/* Layout: forensic lab sheet — a single readable column with wide "evidence strips"
   (filenames, hex, word grids) that carry the subject's own material. */
:root {
  --bg: #eef2f4;
  --surface: #ffffff;
  --ink: #0f1e2e;
  --muted: #4d5f70;
  --line: #cfd9e0;
  --accent: #0b6f78;
  --accent-ink: #ffffff;
  --accent-soft: #d6ecee;
  --warn: #a85f00;
  --warn-soft: #f7ead7;
  --bad: #b3261e;
  --good: #1f7a3d;
  --strip: #0f1e2e;
  --strip-ink: #cfe6e8;
  --font-display: "IBM Plex Sans", "PingFang SC", "PingFang TC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "PingFang TC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 4.4vw, 2.9rem);
  --radius: 6px;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b141d; --surface: #111e2a; --ink: #dce6ec; --muted: #93a6b6; --line: #24384a;
    --accent: #3cc1c9; --accent-ink: #062126; --accent-soft: #123a40;
    --warn: #f0a640; --warn-soft: #33260f; --bad: #ff8a80; --good: #6fd08f;
    --strip: #050b11; --strip-ink: #9fd9dd; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b141d; --surface: #111e2a; --ink: #dce6ec; --muted: #93a6b6; --line: #24384a;
  --accent: #3cc1c9; --accent-ink: #062126; --accent-soft: #123a40;
  --warn: #f0a640; --warn-soft: #33260f; --bad: #ff8a80; --good: #6fd08f;
  --strip: #050b11; --strip-ink: #9fd9dd; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--font-mono); }
.eyebrow { font: 600 var(--step--1)/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.logo-mark { width: 30px; height: 30px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 1rem/1 var(--font-mono); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.lang a { text-decoration: none; color: var(--muted); font: 500 0.8rem/1 var(--font-mono); padding: 6px 8px; border-radius: 4px; }
.lang a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) { .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; } .nav a { white-space: nowrap; } .lang { margin-left: auto; } }

/* Hero */
.hero { padding-block: 56px 40px; }
.hero .wrap { display: grid; gap: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius); font: 600 0.95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.08); }
.promises { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 0; list-style: none; }
.promises li { display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.promises b { font: 700 var(--step-1)/1 var(--font-mono); color: var(--ink); }

/* Evidence strip: an encrypted filename resolving to the original */
.strip { background: var(--strip); color: var(--strip-ink); border-radius: var(--radius); padding: 18px 20px; font: 400 0.92rem/1.9 var(--font-mono); overflow-x: auto; }
.strip .row { display: flex; gap: 16px; white-space: nowrap; }
.strip .tag { color: #7d8b97; min-width: 5.5em; }
.strip .enc { color: #ffb4a8; }
.strip .ok { color: #8fe3a8; }
.cursor { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: -0.2em; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
section.block { padding-block: 56px; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 46em; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; align-content: start; }
.service .code { font: 500 0.8rem/1 var(--font-mono); color: var(--muted); }
.service ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.service a.more { font-weight: 600; text-decoration: none; }
.service.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* Identifier tool */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; }
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tool input[type="text"] { flex: 1 1 260px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 400 1rem/1.3 var(--font-mono); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 0.8rem/1 var(--font-mono); padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.result { border-left: 4px solid var(--line); padding: 14px 16px; background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; display: grid; gap: 6px; }
.result[data-status="free"] { border-left-color: var(--good); }
.result[data-status="partial"] { border-left-color: var(--warn); }
.result[data-status="none"] { border-left-color: var(--bad); }
.pill { display: inline-block; font: 600 0.75rem/1 var(--font-mono); padding: 5px 8px; border-radius: 999px; letter-spacing: 0.04em; }
.pill.free { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.pill.partial { background: var(--warn-soft); color: var(--warn); }
.pill.none { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.source { font-size: var(--step--1); color: var(--muted); }

/* Process (a real sequence, so numbered) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 18px 18px 18px 0; border-top: 3px solid var(--line); display: grid; gap: 6px; align-content: start; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 600 0.85rem/1 var(--font-mono); color: var(--accent); }
.steps li .t { font: 700 var(--step--1)/1 var(--font-mono); color: var(--muted); }
.steps li:first-child { border-top-color: var(--accent); }

/* Warning panel */
.notice { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: var(--radius); padding: 22px 24px; display: grid; gap: 10px; }
.notice h3 { color: var(--warn); }
.notice ul { margin: 0; padding-left: 1.2em; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--muted); max-width: 46em; }

/* Contact */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; }
.contact .k { font: 600 0.8rem/1 var(--font-mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.contact .v { font: 600 1.2rem/1.3 var(--font-mono); word-break: break-all; }
.contact .row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.small { padding: 7px 12px; font-size: 0.85rem; }
.copied { font-size: var(--step--1); color: var(--good); }

/* Floating contact */
.float-contact { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 25; box-shadow: 0 6px 20px rgba(0,0,0,.18); border-radius: 999px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 80px; color: var(--muted); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Wallet: seed grid */
.seed { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.seed span { font: 500 0.9rem/1 var(--font-mono); padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); display: flex; gap: 8px; }
.seed span i { font-style: normal; color: var(--muted); min-width: 1.4em; }
.seed span.miss { border-style: dashed; border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.space { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.space th, .space td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.space th { font: 600 0.8rem/1.2 var(--font-mono); color: var(--muted); letter-spacing: 0.04em; }
.space td.n { font-family: var(--font-mono); }
.table-scroll { overflow-x: auto; }
.cando li::marker { content: "✓  "; color: var(--good); }
.cannot li::marker { content: "✕  "; color: var(--bad); }
.cando, .cannot { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }

/* Wallet assessment */
.quiz { display: grid; gap: 22px; }
.q { display: grid; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--bg); }
.opts input { accent-color: var(--accent); }
.opts label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s ease; }
.verdict { display: grid; gap: 12px; background: var(--bg); border-radius: var(--radius); padding: 18px; }
.verdict .level { font: 700 var(--step-2)/1.1 var(--font-display); }
.verdict ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.summary-box { width: 100%; min-height: 120px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 400 0.85rem/1.6 var(--font-mono); resize: vertical; }

/* Long-form text pages */
.prose { display: grid; gap: 14px; max-width: 46em; }
.prose h2 { font-size: var(--step-1); margin-top: 20px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); }
.site-footer a { color: inherit; }
