/* The account pages (src/account/account-pages.ts), in starsyncstudio.com's look:
   its colours, its fonts (Latin subsets, served from here) and its square boxes
   with round keys. */

@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('anton.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('schibsted-grotesk.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #F2EEE5;
  --paper-2: #EBE6DA;
  --ink: #141412;
  --muted: #5E5B54;
  --rule: rgba(20, 20, 18, .18);
  --red: #D8111F;
  /* Small red text on the paper and the card: #D8111F is 4.2:1 on --paper-2,
     under the 4.5:1 small text needs; this is 5.4:1 there. Keys and big type keep --red. */
  --red-text: #B80F1A;
  --foot-ink: #A8A49B;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #FF2233; color: #fff; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-text); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
main:focus { outline: none; }

.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { top: 12px; color: var(--paper); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }

.top { border-bottom: 1px solid var(--ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { display: block; width: 30px; height: 30px; }
.brand > span { font-family: 'Anton', Impact, sans-serif; font-size: 22px; letter-spacing: .02em; line-height: 1; }
.brand .red { color: var(--red); }
.top .back { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.top .back:hover { color: var(--red-text); }

main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: clamp(28px, 6vw, 72px) 16px; }
.card { width: 100%; max-width: 500px; background: var(--paper-2); border: 1px solid var(--ink); padding: clamp(22px, 5vw, 40px); }

.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--red-text); font-weight: 600; margin: 0 0 10px; }
h1 {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(38px, 10vw, 56px);
  line-height: .95;
  letter-spacing: .004em;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
h1:focus { outline: none; }
h2 { font-family: 'Anton', Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: 22px; line-height: 1.1; letter-spacing: .01em; margin: 0 0 12px; }
p { margin: 0 0 14px; }
.lede { color: var(--muted); margin-bottom: 26px; }
.note { font-size: 13.5px; color: var(--muted); }
.switch { margin: 22px 0 6px; }

.field { margin: 0 0 20px; }
.field label { display: block; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.optional { text-transform: none; letter-spacing: 0; }
.text {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 10px 0;
  margin-top: 2px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.text:focus { outline: none; border-bottom-color: var(--red); box-shadow: 0 2px 0 var(--red); }
.text[aria-invalid="true"] { border-bottom-color: var(--red); }
.hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
.error { font-size: 14px; color: var(--red-text); font-weight: 500; margin: 6px 0 0; }
.form-error { margin: 0 0 16px; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 420px) { .pair { grid-template-columns: 1fr; } }

.check { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; margin: 0 0 14px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.check label { font-size: 15px; line-height: 1.5; }
.check .error { grid-column: 2; margin-top: 0; }
form .check:last-of-type { margin-bottom: 22px; }
.check.show-password { margin-top: -8px; }
.check.show-password label { font-size: 14px; color: var(--muted); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--red); color: #fff; }
.button.red { background: var(--red); color: #fff; }
.button.red:hover { background: var(--ink); color: var(--paper); }
.button.ghost { min-height: 36px; padding: 6px 16px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-size: 14px; }
.button.ghost:hover { background: var(--ink); color: var(--paper); }
.button[disabled] { opacity: .6; cursor: default; }
.button[disabled]:hover { background: var(--ink); color: var(--paper); }
.button.red[disabled]:hover { background: var(--red); color: #fff; }
.wide { width: 100%; }

.steps { margin: 0 0 24px; padding-left: 22px; }
.steps li { margin: 0 0 8px; padding-left: 4px; }
.steps li::marker { color: var(--red-text); font-weight: 700; font-variant-numeric: normal; }
#done h2 { margin-top: 24px; }

.who { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.who strong { color: var(--ink); overflow-wrap: anywhere; }
.facts { margin: 6px 0 22px; border-top: 1px solid var(--ink); }
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 420px) {
  .facts > div { display: block; }
  .facts dd { text-align: left; margin-top: 2px; }
}
.notice { border-left: 3px solid var(--red); padding: 2px 0 2px 12px; }
.tester { font-weight: 600; }
#upgrade-block, #manage-block { margin-top: 6px; }
#upgrade-block .note, #manage-block .note { margin: 10px 0 0; }
#manage-block { margin-top: 18px; }
.section { border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 26px; }
.inline { display: flex; gap: 0 14px; align-items: flex-start; flex-wrap: wrap; }
.inline .field { flex: 1 1 200px; margin-bottom: 8px; }
.inline .button { margin-top: 22px; }

footer { background: var(--ink); color: var(--foot-ink); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 24px; }
footer a { color: var(--foot-ink); text-decoration: none; }
footer a:hover { color: #FF2233; }
footer a:focus-visible { outline-color: #FF2233; }
footer nav { display: flex; gap: 8px 18px; flex-wrap: wrap; }
/* The trademark line: its own row under the links, smaller and quieter. */
footer .tm { flex-basis: 100%; margin: 0; font-size: 12.5px; line-height: 1.5; opacity: .7; }

/* The feedback page (/account/feedback): the kind, the note, the reward. */
.choice { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.choice legend { padding: 0; margin: 0 0 10px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
form .choice .check, form .choice .check:last-of-type { margin-bottom: 8px; }
textarea.text {
  border: 1.5px solid var(--ink);
  padding: 10px 12px;
  margin-top: 6px;
  min-height: 170px;
  resize: vertical;
  font-size: 16px;
  line-height: 1.55;
}
textarea.text:focus { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
textarea.text[aria-invalid="true"] { border-color: var(--red); }
.check .hint { grid-column: 2; margin: 0; }
.reward-line { border-left: 3px solid var(--ink); padding: 2px 0 2px 12px; margin-bottom: 22px; }
.reward { border: 1px solid var(--ink); background: var(--paper); padding: 18px 20px; margin: 6px 0 22px; }
.reward-label { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
/* One line down to a 320 px phone: a code split at a dash reads as two. */
.reward-code { font-size: clamp(18px, 5.6vw, 30px); font-weight: 700; letter-spacing: .06em; line-height: 1.2; margin: 0 0 10px; white-space: nowrap; user-select: all; }
.reward-what { font-weight: 600; margin: 0 0 6px; }
.reward .note { margin: 0; }
.actions { display: grid; gap: 12px; margin-top: 8px; }

/* The invite link page (/join/<token>, src/invite/join-page.ts). */
#open-app { margin: 0 0 12px; }
.open-note { margin-bottom: 18px; }
.copy-row { display: flex; gap: 0 12px; align-items: flex-end; }
.copy-row .field { flex: 1 1 auto; min-width: 0; margin-bottom: 8px; }
.copy-row .text { font-size: 15px; text-overflow: ellipsis; }
.copy-row .button { flex: none; margin-bottom: 10px; }
/* Headings the scripts move the focus to, for screen readers; no ring for a mouse. */
h2[tabindex="-1"]:focus { outline: none; }
#join-button, #joined-open { margin-top: 4px; }
#back-to-invite { margin-bottom: 12px; }

/* The invite page's people: who invited you and who is in the project. */
.people { margin: -8px 0 26px; }
.people h2 { font-family: inherit; font-size: 12.5px; letter-spacing: .12em; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.people ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.people .face { flex: none; width: 40px; height: 40px; border: 1px solid var(--ink); background: var(--paper); object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; color: var(--ink); }
.people .person { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.people .person strong { overflow-wrap: anywhere; }
.people .role { font-size: 13px; color: var(--muted); }
.people .here { flex: none; font-size: 13px; font-weight: 500; color: var(--red-text); }
.people .note { margin: 8px 0 0; }
