/* AgeBate Verify tokens, matched to agebate.com (near-black, off-white, orange accent; Geist + Instrument Serif).
   Logo path is /brand/logo.svg (AgeBate Verify lockup). Legacy variable names
   (--navy, --teal, ...) are kept so existing stylesheets keep working; they now carry AgeBate values. */
:root {
  --bg: #0A0A0A;
  --raise: #121211;
  --text: #F5F3EE;
  --orange: #FF4F1F;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: Geist, "Segoe UI", Helvetica, Arial, sans-serif;

  --navy: var(--bg);
  --card: var(--raise);
  --input: #161615;
  --ink: var(--text);
  --muted: #A3A39E;
  --line: rgba(245, 243, 238, .16);
  --teal: var(--orange);
  --teal-ink: #0A0A0A;
  --focus: var(--orange);
  --fail: #E8A598;
  --accent: var(--text);
  --accent-ink: #0A0A0A;
  --radius: 2px;
  --pad: 0.95rem;
  --brand-logo: url(/brand/logo.svg);
  --brand-logo-on-light: url(/brand/logo-lockup-on-white.svg);
  --brand-mark: url(/brand/logo-mark.svg);
  color-scheme: dark;
}

@font-face {
  font-family: Geist;
  src: url(/brand/fonts/Geist-latin-ext-wght.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: Geist;
  src: url(/brand/fonts/Geist-latin-wght.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Instrument Serif";
  src: url(/brand/fonts/InstrumentSerif-latin-400.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--text); overflow-wrap: anywhere; text-underline-offset: .18em; }
a:hover { color: var(--orange); text-decoration-thickness: 2px; }

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-logo {
  display: block;
  width: 12rem;
  height: auto;
  max-width: 100%;
}
.wordmark { font-weight: 700; letter-spacing: -.03em; font-size: 1.08rem; color: var(--ink); text-decoration: none; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0.85rem 0 0;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--orange); flex: none; }
.step {
  color: var(--teal);
  margin: 1.15rem 0 .35rem;
  font-size: .8rem;
  font-weight: 650;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: .3rem 0 .4rem;
}
h2 { font-size: .95rem; margin: 0 0 .4rem; font-weight: 650; }
.lede { margin: 0 0 .9rem; color: var(--muted); }
.intro { margin: 0 0 1rem; color: var(--muted); font-size: 1.1rem; }
.note { margin: 0 0 1.2rem; color: var(--muted); }
.tip, .capture-foot, .muted, .source, .placeholder { color: var(--muted); font-size: .88rem; }
.source, .placeholder, .capture-foot { font-size: .75rem; }
.muted { font-size: .9rem; }

fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 650; margin-bottom: .55rem; }

.method {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .65rem .8rem;
  margin: 0 0 .4rem;
  cursor: pointer;
}
.method.selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.method input[type=radio] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin: .2rem 0 0;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  display: inline-block;
}
.method.selected input[type=radio],
.method input[type=radio]:checked {
  border-color: var(--teal);
  background: radial-gradient(circle at center, var(--teal) 0 5px, transparent 6px);
}
.method strong { display: block; font-weight: 650; }
.method em { display: block; font-style: normal; color: var(--muted); font-size: .88rem; margin-top: .2rem; }

.storage {
  background: var(--card);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  margin: .2rem 0 .6rem;
}
.storage ul { margin: 0; padding: 0 0 0 1.1rem; }
.storage li { margin: 0 0 .35rem; }

.consent, .check-row {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  margin: .1rem 0 .8rem;
  cursor: pointer;
  min-height: 44px;
}
.consent input[type=checkbox],
.check-row input[type=checkbox],
label.consent input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .15rem;
  border: 2px solid var(--muted);
  border-radius: 4px;
  background: transparent;
  display: inline-block;
}
.consent input[type=checkbox]:checked,
.check-row input[type=checkbox]:checked {
  border-color: var(--teal);
  background-color: var(--teal);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='%230A0A0A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2 6.2 4.8 9 10 3.2'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

.field { display: block; margin: .65rem 0; }
.field-label, label.field { font-weight: 500; }
input[type=text],
input[type=password],
input[type=email],
input[type=url],
input[type=search],
input:not([type]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: .35rem;
  padding: .7rem .875rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--ink);
}
textarea { min-height: 6rem; resize: vertical; }
input[type=text]:focus-visible,
input[type=password]:focus-visible,
input[type=email]:focus-visible,
input[type=url]:focus-visible,
input[type=search]:focus-visible,
input:not([type]):focus-visible,
select:focus-visible,
textarea:focus-visible { border-color: var(--teal); }

.primary, .secondary, button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 650;
  padding: .7rem 1rem;
  text-decoration: none;
  box-sizing: border-box;
}
button:not(.secondary):not(.flash):not(.text-action),
.primary, a.primary {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
}
.primary:hover, button:not(.secondary):not(.flash):not(.text-action):hover { color: var(--accent-ink); background: var(--orange); }
.secondary, button.secondary, a.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.secondary:hover, a.secondary:hover { color: var(--ink); }
button:disabled, .primary:disabled, .secondary:disabled { opacity: .55; cursor: wait; }

.primary:focus-visible,
.secondary:focus-visible,
.flash:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.actions, .capture-actions, .toolbar, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.actions { flex-direction: column; }
.capture-actions { margin-top: .85rem; }
.capture-actions .primary,
.capture-actions .secondary,
.capture-actions button,
.button-row .primary,
.button-row .secondary,
.button-row button,
.toolbar button {
  width: auto;
  flex: 1 1 auto;
  min-width: 44%;
}
.toolbar { align-items: center; justify-content: space-between; }
.toolbar button, .toolbar .secondary { min-width: 0; width: auto; flex: 0 0 auto; }

.flash {
  min-height: 44px;
  width: auto;
  padding: .55rem .85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  align-self: start;
}

footer, .site-links {
  margin-top: auto;
  padding-top: .55rem;
  border-top: 1px solid var(--line);
}
footer nav, .site-links nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
}
footer a, .site-links a { color: var(--muted); text-decoration: none; font-size: .88rem; }
footer a:hover, .site-links a:hover { color: var(--ink); }

.result { padding-top: 2.2rem; }
.result-mark {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--teal);
  border: 1px solid var(--line);
  border-radius: 1rem;
  margin-bottom: 1.1rem;
}
.result-mark.fail { color: var(--fail); }
.result-mark svg { width: 1.85rem; height: 1.85rem; }
.result h1 { font-size: 2.05rem; }
.result .lede { font-size: 1.2rem; color: var(--ink); margin-bottom: 1rem; }

.waiting { padding-top: 2.4rem; text-align: left; }
.spinner {
  width: 1.6rem;
  height: 1.6rem;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 0 1.1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--teal); }
}

.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 36vh;
  overflow: hidden;
  border-radius: 1rem;
  background: #050505;
  border: 1px solid var(--line);
  margin: .85rem 0 .5rem;
}
.card-guide {
  position: absolute;
  width: 78%;
  max-height: 80%;
  aspect-ratio: 1.586;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px dashed var(--orange);
  border-radius: .6rem;
  pointer-events: none;
}
.processing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  background: rgba(10, 10, 10, .92);
  font-weight: 650;
  gap: .8rem;
}
.processing .spinner { margin: 0 auto .2rem; }
.status-ok {
  border: 1px solid rgba(255, 79, 31, .45);
  background: #1A0F0B;
  color: var(--text);
  border-radius: .7rem;
  padding: .65rem .8rem;
  font-weight: 650;
  margin: .6rem 0 0;
}

.screen, main.screen {
  min-height: 100vh;
  padding: var(--pad) 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
}
.eyebrow-badge {
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}
.site-header, .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.panel, details, .card-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}
summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
code { overflow-wrap: anywhere; font-size: .9rem; }
ul.plain, .item-list { list-style: none; padding: 0; margin: 0; }
.item-list li, ul.plain li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}
[role=status]:empty:not(.spinner) { display: none; }
.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;
}

@media (min-width: 900px) {
  body.flow, body.desktop { display: grid; place-items: start center; }
  body.flow main.screen, body.desktop main.screen, main.narrow {
    width: min(36rem, calc(100% - 4rem));
    min-height: auto;
    margin: 1.6rem auto 1.2rem;
    padding: 0 0 1rem;
    background: var(--navy);
  }
  body.flow h1, body.desktop h1 { font-size: 2.15rem; }
}
