/* Server-rendered pages people see (sign-up, log-in, code, legal, report form): the editor's "dark studio"
   (docs/redesign/DESIGN.md). Staff pages keep pages.css. Tokens match editor/src/styles.css. */

@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations");
  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: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-tight-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  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: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #121318; --surface: #1b1c22; --frame: #202128; --field: #18191e;
  --ink: #f3eee6; --muted: #a29d95; --faint: #8a857e; --line: #76726c; --line-hover: #8f8a83; --rule: #2b2c33;
  --glass: rgb(255 255 255 / 0.12); --glass-strong: rgb(255 255 255 / 0.2);
  --accent: #f5a04a; --accent-ink: #f7b26a; --light: 245 160 74;
  --error: #ff9b8a; --ok: #9fd4a8;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --r-pill: 999px; --r-field: 10px; --r-frame: 14px; --tap: 44px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
  accent-color: var(--accent);
  scrollbar-color: #3a3b43 var(--ground);
}
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; background: var(--ground); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--ground); color: var(--ink);
  font: 400 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-wrap: anywhere; }
::selection { background: rgb(var(--light) / 0.32); color: #fff; }
a { color: var(--ink); text-decoration-color: rgb(243 238 230 / 0.4); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 10; padding: 0.5rem 0.75rem; background: var(--surface); color: var(--ink); border-radius: var(--r-field); }

/* the bar and its glowing line */
.top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem;
  padding: 0 clamp(1rem, 4vw, 1.5rem); }
.top::after { content: ""; position: absolute; inset: auto 0 -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--light) / 0) 0%, rgb(var(--light) / 0.35) 18%, rgb(255 214 168 / 0.95) 50%,
    rgb(var(--light) / 0.35) 82%, rgb(var(--light) / 0) 100%);
  box-shadow: 0 0 10px 1px rgb(var(--light) / 0.4), 0 0 28px 2px rgb(var(--light) / 0.16); }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink); font-weight: 700; font-size: 1.0625rem;
  letter-spacing: -0.03em; text-decoration: none; }
.brand:hover { color: var(--ink); }

.page { flex: 1; width: 100%; max-width: 44rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
.page.wide { max-width: 72rem; }
.foot { width: 100%; max-width: 44rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--rule); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

h1 { font-size: 1.75rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.035em; margin: 0 0 0.75rem; text-wrap: balance; }
h2 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; margin: 2rem 0 0.75rem; }
p { margin: 0 0 1rem; }

.check a { color: var(--ink); }
.check a:hover { color: var(--accent-ink); }

/* sign-up, log-in, code: one narrow column, one big question, one lit button */
.auth .page { max-width: 30rem; padding-top: clamp(2.5rem, 9vh, 5.5rem); }
.auth h1 { font-size: clamp(2.25rem, 9vw, 3.25rem); line-height: 1.02; letter-spacing: -0.04em; margin-bottom: 1rem; }
.lead { color: var(--muted); font-size: 1.0625rem; margin: 0 0 2rem; }
.after { color: var(--muted); font-size: 0.875rem; margin: 0.75rem 0 0; }
.switch { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--muted); }
.switch a { color: var(--ink); font-weight: 600; }
.switch a:hover { color: var(--accent-ink); }

/* the report form: the same column, a little wider for the description */
.form-page .page { max-width: 36rem; padding-top: clamp(2rem, 6vh, 4rem); }
.form-page h1 { font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.05; letter-spacing: -0.04em; }
.form-page form .btn { width: 100%; }
@media (min-width: 600px) { .form-page form .btn { width: auto; } }

/* legal pages: for reading; a calm measure, more air between sections */
.reading .page { max-width: 44rem; padding-top: clamp(2rem, 6vh, 4rem); }
.reading h1 { font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 1.5rem; }
.reading h2 { margin-top: 2.5rem; }
.reading p, .reading li { max-width: 68ch; line-height: 1.65; }
.reading ul { padding-left: 1.2rem; }
.reading li { margin-bottom: 0.4rem; }
.reading li::marker { color: var(--muted); }

/* fields */
.field { margin: 0 0 1.25rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.field label.check { display: flex; margin-bottom: 0; }
input[type=email], input[type=text], input:not([type]), input[inputmode], select, textarea {
  width: 100%; min-height: var(--tap); padding: 0.6rem 0.8rem; font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--r-field); transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid transparent; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(var(--light) / 0.35); }
textarea { min-height: 8rem; line-height: 1.55; }
.has-error input { border-color: var(--error); }
.check { display: flex; gap: 0.75rem; align-items: flex-start; min-height: var(--tap); padding: 0.55rem 0; line-height: 1.5; font-weight: 500 !important; cursor: pointer; }
.field .check { margin: 0; }
/* Checkboxes drawn in the studio's materials, aligned to the first line of their label. */
.check input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; font: inherit; flex: none; width: 1.25rem; height: 1.25rem;
  margin: calc((1lh - 1.25rem) / 2) 0 0; border: 1.5px solid var(--line); border-radius: 5px; background: var(--field); cursor: pointer;
  transition: background 150ms var(--ease-out), border-color 150ms var(--ease-out); }
.check input[type=checkbox]:hover { border-color: var(--line-hover); }
.check input[type=checkbox]:checked { background: var(--ink); border-color: var(--ink); }
.check input[type=checkbox]:checked::after { content: ""; position: absolute; left: 0.36rem; top: 0.12rem; width: 0.32rem; height: 0.62rem;
  border: solid var(--ground); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check input[type=checkbox]:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.has-error .check input[type=checkbox] { border-color: var(--error); }
.check input[type=radio] { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 1.25rem; height: 1.25rem; font: inherit;
  margin: calc((1lh - 1.25rem) / 2) 0 0; border: 1.5px solid var(--line); border-radius: 50%; background: var(--field); cursor: pointer; }
.check input[type=radio]:checked { border-color: var(--ink); }
.check input[type=radio]:checked::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); }
.check input[type=radio]:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
fieldset { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 0.4rem; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.code-input { font: 600 1.75rem var(--mono); letter-spacing: 0.3em; max-width: 14rem; text-align: center; }

/* the one action: the lit outline pill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3.25rem; min-width: var(--tap);
  padding: 0 1.6rem; font: 600 1.0625rem/1.2 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  color: var(--accent-ink); background: rgb(18 19 24 / 0.55); border: 1.5px solid rgb(var(--light) / 0.9); border-radius: var(--r-pill);
  transition: background 220ms var(--ease-out), color 220ms var(--ease-out), box-shadow 320ms var(--ease-out); }
.btn:hover { background: rgb(var(--light) / 0.14); color: #ffd7a8;
  box-shadow: 0 0.6rem 2rem -0.6rem rgb(var(--light) / 0.55), inset 0 0 1.2rem rgb(var(--light) / 0.12); }
.btn.secondary { color: var(--ink); border: 1px solid var(--glass-strong); background: rgb(255 255 255 / 0.03); }
.btn.secondary:hover { border-color: var(--line); background: rgb(255 255 255 / 0.07); box-shadow: none; }
.btn.danger { color: var(--error); border: 1px solid rgb(255 155 138 / 0.4); background: none; }
.auth form .btn { width: 100%; margin-top: 0.5rem; }
@media (min-width: 600px) { .auth form .btn { width: auto; } }

.help { color: var(--muted); font-size: 0.875rem; margin: 0.35rem 0 0; }
.error { color: var(--error); }
.ok { color: var(--ok); }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 0.875rem; margin-top: 1.5rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.card { background: var(--surface); border: 1px solid var(--glass); border-radius: var(--r-frame); padding: 1rem; margin: 0 0 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
pre.legal { white-space: pre-wrap; font: inherit; max-width: 68ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; }
}
