/* Public site (/, /how, /download). Tokens and buttons come from panel.css.
   Calm and exact: flat dark surfaces, thin borders, no coloured glow. */

:root { --surface: #15181e; --surface-hi: #1c2028; --line: rgba(255, 255, 255, .09); --display: "Inter", "Segoe UI Variable Display", "Segoe UI", sans-serif; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body.site { font-size: 15px; overflow-x: hidden; background: #0a0b0e; }

/* Intro splash (home, once per session) — particle "ink draw" of the wordmark on black (site.js). */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #0a0b0e; transition: opacity .5s var(--ease); }
.splash.skip { display: none; }
.splash.done { opacity: 0; visibility: hidden; }
.splash-canvas { width: min(72vw, 460px); height: auto; filter: drop-shadow(0 0 12px rgba(122, 162, 200, .5)); transition: transform .5s var(--ease); }
.splash.done .splash-canvas { transform: scale(1.04); }
/* Hold page reveals while the splash runs, so the hero blur-rises in as the splash leaves. */
.site.pre .reveal { opacity: 0 !important; transform: translateY(24px) !important; filter: blur(10px) !important; }
.site a { color: inherit; }
.wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: 110px 0 0; }
.narrow-sec { width: min(780px, calc(100% - 32px)); }

/* Soft ambient accent glow behind everything — depth, not neon. */
.site-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(62% 48% at 50% -6%, rgba(122, 162, 200, .20), transparent 62%),
    radial-gradient(48% 42% at 86% 6%, rgba(122, 162, 200, .10), transparent 66%);
}
/* Fine grid that fades out downward — texture over the glow. */
.site-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px; opacity: .5;
  -webkit-mask-image: linear-gradient(#000, transparent 75%); mask-image: linear-gradient(#000, transparent 75%);
}

/* ------------------------------------------------------------------ nav */
.site-nav {
  position: sticky; top: 14px; z-index: 20; width: min(1160px, calc(100% - 32px)); margin: 14px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 8px 8px 16px;
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(16, 18, 22, .72));
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 10px 34px -14px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .08); animation: drop-in .45s var(--ease);
}
.site .brand-inline { text-decoration: none; }
/* Page links reuse the panel's tabs and sliding pill (site.js moves it). */
.nav-links { flex: none; }
.nav-links .tab { text-decoration: none; }
.site main.enter { animation: panel-in .45s var(--ease); }
.site main.leaving { animation: fade-out .2s ease-in forwards; }
.site .btn { text-decoration: none; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.btn.big { padding: 12px 20px; font-size: 15px; border-radius: 13px; }
.btn.primary.big { box-shadow: 0 12px 34px -10px rgba(122, 162, 200, .45); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

/* ----------------------------------------------------------------- type */
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.display { margin: 14px 0 0; font: 700 clamp(44px, 6.2vw, 82px)/1.02 var(--display); letter-spacing: -.025em; background: linear-gradient(174deg, #fff 14%, #aeb6c2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.display.sm { font-size: clamp(36px, 4.6vw, 56px); }
.title { margin: 10px 0 0; font: 700 clamp(28px, 3.2vw, 40px)/1.14 var(--display); letter-spacing: -.015em; }
.title.sm { font-size: 26px; margin: 0 0 20px; }
.lead { margin: 22px 0 0; max-width: 560px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.sub { margin: 14px 0 0; max-width: 620px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.footnote { margin: 12px 4px 0; font-size: 12.5px; color: var(--muted); }
.s-head { margin-bottom: 36px; }
.s-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.center-row { justify-content: center; }
.page-head { padding: 80px 0 48px; }
.site h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); text-transform: none; letter-spacing: 0; }
.mini-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* ----------------------------------------------------------------- hero */
.s-hero { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; min-height: calc(100vh - 80px); padding: 40px 0; }
.s-hero > .hero-copy, .s-hero > .app-window { position: relative; z-index: 1; }

/* Faint panel fragments behind the hero. */
.hero-ghosts { position: absolute; inset: -6% -3%; z-index: 0; pointer-events: none; overflow: hidden; }
.ghost { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 12.5px "Cascadia Mono", Consolas, monospace; color: #9aa2ad; opacity: .32; filter: blur(.3px); animation: ghost-float 14s ease-in-out infinite; }
.ghost.chip { padding: 5px 11px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); background: var(--surface-hi); color: var(--muted); opacity: .4; display: inline-flex; align-items: center; gap: 7px; }
.ghost.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.g1 { top: 15%; left: 22%; } .g2 { top: 31%; left: 8%; animation-delay: -3s; } .g3 { top: 72%; left: 17%; animation-delay: -6s; }
.g4 { top: 20%; left: 82%; animation-delay: -2s; } .g5 { top: 85%; left: 42%; animation-delay: -9s; } .g6 { top: 52%; left: 92%; animation-delay: -5s; }
.g7 { top: 63%; left: 78%; animation-delay: -11s; } .g8 { top: 43%; left: 54%; opacity: .14; animation-delay: -7s; }
@keyframes ghost-float { 50% { transform: translate(-50%, calc(-50% - 10px)); } }

/* App window mock, shared by home and /how. */
.app-window { border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .7); overflow: hidden; }
.aw-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); background: var(--surface-hi); }
.aw-ctl { margin-left: auto; display: flex; gap: 6px; }
.aw-ctl i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.aw-body { padding: 22px; display: grid; gap: 14px; }
.aw-phase { margin: 0; font-size: 15px; font-weight: 500; }
.aw-progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.aw-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--text); }
.aw-progress.indeterminate span { width: 30%; animation: indet 1.1s ease-in-out infinite; }
.aw-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.aw-file { margin: 0; font: 12px "Cascadia Mono", Consolas, monospace; color: #6c727b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-verdict, .aw-findings, .aw-sent { display: none; }
#sim .aw-body { min-height: 268px; align-content: start; }
#sim.done .aw-scan { display: none; }
#sim.done .aw-verdict { display: flex; animation: pop-in .35s var(--ease); }
#sim.done .aw-findings { display: grid; animation: fade-in .4s var(--ease) .15s both; }
#sim.done .aw-sent { display: block; animation: fade-in .4s var(--ease) .35s both; }
.aw-verdict { gap: 14px; align-items: center; }
.aw-verdict b { display: block; font-size: 18px; color: var(--danger); }
.aw-verdict span { font-size: 13px; color: var(--muted); }
.v-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(229, 72, 77, .12); color: var(--danger); font-weight: 700; font-size: 18px; }
.aw-findings { list-style: none; margin: 0; padding: 0; gap: 8px; }
.aw-findings li { display: grid; gap: 8px; justify-items: start; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.aw-findings code, .detect code, .pm-result code { font: 12.5px/1.6 "Cascadia Mono", Consolas, monospace; color: #b9c0ca; overflow-wrap: anywhere; }
.aw-sent { margin: 0; font-size: 13px; color: var(--ok); }

/* ---------------------------------------------------------------- stats */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.stats-strip > div { padding: 26px 24px; display: grid; gap: 4px; }
.stats-strip > div + div { border-left: 1px solid var(--line); }
.stats-strip b { font: 600 32px/1.1 "Segoe UI Variable Display", "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stats-strip span { color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- cards */
.detect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.detect, .how-steps li { border-radius: 16px; padding: 24px; border: 1px solid var(--line); background: var(--surface); transition: border-color .25s, transform .3s var(--ease); }
.detect:hover, .how-steps li:hover { border-color: rgba(122, 162, 200, .35); transform: translateY(-3px); box-shadow: 0 16px 36px -22px rgba(122, 162, 200, .5); }
.detect .tag { margin-bottom: 18px; }
.detect p, .how-steps p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.detect code { display: block; margin-top: 18px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.tag.danger { color: var(--danger); background: rgba(229, 72, 77, .1); }
.tag.suspect { color: var(--warn); background: rgba(212, 167, 44, .1); }
.panel-mock { max-width: 680px; margin: 0 auto; }
.panel-mock .aw-body { gap: 10px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.how-steps li { position: relative; }
.step-n { display: block; margin-bottom: 26px; font: 600 13px "Cascadia Mono", Consolas, monospace; color: var(--muted); }

.cta-card { border-radius: 24px; padding: 64px 32px; text-align: center; display: grid; justify-items: center; border: 1px solid var(--line); background: var(--surface); }

/* --------------------------------------------------------------- stepper */
.stepper { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: center; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st-list li {
  position: relative; display: flex; gap: 16px; padding: 16px 18px; border-radius: 14px; cursor: pointer; overflow: hidden;
  border: 1px solid transparent; transition: background .2s, border-color .2s; outline: none;
}
.st-list li:hover { background: rgba(255, 255, 255, .03); }
.st-list li:focus-visible { border-color: var(--border-strong); }
.st-list li.active { background: var(--surface); border-color: var(--line); }
.st-list .st-n { font: 600 13px "Cascadia Mono", Consolas, monospace; color: var(--muted); padding-top: 2px; }
.st-list b { display: block; font-size: 15px; margin-bottom: 3px; }
.st-list span:not(.st-n) { font-size: 13px; color: var(--muted); }
.st-list li:not(.active) b { color: var(--muted); }
.st-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--text); opacity: .5; }
.st-list li.active .st-timer { animation: timer var(--step-ms, 5200ms) linear forwards; }
.stepper.paused .st-timer { animation: none !important; width: 0; }
.st-screens { display: grid; min-height: 380px; align-items: center; }
.st-screen { grid-area: 1 / 1; opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .35s, transform .45s var(--ease); pointer-events: none; }
.st-screen.active { opacity: 1; transform: none; }
.narrow-win { max-width: 420px; margin: 0 auto; width: 100%; }
.center-body { justify-items: center; text-align: center; padding: 34px 22px; }
.aw-title { font-size: 16px; }
.mini-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.mini-input { display: flex; align-items: center; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(0, 0, 0, .22); font-size: 14px; min-height: 40px; }
.caret { width: 1px; height: 16px; background: var(--text); margin-left: 1px; animation: blink 1s steps(1) infinite; }
.code-out { margin-top: 6px; padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); display: grid; justify-items: start; gap: 4px; }
.countdown { font: 13px "Cascadia Mono", Consolas, monospace; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.pin-demo { display: flex; gap: 5px; align-items: center; }
.pin-demo span { display: grid; place-items: center; width: 30px; height: 36px; border-radius: 8px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); font: 600 16px "Cascadia Mono", Consolas, monospace; }
.pin-demo.big span { width: 40px; height: 50px; font-size: 22px; }
.pin-demo em { color: var(--muted); font-style: normal; }
.st-screen.active .pin-demo span { animation: key-in .3s var(--ease) both; }
.st-screen.active .pin-demo span:nth-child(2) { animation-delay: .12s; }
.st-screen.active .pin-demo span:nth-child(3) { animation-delay: .24s; }
.st-screen.active .pin-demo span:nth-child(5) { animation-delay: .36s; }
.st-screen.active .pin-demo span:nth-child(6) { animation-delay: .48s; }
.st-screen.active .pin-demo span:nth-child(7) { animation-delay: .6s; }
.wide-btn { width: 100%; }
.grow { width: 0; }
.st-screen.active .grow { animation: grow 4.6s linear forwards; }
.read-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.read-list li::before { content: "✓"; color: var(--ok); margin-right: 8px; }
.pm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 12px; color: var(--muted); }
.pm-steps span { padding-top: 10px; border-top: 2px solid rgba(255, 255, 255, .1); }
.pm-steps .done { border-color: var(--text); color: var(--text); }
.pm-steps .now { border-color: var(--danger); }
.pm-result { display: grid; gap: 10px; justify-items: start; }
.pm-result b { font-size: 16px; }
.pm-result code { display: block; width: 100%; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.pm-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pm-meta div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
.pm-meta b { font-size: 16px; }
.pm-meta span { font-size: 12px; color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 28px; color: var(--muted); line-height: 1.5; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(79, 163, 106, .55); }
.checklist li::after { content: ""; position: absolute; left: 5px; top: 7px; width: 6px; height: 3px; border-left: 1.5px solid var(--ok); border-bottom: 1.5px solid var(--ok); transform: rotate(-45deg); }

/* -------------------------------------------------------------- download */
.dl-grid { display: grid; grid-template-columns: 420px 1fr; gap: 56px; align-items: start; }
.dl-card { padding: 26px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 18px; }
.dl-file { display: flex; gap: 14px; align-items: center; }
.dl-file b { display: block; font-size: 17px; }
.dl-file span { font-size: 13px; color: var(--muted); }
.btn.wide { width: 100%; }
.code-gate #dl-code { text-transform: uppercase; letter-spacing: .14em; font: 600 16px "Cascadia Mono", Consolas, monospace; text-align: center; }
.gate-msg { margin: 8px 0 0; font-size: 12.5px; }
.btn[aria-disabled="true"], .btn.loading { opacity: .45; pointer-events: none; }
.copy-box.locked { opacity: .5; }
.copy-box.locked code { color: var(--muted); }
.copy-box {
  width: 100%; display: grid; gap: 6px; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .25); transition: border-color .15s;
}
.copy-box:hover { border-color: var(--border-strong); }
.copy-box code { font: 11.5px/1.6 "Cascadia Mono", Consolas, monospace; color: #b9c0ca; overflow-wrap: anywhere; }
.copy-label { font-size: 12px; color: var(--muted); }
.copy-box.copied .copy-label { color: var(--ok); }
.hint code { font: 12px "Cascadia Mono", Consolas, monospace; }
.guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: g; }
.guide li { position: relative; display: grid; gap: 4px; padding: 0 0 26px 48px; counter-increment: g; }
.guide li::before {
  content: counter(g); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; border: 1px solid var(--border-strong); background: var(--surface);
}
.guide li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 32px; bottom: 4px; width: 1px; background: var(--line); }
.guide b { font-size: 15px; }
.guide span { color: var(--muted); line-height: 1.55; font-size: 14px; }

/* ------------------------------------------------------------------- faq */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 14px; padding: 0 22px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 18px; color: var(--muted); line-height: 1.6; animation: fade-in .25s var(--ease); }

/* ---------------------------------------------------------------- footer */
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 110px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer .brand-inline { color: var(--text); }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a { text-decoration: none; font-size: 14px; }
.site-footer nav a:hover { color: var(--text); }

/* Scroll reveal (site.js adds .in). */
.js .reveal { opacity: 0; transform: translateY(20px); filter: blur(8px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; filter: blur(0); }

@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@keyframes timer { to { width: 100%; } }
@keyframes grow { to { width: 100%; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes key-in { from { opacity: 0; transform: translateY(6px) scale(.9); } }

@media (max-width: 1000px) {
  .nav-links .tab:not(.active) { display: none; }
  .hero-ghosts { display: none; }
  .s-hero, .two-col, .stepper, .dl-grid { grid-template-columns: 1fr; min-height: 0; }
  .how-steps, .stats-strip { grid-template-columns: 1fr 1fr; }
  .detect-grid { grid-template-columns: 1fr; }
  .stats-strip > div:nth-child(3) { border-left: 0; }
  .stats-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding-top: 80px; }
  .page-head { padding-top: 56px; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .how-steps, .stats-strip { grid-template-columns: 1fr; }
  .stats-strip > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .site-footer { flex-direction: column; }
  .s-head.row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .site.pre .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .ghost { animation: none; }
}
