:root {
  --bg: #0b0d11;
  --bg-2: #10141a;
  --surface: #141920;
  --surface-2: #1a2029;
  --line: #242c37;
  --line-2: #313b48;
  --text: #e9edf2;
  --muted: #9aa5b4;
  --faint: #6b7686;
  --accent: #b8f35a;
  --accent-ink: #0d1404;
  --pass: #44d69a;
  --fail: #ff6f61;
  --unknown: #f2c14e;
  --nt: #8796ab;
  --info: #72b7ff;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* lattice: the math behind ML-KEM, rendered as a quiet dot grid */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(184, 243, 90, .07) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,.35) 60vh, transparent 100vh);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .875rem; }
.eyebrow { font: 600 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: block; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: rgba(11, 13, 17, .82); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 22px; font-size: .93rem; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.on { color: var(--text); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 32px 0 48px; color: var(--faint); font-size: .85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* hero + scan form */
.hero { padding: 88px 0 56px; }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 1.16rem; color: var(--muted); max-width: 60ch; margin-bottom: 32px; }
.scan-form { display: flex; gap: 10px; max-width: 640px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px; box-shadow: 0 20px 60px -30px rgba(184, 243, 90, .25); }
.scan-form:focus-within { border-color: var(--accent); }
.scan-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: 500 1.08rem var(--mono); padding: 12px 14px; }
.scan-form input::placeholder { color: var(--faint); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; padding: 12px 22px; font: 650 .98rem var(--sans); cursor: pointer; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--muted); }
.form-error { color: var(--fail); font-size: .92rem; margin-top: 10px; min-height: 1.4em; }
.hint { color: var(--faint); font-size: .86rem; margin-top: 10px; }

/* sections */
.section { padding: 56px 0 8px; }
.grid { display: grid; gap: 16px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .k { font: 600 .72rem var(--mono); color: var(--faint); letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 10px; }

/* level ladder */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 8px; }
.rung { border: 1px solid var(--line); border-radius: 8px; padding: 12px 12px 10px; background: var(--bg-2); min-height: 92px; }
.rung b { display: block; font: 700 .78rem var(--mono); color: var(--faint); margin-bottom: 6px; }
.rung span { font-size: .86rem; color: var(--muted); line-height: 1.35; display: block; }
.rung.on { border-color: var(--accent); background: linear-gradient(180deg, rgba(184,243,90,.12), rgba(184,243,90,.02)); }
.rung.on b { color: var(--accent); }
.rung.on span { color: var(--text); }
.rung.reach { border-style: dashed; }

/* report */
.report-head { padding: 48px 0 8px; }
.report-head h1 { font-family: var(--mono); font-size: clamp(1.6rem, 4.4vw, 2.6rem); letter-spacing: -.03em; word-break: break-all; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .88rem; }
.meta span { white-space: nowrap; }
.verdict { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; margin-top: 28px; }
.verdict .card { padding: 26px; }
.level-big { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.level-big .n { font: 800 3.6rem/1 var(--mono); color: var(--accent); letter-spacing: -.05em; }
.level-big .n.l0 { color: var(--fail); }
.level-big .t { font-weight: 650; font-size: 1.15rem; }
.summary-list { margin: 0; padding: 0; list-style: none; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.summary-list li:last-child { border-bottom: 0; }
.summary-list .v { font-family: var(--mono); font-size: .86rem; text-align: right; overflow-wrap: anywhere; }

.checks { display: flex; flex-direction: column; gap: 10px; }
.check { display: grid; grid-template-columns: 118px 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.check h3 { margin: 0 0 4px; }
.check p { margin: 0; color: var(--muted); font-size: .94rem; }
.check .detail { margin-top: 8px; color: var(--faint); font-size: .88rem; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 10px; border-radius: 6px; font: 700 .72rem var(--mono); letter-spacing: .08em; border: 1px solid; align-self: start; width: max-content; }
.pill.PASS { color: var(--pass); border-color: rgba(68,214,154,.45); background: rgba(68,214,154,.08); }
.pill.FAIL { color: var(--fail); border-color: rgba(255,111,97,.45); background: rgba(255,111,97,.08); }
.pill.UNKNOWN { color: var(--unknown); border-color: rgba(242,193,78,.45); background: rgba(242,193,78,.08); }
.pill.NOT_TESTED { color: var(--nt); border-color: rgba(135,150,171,.45); background: rgba(135,150,171,.08); }
.pill.INFO { color: var(--info); border-color: rgba(114,183,255,.45); background: rgba(114,183,255,.08); }
.counts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }

.rec { border-left: 3px solid var(--accent); }
.rec .tag { display: inline-block; font: 600 .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; margin: 0 6px 10px 0; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.rec .tag.verified { color: var(--pass); }
.rec .tag.inferred { color: var(--unknown); }
.rec .tag.unverified { color: var(--fail); }
.rec ol, .rec ul { margin: 6px 0 14px; padding-left: 20px; color: var(--muted); font-size: .94rem; }
.rec li { margin-bottom: 6px; }
.rec h4 { margin: 14px 0 2px; font: 600 .76rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

details.tech { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 10px; }
details.tech summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.tech summary::-webkit-details-marker { display: none; }
details.tech summary::after { content: "+"; font-family: var(--mono); color: var(--faint); }
details.tech[open] summary::after { content: "–"; }
details.tech .body { padding: 0 20px 20px; }
pre.raw { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow: auto; max-height: 360px; font-size: .78rem; line-height: 1.5; color: #c9d1db; white-space: pre; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { color: var(--faint); font: 600 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
table.t td.mono { font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; }
.tbl-scroll { overflow-x: auto; }

.notice { border: 1px solid var(--line-2); background: var(--bg-2); border-radius: var(--radius); padding: 16px 20px; color: var(--muted); font-size: .9rem; }
.notice b { color: var(--text); }

/* pending */
.pending { padding: 120px 0; text-align: center; }
.pending h1 { font-family: var(--mono); font-size: clamp(1.4rem, 4vw, 2.2rem); word-break: break-all; }
.steps { list-style: none; padding: 0; margin: 28px auto 0; max-width: 420px; text-align: left; font: .92rem var(--mono); color: var(--faint); }
.steps li { padding: 6px 0; }
.steps li.on { color: var(--text); }
.steps li.on::before { content: "▸ "; color: var(--accent); }
.steps li.done { color: var(--muted); }
.steps li.done::before { content: "✓ "; color: var(--pass); }
.spinner { width: 46px; height: 46px; margin: 0 auto 26px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* forms */
.lead { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead .full { grid-column: 1 / -1; }
.lead label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
.lead input, .lead select, .lead textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 12px; font: 15px var(--sans); }
.lead textarea { min-height: 110px; resize: vertical; }
.lead input:focus, .lead select:focus, .lead textarea:focus { outline: 0; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok-msg { color: var(--pass); font-weight: 600; }

.cta { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; background: linear-gradient(135deg, rgba(184,243,90,.08), rgba(114,183,255,.04)); border: 1px solid var(--line-2); border-radius: 14px; padding: 30px; }
.svc-list { list-style: none; padding: 0; margin: 0; }
.svc-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.svc-list li:last-child { border-bottom: 0; }
.svc-list b { display: block; }
.svc-list span { color: var(--muted); font-size: .9rem; }

.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 28px; }
.prose ul { color: var(--muted); padding-left: 20px; }
.prose li { margin-bottom: 6px; }

.not-found { padding: 140px 0; text-align: center; }

@media (max-width: 860px) {
  .grid.c3, .grid.c4, .verdict, .cta { grid-template-columns: 1fr; }
  .grid.c2 { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 56px 0 36px; }
  .scan-form { flex-direction: column; }
  .scan-form .btn { width: 100%; }
  .nav { gap: 14px; font-size: .88rem; }
  .nav .hide-s { display: none; }
  .check { grid-template-columns: 1fr; gap: 10px; }
  .lead { grid-template-columns: 1fr; }
  .summary-list li { flex-direction: column; gap: 2px; }
  .summary-list .v { text-align: left; }
}
ul.plain { padding-left: 18px; margin: 0; }
.mt12 { margin-top: 12px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.verdict .btn.ghost { margin-top: 16px; }
.show-s { display: none; }
.verdict .ladder { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) {
  .show-s { display: inline; }
  .brand { font-size: .98rem; }
}
