/* Tethertone website — one stylesheet, no web fonts, light and dark themes. */

/* ---------- tokens ---------- */
:root, html[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0b1120;
  --text-2: #3f4b5e;
  --text-3: #5b6778;
  --accent: #0369a1;
  --accent-bright: #0ea5e9;
  --accent-soft: #e0f2fe;
  --ok: #15803d;
  --warn: #b45309;
  --glow: rgba(14, 165, 233, 0.16);
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .08), 0 24px 60px rgba(15, 23, 42, .16);
  --grad: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 45%, #7dd3fc 100%);
  --grad-text: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0ea5e9 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1140px;
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b16;
    --bg-soft: #0b1120;
    --surface: #0f172a;
    --surface-2: #111c33;
    --border: #1e293b;
    --border-strong: #334155;
    --text: #e8eef7;
    --text-2: #a5b1c4;
    --text-3: #8b98ad;
    --accent: #38bdf8;
    --accent-bright: #38bdf8;
    --accent-soft: rgba(56, 189, 248, .12);
    --ok: #4ade80;
    --warn: #fbbf24;
    --glow: rgba(56, 189, 248, 0.18);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 30px 70px rgba(0, 0, 0, .55);
    --grad-text: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 45%, #bae6fd 100%);
    color-scheme: dark;
  }
}

html[data-theme="dark"] {
  --bg: #070b16;
  --bg-soft: #0b1120;
  --surface: #0f172a;
  --surface-2: #111c33;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #e8eef7;
  --text-2: #a5b1c4;
  --text-3: #8b98ad;
  --accent: #38bdf8;
  --accent-bright: #38bdf8;
  --accent-soft: rgba(56, 189, 248, .12);
  --ok: #4ade80;
  --warn: #fbbf24;
  --glow: rgba(56, 189, 248, 0.18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 30px 70px rgba(0, 0, 0, .55);
  --grad-text: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 45%, #bae6fd 100%);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.022em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 720; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.012em; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--accent-soft); color: var(--text); padding: .12em .4em; border-radius: 6px; font-size: .86em; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; font-size: .82em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- reading progress bar (long articles only) ---------- */
.reading-progress { display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .reading-progress {
      display: block; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none;
      background: var(--grad); transform-origin: 0 50%; transform: scaleX(0);
      animation: readProgress linear both; animation-timeline: scroll(root);
    }
    @keyframes readProgress { to { transform: scaleX(1); } }
  }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.nav { height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(125, 211, 252, .18); }
.nav-menu { display: flex; align-items: center; flex: 1; gap: 16px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 auto 0 12px; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: .94rem; font-weight: 500; transition: color .15s ease, background-color .15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .15s ease;
}
.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}
.theme-toggle svg { width: 18px; height: 18px; }
:root .theme-toggle-sun,
html[data-theme="light"] .theme-toggle-sun { display: none; }
:root .theme-toggle-moon,
html[data-theme="light"] .theme-toggle-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle-moon { display: none; }
}
html[data-theme="dark"] .theme-toggle-sun { display: block; }
html[data-theme="dark"] .theme-toggle-moon { display: none; }

.icon-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); text-decoration: none; font-size: .94rem; font-weight: 500; transition: color .15s ease; }
.icon-link:hover { color: var(--text); }
.icon-link svg { width: 18px; height: 18px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--text); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; margin: 0 auto; position: relative; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .js .nav-toggle { display: block; }
  .js .nav-menu {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 20px 24px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .js .nav-menu.open { display: flex; }
  .js .nav-links { flex-direction: column; margin: 0; }
  .js .nav-links a { padding: 12px; font-size: 1rem; }
  .js .nav-actions { justify-content: space-between; padding: 10px 12px 0; border-top: 1px solid var(--border); }
  .no-js .nav { height: auto; flex-wrap: wrap; padding: 10px 20px; }
  .no-js .nav-menu { flex-wrap: wrap; }
  .no-js .nav-links { margin: 0; flex-wrap: wrap; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 1px solid transparent;
  font: 600 .98rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: #0b1120; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 18px rgba(2, 132, 199, .25); }
.btn-primary:hover { background: #111a2e; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 10px 26px rgba(2, 132, 199, .32); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { background: #f1f5f9; color: #0b1120; box-shadow: 0 6px 22px rgba(56, 189, 248, .22); }
  :root:not([data-theme="light"]) .btn-primary:hover { background: #ffffff; }
}
html[data-theme="dark"] .btn-primary { background: #f1f5f9; color: #0b1120; box-shadow: 0 6px 22px rgba(56, 189, 248, .22); }
html[data-theme="dark"] .btn-primary:hover { background: #ffffff; }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-3); }
.btn-ghost { color: var(--text); padding-left: 6px; padding-right: 6px; }
.btn-ghost svg { width: 16px; height: 16px; transition: transform .15s ease; }
.btn-ghost:hover svg { transform: translateX(3px); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: .9rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn-label small { font-weight: 500; font-size: .74rem; opacity: .72; }

/* ---------- shared bits ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: .82rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .86rem; font-weight: 500; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.pill b { background: var(--grad); color: #062033; font-size: .72rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; letter-spacing: .02em; }
.pill:hover { color: var(--text); text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.28rem); color: var(--text-2); line-height: 1.55; max-width: 38em; }
.muted { color: var(--text-3); }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.section-head h2 { margin-bottom: .35em; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 112px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 78% 30%, var(--glow), transparent 70%),
    radial-gradient(35% 40% at 15% 10%, rgba(125, 211, 252, .12), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin: 22px 0 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 22px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; color: var(--text-3); font-size: .9rem; }
.hero-meta li { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta li::before { content: ""; width: 16px; height: 16px; background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%230ea5e9' fill-opacity='.18'/%3E%3Cpath d='M4.8 8.2l2.1 2.1 4.3-4.6' fill='none' stroke='%230ea5e9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-cta, .hero-meta { justify-content: center; }
}

/* ---------- hero art: Mac popover → link → phone ---------- */
/* Every animation here moves only transform/opacity, so it runs on the
   compositor and never forces layout. */
.hero-art { position: relative; display: grid; grid-template-columns: 1.25fr .38fr .9fr; align-items: center; min-height: 420px; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text); font-size: 13px; line-height: 1.35; }
.mock-mac { padding: 0; overflow: hidden; }
.mock-menubar { display: flex; align-items: center; gap: 12px; justify-content: flex-end; height: 28px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--text-3); font-size: 11px; }
.mock-menubar .mb-icon { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mock-menubar .mb-icon svg { width: 11px; height: 11px; }
.mock-body { padding: 16px; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mock-title { font-weight: 700; font-size: 14px; }
.mock-sub { color: var(--text-3); font-size: 11.5px; }
.mock-badge { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); flex: none; }
.mock-btn { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; border-radius: 9px; background: #0a84ff; color: #fff; font-weight: 600; font-size: 13px; }
.mock-btn.secondary { margin-top: 8px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-weight: 500; }
.mock-seg { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 11.5px; text-align: center; }
.mock-seg span { padding: 6px 4px; color: var(--text-2); }
.mock-seg span.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.mock-client { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.mock-client code { display: block; margin-top: 4px; font-size: 10.5px; color: var(--text-3); background: none; padding: 0; }

.link { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 48px; padding: 0 6px; }
.link-line { position: relative; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--border-strong), var(--accent-bright), var(--border-strong)); }
.link-line.dashed { background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 11px); }
.link-line i { position: absolute; top: -3px; left: 0; width: 100%; height: 8px; opacity: 0; }
.link-line i::before { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 12px var(--accent-bright); }
.link-label { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

.mock-phone { width: 100%; max-width: 230px; justify-self: end; border-radius: 34px; padding: 10px; background: #0b1120; border: 1px solid #1e293b; box-shadow: var(--shadow-lg); }
.phone-screen { border-radius: 26px; background: #0f172a; color: #e8eef7; padding: 30px 14px 16px; position: relative; overflow: hidden; }
.phone-screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 64px; height: 16px; transform: translateX(-50%); background: #020617; border-radius: 10px; }
.phone-screen .app-title { font-weight: 800; font-size: 17px; letter-spacing: -.02em; margin-bottom: 10px; }
.status-card { border-radius: 14px; background: #122033; padding: 10px 12px; margin-bottom: 10px; }
.status-card strong { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #86efac; }
.status-card strong .dot { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); width: 7px; height: 7px; }
.status-card span { display: block; margin-top: 2px; font-size: 10.5px; color: #93a4bb; }
.meter { display: flex; align-items: flex-end; gap: 3px; height: 46px; padding: 8px 10px; border-radius: 12px; background: #122033; margin-bottom: 10px; }
.meter i { flex: 1; height: 100%; border-radius: 2px; background: linear-gradient(to top, #0ea5e9, #7dd3fc); transform-origin: bottom; transform: scaleY(var(--s, .6)); }
.meter i:nth-child(1) { --s: .55; } .meter i:nth-child(2) { --s: .8; } .meter i:nth-child(3) { --s: .65; } .meter i:nth-child(4) { --s: .95; } .meter i:nth-child(5) { --s: .7; }
.meter i:nth-child(6) { --s: .85; } .meter i:nth-child(7) { --s: .5; } .meter i:nth-child(8) { --s: .75; } .meter i:nth-child(9) { --s: .6; } .meter i:nth-child(10) { --s: .9; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.tiles div { background: #122033; border-radius: 10px; padding: 7px 9px; }
.tiles b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.tiles span { font-size: 9.5px; color: #93a4bb; }
.drift { border-radius: 12px; background: #122033; padding: 8px 10px; font-size: 10.5px; color: #93a4bb; }
.drift b { display: block; color: #e8eef7; font-size: 11.5px; margin-bottom: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .link-line i { animation: packet 1.6s linear infinite; }
  .link-line i:nth-child(3) { animation-delay: .53s; }
  .link-line i:nth-child(4) { animation-delay: 1.06s; }
  .link-line.dashed i { animation-duration: 2.4s; }
  .meter i { animation: level 1.1s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
  .dot.pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--ok); animation: dotPulse 2s cubic-bezier(.24, 0, .38, 1) infinite; }
}
@keyframes packet { 0% { transform: translateX(0); opacity: 0; } 12%, 88% { opacity: 1; } 100% { transform: translateX(calc(100% - 8px)); opacity: 0; } }
@keyframes level { from { transform: scaleY(calc(var(--s, .6) * .35)); } to { transform: scaleY(var(--s, .6)); } }
@keyframes dotPulse { 0% { transform: scale(.9); opacity: .8; } 70%, 100% { transform: scale(2.2); opacity: 0; } }

@media (max-width: 560px) {
  /* On a phone, the phone is the picture: the Mac mock and link would add
     900px of scrolling before any content. */
  .hero-art { grid-template-columns: 1fr; min-height: 0; margin-top: 8px; }
  .mock-mac, .link { display: none; }
  .mock-phone { justify-self: center; max-width: 250px; }
  .hero-cta { flex-direction: column; align-items: stretch; max-width: 360px; margin-inline: auto; }
  .hero-cta .btn { justify-content: flex-start; }
  .pill { font-size: .8rem; }
}

/* ---------- trust strip ---------- */
.trust { padding: 26px 0; border-block: 1px solid var(--border); background: var(--bg-soft); }
.trust ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; list-style: none; margin: 0; padding: 0; color: var(--text-2); font-size: .94rem; font-weight: 550; }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust svg { width: 20px; height: 20px; color: var(--accent); }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 18px; background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent);
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; color: var(--text-2); font-size: .97rem; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .15s ease, box-shadow .15s ease; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px; border-radius: 10px; background: var(--grad); color: #062033; font-weight: 800; font-size: 1.05rem; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text-2); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; list-style: none; padding: 0; margin: 0 0 40px; }
.pipeline li { position: relative; padding: 20px 18px; background: var(--surface); border: 1px solid var(--border); margin-left: -1px; transition: background-color .15s ease; }
.pipeline li:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.pipeline li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.pipeline li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 50%; z-index: 1; width: 16px; height: 16px; transform: translateY(-50%) rotate(45deg); background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); }
.pipeline small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.pipeline b { display: block; font-size: 1rem; margin-bottom: 4px; }
.pipeline span { display: block; font-size: .88rem; color: var(--text-3); }
@media (max-width: 900px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline li, .pipeline li:first-child, .pipeline li:last-child { margin: -1px 0 0; border-radius: 0; }
  .pipeline li:first-child { border-radius: var(--radius) var(--radius) 0 0; margin-top: 0; }
  .pipeline li:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  .pipeline li:not(:last-child)::after { right: auto; left: 28px; top: auto; bottom: -9px; transform: rotate(135deg); }
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; }
.stats div { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; transition: border-color .15s ease; }
.stats dt { order: 2; color: var(--text-3); font-size: .9rem; }
.stats dd { margin: 0 0 4px; font-family: var(--font-display); font-size: clamp(1.3rem, 5.2vw, 2.2rem); white-space: nowrap; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footnote { margin-top: 16px; font-size: .88rem; color: var(--text-3); }

/* ---------- two-up cards ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: border-color .15s ease; }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card .tag { font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; }
.card p { color: var(--text-2); }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 18px 0 0; font-size: .94rem; }
.card dt { color: var(--text-3); }
.card dd { margin: 0; font-weight: 550; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }

.routes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.route { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .15s ease, transform .15s ease; }
.route-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.route-icon { width: 22px; height: 22px; color: var(--accent); flex: none; }
.route b { display: block; font-size: 1.05rem; }
.route p { margin: 0; color: var(--text-2); font-size: .92rem; }
.route .meta { display: inline-block; margin-top: 14px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px; }
@media (max-width: 900px) { .routes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .routes { grid-template-columns: 1fr; } }

/* ---------- open source band ---------- */
.oss { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.oss ul.checks { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; }
.oss ul.checks li { position: relative; padding-left: 28px; color: var(--text-2); }
.oss ul.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.2 2.2 4.8-5' fill='none' stroke='%230ea5e9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.terminal { margin: 0; border-radius: var(--radius-lg); background: #0b1120; color: #cbd5e1; border: 1px solid #1e293b; box-shadow: var(--shadow-lg); overflow: hidden; font: 13px/1.7 var(--mono); }
.terminal-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #1e293b; }
.terminal-dots { display: flex; gap: 7px; }
.terminal-dots i { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.terminal-dots i:nth-child(1) { background: #f87171; }
.terminal-dots i:nth-child(2) { background: #fbbf24; }
.terminal-dots i:nth-child(3) { background: #4ade80; }
.terminal-title { color: #a5b1c4; font: 600 .78rem/1 var(--font); }
.terminal-copy-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 6px; border: 1px solid #334155;
  background: #111c33; color: #cbd5e1; font: 600 .74rem/1 var(--font); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.terminal-copy-btn:hover { background: #1e293b; color: #fff; border-color: #475569; }
.terminal-copy-btn svg { width: 13px; height: 13px; }
.terminal-copy-btn.copied { color: #86efac; border-color: #22c55e; }
.terminal pre { margin: 0; padding: 18px 20px; overflow-x: auto; color: #dbe4f0; }
.terminal pre code { font-size: .92em; }
.terminal .c { color: #8b98ad; } .terminal .p { color: #38bdf8; } .terminal .ok { color: #4ade80; }
@media (max-width: 860px) { .oss { grid-template-columns: 1fr; } }

/* ---------- guide links ---------- */
.guide-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide-link { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.guide-link b { font-size: 1.05rem; }
.guide-link b::after { content: " →"; color: var(--accent); }
.guide-link span { color: var(--text-2); font-size: .94rem; }
.guide-link:hover { border-color: var(--accent-bright); transform: translateY(-2px); text-decoration: none; }
@media (max-width: 860px) { .guide-links { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: border-color .2s ease, box-shadow .2s ease;
}
.faq details:hover { border-color: var(--border-strong); }
.faq details[open] { border-color: var(--accent-bright); box-shadow: 0 4px 18px var(--glow); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 20px 24px; cursor: pointer; list-style: none; font-weight: 620; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-soft) no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 1v8M1 5h8' stroke='%230ea5e9' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 22px; color: var(--text-2); max-width: 62em; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.faq .answer p:last-child { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px, 6vw, 72px); text-align: center; background: #0b1120; color: #e8eef7; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 50% 0%, rgba(56, 189, 248, .35), transparent 70%); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #a5b1c4; max-width: 36em; margin: 0 auto 28px; }
.cta-band .btn-primary { background: #f1f5f9; color: #0b1120; }
.cta-band .btn-secondary { background: transparent; color: #e8eef7; border-color: #334155; }
.cta-band .hero-cta { justify-content: center; margin: 0; }

/* ---------- inner pages ---------- */
.page-hero { position: relative; padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--border); background: var(--bg-soft); overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(45% 80% at 85% 0%, var(--glow), transparent 70%); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-bottom: 14px; }
.breadcrumb { display: flex; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; font-size: .88rem; color: var(--text-3); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding: clamp(40px, 6vw, 72px) 20px; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .9rem; }
.toc h2 { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.toc-collapsible summary {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 36px; padding: 6px 0; margin-bottom: 8px;
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--text-3); cursor: pointer; list-style: none;
}
.toc-collapsible summary::-webkit-details-marker { display: none; }
@media (min-width: 901px) {
  /* A sidebar that collapses itself is a surprise; on wide screens it is a heading. */
  .toc-collapsible summary { cursor: default; pointer-events: none; min-height: 0; padding: 0; margin-bottom: 12px; }
  .toc-collapsible summary::after { display: none; }
}
.toc-collapsible summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.toc-collapsible[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; transition: color .15s ease, border-left-color .15s ease; }
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--accent-bright); font-weight: 550; }

.doc > * { min-width: 0; }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static; margin-bottom: 24px; padding: 14px 18px;
    border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  }
  .toc-collapsible summary {
    font-size: .92rem; color: var(--text); margin-bottom: 0;
  }
  .toc-collapsible ol { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); border-left: none; }
  .toc-collapsible a { padding: 8px 0; border-left: none; }
}

.prose { max-width: 46rem; font-size: 1.04rem; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 2.2em 0 .6em; padding-top: .2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.18rem; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }

/* Table styling */
.table-wrap { width: 100%; overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); margin: 1.4em 0 1.8em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:last-child td, .prose tr:last-child th { border-bottom: none; }
.prose th { font-weight: 650; color: var(--text); background: var(--bg-soft); white-space: nowrap; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--bg-soft) 50%, transparent); }
.prose td { color: var(--text-2); }
.prose .figure { margin: 1.4em 0 1.8em; }

.codeblock { position: relative; margin: 1em 0 1.5em; }
.codeblock pre, .prose pre { margin: 0; padding: 18px 20px; border-radius: 12px; background: #0b1120; color: #dbe4f0; border: 1px solid #1e293b; overflow-x: auto; font-size: .88rem; line-height: 1.65; }
.copy-btn {
  position: absolute; top: 9px; right: 9px; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border: 1px solid #334155; border-radius: 7px; background: #111c33;
  color: #cbd5e1; font: 600 .74rem/1 var(--font); cursor: pointer; opacity: 0;
  transition: opacity .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.copied { color: #86efac; border-color: #22c55e; }
.codeblock:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: 1; } }

.callout {
  display: flex; gap: 14px; padding: 18px 20px; margin: 1.4em 0 1.8em;
  border-radius: 12px; border: 1px solid var(--border); background: var(--bg-soft);
  border-left: 4px solid var(--accent); font-size: .97rem;
}
.callout.warn {
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 6%, var(--bg-soft));
}
.callout-icon { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.callout.warn .callout-icon { color: var(--warn); }
.callout p { margin: 0; color: var(--text-2); }
.callout p + p { margin-top: .6em; }

/* Short answer first: what a skimmer — or an AI answer engine — should take away. */
.tldr { margin: 0 0 2.2em; padding: 20px 22px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.tldr h2 { margin: 0 0 .5em !important; font-size: 1.05rem !important; letter-spacing: .02em; }
.tldr ul, .tldr ol { margin-bottom: 0; }
.tldr p { margin: .6em 0 0; }
.tldr li, .tldr p { color: var(--text); }
.byline { margin: 14px 0 0; font-size: .9rem; color: var(--text-3); }
.byline a { color: var(--text-2); }

/* ---------- download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: clamp(40px, 6vw, 64px); }
.dl-card {
  position: relative; display: flex; flex-direction: column; padding: 32px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease;
}
.dl-card.recommended { border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--glow), var(--shadow); }
.dl-card .platform { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.dl-card .platform svg { width: 30px; height: 30px; }
.dl-card h2 { font-size: 1.6rem; margin: 0; }
.dl-card .req { color: var(--text-3); font-size: .92rem; margin-bottom: 22px; }
.dl-card .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.dl-card .file { display: block; margin-top: 14px; font: .8rem var(--mono); color: var(--text-3); }
.dl-card .badge-rec {
  position: absolute; top: 18px; right: 18px; font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.dl-card:not(.recommended) .badge-rec { display: none; }
/* Scanning your own screen only makes sense from a desktop. */
.dl-qr-box { display: none !important; }
@media (hover: hover) and (pointer: fine) and (min-width: 761px) { .dl-qr-box { display: flex !important; } }
.dl-qr-box {
  margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border); display: flex; align-items: center; gap: 14px;
}
.dl-qr-box img { width: 68px; height: 68px; border-radius: 6px; background: #fff; padding: 4px; flex: none; }
.dl-qr-text { font-size: .86rem; color: var(--text-2); }
.dl-qr-text strong { display: block; color: var(--text); font-size: .92rem; margin-bottom: 2px; }
@media (max-width: 760px) { .dl-grid { grid-template-columns: 1fr; } }

/* ---------- roadmap ---------- */
.roadmap { list-style: none; padding: 0; margin: 1em 0 1.6em; display: grid; gap: 10px; }
.roadmap li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin: 0; transition: border-color .15s ease; }
.roadmap .state { flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; margin-top: 2px; min-width: 76px; text-align: center; }
.roadmap .done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.roadmap .next { background: var(--accent-soft); color: var(--accent); }
.roadmap .idea { background: var(--bg-soft); color: var(--text-3); border: 1px solid var(--border); }
.roadmap b { display: block; color: var(--text); }
.roadmap span.d { display: block; color: var(--text-2); font-size: .94rem; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: clamp(80px, 14vw, 160px) 20px; }
.not-found .code { font: 800 clamp(4rem, 14vw, 8rem)/1 var(--font-display); letter-spacing: -.05em; margin-bottom: 12px; }
.not-found .hero-cta { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--border); background: var(--bg-soft); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand p { color: var(--text-3); max-width: 24em; margin-top: 14px; }
.footer-version { margin-top: 14px; font-size: .86rem; color: var(--text-3); }
.footer-version a { color: var(--text-2); }
.site-footer h2 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer nav a { color: var(--text-2); text-decoration: none; transition: color .15s ease; }
.site-footer nav a:hover { color: var(--text); text-decoration: underline; }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 22px; padding-bottom: 32px; border-top: 1px solid var(--border);
  color: var(--text-3); font-size: .84rem;
}
.footer-actions { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; flex-wrap: wrap; }
.back-to-top {
  color: var(--accent); text-decoration: none; font-weight: 600; font-size: .86rem;
  padding: 4px 8px; border-radius: 6px; transition: background-color .15s ease;
}
.back-to-top:hover { background: var(--accent-soft); text-decoration: none; }
.trademark { margin: 0; font-size: .84rem; }
.footer-legal a { color: var(--text-2); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

@media print {
  .site-header, .site-footer, .toc, .copy-btn, .hero-art, .reading-progress { display: none !important; }
  body { background: #fff; color: #000; }
}
