/* Catptcha tokens (locked)
   bg #EEF1F6 · surface #FFFFFF · line #D5DBE5 · ink #121826 · muted #5B6475
   blue #1E5BFF (the only accent) · blue-ink #0F3BC4 · fail #D93636 · pass #18A058
   type: Bricolage Grotesque 800 (display) + Onest 400/500/700 (UI)
   spacing 8/16/24/40/64/96 · radius 4 (widget, tiles) / 8 (buttons, boxes)
   motion: 3D tile flip 420ms, everything else 180ms ease-out; reduced motion = instant */

@font-face { font-family: "Bricolage Grotesque"; src: url("assets/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("assets/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Onest"; src: url("assets/fonts/onest-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Onest"; src: url("assets/fonts/onest-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Onest"; src: url("assets/fonts/onest-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --line: #D5DBE5;
  --ink: #121826;
  --muted: #5B6475;
  --blue: #1E5BFF;
  --blue-ink: #0F3BC4;
  --blue-soft: #E6EDFF;
  --fail: #D93636;
  --fail-soft: #FDECEC;
  --pass: #18A058;
  --pass-soft: #E5F6EC;
  --display: "Bricolage Grotesque", "Onest", sans-serif;
  --ui: "Onest", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- session bar ---------- */
.session { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.session-in { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 800 20px/1 var(--display); letter-spacing: -.02em; }
.brand img { border-radius: 50%; border: 2px solid var(--ink); }
.token { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.token-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.token-val { font: 500 13px/1 var(--ui); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; transition: border-color .18s var(--ease); }
.token-val:hover { border-color: var(--blue); }
.xlink { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--blue); padding: 8px 12px; border-radius: 8px; transition: background .18s var(--ease); }
.xlink:hover { background: var(--blue-soft); }
.session-meta { max-width: 1120px; margin: 0 auto; padding: 0 24px 8px; font-size: 11px; color: var(--muted); letter-spacing: .02em; }

/* ---------- shared ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.step-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); text-transform: lowercase; margin-bottom: 16px; }
.step-tag span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 12px/1 var(--ui); }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: .98; }
h1 { font-size: clamp(44px, 6.4vw, 84px); margin-bottom: 24px; }
h2 { font-size: clamp(32px, 4.2vw, 52px); margin-bottom: 16px; }
.lede { font-size: 19px; color: var(--muted); max-width: 30em; margin-bottom: 24px; }
.sub { color: var(--muted); margin-bottom: 24px; max-width: 40em; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 8px; font: 700 15px/1 var(--ui); text-decoration: none; transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-ink); }
.btn-line { background: var(--surface); border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ca-box { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 16px; max-width: 460px; }
.ca-label { display: grid; place-items: center; padding: 0 16px; background: var(--bg); border-right: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ca-val { flex: 1; min-width: 0; text-align: left; padding: 14px 16px; font: 500 14px/1.2 var(--ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-val:hover { color: var(--blue); }
.is-soon .ca-val, .is-soon .token-val { color: var(--muted); font-style: italic; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: auto 1fr; column-gap: 64px; align-items: start; padding: 64px 0 96px; }
.hero-copy { padding-top: 24px; grid-column: 1; grid-row: 1; }
.hero-chrome { grid-column: 1; grid-row: 2; }
.hero-widget { grid-column: 2; grid-row: 1 / span 2; scroll-margin-top: 96px; }
.fails-line { margin-top: 24px; font-size: 13px; color: var(--muted); }
.fails-line b { color: var(--ink); font-weight: 700; }

.queue { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px 16px; font-size: 13px; }
.queue-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.queue-row + .queue-row { border-top: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-you { background: var(--muted); }
.dot-cat { background: var(--pass); }
.q-name { font-weight: 500; }
.q-state { margin-left: auto; color: var(--muted); text-align: right; }
.q-state.bad { color: var(--fail); }
.q-state.good { color: var(--pass); }

/* ---------- the widget (light DOM custom element) ---------- */
cat-captcha { scroll-margin-top: 100px; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.nojs { padding: 24px; color: var(--muted); }

.cc-gate { width: 100%; display: flex; align-items: center; gap: 16px; padding: 24px; min-height: 96px; }
.cc-box { width: 32px; height: 32px; flex: none; border: 2px solid #9AA3B2; border-radius: 4px; background: #fff; display: grid; place-items: center; transition: border-color .18s var(--ease); }
.cc-gate:hover .cc-box { border-color: var(--blue); }
.cc-box .spin { width: 24px; height: 24px; border: 3px solid var(--blue-soft); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
.cc-box svg { width: 22px; height: 22px; }
.cc-gate-label { font-weight: 500; font-size: 16px; text-align: left; }
.cc-gate-label small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.cc-mark { margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
.cc-mark img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); }
.cc-mark b { font: 800 11px/1 var(--display); color: var(--ink); letter-spacing: .02em; }

.cc-head { background: var(--blue); color: #fff; padding: 16px 20px 18px; }
.cc-round { font-size: 12px; opacity: .85; margin-bottom: 4px; }
.cc-prompt { font: 400 15px/1.3 var(--ui); }
.cc-prompt b { display: block; font: 800 26px/1.05 var(--display); letter-spacing: -.02em; margin-top: 2px; }
.cc-progress { height: 4px; background: rgba(255,255,255,.25); margin-top: 14px; border-radius: 2px; overflow: hidden; }
.cc-progress i { display: block; height: 100%; background: #fff; width: 0; transition: width .42s var(--ease); }

.cc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; perspective: 900px; }
.cc-tile { position: relative; aspect-ratio: 1; padding: 0; background: none; }
.cc-tile .in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg); transition: transform .42s var(--ease); }
.cc-tile.up .in { transform: rotateY(0deg); }
.cc-tile .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 2px; overflow: hidden; }
.cc-tile .front img { width: 100%; height: 100%; object-fit: cover; transition: transform .18s var(--ease); }
.cc-tile .back { transform: rotateY(180deg); background: var(--blue-soft); display: grid; place-items: center; }
.cc-tile .back::after { content: ""; width: 34%; height: 34%; border-radius: 50%; border: 3px solid #B7C8FF; }
.cc-tile.sel .front img { transform: scale(.84); }
.cc-tile.sel .front { background: var(--blue-soft); }
.cc-tile .tick { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; transform: scale(0); transition: transform .18s var(--ease); z-index: 2; }
.cc-tile.sel .tick { transform: scale(1); }
.cc-tile:disabled { cursor: default; }

.cc-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.cc-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .18s var(--ease), color .18s var(--ease); }
.cc-icon:hover { background: var(--bg); color: var(--ink); }
.cc-icon svg { width: 20px; height: 20px; }
.cc-hint { font-size: 12px; color: var(--muted); flex: 1; min-width: 0; }
.cc-go { background: var(--blue); color: #fff; font: 700 14px/1 var(--ui); letter-spacing: .04em; text-transform: uppercase; padding: 13px 22px; border-radius: 4px; transition: background .18s var(--ease); }
.cc-go:hover { background: var(--blue-ink); }
.cc-go:disabled { background: #9AA3B2; cursor: progress; }

.cc-check { position: absolute; inset: 0; background: rgba(255,255,255,.86); display: grid; place-items: center; align-content: center; gap: 12px; font-size: 14px; color: var(--muted); z-index: 5; }
.cc-check .spin { width: 40px; height: 40px; border: 4px solid var(--blue-soft); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
.cc-body { position: relative; }

.cc-verdict { padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14px; display: grid; gap: 8px; }
.cc-verdict .row { display: flex; gap: 8px; align-items: flex-start; }
.cc-verdict .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; margin-top: 1px; }
.cc-verdict .bad .mark { background: var(--fail); }
.cc-verdict .good .mark { background: var(--pass); }
.cc-verdict .bad { color: var(--ink); }
.cc-verdict .good { color: var(--muted); }

.cc-final { padding: 32px 24px 24px; text-align: center; }
.cc-final .stamp { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--fail-soft); color: var(--fail); display: grid; place-items: center; }
.cc-final .stamp svg { width: 32px; height: 32px; }
.cc-final h3 { font: 800 30px/1.05 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.cc-final p { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.cc-final .stats { display: flex; justify-content: center; gap: 24px; margin: 16px 0 24px; font-size: 12px; color: var(--muted); }
.cc-final .stats b { display: block; font: 800 28px/1 var(--display); color: var(--ink); }
.cc-final .btns { display: grid; gap: 8px; }
.cc-final .btns button { min-height: 48px; border-radius: 4px; font-weight: 700; }
.cc-final .b1 { background: var(--blue); color: #fff; }
.cc-final .b1:hover { background: var(--blue-ink); }
.cc-final .b2 { border: 1px solid var(--line); }
.cc-final .b2:hover { border-color: var(--blue); color: var(--blue); }
.cc-catpass { display: flex; align-items: center; gap: 16px; text-align: left; background: var(--pass-soft); border-radius: 4px; padding: 12px; margin-top: 16px; }
.cc-catpass img { width: 72px; height: 72px; border-radius: 4px; flex: none; }
.cc-catpass b { color: var(--pass); display: block; }
.cc-catpass span { font-size: 13px; color: var(--muted); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes nudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
cat-captcha.shake { animation: nudge .3s var(--ease) 2; }

.cc-preview { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.cc-preview { cursor: pointer; }
.cc-preview .pv { display: block; aspect-ratio: 1; overflow: hidden; }
.cc-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; filter: saturate(.55) brightness(1.04); opacity: .78; }
.cc-preview-cap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.cc-preview-cap b { color: var(--blue); }

/* ---------- blocks ---------- */
.block { padding: 64px 0; border-top: 1px solid var(--line); }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; }
.cmp th, .cmp td { text-align: left; padding: 16px 24px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp thead th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--bg); text-transform: lowercase; }
.cmp tbody th { font-weight: 500; color: var(--muted); width: 36%; }
.cmp td:nth-child(2) { color: var(--ink); font-weight: 500; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill-pass { background: var(--pass-soft); color: var(--pass); }
.pill-fail { background: var(--fail-soft); color: var(--fail); }
.pill-wait { background: var(--bg); color: var(--muted); }

.codes { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.codes li { display: flex; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); font-size: 16px; }
.codes li:nth-child(odd) { border-right: 1px solid var(--line); }
.codes li:nth-last-child(-n+2) { border-bottom: 0; }
.codes code { flex: none; font: 700 12px/1.9 var(--ui); color: var(--fail); background: var(--fail-soft); border-radius: 4px; padding: 0 8px; height: 24px; letter-spacing: .04em; }

.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 8px 0 40px; counter-reset: s; }
.stepper li { position: relative; padding: 0 24px 0 0; font-size: 15px; color: var(--muted); }
.stepper li b { color: var(--ink); display: block; margin-bottom: 4px; }
.stepper .n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--blue); color: var(--blue); font: 800 18px/1 var(--display); background: var(--bg); position: relative; z-index: 1; margin-bottom: 16px; }
.stepper li:not(:last-child)::before { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 2px; background: var(--line); }
.access { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.access .ca-box { margin: 0; flex: 1 1 320px; max-width: none; }

/* ---------- terms ---------- */
.terms { background: var(--surface); border-top: 1px solid var(--line); margin-top: 32px; }
.terms-in { max-width: 1120px; margin: 0 auto; padding: 40px 24px 48px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.terms-head { font-weight: 700; color: var(--ink); font-size: 13px; margin-bottom: 8px; }
.terms-in p + p { margin-top: 16px; }
.terms-foot { display: flex; flex-wrap: wrap; gap: 8px; }
.terms-foot a { color: var(--blue); }

.toast { visibility: hidden; position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; transition: transform .18s var(--ease); z-index: 50; max-width: calc(100vw - 32px); }
.toast.on { visibility: visible; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 32px; padding: 40px 0 64px; }
  .hero-copy, .hero-chrome, .hero-widget { grid-column: 1; grid-row: auto; }
  .hero-copy { padding-top: 0; order: 1; }
  .hero-widget { order: 2; }
  .hero-chrome { order: 3; }
  .hero-copy h1 { margin-bottom: 16px; }
  .hero-widget { max-width: 460px; width: 100%; scroll-margin-top: 16px; }
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .stepper li:nth-child(2)::before { display: none; }
}
@media (max-width: 640px) {
  .session { position: static; }
  cat-captcha { scroll-margin-top: 16px; }
  .session-in { padding: 10px 16px; gap: 12px; }
  .session-meta { padding: 0 16px 8px; }
  .token-label { display: none; }
  .token-val { max-width: 120px; }
  .xlink span { display: none; }
  main { padding: 0 16px; }
  .lede { font-size: 17px; }
  .block { padding: 48px 0; }
  .codes { grid-template-columns: 1fr; }
  .codes li:nth-child(odd) { border-right: 0; }
  .codes li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .codes li { padding: 16px; }
  .cmp th, .cmp td { padding: 12px 14px; font-size: 14px; }
  .stepper { grid-template-columns: 1fr; row-gap: 24px; }
  .stepper li { display: flex; gap: 16px; padding: 0; }
  .stepper li::before { display: none; }
  .stepper .n { margin: 0; flex: none; }
  .access { padding: 16px; }
  .access .actions, .hero-copy .actions { width: 100%; }
  .access .btn { flex: 1 1 auto; }
  .terms-in { padding: 32px 16px 40px; }
  .cc-prompt b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}
