/* deadkey.net home page (story layout). Self-hosted fonts: the site CSP
   (style-src/font-src 'self') blocks Google Fonts, and self-hosting keeps the
   page free of third-party requests. Both families are SIL OFL 1.1. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/instrument-sans-var.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-600.woff2") format("woff2"); }
  :root {
    color-scheme: dark;
    --bg: #0a0c11;
    --bg-2: #0e1118;
    --card: #11151e;
    --line: rgba(170, 190, 225, 0.09);
    --line-2: rgba(170, 190, 225, 0.17);
    --text: #e7eaf1;
    --text-2: #a4acbd;
    --text-3: #6f788b;
    --dim: #5a6376;
    --accent: #8fb4ea;
    --accent-soft: rgba(143, 180, 234, 0.1);
    --accent-line: rgba(143, 180, 234, 0.32);
    --paper: #ece6d7;
    --paper-ink: #24262c;
    --paper-mute: #8b836f;
    --pen: #2b54b0;
    --amber: #f2b85b;
    --danger: #ef5a5f;
    --ok: #5fcf9b;
    --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3, p, ol, ul { margin: 0; }
  ol, ul { padding: 0; list-style: none; }
  a { color: inherit; text-decoration: none; }
  b, strong { font-weight: 600; color: var(--text); }
  .mono { font-family: var(--mono); font-weight: 500; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

  .wrap { max-width: 1140px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }

  /* ── Mockup ribbon + nav ─────────────────────────────── */
  .mock-bar {
    font-size: 12px; color: var(--text-3); text-align: center;
    padding-block: 7px; padding-inline: 16px;
    border-bottom: 1px solid var(--line); background: #07090d;
  }
  .nav {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
    background: rgba(10, 12, 17, 0.74);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .nav .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }
  .brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
  .brand svg { flex: none; }
  .nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--text-2); }
  .nav-links a:hover { color: var(--text); }
  .nav-cta { margin-left: auto; display: flex; gap: 10px; }
  @media (max-width: 820px) { .nav-links { display: none; } }
  @media (max-width: 420px) { .nav-cta .btn-ghost { display: none; } }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding-inline: 18px; border-radius: 10px;
    font: 500 15px/1 var(--font); border: 1px solid transparent; cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
  }
  .btn:active { transform: translateY(1px); }
  .btn-primary { background: var(--text); color: #0a0c11; box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 30px -8px rgba(143,180,234,.5); }
  .btn-primary:hover { background: #fff; }
  .btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); color: var(--text); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
  .btn-sm { height: 36px; font-size: 14px; padding-inline: 14px; border-radius: 9px; }

  /* ── Hero ─────────────────────────────────────────────── */
  .hero { position: relative; padding-block: clamp(56px, 9vw, 104px) clamp(72px, 9vw, 112px); overflow: hidden; }
  .hero::before {
    content: ""; position: absolute; left: 50%; top: -260px; width: 1300px; height: 820px;
    transform: translateX(-50%); pointer-events: none;
    background: radial-gradient(50% 50% at 50% 40%, rgba(120, 160, 230, 0.2), transparent 70%);
  }
  .hero-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 52px 52px;
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
  }
  .hero .wrap { position: relative; }
  .announce {
    display: inline-flex; align-items: center; gap: 10px; flex-wrap: nowrap;
    font-size: 13.5px; color: var(--text-2);
    border: 1px solid var(--line-2); border-radius: 999px;
    padding: 5px 14px 5px 5px; background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s, background 0.2s;
  }
  .announce:hover { border-color: var(--accent-line); background: var(--accent-soft); }
  .announce-tag { font-size: 12px; font-weight: 600; color: #0a0c11; background: var(--accent); border-radius: 999px; padding: 2px 9px; }
  .hero h1 {
    margin-top: 26px;
    font-size: clamp(2.6rem, 6.6vw, 5rem);
    line-height: 1.01; letter-spacing: -0.045em; font-weight: 600;
    max-width: 13.5ch; text-wrap: balance;
    background: linear-gradient(180deg, #ffffff 35%, #9ea8bd 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .lede { margin-top: 22px; font-size: clamp(1.06rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 58ch; }
  .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
  .fine { margin-top: 16px; font: 500 13px var(--mono); color: var(--text-3); letter-spacing: 0.01em; }

  .frame {
    margin-top: clamp(44px, 6vw, 76px); position: relative;
    border: 1px solid var(--line-2); border-radius: 18px;
    background: linear-gradient(180deg, rgba(22, 27, 39, 0.92), rgba(12, 15, 22, 0.96));
    box-shadow: 0 60px 140px -60px rgba(90, 130, 200, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: clamp(16px, 2.6vw, 30px);
  }
  .frame-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font: 500 12px var(--mono); color: var(--text-3); }
  .dots { display: flex; gap: 6px; }
  .dots i { width: 10px; height: 10px; border-radius: 50%; background: #262c3a; }
  .frame-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
  .frame-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: blink 2s ease-in-out infinite; }
  @keyframes blink { 50% { opacity: 0.35; } }

  .stage { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr) minmax(0, 0.85fr); gap: clamp(16px, 2.6vw, 36px); align-items: center; }
  @media (max-width: 860px) { .stage { grid-template-columns: 1fr; } }
  .pane-label { font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); }
  .pane-sub { font-size: 13.5px; color: var(--text-3); margin-top: 4px; }
  .pane-sub.center { text-align: center; margin-top: 14px; }
  .pane-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
  .pane-note svg { color: var(--accent); flex: none; }

  .pin-slots { display: flex; gap: 10px; margin-top: 16px; }
  .pin-slot {
    width: 48px; height: 58px; border-radius: 11px; display: grid; place-items: center;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
    font: 500 24px var(--mono); color: var(--text);
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  }
  .pin-slot.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(143, 180, 234, 0.12); }
  .pin-slot.filled { color: var(--text-2); }

  /* ── The paper codebook ──────────────────────────────── */
  .paper {
    position: relative; border-radius: 7px; color: var(--paper-ink);
    padding: clamp(10px, 1.5vw, 16px);
    background-color: var(--paper);
    background-image:
      radial-gradient(circle at 15% 8%, rgba(255, 255, 255, 0.55), transparent 45%),
      repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.02) 0 1px, transparent 1px 3px);
    box-shadow: 0 34px 60px -28px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.25);
  }
  .stage .paper { transform: rotate(-0.7deg); }
  .paper-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; font: 600 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-mute); }
  .cb { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); font-family: var(--mono); font-size: clamp(11px, 1.3vw, 15px); text-align: center; }
  .cb > span, .cb-mini > span { aspect-ratio: 1; display: grid; place-items: center; position: relative; line-height: 1; }
  .cb .h { font-size: 0.74em; font-weight: 600; color: var(--paper-mute); transition: color 0.25s; }
  .cb .h.is-lit { color: var(--pen); }
  .cb .c { border-right: 1px solid rgba(36, 38, 44, 0.08); border-bottom: 1px solid rgba(36, 38, 44, 0.08); }
  .cb .c.hit, .cb-mini .hit { color: #1c3c88; font-weight: 600; }
  .cb .c.hit::before, .cb-mini .hit::before {
    content: ""; position: absolute; inset: 7%;
    border: 2px solid var(--pen); border-radius: 52% 46% 50% 48%;
    transform: rotate(-9deg);
    animation: ink 0.5s ease-out both;
  }
  @keyframes ink { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .cb .n {
    position: absolute; top: -3px; right: -3px; z-index: 1;
    min-width: 15px; height: 15px; padding-inline: 3px; border-radius: 99px;
    display: grid; place-items: center; aspect-ratio: auto;
    background: var(--pen); color: #fff; font: 600 9px var(--font);
  }

  /* ── Server list ─────────────────────────────────────── */
  .server { margin-top: 12px; display: grid; gap: 8px; font-family: var(--mono); }
  .server-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 12px; border-radius: 9px; font-size: 15px;
    border: 1px dashed var(--line-2); color: var(--text-3);
    transition: border-color 0.35s, background 0.35s, color 0.35s;
  }
  .server-row.on { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
  .server-row .k { font-size: 11.5px; color: var(--text-3); }
  .server-row .v { letter-spacing: 0.14em; }
  .frame-caption { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); transition: opacity 0.5s; }
  .frame-caption.dim { opacity: 0.15; }
  .fly {
    position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
    font: 600 14px var(--mono); letter-spacing: 0.1em;
    padding: 5px 9px; border-radius: 7px; background: var(--accent); color: #0a0c11;
    box-shadow: 0 10px 34px rgba(143, 180, 234, 0.55);
  }

  /* ── Sections ─────────────────────────────────────────── */
  .section { position: relative; padding-block: clamp(84px, 11vw, 140px); border-top: 1px solid var(--line); }
  .eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); }
  .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; box-shadow: 0 0 14px currentColor; }
  .eyebrow.amber { color: var(--amber); }
  h2 { margin-top: 18px; font-size: clamp(2rem, 4.5vw, 3.35rem); line-height: 1.04; letter-spacing: -0.038em; font-weight: 600; max-width: 17ch; text-wrap: balance; }
  h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; text-wrap: balance; }
  .sec-lede { margin-top: 20px; font-size: 1.125rem; color: var(--text-2); max-width: 60ch; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
  .split.end { align-items: end; }
  @media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

  /* Scroll-lit problem statement */
  p.lit { margin-top: 24px; max-width: 920px; font-size: clamp(1.6rem, 3.4vw, 2.55rem); line-height: 1.24; letter-spacing: -0.028em; font-weight: 500; text-wrap: pretty; color: var(--dim); }
  p.lit span { color: var(--dim); transition: color 0.3s; }
  p.lit span.on { color: var(--text); }
  p.lit span.acc.on { color: var(--accent); }

  .points { margin-top: 30px; display: grid; gap: 16px; }
  .points li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; color: var(--text-2); font-size: 15.5px; }
  .points svg { color: var(--accent); margin-top: 3px; }

  /* Playground */
  .card { border: 1px solid var(--line-2); border-radius: 18px; background: linear-gradient(180deg, #121622, #0d1018); padding: clamp(16px, 2.2vw, 24px); transition: border-color 0.35s, box-shadow 0.35s; }
  .pg.hacker { border-color: rgba(239, 90, 95, 0.4); box-shadow: 0 30px 90px -50px rgba(239, 90, 95, 0.6); }
  .pg-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
  .field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
  .field input {
    width: 160px; height: 42px; padding-inline: 14px; border-radius: 10px;
    border: 1px solid var(--line-2); background: #0a0c11; color: var(--text);
    font: 500 20px var(--mono); letter-spacing: 0.3em;
  }
  .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(143, 180, 234, 0.14); }
  .switch { display: inline-flex; align-items: center; gap: 10px; height: 36px; font-size: 14px; color: var(--text-2); cursor: pointer; user-select: none; }
  .switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 38px; height: 22px; border-radius: 99px; background: #262c3a; position: relative; cursor: pointer; transition: background 0.25s; }
  .switch input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #cfd5e2; transition: transform 0.25s; }
  .switch input:checked { background: var(--danger); }
  .switch input:checked::before { transform: translateX(16px); }
  .pg-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; margin-top: 22px; }
  .pg .cb { font-size: clamp(11px, 1.05vw, 13.5px); }
  @media (max-width: 620px) { .pg-body { grid-template-columns: 1fr; } }
  .pg-body .paper { margin-top: 12px; }
  .paper-wrap { position: relative; }
  .paper-wrap .paper { transition: filter 0.4s, opacity 0.4s; }
  .paper-overlay {
    position: absolute; inset: 12px 0 0; display: grid; place-items: center; text-align: center;
    padding: 20px; font-size: 14px; font-weight: 600; color: var(--text);
    opacity: 0; pointer-events: none; transition: opacity 0.4s;
  }
  .pg.hacker .paper-wrap .paper { filter: blur(5px) grayscale(0.5); opacity: 0.35; }
  .pg.hacker .paper-overlay { opacity: 1; }
  .pg.hacker .server-row.on { border-color: rgba(239, 90, 95, 0.4); background: rgba(239, 90, 95, 0.08); }
  .pg-note { margin-top: 14px; font-size: 14px; color: var(--text-2); min-height: 3em; }

  /* Network diagram */
  .net-scroll { margin-top: clamp(40px, 5vw, 64px); overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(80% 90% at 30% 50%, rgba(239, 90, 95, 0.06), transparent 60%), var(--bg-2); }
  .net-scroll svg { display: block; width: 100%; min-width: 640px; height: auto; }
  .wire { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
  .wire.gap { stroke-dasharray: 3 6; }
  .atk { fill: rgba(239, 90, 95, 0.1); stroke: var(--danger); stroke-width: 1.5; }
  .hub { fill: #121724; stroke: var(--line-2); stroke-width: 1.5; }
  .dev { fill: #121724; stroke: rgba(170, 190, 225, 0.17); stroke-width: 1.5; }
  .pulse { fill: var(--danger); }
  .gapline { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 5 7; opacity: 0.75; }
  .paperfill { fill: var(--paper); }
  .t { font: 500 13px var(--font); fill: var(--text-2); }
  .t-b { font: 600 13px var(--font); fill: var(--text); }
  .t3 { font: 600 10.5px var(--mono); fill: var(--text-3); letter-spacing: 0.1em; }
  .t-amber { font: 600 10.5px var(--mono); fill: var(--amber); letter-spacing: 0.14em; }
  .t-mono { font: 600 12px var(--mono); fill: var(--danger); }

  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
  @media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
  .fact { border-top: 1px solid var(--line-2); padding-top: 18px; }
  .fact b { display: block; font-size: 16px; }
  .fact span { display: block; margin-top: 6px; font-size: 15px; color: var(--text-2); }
  .callout { display: flex; gap: 16px; margin-top: 36px; padding: 20px 22px; border-radius: 16px; border: 1px solid rgba(242, 184, 91, 0.25); background: rgba(242, 184, 91, 0.05); }
  .callout svg { flex: none; color: var(--amber); margin-top: 2px; }
  .callout p { margin-top: 4px; color: var(--text-2); font-size: 15px; max-width: 70ch; }

  /* Countdown */
  .cd-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr); gap: 20px; margin-top: clamp(40px, 5vw, 64px); align-items: stretch; }
  @media (max-width: 880px) { .cd-wrap { grid-template-columns: 1fr; } }
  .cd { display: flex; flex-direction: column; }
  .cd-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 500 12px var(--mono); color: var(--text-3); }
  .pill { font: 600 12px var(--font); padding: 3px 11px; border-radius: 99px; color: var(--amber); background: rgba(242, 184, 91, 0.12); border: 1px solid rgba(242, 184, 91, 0.3); transition: all 0.3s; }
  .pill.cancel { color: var(--ok); background: rgba(95, 207, 155, 0.1); border-color: rgba(95, 207, 155, 0.3); }
  .cd-day { margin-top: 18px; font-size: clamp(2.6rem, 5.4vw, 3.8rem); line-height: 1; font-weight: 600; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
  .cd-day small { font-size: 0.4em; letter-spacing: -0.01em; color: var(--text-3); font-weight: 500; margin-left: 6px; }
  .cd-bar { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 20px; }
  .cd-bar i { height: 9px; border-radius: 3px; background: #1c2230; transition: background 0.35s, box-shadow 0.35s; }
  .cd-bar i.f { background: var(--amber); box-shadow: 0 0 14px rgba(242, 184, 91, 0.4); }
  .cd.cancelled .cd-bar i.f { background: #3a4254; box-shadow: none; }
  .cd-scale { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font: 500 11.5px var(--mono); color: var(--text-3); }
  .log { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 14.5px; }
  .log li { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; color: var(--text-2); }
  .log time { font: 500 12.5px var(--mono); color: var(--text-3); padding-top: 2px; white-space: nowrap; }
  .log li.future { opacity: 0.6; }
  .log li.struck span { text-decoration: line-through; text-decoration-color: var(--text-3); }
  .log li.new { color: var(--ok); animation: slide 0.45s ease-out both; }
  @keyframes slide { from { transform: translateY(-6px); opacity: 0; } }

  .phone {
    width: 100%; max-width: 340px; margin-inline: auto;
    display: flex; flex-direction: column;
    padding: 18px 16px; border-radius: 34px;
    border: 1px solid var(--line-2);
    background: linear-gradient(180deg, #161c2a, #0b0e15);
    box-shadow: inset 0 0 0 6px #07090d, 0 40px 90px -50px rgba(0, 0, 0, 0.9);
  }
  .phone-notch { width: 90px; height: 22px; margin: 0 auto; border-radius: 99px; background: #07090d; }
  .phone-clock { text-align: center; margin-top: 18px; font-size: 46px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
  .phone-date { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 6px; }
  .notif { margin-top: 20px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.08); font-size: 13.5px; color: var(--text-2); }
  .notif.drop { animation: drop 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  @keyframes drop { from { transform: translateY(-18px) scale(0.97); opacity: 0; } }
  .notif-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
  .notif-top .app { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--accent); }
  .notif-top span:last-child { margin-left: auto; }
  .notif b { display: block; margin-top: 6px; }
  .phone .btn-danger {
    margin-top: 16px; width: 100%; height: 46px; border: 0; border-radius: 13px;
    background: var(--danger); color: #fff; font: 600 15px var(--font); cursor: pointer;
    transition: background 0.25s, transform 0.2s;
  }
  .phone .btn-danger:hover { background: #f36d71; }
  .phone .btn-danger:disabled { background: rgba(95, 207, 155, 0.14); color: var(--ok); cursor: default; }
  .replay { margin-top: 12px; align-self: center; background: none; border: 0; color: var(--text-2); font: 500 13px var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .phone-foot { margin-top: auto; padding-top: 16px; text-align: center; font-size: 12px; color: var(--text-3); }

  .threats-title { margin-top: clamp(56px, 7vw, 88px); font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
  .scen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
  @media (max-width: 720px) { .scen { grid-template-columns: 1fr; } }
  .scen article { display: flex; flex-direction: column; padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); transition: border-color 0.25s, background 0.25s, transform 0.25s; }
  .scen article:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); transform: translateY(-2px); }
  .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(143, 180, 234, 0.22); }
  .scen h3 { margin-top: 16px; }
  .scen p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
  .tag { align-self: flex-start; margin-top: auto; padding-top: 18px; }
  .tag span { display: inline-block; font: 500 11.5px var(--mono); color: var(--text-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 9px; }

  /* Steps */
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 5vw, 60px); }
  @media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
  .step { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%); }
  .step-num { font: 600 12px var(--mono); color: var(--accent); letter-spacing: 0.06em; }
  .step-vis { position: relative; height: 150px; margin-block: 16px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
  .step p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
  .paper.mini { width: 132px; padding: 9px; transform: rotate(-3deg); transition: transform 0.4s; }
  .step:hover .paper.mini { transform: rotate(0deg) scale(1.04); }
  .cb-mini { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); font: 500 11px var(--mono); text-align: center; }
  .sheets { position: relative; width: 200px; height: 118px; }
  .sheet { position: absolute; top: 8px; width: 112px; height: 100px; padding: 9px; border-radius: 4px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 14px 24px -10px rgba(0, 0, 0, 0.75); transition: transform 0.4s; }
  .sheet b { font: 600 8.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper-ink); }
  .sheet i { display: block; height: 4px; border-radius: 2px; background: rgba(36, 38, 44, 0.18); }
  .sheet i.short { width: 55%; }
  .sheet em { margin-top: auto; font-style: normal; font-size: 8.5px; color: var(--paper-mute); }
  .s1 { left: 0; transform: rotate(-6deg); }
  .s2 { right: 0; transform: rotate(5deg); }
  .step:hover .s1 { transform: rotate(-9deg) translateX(-8px); }
  .step:hover .s2 { transform: rotate(8deg) translateX(8px); }
  .ring-bg { fill: none; stroke: #1c2230; stroke-width: 8; }
  .ring { fill: none; stroke: var(--amber); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 202; transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke-dashoffset 1.6s cubic-bezier(0.3, 0.7, 0.2, 1); }
  .ring-n { font: 600 28px var(--font); fill: var(--text); }
  .ring-l { font: 600 7.5px var(--mono); fill: var(--text-3); letter-spacing: 0.03em; }

  /* Comparison */
  .table-wrap { margin-top: clamp(36px, 5vw, 56px); overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
  table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 14.5px; }
  th, td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
  tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
  thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); background: rgba(255, 255, 255, 0.02); }
  tbody th { font-weight: 600; color: var(--text); width: 22%; }
  tr.us { background: linear-gradient(90deg, rgba(143, 180, 234, 0.1), rgba(143, 180, 234, 0.03)); }
  tr.us th { color: var(--accent); }
  .m { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
  .m::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
  .m.yes::before { background: var(--ok); }
  .m.no::before { background: var(--danger); }
  .m.part::before { background: var(--amber); }
  td small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-3); }

  /* Pricing */
  .price-card { position: relative; padding: clamp(24px, 3vw, 34px); border-radius: 20px; border: 1px solid var(--accent-line); background: radial-gradient(120% 80% at 0% 0%, rgba(143, 180, 234, 0.14), transparent 60%), #0f131b; box-shadow: 0 50px 120px -60px rgba(90, 130, 200, 0.7); }
  .price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; font-size: 72px; line-height: 1; font-weight: 600; letter-spacing: -0.05em; }
  .price small { font-size: 16px; letter-spacing: 0; font-weight: 500; color: var(--text-2); }
  .price-sub { margin-top: 10px; font-size: 16px; color: var(--text); }
  .feat { margin-top: 24px; display: grid; gap: 11px; font-size: 15px; color: var(--text-2); }
  .feat li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
  .feat svg { color: var(--ok); margin-top: 3px; }
  .price-card .btn { width: 100%; margin-top: 28px; height: 46px; }
  .price-card .fine { text-align: center; font-family: var(--font); font-size: 13.5px; }
  .price-card .fine a { color: var(--accent); }
  .text-link { display: inline-block; margin-top: 22px; color: var(--accent); font-size: 15px; }
  .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

  /* Final CTA */
  .final { overflow: hidden; }
  .final::before { content: ""; position: absolute; left: 50%; bottom: -320px; width: 1100px; height: 640px; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, rgba(120, 160, 230, 0.18), transparent 70%); pointer-events: none; }
  .final .wrap { position: relative; text-align: center; }
  .final h2 { margin-inline: auto; max-width: 16ch; }
  .final .sec-lede { margin-inline: auto; }
  .final .hero-ctas { justify-content: center; }

  .foot { border-top: 1px solid var(--line); padding-block: 36px; }
  .foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; font-size: 13px; color: var(--text-3); }
  .foot ul { display: flex; flex-wrap: wrap; gap: 20px; }
  .foot a:hover { color: var(--text); }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  }

/* ── Site additions (port from the mockup) ───────────────── */
.t-paper { font: 600 9px var(--mono); fill: #8b836f; letter-spacing: 0.1em; }
.trustee-link { margin-top: 10px; font-size: 14px; color: var(--text-3); }
.trustee-link a { color: var(--accent); }
.trustee-link a:hover { text-decoration: underline; text-underline-offset: 3px; }
.net-mobile, .mbar { display: none; }

/* ── Phones: a simpler, smaller layout ───────────────────── */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .nav .wrap { height: 56px; gap: 12px; }

  .hero { padding-block: 40px 56px; }
  .announce { font-size: 12.5px; }
  .hero h1 { margin-top: 20px; font-size: clamp(2.15rem, 10.5vw, 2.7rem); }
  .lede { font-size: 1rem; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; height: 46px; }

  /* Hero frame: drop the window chrome and the PIN pane; show the paper and a
     single row of coordinate chips underneath. */
  .frame { margin-top: 36px; padding: 14px; border-radius: 14px; }
  .frame-top { display: none; }
  .stage { gap: 16px; }
  .stage > div:first-child { display: none; }
  .stage .paper { transform: none; }
  .paper-head { font-size: 9px; letter-spacing: 0.06em; }
  .paper-head span { white-space: nowrap; }
  .pane-sub.center { margin-top: 10px; }
  .server { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .server-row { justify-content: center; padding: 8px 4px; }
  .server-row .k { display: none; }
  #hero-server + .pane-note { display: none; }
  .frame-caption { margin-top: 16px; padding-top: 14px; font-size: 14px; }

  .section { padding-block: 64px; }
  h2 { font-size: clamp(1.75rem, 8.2vw, 2.25rem); }
  .sec-lede { font-size: 1rem; margin-top: 14px; }
  p.lit { font-size: 1.4rem; }
  .points li { font-size: 15px; }

  /* Playground: coordinates as a chip row too. */
  .pg-controls { gap: 10px; }
  .field input { width: 130px; }
  #pg-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #pg-list .server-row:only-child { grid-column: 1 / -1; }

  /* Air gap: vertical version replaces the wide diagram. */
  .net-scroll { display: none; }
  .net-mobile { display: block; margin-top: 36px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
  .nm-label { font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--danger); }
  .nm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .nm-list li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; border: 1px solid rgba(239, 90, 95, 0.3); background: rgba(239, 90, 95, 0.06); font-size: 13.5px; color: var(--text-2); }
  .nm-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--danger); animation: blink 1.6s ease-in-out infinite; }
  .nm-list li:nth-child(2)::before { animation-delay: 0.4s; }
  .nm-list li:nth-child(3)::before { animation-delay: 0.8s; }
  .nm-list li:nth-child(4)::before { animation-delay: 1.2s; }
  .nm-gap { display: flex; align-items: center; gap: 10px; margin-block: 16px; font: 600 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
  .nm-gap::before, .nm-gap::after { content: ""; flex: 1; border-top: 1.5px dashed rgba(242, 184, 91, 0.7); }
  .nm-paper { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-2); }
  .nm-paper b { display: block; }
  .nm-sheet { flex: none; width: 64px; height: 76px; padding: 7px; border-radius: 3px; display: flex; flex-direction: column; gap: 5px; background: var(--paper); transform: rotate(-4deg); box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.8); }
  .nm-sheet b { font: 600 6.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper-mute); }
  .nm-sheet i { display: block; height: 3px; border-radius: 2px; background: rgba(36, 38, 44, 0.18); }
  .nm-sheet i.short { width: 55%; }

  .facts { margin-top: 28px; gap: 18px; }
  .callout { padding: 16px; margin-top: 28px; }

  /* Countdown: the phone mockup becomes a plain alert card. */
  .phone { max-width: none; padding: 16px; border-radius: 16px; box-shadow: none; }
  .phone-notch, .phone-clock, .phone-date, .phone-foot { display: none; }
  .notif { margin-top: 0; }
  .log li { grid-template-columns: 1fr; gap: 2px; }

  .threats-title { margin-top: 48px; }
  .scen article { padding: 18px; }
  .step { padding: 18px; }
  .step-vis { height: 112px; margin-block: 12px 16px; }

  /* Comparison: each option becomes a stacked card. */
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .table-wrap table { min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tbody, .table-wrap tr, .table-wrap th { display: block; }
  .table-wrap tbody tr { margin-bottom: 12px; padding: 14px 16px 4px; border: 1px solid var(--line); border-radius: 14px; }
  .table-wrap tbody tr.us { border-color: var(--accent-line); }
  .table-wrap tbody tr th { width: auto; padding: 0 0 6px; border-bottom: 0; font-size: 16px; }
  .table-wrap tbody tr td { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .table-wrap tbody tr td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); font-size: 13px; color: var(--text-3); }
  .table-wrap td .m { justify-self: end; }
  .table-wrap td small { grid-column: 1 / -1; margin-top: 0; }

  .price { font-size: 56px; }
  .price-card { padding: 22px; }

  /* Sticky demo bar, shown by home.js once the hero buttons scroll away. */
  .foot { padding-bottom: 96px; }
  .mbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 12, 17, 0.92);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-2);
    font-size: 13px; color: var(--text-2);
    transform: translateY(110%); visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }
  .mbar.show { transform: none; visibility: visible; transition: transform 0.3s ease, visibility 0s; }
}
