/* Skimora site tokens. Palette and roles come from the extension's own theme
 * (C:\skimora\src\ui\theme.css), so the site and the product read as one thing:
 *
 *   sage  = identity: logo, headings' quiet accents, ticks
 *   mark  = LIVE. The highlighter. It is the reading highlight and it is the buy
 *           button, on purpose: the button glows the same colour as the thing it
 *           sells. Used as a background, never as text.
 *   ink   = text
 *
 * Nothing else on the page is warm, so anything apricot is either "happening now"
 * or "this is how you get it".
 */

@font-face {
  font-family: "Lexend";
  src: url("/assets/fonts/lexend.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  /* The demo article text only. A reading serif, so the demos look like the
   * long-form material Skimora is for and the interface stays interface. */
  font-family: "Literata";
  src: url("/assets/fonts/literata.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
/* Only fetched when a visitor picks them in the reading-fonts demo. */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("/assets/fonts/opendyslexic.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --paper: #f2f4f1;
  --card: #fafbf9;
  --surface: #e8ebe6;
  --line: #d3d8cf;
  --ink: #23291f;
  --sage: #3d4a3c;
  --sage-hover: #4d5c4b;
  --muted: #5c6157;
  --mark: #f0bc8a;
  --on-mark: #23291f;
  --danger: #925539;
  --focus: var(--sage);
  --wash: color-mix(in srgb, var(--mark) 62%, transparent);
  --band-bg: var(--sage);
  --band-ink: #f2f4f1;
  --brand-head: #211d2b;

  --font: "Lexend", -apple-system, "Segoe UI", system-ui, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;

  --radius: 14px;
  --radius-lg: 20px;
  --motion: 160ms ease;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151813;
    --card: #1a1e17;
    --surface: #1e221b;
    --line: #343a31;
    --ink: #e8ebe0;
    --sage: #9fbb9b;
    --sage-hover: #b4cdb0;
    --muted: #949b8c;
    --mark: #e9b27f;
    --on-mark: #23291f;
    --danger: #ef9a92;
    --wash: color-mix(in srgb, var(--mark) 36%, transparent);
    --band-bg: #1e221b;
    --band-ink: #e8ebe0;
    --brand-head: #e8ebe0;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 106.25%; /* 17px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 1.1rem + 4.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.032em; }
h2 { font-size: clamp(1.75rem, 1.15rem + 2.2vw, 2.7rem); line-height: 1.1; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 52rem; }

.lede {
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.24rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 34rem;
  margin-top: 1.1rem;
}
.fine { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0; max-width: 40rem; }
.fine a { color: inherit; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper);
  padding: 0.7rem 1rem; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--mark) 70%, transparent); color: var(--ink); }

.link { color: var(--sage); font-weight: 600; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }
.link:hover { color: var(--ink); }

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

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 1rem/1.1 var(--font); letter-spacing: -0.005em;
  padding: 0.9rem 1.35rem; border-radius: 12px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background var(--motion), transform var(--motion), border-color var(--motion), color var(--motion);
}
.btn-buy { background: var(--mark); color: var(--on-mark); border-color: var(--ink); }
.btn-buy:hover { background: color-mix(in srgb, var(--mark) 84%, white); transform: translateY(-2px); }
.btn-buy:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--sage); color: var(--sage); }
.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-lg { padding: 1.05rem 1.7rem; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 0.6rem 1rem; font-size: 0.9rem; border-radius: 10px; white-space: nowrap; }
.nav-short { display: none; }
.btn-block { width: 100%; }
/* The price is shown, but there is nothing to buy yet: not a link, not a button. */
.btn-soon { margin: 0; cursor: default; background: var(--surface); color: var(--muted); border-color: var(--line); }
.ticket-soon { font-size: 0.88rem; color: var(--muted); margin: 0.7rem 0 0; }

/* ---------------------------------------------------------------- tier badge */
.tier {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 600; line-height: 1;
  padding: 0.32rem 0.7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.tier--free, .tier--mixed { background: var(--surface); color: var(--sage); border-color: transparent; }
.tier svg { flex: none; }

/* -------------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); min-height: 4rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; text-decoration: none; }
.logo svg { flex-shrink: 0; }
.logo svg .bm-h { fill: var(--brand-head); }
.primary { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); margin-right: auto; }
.nav-link, .menu > summary { font-weight: 500; font-size: 0.95rem; text-decoration: none; padding: 0.5rem 0.2rem; cursor: pointer; }
.nav-link:hover, .nav-link[aria-current], .menu > summary:hover { color: var(--sage); }
.nav-link[aria-current] { text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 2px; }
.menu { position: relative; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.3rem; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { transform: rotate(90deg); transition: transform var(--motion); }
.menu[open] > summary svg { transform: rotate(-90deg); }
.menu-panel {
  position: absolute; left: -12px; top: calc(100% + 10px); width: min(46rem, calc(100vw - 2 * var(--gutter)));
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius-lg); padding: 10px;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.14);
}
.menu-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.menu-list a { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.7rem 0.8rem; border-radius: 12px; text-decoration: none; }
.menu-list a:hover, .menu-list a[aria-current] { background: var(--surface); }
.menu-list b { display: block; font-size: 0.95rem; font-weight: 600; }
.menu-list small { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.menu-ico { flex: none; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--sage); }
.menu-foot { display: none; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0.8rem 0.9rem 0.4rem; border-top: 1px solid var(--line); margin-top: 8px; font-size: 0.92rem; }
.menu-foot a { font-weight: 600; text-decoration: none; }

/* ---------------------------------------------------------------------- hero */
.hero { padding-block: clamp(28px, 4.2vw, 64px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy h1 { max-width: 11ch; }
/* Headline emphasis: a highlighter swipe like GlideMark's band, and a wavy
   underline under "wander". */
.hl-mark {
  --hl: color-mix(in srgb, var(--mark) 88%, transparent);
  background: linear-gradient(transparent 52%, var(--hl) 52%, var(--hl) 94%, transparent 94%);
  padding-inline: 0.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@media (prefers-color-scheme: dark) { .hl-mark { --hl: color-mix(in srgb, var(--mark) 45%, transparent); } }
.hl-wander { text-decoration: underline wavy var(--sage); text-decoration-thickness: 0.05em; text-underline-offset: 0.18em; text-decoration-skip-ink: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.hero-demo { background: var(--surface); padding: 10px; border-radius: 26px; }
.hero-hint { font-size: 0.85rem; color: var(--muted); margin: 0.8rem 0.6rem 0.3rem; text-align: center; }

.trust { border-block: 1px solid var(--line); }
.trust-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.9rem clamp(16px, 2.4vw, 32px); padding-block: 1.3rem; }
.trust-list li { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.93rem; font-weight: 500; }
.trust-list svg { color: var(--sage); flex: none; }

/* ------------------------------------------------------------------ sections */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section--tight { padding-block: clamp(24px, 4vw, 48px); }
.section-head { max-width: 46rem; margin-bottom: clamp(24px, 4vw, 40px); }

/* problem */
.problem-head { max-width: 40rem; margin-bottom: clamp(28px, 4vw, 48px); }
.problem-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.problem-list { list-style: none; display: grid; gap: 1.6rem; }
.problem-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.problem-list svg { color: var(--sage); margin-top: 0.15rem; }
.problem-list h3 { font-size: 1.2rem; }
.problem-list p { color: var(--muted); margin: 0.25rem 0 0; max-width: 30rem; }

/* problem / fix pairs */
.pair {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: center;
  padding-block: clamp(36px, 5.5vw, 72px); border-top: 1px solid var(--line);
}
.pair--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.pair--flip .pair-copy { order: 2; }
.pair-tier { margin: 0 0 1rem; }
.pair h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); line-height: 1.12; letter-spacing: -0.025em; }
.pair-copy > p { color: var(--muted); margin: 0.9rem 0 0; max-width: 30rem; }
.pair-copy > .pair-fix { color: var(--ink); border-left: 3px solid var(--mark); padding-left: 1rem; margin-top: 1.2rem; }
.pair-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.pair-copy > .pair-links { color: var(--sage); margin-top: 1.2rem; }

.cta-inline {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  background: var(--surface); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 32px);
  margin-block: clamp(8px, 2vw, 24px);
}
.cta-inline p { margin: 0; font-size: 1.1rem; font-weight: 500; max-width: 30rem; }
.cta-inline-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* deep reading + private */
.deep-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-bottom: clamp(28px, 4vw, 48px); }
.deep-top .rules { margin: 0.4rem 0 0; }
.rules { margin: 1.6rem 0; display: grid; gap: 0.9rem; }
.rules div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.rules dt { font-weight: 600; font-size: 0.95rem; }
.rules dd { margin: 0; color: var(--muted); font-size: 0.95rem; }
.private { background: var(--surface); }

/* steps: the one place the content really is a sequence */
.start h2 { margin-bottom: clamp(24px, 4vw, 40px); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); }
.steps li { display: grid; gap: 1rem; align-content: start; }
.step-n { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--sage); color: var(--paper); font-weight: 700; font-size: 1.1rem; }
.steps p { color: var(--muted); margin: 0.35rem 0 0; }

/* ---------------------------------------------------------- ticket / pricing */
.ticket-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(16px, 3vw, 28px); align-items: stretch; }
.plan { border: 1.5px solid var(--line); border-radius: 22px; padding: clamp(22px, 3vw, 34px); background: var(--card); }
.plan h3, .ticket h3 { font-size: 1.25rem; }
.plan-price { font-size: 1.05rem; color: var(--muted); margin: 0.6rem 0 1.2rem; display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.plan--free .plan-price { font-size: 2rem; font-weight: 600; color: var(--ink); }
.plan--free .plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan-note { color: var(--muted); font-size: 0.9rem; margin: 1.4rem 0 0; }

.ticket {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  background: var(--card); border: 2px solid var(--ink); border-radius: 24px;
}
.ticket-main, .ticket-stub { padding: clamp(22px, 3.2vw, 38px); }
.price-now { font-size: clamp(3.4rem, 2.2rem + 4.4vw, 5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--ink); }
.ticket .plan-price { align-items: baseline; gap: 0.7rem; margin: 0.5rem 0 0.45rem; }
.ticket-lede { color: var(--muted); margin: 0 0 1.4rem; max-width: 26rem; }
.ticket-value { font-size: 0.88rem; color: var(--ink); margin: 1.1rem 0 0; max-width: 28rem; }
.ticket-value a { color: var(--sage); font-weight: 600; }
.ticket-value span { color: var(--muted); font-size: 0.8rem; }
.ticket-fine { font-size: 0.82rem; color: var(--muted); margin: 0.7rem 0 0; }
.ticket-fine a { color: inherit; }

/* launch pricing: the next tier's price, struck through, and the tier track */
.price-next {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--muted);
  text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 0.08em;
}
.price-kind { margin: 0 0 1.1rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); }
.tier-track { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tier-step { position: relative; display: grid; justify-items: center; align-content: start; gap: 0.2rem; text-align: center; padding-inline: 2px; }
.tier-step + .tier-step::before { content: ""; position: absolute; top: 9px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.tier-step--sold + .tier-step::before { background: var(--sage); }
.tier-node { position: relative; z-index: 1; width: 20px; height: 20px; margin-bottom: 0.35rem; border-radius: 6px; border: 2px solid var(--line); background: var(--card); }
.tier-price { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--muted); }
.tier-label { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; line-height: 1.35; text-transform: uppercase; color: var(--muted); }
.tier-step--sold .tier-node { background: var(--sage); border-color: var(--sage); }
.tier-step--sold .tier-price { opacity: 0.6; }
.tier-step--current .tier-node { background: var(--mark); border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark) 35%, transparent); }
.tier-step--current .tier-price { color: var(--ink); }
.tier-step--current .tier-label { color: var(--sage); }
/* The spots-left number: bold, and it blinks 4 times (under 5 seconds, so it
   needs no pause control) each time the track scrolls into view. */
.spots-n { font-size: 1.35em; font-weight: 800; letter-spacing: 0.02em; color: var(--danger); }
.tier-track.is-seen .spots-n { animation: spots-blink 1.1s ease-in-out 4; }
@keyframes spots-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

/* the price line under a big buy button */
.buy-stack { display: flex; flex-direction: column; align-items: center; }
.price-line { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--muted); text-align: center; }
.price-line strong { color: var(--ink); font-weight: 700; }
.price-line a { color: inherit; }
.price-line-next { text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.hero-actions, .cta-inline-actions, .cta-band-actions { align-items: flex-start; }
.cta-band .price-line { margin: 0.5rem 0 0; font-size: 0.85rem; max-width: none; color: color-mix(in srgb, var(--band-ink) 75%, transparent); }
.cta-band .price-line strong { color: var(--band-ink); }
.cta-band .price-line-next { text-decoration-color: var(--mark); }
.ticket-cut { position: relative; border-left: 2px dashed var(--line); }
.ticket-cut::before, .ticket-cut::after {
  content: ""; position: absolute; left: -15px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.ticket-cut::before { top: -16px; clip-path: inset(50% 0 0 0); }
.ticket-cut::after { bottom: -16px; clip-path: inset(0 0 50% 0); }
.stub-title { font-weight: 600; margin-bottom: 1rem; }

.checks, .crosses { list-style: none; display: grid; gap: 0.7rem; }
.checks li, .crosses li { display: grid; grid-template-columns: 1.15rem 1fr; gap: 0.65rem; align-items: start; font-size: 0.97rem; }
.checks li::before, .crosses li::before {
  content: ""; width: 1.15rem; height: 1.15rem; margin-top: 0.22rem; background: var(--sage);
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.checks li::before { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }
.crosses li::before { background: var(--danger); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }

/* --------------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; margin-top: 0.6rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 0.9rem 1rem 0.9rem 0; border-top: 1px solid var(--line); vertical-align: top; }
thead th, thead td { border-top: 0; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }
tbody th a { text-decoration: none; }
tbody th a:hover { text-decoration: underline; }
.spec th { width: 30%; }
.spec--keys th { white-space: nowrap; }
.spec td, .cmp td { color: var(--muted); }
.cmp thead th { font-size: 1rem; color: var(--ink); }
.cmp thead a { text-decoration: none; }
.cmp thead a:hover { text-decoration: underline; }
.cmp tbody th { width: 16%; font-size: 0.85rem; color: var(--muted); }
.matrix td, .matrix thead th:not(:first-child) { text-align: center; padding-inline: 1rem; }
.matrix th:first-child { width: 58%; }
.yes { color: var(--sage); display: inline-flex; }
.no { color: var(--muted); }
.cell-text { font-size: 0.85rem; color: var(--muted); }
kbd { font: 600 0.8rem var(--font); padding: 0.15rem 0.5rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; background: var(--card); }
code { font: 500 0.88em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--surface); padding: 0.1em 0.4em; border-radius: 6px; }

/* ------------------------------------------------------------------------ FAQ */
.faq-sec h2 { margin-bottom: 1.4rem; }
.faq-group { font-size: 1.35rem; margin: 2.4rem 0 0.6rem; }
.faq-group:first-child { margin-top: 0; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.1rem 0; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--sage); flex: none; transition: transform var(--motion); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a p { color: var(--muted); max-width: 42rem; margin: 0 0 1.3rem; }

/* ---------------------------------------------------------------- CTA band */
.cta-band { background: var(--band-bg); color: var(--band-ink); }
.cta-band-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.cta-band h2 { font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.1rem); }
.cta-band p { color: color-mix(in srgb, var(--band-ink) 78%, transparent); margin: 0.9rem 0 0; max-width: 28rem; font-size: 1.1rem; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band-actions .fine { flex-basis: 100%; color: color-mix(in srgb, var(--band-ink) 70%, transparent); margin: 0.4rem 0 0; }
.cta-band .btn-ghost { color: var(--band-ink); border-color: color-mix(in srgb, var(--band-ink) 40%, transparent); }
.cta-band .btn-ghost:hover { color: var(--band-ink); border-color: var(--band-ink); }
.cta-band .btn-buy { border-color: var(--mark); }

/* ------------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 72px); }
.foot { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 2.4fr) minmax(0, 1.7fr) minmax(0, 1.9fr); gap: clamp(20px, 3.4vw, 48px); }
.foot-brand p { color: var(--muted); max-width: 22rem; margin: 1rem 0 1.2rem; font-size: 0.95rem; }
.foot-line { display: block; color: var(--ink); font-weight: 600; margin-bottom: 0.25rem; }
.foot-col h2 { font-size: 0.95rem; margin-bottom: 0.9rem; letter-spacing: 0; }
.foot-col ul { list-style: none; display: grid; gap: 0.5rem; font-size: 0.94rem; }
.foot-features ul { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.foot-col a { text-decoration: none; color: var(--muted); }
.foot-col a:hover { color: var(--ink); text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 2rem; margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }

/* --------------------------------------------------------------- sticky bar */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); color: var(--paper);
  transform: translateY(110%); visibility: hidden; transition: transform 0.3s ease, visibility 0s 0.3s;
}
.buybar.is-on { transform: none; visibility: visible; transition: transform 0.3s ease; }
.buybar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.buybar p { margin: 0; font-size: 0.95rem; }
.buybar p span { opacity: 0.75; }
.buybar .btn-buy { border-color: var(--mark); }

/* ------------------------------------------------------------ feature pages */
.fhero { padding-block: clamp(28px, 5vw, 72px) clamp(28px, 4vw, 56px); }
.fhero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.fhero--wide .fhero-grid { grid-template-columns: 1fr; }
.fhero h1 { font-size: clamp(2.2rem, 1.1rem + 3.6vw, 3.6rem); max-width: 14ch; }
.fhero--wide h1 { max-width: 20ch; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.fhero-demo { min-width: 0; }
.fproblem { background: var(--surface); }
.fproblem-in { max-width: var(--maxw); }
.fproblem-in > * { max-width: 44rem; }
.fproblem h2 { max-width: 22ch; }
.fdetails h2 { margin-bottom: 1.4rem; }
.details { display: grid; }
.detail { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem; padding-block: 1.3rem; border-top: 1px solid var(--line); }
.detail h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.detail p { margin: 0; color: var(--muted); max-width: 40rem; }
.sub { font-size: 1.3rem; margin-top: clamp(36px, 5vw, 64px); }
.limits { padding-top: 0; }
.limits-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); border-top: 1px solid var(--line); padding-top: clamp(32px, 5vw, 56px); }
.limit h2 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.related h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.related-list { list-style: none; max-width: 42rem; }
.related-list a { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.related-list li:last-child a { border-bottom: 1px solid var(--line); }
.related-list a > svg { color: var(--sage); flex: none; }
.related-list b { display: block; }
.related-list small { color: var(--muted); font-size: 0.9rem; }
.related-list a:hover b { text-decoration: underline; }

.phero { padding-block: clamp(40px, 7vw, 96px) clamp(16px, 3vw, 32px); }
.phero h1 { font-size: clamp(2.3rem, 1.1rem + 3.8vw, 3.8rem); max-width: 18ch; }
.phero--legal h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem); }
.prose { font-size: 1.02rem; }
.prose h2 { font-size: 1.35rem; margin: 2.2rem 0 0.7rem; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--paper)); max-width: 44rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.prose a { color: var(--sage); font-weight: 600; }
/* The privacy policy's tables (src/content/privacy.html) scroll rather than squeeze on a phone. */
.prose .table { overflow-x: auto; margin: 0.6rem 0 1.2rem; }
/* Long addresses in code (the license server's URL) break instead of widening the page. */
.prose code { overflow-wrap: anywhere; }
.prose .table th, .prose .table td { font-size: 0.92rem; }
.prose blockquote { margin: 1.4rem 0; padding-left: 1.1rem; border-left: 3px solid var(--mark); }
.prose blockquote p { color: var(--ink); font-style: italic; }

/* --------------------------------------------------------- use-case index */
.usecase-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.usecase-grid a { display: grid; gap: 0.5rem; padding: 1.4rem 1.2rem; border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--card); transition: border-color var(--motion); }
.usecase-grid a:hover { border-color: var(--sage); }
.usecase-grid svg { color: var(--sage); }
.usecase-grid b { font-size: 1rem; }
.usecase-grid span { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }

/* ------------------------------------------------------- disclaimer box */
.disclaimer { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; background: var(--surface); }
.disclaimer p { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: 44rem; }


/* ------------------------------------------------------------------- blog */
.blog-grid { list-style: none; display: grid; gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.blog-card { background: var(--paper); }
.blog-card a { display: block; padding: 1.6rem clamp(18px, 3vw, 30px); text-decoration: none; }
.blog-card a:hover { background: var(--surface); }
.blog-tag { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--sage); margin-bottom: 0.6rem; }
.blog-card h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.blog-card p { color: var(--muted); margin: 0 0 0.8rem; max-width: 44rem; }
.blog-meta { font-size: 0.82rem; color: var(--muted); }
.post-meta { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; }

/* ----------------------------------------------------- /thanks/ license key */
.keybox { margin-top: 1.8rem; max-width: 38rem; }
.keybox label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.keybox-row { display: flex; flex-wrap: wrap; gap: 10px; }
.keybox input {
  flex: 1 1 16rem; min-width: 0; padding: 0.85rem 1rem; border: 1.5px solid var(--ink); border-radius: 12px;
  background: var(--card); color: var(--ink); font: 600 1rem ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.keybox .fine { margin-top: 0.8rem; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero-grid, .fhero-grid, .problem-grid, .pair, .pair--flip, .deep-top, .cta-band-in { grid-template-columns: minmax(0, 1fr); }
  .pair--flip .pair-copy { order: 0; }
  .hero-copy h1, .fhero h1 { max-width: 16ch; }
  .steps { grid-template-columns: 1fr; }
  .ticket-wrap { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-link { display: none; }
  .menu-list { grid-template-columns: 1fr; }
  .menu-foot { display: flex; }
  .menu-panel { position: fixed; left: var(--gutter); right: var(--gutter); top: 4.4rem; width: auto; max-height: calc(100vh - 5.4rem); overflow-y: auto; }
  .ticket { grid-template-columns: 1fr; }
  .ticket-cut { border-left: 0; border-top: 2px dashed var(--line); height: 0; }
  .ticket-cut::before, .ticket-cut::after { top: -15px; bottom: auto; clip-path: none; border: 2px solid var(--ink); }
  .ticket-cut::before { left: -15px; clip-path: inset(0 50% 0 0); }
  .ticket-cut::after { left: auto; right: -15px; clip-path: inset(0 0 0 50%); }
  .detail { grid-template-columns: 1fr; gap: 0.4rem; }
  .limits-in { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr; }
  .rules div { grid-template-columns: 1fr; gap: 0.15rem; }
  table.cmp thead { display: none; }
  table.cmp, table.cmp tbody, table.cmp tr, table.cmp th, table.cmp td { display: block; width: 100%; }
  table.cmp tr { border-top: 1px solid var(--line); padding: 0.9rem 0; }
  table.cmp th, table.cmp td { border: 0; padding: 0.15rem 0; }
  table.cmp td::before { content: attr(data-label); display: block; font-weight: 600; color: var(--ink); font-size: 0.85rem; margin-top: 0.5rem; }
  table.cmp tbody th { width: auto; }
  .matrix th:first-child { width: auto; }
  .matrix td { padding-inline: 0.4rem; }
  .buybar p span { display: none; }
}
@media (max-width: 640px) {
  .trust-list { flex-direction: column; }
}
@media (max-width: 560px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .cta-band-actions .btn, .cta-inline-actions .btn, .cta-band-actions .buy-stack, .cta-inline-actions .buy-stack { flex: 1 1 100%; }
  .buy-stack { align-items: stretch; }
}
@media (max-width: 480px) {
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .foot { grid-template-columns: 1fr; }
  .logo span { font-size: 1.1rem; }
  .bar .btn-sm { padding: 0.55rem 0.8rem; }
}
/* The smallest phones (320px): tighten the header so the buy button stays on screen. */
@media (max-width: 359px) {
  .bar { gap: 6px; }
  .logo { gap: 0.35rem; }
  .logo svg { width: 24px; height: 24px; }
  .logo span { font-size: 0.95rem; }
  .bar .primary summary { font-size: 0.875rem; }
  .bar .btn-sm { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
}

/* ============================================================== the reader */
.reader { position: relative; margin: 0; background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; }
.reader-chrome { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.reader-url { flex: 1; min-width: 0; font-size: 0.74rem; color: var(--muted); background: var(--surface); padding: 0.3rem 0.8rem; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-mode { flex: none; font-size: 0.74rem; font-weight: 600; color: var(--muted); padding: 0.28rem 0.7rem; border-radius: 999px; border: 1px solid var(--line); transition: background var(--motion); }
.reader-mode.on { background: var(--mark); color: var(--on-mark); border-color: transparent; }

.reader-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.reader-page { position: relative; padding: clamp(18px, 3vw, 30px) clamp(16px, 3vw, 30px); min-height: 19rem; }
.reader-text { font-family: var(--serif); font-size: clamp(1rem, 0.92rem + 0.3vw, 1.12rem); line-height: 1.75; color: var(--ink); }
.reader-text p { margin: 0 0 1em; }
.reader-text p:last-child { margin: 0; }
.reader-text .w b { font-weight: 700; }
.reader-text .w.cur { background: var(--wash); border-radius: 3px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--mark) 30%, transparent); }
.reader-text .w.glided { background: var(--wash); }
::highlight(skimora-glide) { background-color: var(--wash); color: inherit; }

/* Autopace's reading screen, sized to the demo rather than the whole window. */
.stage { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: var(--card); border-radius: 0 0 0 14px; }
.stage[hidden] { display: none; }
.stage-progress { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--line); }
.stage-progress i { display: block; height: 100%; width: 0; background: var(--mark); }
.stage-word { margin: 0; font-size: clamp(1.9rem, 1.2rem + 3vw, 2.9rem); font-weight: 600; letter-spacing: 0.01em; padding: 0 1rem; text-align: center; overflow-wrap: anywhere; }
.stage-word b { color: var(--sage); font-weight: 800; }

/* the toolbar rail */
.tb { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 12px 12px 12px 0; padding: 8px 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.tb[hidden] { display: none; }
.tb-btn {
  position: relative; display: grid; place-items: center; width: 34px; height: 32px; padding: 0;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer;
  transition: background var(--motion);
}
.tb-btn[hidden] { display: none; }
.tb-btn:hover { background: var(--surface); }
.tb-btn[aria-pressed="true"] { background: var(--mark); color: var(--on-mark); }
.tb-lock { position: absolute; right: 1px; bottom: 1px; display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); color: var(--muted); }
.tb-btn[aria-pressed="true"] .tb-lock { background: var(--on-mark); color: var(--mark); }
.tb-sep { width: 22px; height: 1px; background: var(--line); margin: 3px 0; }
.tb.is-collapsed { padding: 4px; }
.tb.is-collapsed > .tb-btn:not(.tb-mark), .tb.is-collapsed > .tb-sep { display: none; }

/* hover cards */
.tb-cards { display: contents; }
.tb-card {
  position: absolute; z-index: 20; right: 64px; top: var(--y, 12px); width: 17rem; padding: 14px 16px 16px;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 0 14px 34px rgb(0 0 0 / 0.16);
}
.tb-card[hidden] { display: none; }
.tb-card-name { margin: 0; font-weight: 700; font-size: 0.98rem; }
.tb-card-line { margin: 0.35rem 0 0; font-size: 0.86rem; line-height: 1.45; color: var(--muted); }
.tb-card-lock { display: flex; align-items: flex-start; gap: 0.45rem; margin: 0.8rem 0 0; font-size: 0.82rem; font-weight: 600; }
.tb-card-lock svg { flex: none; margin-top: 0.1rem; color: var(--sage); }
.tb-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-top: 0.8rem; }
.tb-card-link { font-size: 0.85rem; font-weight: 600; color: var(--sage); }

/* mini pictures inside the cards. Ported from the extension's toolbarCards.js;
   under prefers-reduced-motion each freezes on its finished frame. */
.demo { position: relative; height: 74px; overflow: hidden; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); padding: 9px 10px; margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink); }
.demo .line { display: block; }
.d-bio { position: relative; }
.d-bio .plain, .d-bio .bold { display: block; }
.d-bio .plain { animation: bioOut 3.6s linear infinite; }
.d-bio .bold { position: absolute; inset: 0; animation: bioIn 3.6s linear infinite; }
.d-bio .bold b { font-weight: 700; }
@keyframes bioIn { 0%, 20% { opacity: 0 } 24%, 80% { opacity: 1 } 84%, 100% { opacity: 0 } }
@keyframes bioOut { 0%, 20% { opacity: 1 } 24%, 80% { opacity: 0 } 84%, 100% { opacity: 1 } }
.d-ap { display: flex; align-items: center; justify-content: center; height: 100%; }
.d-ap .slot { position: relative; display: block; min-width: 130px; text-align: center; font-weight: 600; font-size: 16px; }
.d-ap span { position: absolute; left: 0; right: 0; opacity: 0; animation: apFlash 2.52s steps(1, end) infinite; }
@keyframes apFlash { 0%, 16.6% { opacity: 1 } 16.7%, 100% { opacity: 0 } }
.d-cad { position: relative; }
.d-cad .line { position: relative; }
.d-cad .mark { position: absolute; top: -1px; left: 0; height: 19px; width: 56px; border-radius: 5px; background: var(--mark); opacity: 0.6; animation: cadStep 4s steps(1, end) infinite; }
@keyframes cadStep { 0% { transform: translate(0, 0) } 25% { transform: translate(58px, 0) } 50% { transform: translate(118px, 0) } 75% { transform: translate(0, 21px) } 100% { transform: translate(0, 0) } }
.d-gl { position: relative; }
.d-gl .bar { position: absolute; left: 0; top: 16px; height: 4px; width: 0; border-radius: 3px; background: var(--mark); animation: glSweep 4.4s linear infinite; }
@keyframes glSweep { 0% { width: 0; top: 16px } 45% { width: 100%; top: 16px } 50% { width: 0; top: 37px } 92%, 100% { width: 72%; top: 37px } }
.d-area { position: relative; }
.d-area .dim { opacity: 0.4; }
.d-area .pick { position: relative; display: block; }
.d-area .pick .plain { animation: areaPlain 4s linear infinite; }
.d-area .pick .bold { position: absolute; inset: 0; opacity: 0; animation: areaBold 4s linear infinite; }
.d-area .pick .bold b { font-weight: 700; }
.d-area .box { position: absolute; left: -3px; top: 17px; right: -3px; height: 22px; border-radius: 6px; border: 2px dashed var(--sage); opacity: 0; animation: areaBox 4s ease-in-out infinite; }
@keyframes areaBox { 0%, 8% { opacity: 0; transform: scale(0.92) } 22%, 88% { opacity: 1; transform: scale(1) } 100% { opacity: 0 } }
@keyframes areaBold { 0%, 28% { opacity: 0 } 32%, 88% { opacity: 1 } 92%, 100% { opacity: 0 } }
@keyframes areaPlain { 0%, 28% { opacity: 1 } 32%, 88% { opacity: 0 } 92%, 100% { opacity: 1 } }
.d-foc { position: relative; }
.d-foc .junk { display: block; height: 8px; border-radius: 3px; background: var(--line); margin: 4px 0; animation: focGo 4s ease-in-out infinite; }
.d-foc .j1 { width: 70% } .d-foc .j3 { width: 56% }
@keyframes focGo { 0%, 22% { opacity: 1; transform: none } 48%, 88% { opacity: 0; transform: translateX(-6px) } 100% { opacity: 1 } }
.d-font { position: relative; }
.d-font .a, .d-font .b { display: block; }
.d-font .a { font-family: Georgia, "Times New Roman", serif; animation: fontOut 4s linear infinite; }
.d-font .b { position: absolute; inset: 0; font-family: var(--font); animation: fontSwap 4s linear infinite; }
@keyframes fontSwap { 0%, 20% { opacity: 0 } 24%, 80% { opacity: 1 } 84%, 100% { opacity: 0 } }
@keyframes fontOut { 0%, 20% { opacity: 1 } 24%, 80% { opacity: 0 } 84%, 100% { opacity: 1 } }
.d-snd { display: flex; align-items: center; justify-content: center; gap: 5px; height: 100%; }
.d-snd span { width: 5px; height: 10px; border-radius: 3px; background: var(--sage); animation: sndBar 1.1s ease-in-out infinite; }
@keyframes sndBar { 0%, 100% { height: 8px } 50% { height: 30px } }
@media (prefers-reduced-motion: reduce) {
  .d-bio .plain { animation: none; visibility: hidden } .d-bio .bold { animation: none; opacity: 1 }
  .d-ap span { animation: none } .d-ap span:first-child { opacity: 1 }
  .d-cad .mark { animation: none; transform: translate(58px, 0) }
  .d-gl .bar { animation: none; width: 62% }
  .d-area .box { animation: none; opacity: 1 } .d-area .pick .plain { animation: none; visibility: hidden } .d-area .pick .bold { animation: none; opacity: 1 }
  .d-foc .junk { animation: none; opacity: 0 }
  .d-font .a { animation: none; visibility: hidden } .d-font .b { animation: none; opacity: 1 }
  .d-snd span { animation: none } .d-snd span:nth-child(odd) { height: 24px } .d-snd span:nth-child(even) { height: 12px }
}

/* controls under the text */
.reader-controls { display: flex; align-items: center; padding: 0.6rem 0.9rem; min-height: 3.6rem; border-top: 1px solid var(--line); background: var(--paper); border-radius: 0 0 16px 16px; }
.hero-demo .reader-controls, .fhero-demo .reader-controls[data-rows="2"] { min-height: 6.1rem; }
.rc-hint { margin: 0; font-size: 0.85rem; color: var(--muted); }
.rc-hint[hidden] { display: none; }
/* the hero's tour strip: the mode showing now, then how to take over */
.rc-tour { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.8rem; }
.rc-tour[hidden] { display: none; }
.rc-tour-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rc-tour-steps li { font-size: 0.78rem; font-weight: 600; padding: 0.22rem 0.62rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); transition: background var(--motion), color var(--motion), border-color var(--motion); }
.rc-tour-steps li.is-on { background: var(--mark); color: var(--on-mark); border-color: transparent; }
.rc-tour-note { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 480px) {
  .rc-tour-steps { gap: 0.25rem; }
  .rc-tour-steps li { padding: 0.2rem 0.4rem; font-size: 0.72rem; }
}
.rc-live { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; width: 100%; }
.rc-live[hidden] { display: none; }
.rc-group { display: inline-flex; align-items: center; gap: 2px; }
.rc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 34px; height: 32px; padding: 0 0.5rem; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 600 0.82rem var(--font); cursor: pointer; }
.rc-btn:hover { background: var(--surface); }
.rc-play .i-play { display: none; }
.reader-controls.is-paused .rc-play .i-pause { display: none; }
.reader-controls.is-paused .rc-play .i-play { display: inline-flex; }
.rc-speed { display: inline-flex; flex-direction: column; align-items: center; min-width: 4.2rem; line-height: 1.1; }
.rc-speed output { font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-speed small { font-size: 0.68rem; color: var(--muted); }
.rc-label { font-size: 0.78rem; color: var(--muted); margin-right: 0.4rem; }
.rc-chip { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 0.82rem var(--font); cursor: pointer; }
.rc-chip[aria-pressed="true"] { background: var(--mark); color: var(--on-mark); border-color: transparent; }
.rc-stop { margin-left: auto; }
.rc-chunk { flex-basis: 100%; order: 5; }

.range { display: grid; gap: 0.35rem; padding: 0.7rem 1rem; border-top: 1px solid var(--line); font-size: 0.85rem; }
.range-top { display: flex; justify-content: space-between; font-weight: 600; }
.range-top output { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.range-note { color: var(--muted); font-size: 0.78rem; }
.range input[type="range"] { width: 100%; accent-color: var(--sage); }
.range--inline { border: 0; padding: 0.4rem 0; max-width: 22rem; }

/* ============================================================ chips (fonts, sound) */
.chip { font: 600 0.88rem var(--font); padding: 0.55rem 0.95rem; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: background var(--motion), border-color var(--motion); }
.chip:hover { border-color: var(--sage); }
.chip[aria-checked="true"] { background: var(--sage); color: var(--paper); border-color: var(--sage); }

.fdemo, .sdemo, .hdemo { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: clamp(16px, 3vw, 28px); }
.fdemo-tabs, .sdemo-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.fdemo-text { font-family: var(--demo-font, var(--serif)); font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.75; margin-top: 1.4rem; min-height: 9rem; }
.fdemo-text p { margin: 0; }
.fdemo-note { font-size: 0.85rem; color: var(--muted); margin: 1rem 0 0; }

.sdemo-bars { display: flex; align-items: center; justify-content: center; gap: 7px; height: 84px; margin-bottom: 1.2rem; background: var(--paper); border-radius: 14px; }
.sdemo-bars i { width: 7px; height: 12px; border-radius: 4px; background: var(--line); transition: background var(--motion); }
.sdemo.is-on .sdemo-bars i { background: var(--sage); animation: sndBar 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * 0.11s); }
@media (prefers-reduced-motion: reduce) { .sdemo.is-on .sdemo-bars i { animation: none; height: 34px; } }

/* ==================================================== highlight -> library */
.hdemo { position: relative; }
.hdemo-text { font-family: var(--serif); font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem); line-height: 1.78; }
.hdemo-text p { margin: 0; }
.hdemo-btn { position: absolute; z-index: 5; }
.hdemo-btn[hidden] { display: none; }
.hdemo-lib { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.hdemo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hdemo-head h4 { font-size: 1rem; }
.hdemo-list { list-style: none; display: grid; gap: 0.6rem; margin-top: 0.8rem; }
.hdemo-list li { font-size: 0.9rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.hdemo-list q { font-family: var(--serif); background: var(--wash); padding: 0.05em 0.25em; border-radius: 3px; quotes: none; }
.hdemo-list small { display: block; color: var(--muted); margin-top: 0.3rem; font-size: 0.75rem; }
.hdemo-list .hdemo-empty { color: var(--muted); border-style: dashed; }

/* ================================================== PDF: before and after */
.ddemo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(12px, 2.5vw, 28px); align-items: center; }
.ddemo-pane { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: clamp(16px, 2.6vw, 26px); }
.ddemo-pane p { margin: 0 0 0.7rem; font-size: 0.92rem; }
.ddemo-before { font-size: 0.85rem; color: var(--muted); }
.ddemo-after { font-family: var(--serif); font-size: 1.02rem; line-height: 1.7; }
.ddemo-after p { font-size: 1.02rem; }
.ddemo-after b { font-weight: 700; }
.ddemo-cap { font-family: var(--font); font-size: 0.78rem; font-weight: 600; color: var(--sage); margin-bottom: 0.9rem !important; }
.ddemo-run, .ddemo-num { font-size: 0.75rem !important; color: var(--muted); }
.ddemo-num { text-align: center; }
.ddemo s { text-decoration-thickness: 1.5px; text-decoration-color: var(--danger); }
.ddemo-h { font-family: var(--font); font-weight: 700; color: var(--ink); }
.ddemo-arrow { color: var(--sage); }
.ddemo-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; font-family: var(--font); }
.pill { font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.on { background: var(--mark); color: var(--on-mark); border-color: transparent; }

/* ============================================================ heatmap */
.hm { margin: 0; }
.hm-grid { display: grid; grid-auto-flow: column; grid-template-columns: repeat(53, minmax(0, 1fr)); gap: 4px; }
.hm-w { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.hm i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--line); }
.hm i[data-l="1"] { background: color-mix(in srgb, var(--sage) 28%, var(--line)); }
.hm i[data-l="2"] { background: color-mix(in srgb, var(--sage) 52%, var(--line)); }
.hm i[data-l="3"] { background: color-mix(in srgb, var(--sage) 78%, var(--line)); }
.hm i[data-l="4"] { background: var(--sage); }
.hm-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 0.9rem; font-size: 0.82rem; color: var(--muted); }
.hm-legend { display: inline-flex; align-items: center; gap: 3px; }
.hm-legend i { width: 11px; height: 11px; aspect-ratio: auto; }
.hm-legend i:first-of-type { margin-left: 4px; }
.hm-legend i:last-of-type { margin-right: 4px; }

/* ============================================================= privacy */
.pdemo-flow { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(12px, 2vw, 20px); margin-bottom: 1.6rem; }
.pdemo-box { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: clamp(16px, 2.6vw, 26px); }
.pdemo-goes { border-style: dashed; }
.pdemo-title { font-weight: 700; margin-bottom: 0.7rem; }
.pdemo-box ul { list-style: none; display: grid; gap: 0.4rem; font-size: 0.95rem; color: var(--muted); }
.pdemo-stays li::before { content: "\2713\00a0\00a0"; color: var(--sage); font-weight: 700; }
.pdemo-goes li::before { content: "\2192\00a0\00a0"; color: var(--sage); font-weight: 700; }

/* ============================== the cluttered page, and the same page fixed */
.fx { margin: 0; }
.fx-page { position: relative; overflow: hidden; background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; min-height: 26rem; padding-bottom: 2.4rem; }
.fx-cookie { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; font-size: 0.72rem; max-height: 5rem; transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.4s ease; }
.fx-cookie p { margin: 0; }
.fx-btn { flex: none; font-size: 0.7rem; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 6px; background: var(--mark); color: var(--on-mark); }
.fx-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr); gap: 14px; padding: 14px; transition: grid-template-columns 0.6s ease; }
.fx-side { display: grid; gap: 10px; align-content: start; min-width: 0; overflow: hidden; transition: opacity 0.4s ease; }
.fx-ad { padding: 0.7rem; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); font-size: 0.72rem; line-height: 1.3; }
.fx-ad small { display: block; font-size: 0.62rem; color: var(--muted); margin-bottom: 0.2rem; }
.fx-ad--2 { background: color-mix(in srgb, var(--mark) 35%, var(--surface)); }
.fx-news { padding: 0.7rem; border-radius: 8px; background: var(--sage); color: var(--paper); font-size: 0.72rem; display: grid; gap: 0.5rem; justify-items: start; }
.fx-line { display: block; height: 7px; border-radius: 3px; background: var(--line); width: 100%; }
.fx-line.w60 { width: 60%; } .fx-line.w80 { width: 80%; }
.fx-article { min-width: 0; font-family: var(--font); font-size: 0.72rem; line-height: 1.35; transition: font-size 0.5s ease, line-height 0.5s ease; }
.fx-article h4 { font-size: 0.95rem; margin-bottom: 0.5rem; transition: font-size 0.5s ease; }
.fx-article p { margin: 0 0 0.6em; }
.fx-popup { position: absolute; right: 12px; bottom: 3.2rem; max-width: 12rem; padding: 0.7rem 0.8rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px; font-size: 0.72rem; box-shadow: 0 8px 20px rgb(0 0 0 / 0.14); display: grid; gap: 0.4rem; justify-items: start; transition: opacity 0.4s ease, transform 0.4s ease; }
.fx-share { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.55rem 1rem; background: var(--surface); border-top: 1px solid var(--line); font-size: 0.72rem; color: var(--muted); transition: opacity 0.4s ease, transform 0.4s ease; }
.fx-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin-top: 1rem; }
.fx-cap span { font-size: 0.88rem; color: var(--muted); max-width: 26rem; }
.btn-fix { background: var(--sage); color: var(--paper); border-color: var(--sage); }
.btn-fix[hidden] { display: none; }
.btn-fix:hover { background: var(--sage-hover); border-color: var(--sage-hover); }

.fx.is-fixed .fx-cookie { max-height: 0; padding-block: 0; opacity: 0; overflow: hidden; }
.fx.is-fixed .fx-body { grid-template-columns: minmax(0, 0fr) minmax(0, 1fr) minmax(0, 0fr); gap: 0; padding-inline: clamp(14px, 4vw, 44px); }
.fx.is-fixed .fx-side { opacity: 0; }
.fx.is-fixed .fx-popup, .fx.is-fixed .fx-share { opacity: 0; transform: translateY(12px); pointer-events: none; }
.fx.is-fixed .fx-article { font-family: var(--serif); font-size: 1.08rem; line-height: 1.8; max-width: 38rem; margin-inline: auto; }
.fx.is-fixed .fx-article h4 { font-family: var(--font); font-size: 1.4rem; margin-bottom: 0.9rem; }
.fx-article b { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .fx *, .fx { transition: none !important; } }

/* ============================================================ responsive */
@media (max-width: 640px) {
  .reader-main { grid-template-columns: minmax(0, 1fr); }
  .reader-page { min-height: 0; }
  .tb { flex-direction: row; flex-wrap: wrap; justify-content: center; margin: 0 10px 10px; }
  .tb-sep { width: 1px; height: 22px; margin: 0 3px; }
  .tb-card { left: 10px; right: 10px; width: auto; top: auto; bottom: calc(100% - var(--by, 100%) + 8px); }
  .ddemo { grid-template-columns: 1fr; }
  .ddemo-arrow { transform: rotate(90deg); justify-self: center; }
  .pdemo-flow { grid-template-columns: 1fr; }
  .hm-grid { grid-template-columns: repeat(26, minmax(0, 1fr)); }
  .hm-w:nth-child(-n + 27) { display: none; }
  .fx-body { grid-template-columns: minmax(0, 1fr); }
  .fx-side { display: none; }
  .fx.is-fixed .fx-body { grid-template-columns: minmax(0, 1fr); }
  .rc-stop { margin-left: 0; }
}
