/*
 * Shared page shell for the Waveclues app pages (App Lock, Secure Vault).
 *
 * Lifted from invoiceongo-guide.html so the three app pages read as one
 * site. That page keeps its own inline copy - it is the older file and
 * carries the version-switcher and screenshot-gallery rules these two
 * pages do not use; do not "tidy" it into this file without checking it
 * still renders.
 *
 * Per-app accent: set data-app on <html> and the --stamp pair below
 * changes. Everything else is identical between the pages.
 */

@font-face {
  font-family: 'Source Serif';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/ss4-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/ss4-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/pubsans-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plexmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/plexmono-600.woff2') format('woff2');
}

:root {
  --paper: #f4f7fb;
  --paper-raised: #ffffff;
  --paper-sunken: #e6eaef;
  --ink: #1a2130;
  --ink-soft: #48546b;
  --ink-faint: #7c869a;
  --accent: #2e4374;
  --accent-soft: #d9e0ee;
  --stamp: #2e4374;
  --stamp-soft: #d9e0ee;
  --success: #2f6b48;
  --success-soft: #dbe9df;
  --warning: #8a5a17;
  --warning-soft: #f1e2c8;
  --line: rgba(26, 33, 48, 0.14);
  --line-strong: rgba(26, 33, 48, 0.28);
  --shadow: 0 1px 2px rgba(26, 33, 48, 0.06), 0 8px 24px -12px rgba(26, 33, 48, 0.18);
  /* The accent as it appears on the apps' own navy surface. Unlike --stamp
     this does not darken for light mode: the phone sketches below are navy
     in both themes, and the light-mode --stamp sits on them at ~2.8:1. */
  --stamp-on-dark: #90a5da;

  /* Neon, for bold words inside prose.
     Neon is a light-on-dark effect: #2ffcdc on white is about 1.5:1, which
     is unreadable, so --neon is the most saturated version of each app's
     colour that still clears 4.5:1 here, and the dark-mode block below
     swaps in the real thing plus a faint glow. --neon-glow is none in
     light mode so the shadow costs nothing. */
  --neon: #4a5ba8;
  --neon-glow: none;
}

/* The two security apps share a navy/teal theme; the padlock's brass is
   what tells App Lock apart from Secure Vault's shield. Light mode uses a
   deeper shade of each - #e3b04b and #4fd1c5 are chosen against the apps'
   dark surface and are unreadable as text on white. */
:root[data-app="applock"] { --stamp: #8a5a17; --stamp-soft: #f3e4c6; --stamp-on-dark: #e3b04b; --neon: #8f5400; }
:root[data-app="securevault"] { --stamp: #0f6f66; --stamp-soft: #d3ece9; --stamp-on-dark: #4fd1c5; --neon: #006f63; }
/* The Waveclues blue itself is #00a8ef, which is too pale to read as small
   text on white; the home page uses a deeper cast of it. */
:root[data-app="waveclues"] { --stamp: #006e9c; --stamp-soft: #e2f2fb; --stamp-on-dark: #4ec3f0; --neon: #006b9e; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14171c;
    --paper-raised: #1b1f26;
    --paper-sunken: #101317;
    --ink: #e8eaea;
    --ink-soft: #a7b0be;
    --ink-faint: #707a8c;
    --accent: #90a5da;
    --accent-soft: #232c47;
    --stamp: #90a5da;
    --stamp-soft: #232c47;
    --success: #7fc39a;
    --success-soft: #1e3327;
    --warning: #e2b064;
    --warning-soft: #3a2d15;
    --line: rgba(232, 234, 234, 0.14);
    --line-strong: rgba(232, 234, 234, 0.28);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --neon: #b79dff;
    --neon-glow: 0 0 14px currentColor;
  }
  :root[data-app="applock"] { --stamp: #e3b04b; --stamp-soft: #3a2d15; --neon: #ffc94d; }
  :root[data-app="securevault"] { --stamp: #4fd1c5; --stamp-soft: #14332f; --neon: #2ffcdc; }
  :root[data-app="waveclues"] { --stamp: #4ec3f0; --stamp-soft: #10303d; --neon: #4fd8ff; }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Source Serif', Georgia, serif; font-weight: 650; text-wrap: balance; margin: 0; color: var(--ink); }
a { color: var(--accent); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
img, svg, video { max-width: 100%; height: auto; }
.mono { font-family: 'Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px);
  height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand img { width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0; }
.brand-name { font-family: 'Source Serif', serif; font-weight: 650; font-size: 17px; color: var(--ink); }

/* The nav scrolls sideways rather than pushing the page wide. Without this
   a five-item nav is ~320px of content in a 320px bar, and because the bar
   is the full width of the viewport it drags the whole document with it -
   every section then sits offset and the page scrolls horizontally. */
.topnav {
  display: flex; gap: 4px; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 7px; transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.topnav a:hover { background: var(--paper-sunken); color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* ---------- the "get the app" badge ----------
   Neither app is on Google Play yet, so this is a state, not a link:
   .get-app.soon is not clickable and says so. Swap it for an <a
   class="get-app"> pointing at the listing on the day it publishes. */
.get-app {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 13.5px;
  padding: 8px 14px; border-radius: 8px;
}
a.get-app:hover { background: var(--accent); color: #fff; }
.get-app.soon {
  background: transparent; color: var(--ink-soft); border: 1px dashed var(--line-strong); cursor: default;
}
.get-app.soon .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--stamp); flex-shrink: 0;
}

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 7vw, 72px) 0 clamp(32px, 5vw, 56px); }
.eyebrow {
  font-family: 'Plex Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--stamp); margin-bottom: 14px; display: block;
}
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -0.01em; max-width: 17ch; }
.hero-lede { margin-top: 18px; max-width: 60ch; font-size: 18px; color: var(--ink-soft); line-height: 1.65; }
.hero-actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero-actions .get-app { font-size: 15px; padding: 11px 18px; }
.hero-actions .note { font-size: 13.5px; color: var(--ink-faint); }

.fact-strip {
  margin-top: 34px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.fact { padding: 16px 18px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: none; }
.fact .k { font-family: 'Plex Mono', monospace; font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.fact .v { margin-top: 5px; font-size: 15px; font-weight: 600; }

/* ---------- section headers ---------- */
.section-head { padding: clamp(30px, 5vw, 44px) 0 8px; }
.section-head .eyebrow { margin-bottom: 10px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head .sub { margin-top: 10px; max-width: 62ch; color: var(--ink-soft); font-size: 16px; }

/* ---------- tour ---------- */
#tour { padding-bottom: clamp(40px, 6vw, 64px); }
.tour-list { margin-top: 30px; display: flex; flex-direction: column; }
.stop {
  display: grid; grid-template-columns: 88px 1fr 200px; gap: 28px;
  padding: 30px 0; border-top: 1px solid var(--line);
  opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease;
}
.stop.in-view { opacity: 1; transform: translateY(0); }
.stop:last-child { border-bottom: 1px solid var(--line); }
.stop-num { font-family: 'Plex Mono', monospace; font-size: 13px; color: var(--ink-faint); padding-top: 4px; }
.stop-num b { display: block; font-size: 26px; color: var(--ink); font-weight: 600; line-height: 1; margin-bottom: 6px; }
.stop h3 { font-size: 22px; margin-bottom: 6px; }
.stop .tagline { font-style: italic; color: var(--ink-soft); font-family: 'Source Serif', serif; font-size: 16px; margin-bottom: 14px; }
.stop ul { display: flex; flex-direction: column; gap: 7px; }
.stop li { font-size: 14.5px; color: var(--ink-soft); padding-left: 16px; position: relative; }
.stop li::before { content: "-"; position: absolute; left: 0; color: var(--ink-faint); }
.stop li b { color: var(--ink); font-weight: 600; }

/* A small phone-shaped sketch beside each tour stop. Deliberately a
   sketch and not a screenshot: neither app has shipped, and a mock that
   looks like a photograph of a release would be a lie. */
.mock {
  justify-self: end; align-self: start; width: 168px;
  border-radius: 20px; border: 1px solid var(--line-strong); background: #1b1b2f;
  padding: 14px 12px 16px; box-shadow: var(--shadow); color: #ededf5;
}
.mock .notch { width: 46px; height: 4px; border-radius: 3px; background: #45456a; margin: 0 auto 12px; }
.mock .mtitle { font-family: 'Plex Mono', monospace; font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: #b9b9ce; margin-bottom: 9px; }
.mock .mrow {
  display: flex; align-items: center; gap: 7px; padding: 6px 7px; margin-bottom: 5px;
  border-radius: 7px; background: #2a2a45; font-size: 10px;
}
.mock .mrow .sq { width: 14px; height: 14px; border-radius: 4px; background: #45456a; flex-shrink: 0; }
.mock .mrow .sw { margin-left: auto; width: 18px; height: 10px; border-radius: 6px; background: #45456a; flex-shrink: 0; }
.mock .mrow.on .sw { background: var(--stamp-on-dark); }
.mock .mrow.on { background: #32324f; }
.mock .dots { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }
.mock .dots i { width: 9px; height: 9px; border-radius: 50%; background: #45456a; display: block; }
.mock .dots i.f { background: var(--stamp-on-dark); }
.mock .pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mock .pad span {
  height: 20px; border-radius: 6px; background: #2a2a45;
  display: grid; place-items: center; font-size: 9px; color: #b9b9ce;
  font-family: 'Plex Mono', monospace;
}
.mock .note { font-size: 9px; color: #b9b9ce; text-align: center; margin-top: 10px; line-height: 1.4; }
.mock .bar { height: 6px; border-radius: 3px; background: #2a2a45; margin-bottom: 6px; }
.mock .bar.a { width: 80%; } .mock .bar.b { width: 55%; } .mock .bar.c { width: 68%; }
.mock .stamped {
  margin-top: 10px; text-align: center; font-family: 'Plex Mono', monospace;
  font-size: 9px; letter-spacing: 0.06em; color: var(--stamp-on-dark);
}

/* ---------- guide ---------- */
#guide { padding-bottom: 60px; }
.guide-body { margin-top: 20px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.index { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 2px; padding-right: 8px; }
.index a {
  text-decoration: none; color: var(--ink-faint); font-size: 13.5px; font-weight: 600;
  padding: 7px 10px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.index a:hover { color: var(--ink); background: var(--paper-sunken); }
.index a.active { color: var(--stamp); border-left-color: var(--stamp); background: var(--stamp-soft); }

.topics { display: flex; flex-direction: column; }
.topic { padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 74px; }
.topic:first-child { border-top: none; padding-top: 0; }
.topic-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.topic h3 { font-size: 22px; }
.topic .tag {
  font-family: 'Plex Mono', monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-faint); border: 1px solid var(--line-strong); padding: 2px 7px; border-radius: 20px;
}
.topic .lede { margin-top: 10px; color: var(--ink-soft); max-width: 66ch; font-size: 15.5px; }
.topic .rows { margin-top: 18px; display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; padding: 13px 0; border-top: 1px dashed var(--line); }
.row:first-child { border-top: none; }
.row .rk { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.row .rv { font-size: 14.5px; color: var(--ink-soft); }
.row .rv b { color: var(--ink); font-weight: 600; }
.row .rv code, .inline-code {
  font-family: 'Plex Mono', monospace; font-size: 0.86em; background: var(--paper-sunken);
  padding: 1px 6px; border-radius: 4px; color: var(--ink);
}

.callout {
  margin-top: 18px; padding: 16px 18px; border-radius: 10px; display: flex; gap: 12px;
  background: var(--paper-raised); border: 1px solid var(--line);
}
.callout.warn { background: var(--warning-soft); border-color: transparent; }
.callout.info { background: var(--accent-soft); border-color: transparent; }
.callout .mark { font-family: 'Plex Mono', monospace; font-weight: 700; font-size: 12px; flex-shrink: 0; padding-top: 2px; }
.callout.warn .mark { color: var(--warning); }
.callout.info .mark { color: var(--accent); }
.callout p { font-size: 14.5px; color: var(--ink-soft); }
.callout p b { color: var(--ink); }

.chiprow { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.chip {
  font-family: 'Plex Mono', monospace; font-size: 12px; padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
}

.table-scroll { overflow-x: auto; margin-top: 4px; }
.settings-table { margin-top: 4px; width: 100%; border-collapse: collapse; }
.settings-table th, .settings-table td { text-align: left; padding: 10px 14px; font-size: 14px; border-top: 1px solid var(--line); white-space: nowrap; }
.settings-table td:nth-child(3), .settings-table th:nth-child(3) { white-space: normal; min-width: 260px; }
.settings-table th { font-family: 'Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); border-top: none; padding-bottom: 8px; }
.settings-table td:first-child { color: var(--stamp); font-weight: 600; font-family: 'Plex Mono', monospace; font-size: 12.5px; }
.settings-table td:nth-child(2) { font-weight: 600; }
.settings-table td:last-child { color: var(--ink-soft); }

.faq-item { padding: 16px 0; border-top: 1px dashed var(--line); }
.faq-item:first-child { border-top: none; }
.faq-item .q { font-weight: 650; font-size: 15.5px; margin-bottom: 6px; }
.faq-item .a { color: var(--ink-soft); font-size: 14.5px; max-width: 66ch; }

/* A two-column "does / does not" pair, for the pages' honesty sections. */
.split { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.split .card { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-raised); }
.split .card h4 { font-size: 16px; margin-bottom: 10px; }
.split .card.yes h4 { color: var(--success); }
.split .card.no h4 { color: var(--warning); }
.split .card li { font-size: 14px; color: var(--ink-soft); padding-left: 18px; position: relative; margin-bottom: 7px; }
.split .card li:last-child { margin-bottom: 0; }
.split .card.yes li::before { content: "+"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.split .card.no li::before { content: "-"; position: absolute; left: 0; color: var(--warning); font-weight: 700; }

/* ---------- screenshot gallery ----------
   Same component as invoiceongo-guide.html, with the image folder named
   per page (data-slider-dir) instead of hard-coded to SLIDER/. The
   section starts hidden and app-page.js only reveals it once images have
   actually loaded, so a page with no screenshots yet shows no empty frame. */
.slider-gallery { margin: 64px 0 8px; }
.slider-gallery .section-head { margin-bottom: 22px; }
.slider-stage {
  position: relative; overflow: hidden; border: 1px solid var(--line-strong);
  border-radius: 14px; background: var(--paper); box-shadow: 0 14px 34px rgba(20, 31, 38, .08);
}
.slider-stage img { display: block; width: 100%; max-height: 680px; object-fit: contain; background: var(--paper-sunken); }
/* Hold the height before the first image decodes, so revealing the gallery
   does not shove the rest of the page down (cumulative layout shift). */
.slider-stage { min-height: 420px; }
.slider-gallery.portrait .slider-stage { min-height: 700px; }
@media (max-width: 640px) {
  .slider-stage { min-height: 300px; }
  .slider-gallery.portrait .slider-stage { min-height: 460px; }
}
.slider-count {
  position: absolute; top: 12px; left: 12px; padding: 4px 8px; border-radius: 5px;
  background: rgba(17, 31, 39, .74); color: #fff; font: 12px/1.2 'Plex Mono', ui-monospace, monospace;
}
.slider-nav {
  position: absolute; top: 50%; z-index: 1; display: grid; place-items: center;
  width: 42px; height: 42px; transform: translateY(-50%); border: 0; border-radius: 50%;
  background: rgba(17, 31, 39, .82); color: #fff; cursor: pointer; font-size: 30px; line-height: 1;
}
.slider-nav:hover, .slider-nav:focus-visible { background: var(--stamp); outline: 3px solid var(--stamp-soft); outline-offset: 2px; }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: thin; }
.slider-thumb {
  flex: 0 0 92px; height: 66px; overflow: hidden; padding: 0; border: 2px solid transparent;
  border-radius: 8px; background: var(--paper); cursor: pointer;
}
.slider-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.slider-thumb[aria-current="true"] { border-color: var(--stamp); }
.slider-caption { margin: 12px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.slider-caption b { color: var(--ink); font-weight: 650; }
.slider-status { margin: 10px 0 0; color: var(--ink-faint); font-size: 13px; }
.slider-gallery[hidden] { display: none; }

/* A gallery of phone screenshots is tall and narrow; left at full width the
   stage is mostly empty backdrop. `portrait` narrows the whole component
   instead of letting one 540px-wide image float in a 1080px frame. */
.slider-gallery.portrait .slider-stage,
.slider-gallery.portrait .slider-thumbs,
.slider-gallery.portrait .slider-caption { max-width: 560px; margin-inline: auto; }
.slider-gallery.portrait .slider-stage img { max-height: 760px; }
.slider-gallery.portrait .slider-thumbs { justify-content: flex-start; }
.slider-gallery.portrait .slider-caption { text-align: center; }
@media (max-width: 640px) {
  .slider-gallery { margin-top: 44px; }
  .slider-stage img { max-height: 440px; }
  .slider-nav { width: 36px; height: 36px; font-size: 25px; }
  .slider-prev { left: 8px; }
  .slider-next { right: 8px; }
}
@media (max-width: 440px) { .slider-thumb { flex: 0 0 72px; height: 52px; } }


/* ---------- neon bold ----------
   Bold words inside running text carry the accent instead of plain ink. It
   is scoped to prose: headings are already serif and heavy, and turning
   nav, buttons or table headers neon would make the accent meaningless.
   The glow is a dark-mode-only variable, so light mode renders flat. */
.stop li b, .stop li strong,
.topic .lede b, .topic .lede strong,
.row .rv b, .row .rv strong,
.callout p b, .callout p strong,
.faq-item .a b, .faq-item .a strong,
.split .card li b, .split .card li strong,
.hero-lede b, .hero-lede strong,
.section-head .sub b, .section-head .sub strong,
.slider-caption b, .slider-caption strong {
  color: var(--neon);
  font-weight: 700;
  text-shadow: var(--neon-glow);
}
@media (prefers-reduced-motion: no-preference) {
  .stop li b, .row .rv b, .callout p b { transition: text-shadow 0.2s; }
}

footer { border-top: 1px solid var(--line-strong); padding: 30px 0 46px; }
footer .foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer p { font-size: 13px; color: var(--ink-faint); }
footer .foot-row .mono { font-size: 12.5px; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer nav a { font-size: 13px; color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .wrap, .topbar-inner { padding: 0 24px; }
  .guide-body { gap: 32px; }
}

@media (max-width: 860px) {
  .wrap, .topbar-inner { padding: 0 18px; }
  .topbar-inner { height: 56px; }
  .brand-name { font-size: 16px; }
  .topnav a { padding: 6px 10px; font-size: 13px; }
  .stop { grid-template-columns: 60px 1fr; gap: 16px; }
  .mock { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
  .guide-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .index {
    position: sticky; top: 56px; flex-direction: row; overflow-x: auto; gap: 6px;
    background: var(--paper); padding: 8px 0; border-bottom: 1px solid var(--line); z-index: 10;
    -webkit-overflow-scrolling: touch; -ms-overflow-style: none; scrollbar-width: none;
  }
  .index::-webkit-scrollbar { display: none; }
  .index a { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; border-radius: 6px; padding: 6px 12px; }
  .index a.active { border-left: none; border-bottom-color: var(--stamp); }
  .row { grid-template-columns: 140px minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .brand-name { display: none; }
  .topbar-inner { gap: 8px; }
  .topnav { gap: 2px; }
  .topnav a { padding: 6px 9px; font-size: 13px; }
  .hero { padding: 32px 0 24px; }
  .hero-lede { font-size: 16px; }
  .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 12px 14px; }
  .fact:nth-child(3) { border-left: none; border-top: 1px solid var(--line); }
  .fact:nth-child(4) { border-top: 1px solid var(--line); }
  .stop { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
  .stop-num { display: flex; align-items: center; gap: 8px; padding-top: 0; }
  .stop-num b { margin-bottom: 0; font-size: 22px; }
  .stop h3 { font-size: 19px; }
  .row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .row .rk, .row .rv { font-size: 14px; }
  .topic { padding: 24px 0; }
  .topic h3 { font-size: 19px; }
  .topic-head { flex-wrap: wrap; gap: 6px; }
  .callout { padding: 12px 14px; gap: 10px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .settings-table th, .settings-table td { padding: 8px 10px; font-size: 13px; }
  .faq-item { padding: 12px 0; }
  .faq-item .q { font-size: 14.5px; }
  .faq-item .a { font-size: 13.5px; }
  footer { padding: 24px 0 36px; }
  footer .foot-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 440px) {
  .wrap, .topbar-inner { padding: 0 14px; }
  .topnav a { padding: 5px 7px; font-size: 12.5px; }
  .fact-strip { grid-template-columns: 1fr; }
  .fact { border-left: none; border-top: 1px solid var(--line); }
  .fact:first-child { border-top: none; }
  .chip { font-size: 11px; padding: 3px 8px; }
  .topbar .get-app { padding: 7px 10px; font-size: 12.5px; }
}
