/* The waitlist page and its admin view: the landing page's theme
   (../agent-fingerprint-landing-stage/public/styles.css): the same Blockaid tokens, exact values,
   in light and dark, and dark follows the system (prefers-color-scheme) as it does there; the
   landing has no theme switch, so neither does this. test/worker.test.mjs keeps the shared tokens
   equal to the landing's (the two Workers deploy apart, so the file can't be shared). Orange only
   for the one primary action and the focus ring. Fira Mono is self-hosted (public/fonts, OFL). */

@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/fira-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('/fonts/fira-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  /* Palette (exact brand values). */
  --bk-accent: #ff4500;
  --bk-accent-light: #fd9c78;
  --bk-accent-pale: #fbd6c8;
  --bk-accent-wash: #fff7f4;
  --bk-text: #232323;
  --bk-text-light: #4f4f4f;
  --bk-white: #ffffff;
  --bk-gray: #d3d3d3;
  --bk-stroke: #dedede;

  /* Light theme (the landing's :root). */
  --surface: var(--bk-white);
  --surface-raised: var(--bk-white);
  --surface-sunken: #f7f7f7;
  --surface-hover: #efefef;
  --text: var(--bk-text);
  --text-muted: var(--bk-text-light);
  --stroke: var(--bk-stroke);
  --stroke-strong: #8c8c8c; /* 3.3:1 on white: control edges */
  --accent: var(--bk-accent);
  --accent-text: #c13b0a; /* links: 5.4:1 on white */
  --focus: var(--bk-accent);

  /* This page's own. */
  --error: #b3261e;
  --placeholder: #767676; /* 4.5:1 on white */
  --field: var(--bk-white);
  --font: 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --mono: 'Fira Mono', ui-monospace, 'Courier New', monospace;
  --radius: 12px;
  color-scheme: light;
}

/* Dark (the landing's set): the brand's #232323 page, raised surfaces lighter than it. */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: var(--bk-text);
    --surface-raised: #2c2c2c;
    --surface-sunken: #1b1b1b;
    --surface-hover: #3a3a3a;
    --text: var(--bk-white);
    --text-muted: var(--bk-gray);
    --stroke: #3d3d3d;
    --stroke-strong: #8a8a8a;
    --accent: var(--bk-accent);
    --accent-text: var(--bk-accent-light);
    --focus: var(--bk-accent-light);
    --error: #ffb4ab; /* 9:1 on #2c2c2c */
    --placeholder: #a3a3a3; /* 5.6:1 on #1b1b1b */
    --field: #1b1b1b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The landing page's own container (its styles.css: 74rem, with a gutter of 1rem, 1.5rem from 40rem
   and 3rem from 64rem), so the wordmark and the page's edges stay put between the two sites. */
.container { max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); --gutter: 1rem; }
@media (min-width: 40rem) { .container { --gutter: 1.5rem; } }
@media (min-width: 64rem) { .container { --gutter: 3rem; } }
.container.wide { max-width: 1400px; }

/* Nav: the Blockaid wordmark, top-left (779 x 154, scaled by height). */
.nav { border-bottom: 1px solid var(--stroke); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
/* The header's link is a press target: at least 44px tall (it was 24px, 20px on a phone). */
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.logo { height: 24px; width: auto; display: block; }
.logo path { fill: var(--text); }
.nav-link { font-family: var(--mono); font-size: 13px; color: var(--text-muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.nav-link:hover { color: var(--text); text-decoration: underline; }
/* The header's link to wtfismyagent.sh, across from the wordmark: a 44px press target too. */
.site-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap; }
.site-link:hover { text-decoration: underline; }

/* The page: the pitch on the left, the form card on the right. */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 64px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 64px;
}
h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 20px; }
.intro { padding-top: 24px; }
.intro h1 { font-size: clamp(48px, 8vw, 88px); line-height: 1; letter-spacing: -0.02em; margin-bottom: 24px; }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--text-muted); margin: 0; max-width: 22em; }

.card {
  background: var(--surface-raised);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px;
}
.card h2 { font-size: 24px; font-weight: 500; margin: 0; }

/* The form. */
.field { margin-bottom: 18px; }
label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.optional { font-family: var(--mono); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-left: 6px; }
.hint { font-size: 13px; color: var(--text-muted); margin: -2px 0 6px; }
input, textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 16px; /* no zoom on focus in iOS Safari */
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--stroke-strong);
  border-radius: 8px;
  padding: 10px 12px;
}
textarea { resize: vertical; min-height: 96px; }
::placeholder { color: var(--placeholder); opacity: 1; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
[aria-invalid='true'] { border-color: var(--error); }
.error { color: var(--error); font-size: 14px; margin: 6px 0 0; }
.form-error { margin: 0 0 16px; }
/* The honeypot: off-screen for people, still in the form for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 4px 0 18px; min-height: 65px; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--bk-white);
  background: var(--bk-accent);
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { color: var(--bk-white); opacity: 0.92; text-decoration: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
/* The landing's primary button size: large bold text keeps white on the orange within WCAG AA. */
#submit { width: 100%; font-size: 19px; }
.btn-quiet { color: var(--text); background: var(--surface-raised); border: 1px solid var(--stroke-strong); font-weight: 500; }
.btn-quiet:hover { color: var(--text); background: var(--surface-hover); }
.fineprint { font-size: 13px; color: var(--text-muted); margin: 12px 0 0; }

.success:focus { outline: none; }

/* The footer, as the landing page's: the wordmark, whose product it is, the copyright line. */
.footer { border-top: 1px solid var(--stroke); color: var(--text-muted); }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding-top: 40px; padding-bottom: 40px; }
.footer p { margin: 0; }
.footer .logo { height: 16px; }
/* The footer's wordmark link: its 44px target reaches past the wordmark without moving the lines around it. */
.footer .brand { margin-block: -14px; }
.footer .copyright { font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; }
  .intro { padding-top: 0; }
}
@media (max-width: 480px) {
  .card { padding: 24px 20px; }
  .nav-inner { height: 60px; }
  .logo { height: 20px; }
}

/* The admin view. */
.admin main { padding-top: 40px; padding-bottom: 40px; }
.admin h1 { font-size: 28px; margin-bottom: 24px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 420px; }
.search input { flex: 1 1 260px; width: auto; }
.search .btn { padding: 10px 18px; }
.clear { font-size: 14px; }
.label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin: 0 0 8px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--stroke); }
th { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); background: var(--surface-sunken); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.use-case { min-width: 280px; max-width: 520px; white-space: pre-wrap; overflow-wrap: anywhere; }
td.nowrap, .nowrap { white-space: nowrap; }
td.empty { text-align: center; color: var(--text-muted); padding: 40px 12px; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: flex-end; margin-top: 16px; font-size: 14px; }
.pager [aria-disabled='true'] { color: var(--stroke-strong); }

/* ---------- The line: this page's own animation ----------
   A waitlist is a line, so the page shows one: blank entries that keep moving up a place, for
   good, one of them (in the accent) the visitor's. Nothing of the landing page's motion is here
   (the owner, 2026-11-30: "dont use the same animation in the waitlist page"): no grid, no rise,
   no wall. CSS only, so it is there without JavaScript; transform only; no pause or replay
   control. Shapes, not words: it names nobody and counts nothing. */
.line {
  --row: 56px;
  --gap: 12px;
  --step: calc(var(--row) + var(--gap));
  /* Four places in view; the rows slide under a soft edge at the top and the foot. */
  height: calc(var(--step) * 4);
  max-width: 22em;
  margin-top: 40px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, black 22%, black 78%, transparent);
}
.line-track {
  display: grid;
  gap: var(--gap);
  /* One place at a time: a rest, then everyone moves up one. Six moves bring the copy to where
     the first set began, so it loops without a seam. */
  animation: line-up 15s infinite;
}
.line-row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--row);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: 0 16px;
}
.line-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--stroke); }
.line-bars { display: grid; gap: 7px; flex: 1; }
.line-bar { height: 8px; width: 62%; border-radius: 4px; background: var(--stroke); }
.line-bar--short { width: 36%; opacity: 0.7; }
/* The visitor's place: the accent's ring and dot, and a slow breath. */
.line-row--you { border-color: var(--bk-accent); box-shadow: 0 0 0 3px rgb(255 69 0 / 0.12); }
.line-row--you .line-dot { background: var(--bk-accent); animation: line-breath 2.5s ease-in-out infinite; }
.line-row--you .line-bar { background: var(--bk-accent-light); }
@keyframes line-up {
  0%, 9% { transform: translateY(0); animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1); }
  16.666%, 25.666% { transform: translateY(calc(var(--step) * -1)); animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1); }
  33.333%, 42.333% { transform: translateY(calc(var(--step) * -2)); animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1); }
  50%, 59% { transform: translateY(calc(var(--step) * -3)); animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1); }
  66.666%, 75.666% { transform: translateY(calc(var(--step) * -4)); animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1); }
  83.333%, 92.333% { transform: translateY(calc(var(--step) * -5)); animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1); }
  100% { transform: translateY(calc(var(--step) * -6)); }
}
@keyframes line-breath {
  50% { transform: scale(0.72); opacity: 0.7; }
}
/* Beside the form the line has the column's height to itself; above it, on a narrow screen, it is
   three places tall. */
@media (max-width: 860px) {
  .line { --row: 48px; --gap: 10px; height: calc(var(--step) * 3); margin-top: 28px; }
}
/* Still under reduced motion: the line as it stands, nothing moving (no animation, no transition
   anywhere on the page). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
