/* SPDX-FileCopyrightText: 2026 Wonmor and Sanad contributors
   SPDX-License-Identifier: Apache-2.0 */

/* Sanad home page. One file, tokens first. Fonts are self-hosted (see /fonts/LICENSE-*.txt). */

@font-face { font-family: 'Sn Sans'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/sans-latin.woff2) format('woff2');
  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: 'Sn Sans'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sn Sans'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/sans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Sn Sans'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/sans-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Sn Serif'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/fonts/serif-latin.woff2) format('woff2');
  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: 'Sn Serif'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/fonts/serif-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sn Serif'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/fonts/serif-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Sn Serif'; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/fonts/serif-latin-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F; }
@font-face { font-family: 'Sn Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sn Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --sans: 'Sn Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Sn Serif', Georgia, 'Times New Roman', serif;
  --mono: 'Sn Mono', ui-monospace, Consolas, monospace;

  /* the certificate is paper in every theme */
  --paper: #f8f3e4;
  --paper-2: #efe7d1;
  --paper-ink: #1b2421;
  --paper-ink-2: #4c5652;
  --guil: 31 138 116;
  --seal-good: #0b7a50;
  --seal-bad: #b3412c;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-soft: cubic-bezier(.45, .05, .25, 1);
  --gutter: clamp(16px, 4.4vw, 72px);
  --maxw: 1360px;
  --r: 14px;

  color-scheme: light;
  --bg: #f4f1e8;
  --bg-2: #ebe6d8;
  --panel: #fffdf7;
  --ink: #141c19;
  --ink-2: #36423e;
  --ink-3: #56615d;
  --line: rgb(20 28 25 / .14);
  --line-2: rgb(20 28 25 / .08);
  --accent: #006e5a;
  --accent-fill: #0f6e5c;
  --on-accent: #ffffff;
  --accent-soft: rgb(31 138 116 / .12);
  --good: #0b704a;
  --good-soft: rgb(11 112 74 / .1);
  --bad: #a63e2c;
  --bad-soft: rgb(166 62 44 / .1);
  --warn: #7d5e02;
  --shadow: 0 1px 2px rgb(20 28 25 / .06), 0 18px 40px -22px rgb(20 28 25 / .28);
  --focus: #0b4f9e;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1210;
  --bg-2: #0f1916;
  --panel: #13201c;
  --ink: #eef3f1;
  --ink-2: #cbd4d1;
  --ink-3: #9ba7a3;
  --line: rgb(238 243 241 / .14);
  --line-2: rgb(238 243 241 / .07);
  --accent: #5cc9ae;
  --accent-fill: #5cc9ae;
  --on-accent: #04110d;
  --accent-soft: rgb(92 201 174 / .13);
  --good: #7dd6a8;
  --good-soft: rgb(125 214 168 / .12);
  --bad: #f58f7a;
  --bad-soft: rgb(245 143 122 / .12);
  --warn: #ebbd57;
  --shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 24px 60px -30px rgb(0 0 0 / .8);
  --focus: #9cc4ff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --bg: #0a1210; --bg-2: #0f1916; --panel: #13201c;
    --ink: #eef3f1; --ink-2: #cbd4d1; --ink-3: #9ba7a3;
    --line: rgb(238 243 241 / .14); --line-2: rgb(238 243 241 / .07);
    --accent: #5cc9ae; --accent-fill: #5cc9ae; --on-accent: #04110d; --accent-soft: rgb(92 201 174 / .13);
    --good: #7dd6a8; --good-soft: rgb(125 214 168 / .12); --bad: #f58f7a; --bad-soft: rgb(245 143 122 / .12); --warn: #ebbd57;
    --shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 24px 60px -30px rgb(0 0 0 / .8);
    --focus: #9cc4ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgb(var(--guil) / .25); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; line-height: 1.04; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--panel); color: var(--ink); padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.label { font: 600 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.label b { color: var(--accent); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-2); background: var(--panel); white-space: nowrap; }
.chip--soon { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--panel)); }
.chip--plan { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.chip--done { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-soft); }
.chip--demo { color: var(--ink-2); border-style: dashed; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 99px; font: 600 16px/1 var(--sans);
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .5s var(--ease), background .3s, color .3s, border-color .3s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent-fill); color: var(--on-accent); }
.btn--primary:hover { color: var(--on-accent); background: color-mix(in srgb, var(--accent-fill) 86%, var(--ink)); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line-2); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 21px/1 var(--serif); letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.mark { width: 30px; height: 30px; color: var(--accent); }
.mark .ring { transform-origin: 50% 50%; animation: spin 60s linear infinite; }
.mark .tick { stroke-dasharray: 16; stroke-dashoffset: 16; animation: tick 1.6s .5s var(--ease) forwards; }
.brand:hover .mark .tick { animation: tick-replay 1.4s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tick { to { stroke-dashoffset: 0; } }
@keyframes tick-replay { 0% { stroke-dashoffset: 16; } 100% { stroke-dashoffset: 0; } }
.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav a { padding: 8px 11px; border-radius: 8px; font-size: 15px; text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--line-2); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.lang a { font: 600 12.5px/1 var(--mono); padding: 8px 9px; border-radius: 99px; text-decoration: none; color: var(--ink-2); min-width: 34px; text-align: center; }
.lang a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-ico-dark { display: none; }
:root[data-theme="dark"] .theme-ico-dark { display: block; }
:root[data-theme="dark"] .theme-ico-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ico-dark { display: block; }
  :root:not([data-theme="light"]) .theme-ico-light { display: none; }
}
.menu-btn { display: none; }
@media (max-width: 1020px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .nav.open { display: flex; position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0; margin: 0; padding: 10px var(--gutter) 22px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open a { font-size: 19px; padding: 14px 4px; border-bottom: 1px solid var(--line-2); border-radius: 0; }
}
@media (max-width: 520px) { .tools .gh-btn { display: none; } .top .wrap { gap: 10px; } }

/* hero */
.hero { position: relative; padding: clamp(28px, 5vw, 72px) 0 clamp(56px, 7vw, 110px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; pointer-events: none;
  background: radial-gradient(closest-side, rgb(var(--guil) / .12), transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(46px, 6.4vw, 108px); line-height: .96; margin: 18px 0 22px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(18px, 1.45vw, 21px); color: var(--ink-2); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.nocoin { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 14px/1.4 var(--mono); color: var(--ink-3); }
.nocoin span::before { content: "—"; margin-right: 8px; color: var(--accent); }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(44px, 12.5vw, 76px); }
}

/* the certificate */
.stage { position: relative; perspective: 1400px; }
.cert-wrap { position: relative; transform-style: preserve-3d; transition: transform 1.2s var(--ease); will-change: transform; }
.cert { position: relative; aspect-ratio: 1.414 / 1; width: 100%; background: var(--paper); color: var(--paper-ink); border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 0 rgb(255 255 255 / .7) inset, 0 2px 3px rgb(30 25 10 / .12), 0 30px 70px -30px rgb(20 20 10 / .55), 0 70px 90px -70px rgb(var(--guil) / .45);
  container-type: inline-size; }
.cert::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 90% at var(--gx, 30%) var(--gy, 10%), rgb(255 255 255 / .35), transparent 45%), linear-gradient(180deg, transparent 60%, rgb(120 100 40 / .06)); mix-blend-mode: soft-light; }
.cert canvas.guil { position: absolute; inset: 0; width: 100%; height: 100%; }
.cert-in { position: absolute; inset: 10.5% 8% 17% 8%; display: flex; flex-direction: column; }
.cert-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 4cqi; }
.cert-org { font: 600 2.05cqi/1.25 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--paper-ink-2); }
.cert-no { font: 500 1.75cqi/1.2 var(--mono); color: var(--paper-ink-2); text-align: right; }
.cert-title { font: 500 6.1cqi/1 var(--serif); margin-top: 4.6cqi; letter-spacing: -.01em; }
.cert-sub { font: 400 2.1cqi/1.4 var(--sans); color: var(--paper-ink-2); margin-top: 1.6cqi; }
.fields { margin-top: auto; display: grid; grid-template-columns: 1.35fr 1fr; gap: 2.2cqi 4cqi; max-width: 70%; }
.field { position: relative; padding: .6cqi .9cqi; margin: -.6cqi -.9cqi; border-radius: .8cqi; transition: background .6s var(--ease), box-shadow .6s var(--ease); }
.field dt { font: 600 1.45cqi/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-ink-2); }
.field dd { margin: .5cqi 0 0; font: 500 2.75cqi/1.15 var(--serif); position: relative; }
.field dd .val { display: inline-block; transition: opacity .5s var(--ease), transform .7s var(--ease), color .4s; }
.field .mk { position: absolute; right: -.2cqi; top: .2cqi; width: 2.4cqi; height: 2.4cqi; border-radius: 99px; display: grid; place-items: center; opacity: 0; transform: scale(.4);
  transition: opacity .45s var(--ease), transform .6s var(--ease); color: #fff; font: 700 1.5cqi/1 var(--sans); }
.field.ok { background: rgb(11 122 80 / .08); box-shadow: inset 0 0 0 1px rgb(11 122 80 / .28); }
.field.ok .mk { opacity: 1; transform: none; background: var(--seal-good); }
.field.bad { background: rgb(179 65 44 / .1); box-shadow: inset 0 0 0 1px rgb(179 65 44 / .5); }
.field.bad .mk { opacity: 1; transform: none; background: var(--seal-bad); }
.field.forged dd .val { color: #8f2e1e; }
.seal { position: absolute; right: 7%; bottom: 13%; width: 21cqi; aspect-ratio: 1; }
.seal canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.seal-core { position: absolute; inset: 26%; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: 0 0 0 .35cqi rgb(var(--guil) / .5);
  transition: box-shadow .8s var(--ease), background .8s var(--ease); }
.seal-core svg { width: 62%; height: 62%; }
.seal-core .s-letter { font: 600 5.4cqi/1 var(--serif); fill: rgb(var(--guil)); transition: opacity .5s; }
.seal-core .s-ok, .seal-core .s-x { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset .9s var(--ease) .1s; }
.seal-core .s-ok { stroke: var(--seal-good); }
.seal-core .s-x { stroke: var(--seal-bad); }
.cert[data-state="ok"] .seal-core { box-shadow: 0 0 0 .5cqi var(--seal-good), 0 0 0 1.8cqi rgb(11 122 80 / .12); }
.cert[data-state="ok"] .s-ok, .cert[data-state="bad"] .s-x { stroke-dashoffset: 0; }
.cert[data-state="ok"] .s-letter, .cert[data-state="bad"] .s-letter { opacity: 0; }
.cert[data-state="bad"] .seal-core { box-shadow: 0 0 0 .5cqi var(--seal-bad), 0 0 0 1.8cqi rgb(179 65 44 / .12); }
.proof { position: absolute; left: 8%; right: 32%; bottom: 9.5%; display: flex; align-items: center; gap: 1.2cqi; font: 500 1.45cqi/1.2 var(--mono); color: var(--paper-ink-2);
  border-top: 1px dashed rgb(27 36 33 / .3); padding-top: 1.1cqi; transition: color .5s, border-color .5s; white-space: nowrap; overflow: hidden; }
.cert[data-state="ok"] .proof { color: var(--seal-good); border-top-style: solid; border-color: rgb(11 122 80 / .5); }
.cert[data-state="bad"] .proof { color: var(--seal-bad); border-top-style: solid; border-color: rgb(179 65 44 / .55); }
.beam { position: absolute; left: 0; right: 0; top: 0; height: 18%; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgb(var(--guil) / .10) 70%, rgb(var(--guil) / .55) 98%, transparent);
  transform: translateY(-100%); }
.beam::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgb(var(--guil)); box-shadow: 0 0 18px 2px rgb(var(--guil) / .7); }
.cert.scanning .beam { opacity: 1; }
.cert-qr { position: absolute; right: 8%; top: 22%; width: 11.5cqi; aspect-ratio: 1; padding: .8cqi; background: #fff; border-radius: .8cqi; box-shadow: 0 0 0 1px rgb(27 36 33 / .12); }
.cert-qr svg { width: 100%; height: 100%; }
.verdict { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; justify-content: space-between; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 4px; background: var(--panel); }
.seg button { font: 600 14px/1 var(--sans); border: 0; background: transparent; color: var(--ink-2); padding: 11px 16px; min-height: 40px; border-radius: 99px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.result { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1.3 var(--sans); min-height: 40px; }
.result .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 5px var(--line-2); transition: background .4s, box-shadow .4s; }
.result[data-state="ok"] { color: var(--good); }
.result[data-state="ok"] .dot { background: var(--good); box-shadow: 0 0 0 5px var(--good-soft); }
.result[data-state="bad"] { color: var(--bad); }
.result[data-state="bad"] .dot { background: var(--bad); box-shadow: 0 0 0 5px var(--bad-soft); }
.stage-note { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }

@container (max-width: 520px) {
  .cert-org { font-size: 2.9cqi; } .cert-no { font-size: 2.4cqi; } .cert-sub { font-size: 2.9cqi; }
  .field dt { font-size: 2.3cqi; } .field dd { font-size: 3.6cqi; } .proof { font-size: 2.2cqi; right: 30%; }
  .fields { max-width: 66%; gap: 1.8cqi 3cqi; } .field .mk { width: 3.2cqi; height: 3.2cqi; font-size: 2cqi; }
}

/* sections */
section.sec { padding: clamp(64px, 9vw, 140px) 0; position: relative; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 60px); }
.sec-head h2 { font-size: clamp(36px, 4.6vw, 72px); margin-top: 14px; }
.sec-head p { color: var(--ink-2); font-size: 18px; max-width: 36em; }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } }
.band { background: var(--bg-2); }
.src { font-size: 13.5px; color: var(--ink-3); margin-top: 18px; }
.src--meta { margin: 0 18px 16px; }
.src a { color: var(--ink-2); }

/* problem: real QR vs lookalike */
.qrpath { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.path { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 2.4vw, 32px); box-shadow: var(--shadow); }
.path h3 { font-size: clamp(24px, 2.2vw, 32px); margin-bottom: 18px; }
.flow { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; }
.flow .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 14px/1 var(--mono); border: 1px solid var(--line); color: var(--ink-2); }
.url { font: 500 15px/1.35 var(--mono); padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); overflow-wrap: anywhere; }
.url mark { background: var(--bad-soft); color: var(--bad); border-radius: 3px; padding: 0 2px; }
.fakeok { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--good); }
.fakeok svg, .realbad svg { width: 22px; height: 22px; flex: none; }
.realbad { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--bad); }
.path--bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.path--good { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.path .moral { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); color: var(--ink-2); font-size: 16px; }
@media (max-width: 860px) { .qrpath { grid-template-columns: 1fr; } }

/* how it works: the chain */
.chain { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.chain svg.rail { position: absolute; left: 0; right: 0; top: 64px; width: 100%; height: 40px; pointer-events: none; overflow: visible; }
.rail path { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 7; }
.rail .run { stroke: var(--accent); stroke-dasharray: 0; stroke-width: 2; stroke-dashoffset: var(--len, 1000); }
.node { position: relative; z-index: 1; }
.node .ico { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 22px; }
.node .ico svg { width: 60px; height: 60px; color: var(--accent); }
.node h3 { font-size: clamp(26px, 2.4vw, 36px); }
.node .who { font: 600 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 6px 0 12px; }
.node p { color: var(--ink-2); max-width: 26em; }
.node code { display: inline-block; margin-top: 12px; font-size: 13.5px; padding: 6px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.offline { margin-top: clamp(36px, 4vw, 56px); display: grid; grid-template-columns: auto 1fr auto; gap: 18px 24px; align-items: center; padding: 22px 26px; border-radius: var(--r); border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.offline svg { width: 40px; height: 40px; color: var(--accent); }
.offline b { font-family: var(--serif); font-weight: 500; font-size: 24px; display: block; margin-bottom: 4px; }
.offline p { color: var(--ink-2); }
@media (max-width: 860px) {
  .chain { grid-template-columns: 1fr; gap: 34px; }
  .chain svg.rail { display: none; }
  .node { display: grid; grid-template-columns: 84px 1fr; gap: 0 18px; }
  .node .ico { width: 84px; height: 84px; margin: 0; grid-row: span 4; }
  .node .ico svg { width: 40px; height: 40px; }
  .offline { grid-template-columns: auto 1fr; }
  .offline .chip { grid-column: 1 / -1; justify-self: start; }
}

/* demo */
.demo { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); align-items: start; }
.pane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.pane-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font: 600 13px/1.2 var(--mono); color: var(--ink-3); }
.json { margin: 0; padding: 16px 18px 20px; font: 400 13.5px/1.62 var(--mono); color: var(--ink-2); overflow-x: auto; white-space: pre; tab-size: 2; max-height: 560px; }
.json .k { color: var(--ink); }
.json .s { color: var(--accent); }
.json .chg { background: var(--bad-soft); color: var(--bad); border-radius: 3px; box-shadow: 0 0 0 2px var(--bad-soft); animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 8px rgb(245 143 122 / .0); } 30% { box-shadow: 0 0 0 4px var(--bad-soft); } }
.tamper { padding: 18px; display: grid; gap: 10px; border-bottom: 1px solid var(--line-2); }
.tamper h3 { font: 600 15px/1.3 var(--sans); }
.sw { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15.5px; min-height: 40px; }
.sw input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .35s var(--ease); margin: 0; }
.sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform .45s var(--ease); }
.sw input:checked { background: var(--bad); }
.sw input:checked::after { transform: translateX(18px); }
.sw input.rev:checked { background: var(--warn); }
.sw small { color: var(--ink-3); font-size: 13px; display: block; }
.steps { list-style: none; margin: 0; padding: 8px 18px 4px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.steps li:last-child { border-bottom: 0; }
.steps .st { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; margin-top: 1px; transition: background .4s, border-color .4s; }
.steps .st svg { width: 13px; height: 13px; opacity: 0; transition: opacity .3s; }
.steps .st .i-x { position: absolute; }
.steps li[data-s="ok"] .st { background: var(--good); border-color: var(--good); color: var(--bg); }
.steps li[data-s="bad"] .st { background: var(--bad); border-color: var(--bad); color: var(--bg); }
.steps li[data-s="skip"] .st { border-style: dashed; }
.steps li[data-s="ok"] .st .i-ok, .steps li[data-s="bad"] .st .i-x { opacity: 1; }
.steps b { font-weight: 600; font-size: 15.5px; display: block; }
.steps .d { font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); overflow-wrap: anywhere; display: block; margin-top: 3px; }
.verdict-big { margin: 6px 18px 18px; padding: 18px; border-radius: 12px; display: flex; gap: 14px; align-items: center; background: var(--bg); border: 1px solid var(--line-2); transition: background .5s, border-color .5s; }
.verdict-big svg { width: 34px; height: 34px; flex: none; }
.verdict-big b { font: 500 24px/1.15 var(--serif); display: block; }
.verdict-big span { color: var(--ink-2); font-size: 14.5px; }
.verdict-big[data-v="ok"] { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, transparent); color: var(--good); }
.verdict-big[data-v="bad"] { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); }
.verdict-big[data-v="rev"] { background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }
.demo-note { margin-top: 18px; font-size: 14px; color: var(--ink-3); max-width: 70em; }
.name-edit { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.name-edit input { font: 500 15px/1.2 var(--sans); padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-height: 44px; }
@media (max-width: 960px) { .demo { grid-template-columns: 1fr; } .json { max-height: 380px; font-size: 12.5px; } }

/* telegram mock */
.tg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(28px, 5vw, 90px); align-items: center; }
.tg-copy h2 { font-size: clamp(36px, 4.6vw, 72px); margin-top: 14px; }
.tg-copy h2 + .lead { margin-top: 20px; }
.tg-copy ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.tg-copy li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--ink-2); }
.tg-copy li svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.phone { position: relative; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 46px; padding: 12px; background: #0d1412;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08) inset, 0 40px 80px -40px rgb(0 0 0 / .6), 0 0 0 1px var(--line); }
.screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: #dfe9e4; display: flex; flex-direction: column; }
:root[data-theme="dark"] .screen { background: #15211d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .screen { background: #15211d; } }
.tg-bar { display: flex; align-items: center; gap: 10px; padding: 34px 16px 12px; background: var(--panel); border-bottom: 1px solid var(--line-2); }
.tg-av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); display: grid; place-items: center; font: 600 17px/1 var(--serif); }
.tg-bar b { font-size: 15px; display: block; line-height: 1.2; }
.tg-bar small { font-size: 12.5px; color: var(--ink-3); }
.tg-bar .chip { margin-left: auto; }
.chat { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; overflow: hidden; }
.msg { max-width: 84%; padding: 9px 12px 10px; border-radius: 16px; font-size: 14px; line-height: 1.45; background: var(--panel); color: var(--ink); box-shadow: 0 1px 1px rgb(0 0 0 / .08);
  opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.msg.in { opacity: 1; transform: none; }
.msg.me { align-self: flex-end; background: #cfeee0; color: #10241c; border-bottom-right-radius: 5px; }
:root[data-theme="dark"] .msg.me { background: #1f5144; color: #eef7f3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.me { background: #1f5144; color: #eef7f3; } }
.msg.bot { align-self: flex-start; border-bottom-left-radius: 5px; }
.msg .qrimg { width: 120px; height: 120px; background: #fff; border-radius: 10px; padding: 8px; margin-bottom: 6px; }
.msg .res { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.msg .res.ok { color: var(--good); }
.msg .res.bad { color: var(--bad); }
.msg dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; }
.msg dt { color: var(--ink-3); }
.msg dd { margin: 0; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (max-width: 860px) { .tg { grid-template-columns: 1fr; } .phone { max-width: 340px; } }

/* audience */
.aud { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.aud article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 2.4vw, 34px); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.aud article:nth-child(1) { grid-column: span 5; }
.aud article:nth-child(2) { grid-column: span 4; }
.aud article:nth-child(3) { grid-column: span 3; }
.aud h3 { font-size: clamp(26px, 2.4vw, 36px); }
.aud p { color: var(--ink-2); }
.aud .gets { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); font: 500 13.5px/1.5 var(--mono); color: var(--accent); }
.aud .not { font-size: 14px; color: var(--ink-3); }
@media (max-width: 1020px) { .aud article:nth-child(n) { grid-column: span 12; } }

/* standards */
.stds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.std { display: grid; gap: 6px; padding: 22px 22px 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.std b { font: 500 23px/1.15 var(--serif); }
.std span { font-size: 14.5px; color: var(--ink-2); }
.std small { font: 500 12.5px/1.3 var(--mono); color: var(--ink-3); }
.std:hover b { color: var(--accent); }

/* roadmap */
.road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: wk; }
.road li { position: relative; padding: 22px 22px 26px 0; border-top: 2px solid var(--line); }
.road li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.road .wk { font: 600 12.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.road b { display: block; font: 500 21px/1.2 var(--serif); margin: 10px 0 8px; }
.road p { font-size: 15px; color: var(--ink-2); }
.road .chip { margin-top: 12px; }
.later { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.later div { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.later b { font: 500 20px/1.2 var(--serif); display: block; margin-bottom: 6px; }
.later p { font-size: 15px; color: var(--ink-2); }
@media (max-width: 960px) { .road { grid-template-columns: repeat(2, minmax(0, 1fr)); } .later { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .road { grid-template-columns: 1fr; } .road li { padding-left: 26px; border-top: 0; border-left: 2px solid var(--line); padding-top: 4px; } .road li::before { left: -7px; top: 6px; } }

/* status */
.status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.status > div { padding: 24px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.status h3 { font: 600 13px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.status ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.status li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--ink-2); font-size: 15.5px; }
.status li svg { width: 18px; height: 18px; margin-top: 3px; }
.status .yes svg { color: var(--good); } .status .no svg { color: var(--ink-3); } .status .lim svg { color: var(--warn); }
@media (max-width: 960px) { .status { grid-template-columns: 1fr; } }

/* links + footer */
.links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lk { display: grid; gap: 8px; padding: 24px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); text-decoration: none; transition: border-color .3s, transform .5s var(--ease); }
.lk:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.lk b { font: 500 24px/1.15 var(--serif); }
.lk span { color: var(--ink-2); font-size: 15px; }
.lk small { font: 500 12.5px/1.3 var(--mono); color: var(--accent); overflow-wrap: anywhere; }
@media (max-width: 860px) { .links { grid-template-columns: 1fr; } }
footer.foot { border-top: 1px solid var(--line); padding: 44px 0 56px; font-size: 15px; color: var(--ink-2); }
.foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.foot b { font: 500 22px/1.2 var(--serif); color: var(--ink); display: block; margin-bottom: 8px; }
.foot h3 { font: 600 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--ink-2); }
.foot .fine { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-3); padding-top: 22px; border-top: 1px solid var(--line-2); }
@media (max-width: 860px) { .foot .wrap { grid-template-columns: 1fr; } }

/* reveal: only the few that tell a story move in */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.rv.in { opacity: 1; transform: none; }
html.no-js .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .mark .ring { animation: none; }
  .mark .tick { animation: none; stroke-dashoffset: 0; }
  .msg { transition: none; }
  .typing i { animation: none; opacity: .6; }
  .cert-wrap { transition: none; }
}

/* 404 */
.nf { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.nf h1 { font-size: clamp(48px, 8vw, 110px); margin: 16px 0; }
.nf p { color: var(--ink-2); max-width: 32em; margin: 0 auto 28px; }
.nf .cta { justify-content: center; }

/* The rail traveller starts hidden; main.js fades it in and out. */
.traveller { opacity: 0; }
.traveller__card { fill: var(--paper); }
