/* ─── RESET ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --bg: #0D0D0F;
  --bg-elev: #141416;
  --bg-panel: #1B1B1F;
  --ink: #F2F1EC;
  --dim: #A6A69F;
  --faint: #5E5E58;
  --border: #26262C;
  /* The one accent, the app icon's lime: a fill for the call to action
     (with --on-accent ink); --accent-text for text, carets and rings. */
  --accent: #AECD1E;
  --on-accent: #141A05;
  --accent-text: #B8D62A;
  --accent-display: #B8D62A;
  --accent-tint: rgba(174, 205, 30, 0.17);
  --fill-hover: rgba(242, 241, 236, 0.06);
  --serif: 'Afacad', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif; /* display face; the token name is historical */
  --mono: 'DM Mono', 'SF Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --text: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Base appearance; light overrides live in the prefers-color-scheme block. */
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(242, 241, 236, 0.018) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* ─── TOP BAR — the app's docked top bar: three glass capsules (as on
   the landing page) ───────────────────────────────────────────────── */
/* One place for the bar's row, so the links beside it share its middle. */
:root {
  --bar-top: 14px;
  --bar-h: 38px;
}

.topbar {
  --tb-glass: rgba(20, 20, 22, 0.82);
  --tb-strong: #37373F;
  --tb-raised: var(--bg-panel);
  --tb-raised-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  --tb-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.8);
  position: fixed;
  top: var(--bar-top);
  left: 50%;
  z-index: 500;
  width: min(1240px, 100% - 2 * clamp(20px, 5vw, 64px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .topbar,
  :root:not([data-theme="dark"]) footer {
    --tb-glass: rgba(251, 250, 246, 0.84);
    --tb-strong: #C7C0B0;
    --tb-raised: #FFFFFF;
    --tb-raised-shadow: 0 1px 3px rgba(31, 29, 24, 0.12);
    --tb-shadow: 0 12px 32px -18px rgba(31, 29, 24, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
}

:root[data-theme="light"] .topbar,
:root[data-theme="light"] footer {
  --tb-glass: rgba(251, 250, 246, 0.84);
  --tb-strong: #C7C0B0;
  --tb-raised: #FFFFFF;
  --tb-raised-shadow: 0 1px 3px rgba(31, 29, 24, 0.12);
  --tb-shadow: 0 12px 32px -18px rgba(31, 29, 24, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* The footer's capsules are the same glass as the bar's. */
footer {
  --tb-glass: rgba(20, 20, 22, 0.82);
  --tb-strong: #37373F;
  --tb-raised: var(--bg-panel);
  --tb-raised-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  --tb-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.8);
}

.cap-glass {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: var(--bar-h);
  padding: 3px;
  border-radius: 12px;
  background: var(--tb-glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--tb-shadow);
}

.tb-brand {
  justify-self: start;
  gap: 9px;
  padding: 3px 13px 3px 5px;
  color: var(--ink);
  text-decoration: none;
}

.tb-brand img {
  width: calc(var(--bar-h) - 14px);
  height: calc(var(--bar-h) - 14px);
  border-radius: 7px;
  display: block;
}

/* The logo goes home, so on hover it wears Get Kloni's lime ring: in the
   bar, whatever takes you somewhere turns lime, and the tools, which open
   a menu, fill. The footer's mark wears the same ring. */
.tb-brand {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tb-brand:hover {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--tb-shadow);
}

.foot-mark {
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color 0.2s;
}

.foot-mark:hover {
  outline-color: var(--accent);
}

.tb-brand:focus-visible,
.foot-mark:focus-visible {
  outline: 2px solid var(--accent-text);
}

@media (prefers-reduced-motion: reduce) {
  .tb-brand,
  .foot-mark {
    transition: none;
  }
}

/* The wordmark: Plex Sans Medium, sentence case, -0.01em. Centred at
   its larger size it sits 0.75px below the bar's other words; lifted
   onto their baseline. */
.tb-brand span {
  position: relative;
  top: -0.75px;
  font: 500 16px/1 var(--sans);
  letter-spacing: -0.01em;
}

/* The bar's islands: the brand, then the way to Pricing and the tools.
   Get Kloni is quiet at rest (lime is kept for the page's own calls to
   action) and takes a lime edge on hover. */
.tb-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tb-get {
  padding: 4px 16px;
  font: 600 13.5px/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tb-get:hover {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--tb-shadow);
  text-decoration: none;
}

.tb-end {
  justify-self: end;
}

.tb-tool {
  width: calc(var(--bar-h) - 8px);
  height: calc(var(--bar-h) - 8px);
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tb-tool svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: none;
}

.tb-tool[data-mode="auto"] .i-auto,
.tb-tool[data-mode="light"] .i-light,
.tb-tool[data-mode="dark"] .i-dark {
  display: block;
}

.tb-tool:hover,
.tb-tool[aria-expanded="true"] {
  background: var(--fill-hover);
  color: var(--ink);
}

.tb-tool:focus-visible,
.tb-brand:focus-visible,
.tb-get:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

/* The pages people come back for, as quiet links in the bar's row. They
   sit on the page, not in the bar, so they scroll away with it. On a
   phone they go, and Menu or the footer is the way to them. */
.top-pages {
  position: absolute;
  top: var(--bar-top);
  left: 50%;
  z-index: 2;
  height: var(--bar-h);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.top-pages a {
  position: relative;
  --line-top: 21.5px;
  padding: 4px 0;
  font: 400 14.5px/1 var(--sans);
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

/* The dot sits in the gap, outside the link, so the underline spans
   the word alone. */
.top-pages a + a {
  margin-left: 28.5px;
}

.top-pages a + a::before {
  content: '\00B7';
  position: absolute;
  left: -14.25px;
  transform: translateX(-50%);
  color: var(--faint);
}

.top-pages a:hover,
.top-pages a[aria-current="page"] {
  color: var(--ink);
}

/* On hover the link draws, from its left, the lime line the page you're
   on wears: a preview of being there. The same in the footer. */
.top-pages a::after,
.foot-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: var(--line-top);
  height: 1.5px;
  background: var(--accent-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-pages a:hover::after,
.top-pages a[aria-current="page"]::after,
.foot-nav a:hover::after,
.foot-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .top-pages a::after,
  .foot-nav a::after {
    transition: none;
  }
}

@media (max-width: 900px) {
  .top-pages {
    display: none;
  }
}

.tb-pop {
  position: relative;
  display: inline-flex;
}

.tb-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: -4px;
  min-width: 170px;
  padding: 6px;
  background: var(--tb-glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--tb-strong);
  border-radius: 12px;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.7);
  animation: menuIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

.tb-menu[hidden] {
  display: none;
}

/* An invisible bridge so the pointer can cross the gap without closing it. */
.tb-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.tb-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--dim);
  font: 500 13px/1 var(--sans);
  text-align: left;
  cursor: pointer;
}

.tb-menu button svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.tb-menu button:hover,
.tb-menu button:focus-visible {
  background: var(--fill-hover);
  color: var(--ink);
  outline: none;
}

.tb-menu button[aria-checked="true"] {
  color: var(--ink);
}

.tb-menu button[aria-checked="true"]::after {
  content: '';
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@media (max-width: 900px) {
  .tb-right {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .tb-brand span {
    display: none;
  }

  .tb-brand {
    padding: 3px;
  }
}

/* ─── PAGE SHELL ─────────────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(120px, 16vw, 160px) clamp(24px, 6vw, 48px) clamp(80px, 12vw, 140px);
}

/* ─── HEADER ─────────────────────────────────────────────────────────── */
.page-eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 20px;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  animation: fadeUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

h1 em {
  font-style: italic;
  color: var(--accent-display);
}

.page-intro {
  font-size: 14px;
  line-height: 1.85;
  color: var(--dim);
  max-width: 560px;
  margin-bottom: clamp(48px, 7vw, 64px);
  padding-bottom: clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
  animation: fadeUp 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.page-intro a {
  color: var(--dim);
  text-decoration-color: var(--border);
  transition: color 0.2s ease;
}

.page-intro a:hover {
  color: var(--ink);
}

/* ─── OVERVIEW VIDEO ─────────────────────────────────────────────────── */
.manual-video {
  margin: 0 0 clamp(48px, 7vw, 72px);
}
.manual-video .section-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.manual-video .frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: 0 24px 70px -30px rgba(0, 0, 0, 0.55);
}
.manual-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--bg-elev);
}
.manual-video figcaption {
  margin-top: 14px;
  max-width: 680px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.55;
}
.manual-video figcaption .dur {
  color: var(--dim);
}

/* ─── TABLE OF CONTENTS ──────────────────────────────────────────────── */
.manual-toc {
  margin-bottom: clamp(56px, 8vw, 80px);
  padding: 28px 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.manual-toc .section-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}

.manual-toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 32px;
}

@media (max-width: 640px) {
  .manual-toc ol {
    grid-template-columns: 1fr;
  }

  .manual-toc {
    padding: 24px;
  }
}

.manual-toc li {
  counter-increment: toc;
  font-size: 13px;
  line-height: 1.6;
}

.manual-toc li::before {
  content: counter(toc, decimal-leading-zero);
  display: inline-block;
  width: 28px;
  color: var(--dim);
  font-feature-settings: 'tnum';
}

.manual-toc a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.manual-toc a:hover {
  color: var(--ink);
}

/* ─── SECTIONS ───────────────────────────────────────────────────────── */
.manual-section {
  margin-bottom: clamp(56px, 8vw, 80px);
  scroll-margin-top: 100px;
}

.manual-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  color: var(--ink);
}

.manual-section h2 em {
  font-style: italic;
  color: var(--accent-text);
}

.manual-section h2 .section-number {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 400;
}

.manual-section h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--ink);
}

.manual-section p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--dim);
  margin-bottom: 16px;
  max-width: 680px;
}

.manual-section p strong {
  color: var(--ink);
  font-weight: 400;
}

.manual-section p em {
  font-style: italic;
  color: var(--ink);
}

.manual-section ul,
.manual-section ol {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
  max-width: 680px;
}

.manual-section ul li,
.manual-section ol li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--dim);
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}

.manual-section ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 12px;
  width: 4px;
  height: 4px;
  background: var(--dim);
  border-radius: 50%;
}

.manual-section ol {
  counter-reset: list;
}

.manual-section ol li {
  counter-increment: list;
}

.manual-section ol li::before {
  content: counter(list) ".";
  position: absolute;
  left: 0;
  color: var(--dim);
  font-size: 12px;
}

.manual-section a {
  color: var(--ink);
  text-decoration-color: var(--faint);
  transition: text-decoration-color 0.2s ease;
}

.manual-section a:hover {
  text-decoration-color: var(--ink);
}

/* ─── INLINE CODE & KEYBOARD KEYS ────────────────────────────────────── */
code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Keycap, as the app's Kbd draws it: the system font with the macOS
   glyphs; a combination is a row of caps with no "+". */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font: 500 11px/1 -apple-system, BlinkMacSystemFont, system-ui, 'Helvetica Neue', sans-serif;
  color: var(--ink);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 1px 0 0 var(--border);
  letter-spacing: 0;
  white-space: nowrap;
}

kbd + kbd {
  margin-left: 3px;
}

/* ─── CALLOUT BLOCKS ────────────────────────────────────────────────── */
.callout {
  padding: 20px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 24px 0;
  max-width: 680px;
}

.callout p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.75;
}

.callout .callout-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
  font-weight: 400;
  display: block;
}

/* ─── SHORTCUTS REFERENCE TABLE ─────────────────────────────────────── */
.shortcuts-table {
  width: 100%;
  max-width: 680px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.shortcuts-table .shortcut-group {
  border-bottom: 1px solid var(--border);
}

.shortcuts-table .shortcut-group:last-child {
  border-bottom: none;
}

.shortcuts-table .shortcut-group-label {
  padding: 14px 20px 6px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--bg-elev);
}

.shortcuts-table .shortcut-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  align-items: center;
  padding: 11px 20px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.shortcuts-table .shortcut-group-label+.shortcut-row {
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .shortcuts-table .shortcut-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.shortcuts-table .shortcut-desc {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
}

.shortcuts-table .shortcut-combo {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .shortcuts-table .shortcut-combo {
    text-align: left;
  }
}

/* ─── MORE HELP CTA ─────────────────────────────────────────────────── */
.more-help {
  margin-top: clamp(64px, 9vw, 96px);
  padding: 36px 40px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

.more-help::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--faint), transparent);
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 560px) {
  .more-help {
    padding: 28px 24px;
  }
}

.more-help h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--ink);
}

.more-help h2 em {
  font-style: italic;
  color: var(--accent-text);
}

.more-help p {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 540px;
}

.more-help-cta {
  display: inline-flex;
  align-items: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 10px;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: filter 0.15s;
}

.more-help-cta:hover {
  filter: brightness(1.04);
}

.more-help-cta svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────── */
/* Headings settle into place; they never start invisible, so the page
   reads even where animations don't run (a background tab, a crawler). */
@keyframes fadeUp {
  from {
    transform: translateY(14px);
  }

  to {
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}
/* ─── LIGHT THEME (auto — follows the macOS appearance setting) ───────
   Mirrors the landing page: re-declares the neutral tokens under
   prefers-color-scheme: light and fixes the few hardcoded colors (dotted
   backdrop, glass nav, cursor blend, and the kbd key edge). The lime
   accent fill is the same in both themes; --accent-text darkens. */
/* ─── LIGHT THEME — follows the OS unless the visitor forces dark ─────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4F1EA;
    --bg-elev: #FBFAF6;
    --bg-panel: #ECE7DB;
    --ink: #1F1D18;
    --dim: #5E5950;
    --faint: #9B9385;
    --border: #DBD5C8;
    --accent-text: #3C740A;
    --accent-display: #5A930F;
    --accent-tint: rgba(174, 205, 30, 0.22);
    --fill-hover: rgba(31, 29, 24, 0.04);
    color-scheme: light;
  }

  :root:not([data-theme="dark"]) body::before {
    background-image: radial-gradient(circle at 1px 1px, rgba(32, 30, 25, 0.05) 1px, transparent 0);
  }
}

/* ─── LIGHT THEME — forced from the toolbar ─────────────────────────── */
:root[data-theme="light"] {
  --bg: #F4F1EA;
  --bg-elev: #FBFAF6;
  --bg-panel: #ECE7DB;
  --ink: #1F1D18;
  --dim: #5E5950;
  --faint: #9B9385;
  --border: #DBD5C8;
  --accent-text: #3C740A;
  --accent-display: #5A930F;
  --accent-tint: rgba(174, 205, 30, 0.22);
  --fill-hover: rgba(31, 29, 24, 0.04);
  color-scheme: light;
}

:root[data-theme="light"] body::before {
  background-image: radial-gradient(circle at 1px 1px, rgba(32, 30, 25, 0.05) 1px, transparent 0);
}

/* Labels that used to inherit the mono body face. */
.page-eyebrow,
.manual-video .section-label,
.manual-toc .section-label,
.callout .callout-label,
.shortcuts-table .shortcut-group-label,
code,
pre {
  font-family: var(--mono);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ─── FOOTER — the page's quiet close, centred like the close above it:
   the icon, the pages beyond this one in a row, then the fine print ── */
footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(72px, 8vw, 120px);
  padding: clamp(48px, 5vw, 72px) 0 28px;
  /* Its own ground: the page's panel colour, no canvas dots, a hairline
     where the page ends. */
  background: var(--bg-panel);
  box-shadow: 0 -1px 0 var(--border);
}

.foot {
  width: min(1240px, 100% - 2 * clamp(20px, 5vw, 64px));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.foot-mark {
  display: block;
  border-radius: 11px;
}

.foot-mark img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: var(--shadow-soft, 0 8px 22px -12px rgba(0, 0, 0, 0.45));
}

/* The links, one row, a quiet dot between each. */
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
}

.foot-nav a {
  position: relative;
  --line-top: 25px;
  padding: 4px 0;
  font: 500 15px/1.4 var(--sans);
  color: var(--ink);
  text-decoration: none;
}

.foot-nav a + a {
  margin-left: 37px;
}

.foot-nav a + a::before {
  content: '\00B7';
  position: absolute;
  left: -18.5px;
  transform: translateX(-50%);
  color: var(--faint);
}

/* The fine print centred; the way back up a small button at the right,
   and on a phone the appearance switch balancing it on the left. */
.foot-fine {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 22px;
  font: 400 13px/1.4 var(--sans);
  color: var(--faint);
}

.foot-side {
  display: flex;
  align-items: center;
}

.foot-side.-end {
  justify-content: flex-end;
}

.foot-top {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--dim);
  transition: color 0.2s, box-shadow 0.2s, transform 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.foot-top svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot-top:hover {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border-strong, var(--border));
  transform: translateY(-2px);
}

.foot-top:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.foot-fine a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

.foot-fine a:hover {
  color: var(--ink);
}

/* ═══ MANUAL STRUCTURE (mockup) ═════════════════════════════════════════
   A hub, one page per part, and a Shortcuts page. Labels are sentence
   case, after the Oct 27 type pass on the home page. */

.mock-note {
  display: inline-block;
  margin-bottom: 28px;
  padding: 4px 10px;
  border: 1px dashed var(--faint);
  border-radius: 6px;
  font: 400 12px/1.5 var(--sans);
  color: var(--dim);
}

.label {
  font: 500 13px/1.4 var(--sans);
  color: var(--dim);
  margin-bottom: 14px;
}

/* ─── Hub ──────────────────────────────────────────────────────────────── */
.start {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0 0 clamp(56px, 8vw, 88px);
}
.start a { color: inherit; text-decoration: none; display: block; }
.start h3 {
  font: 400 22px/1.25 var(--serif);
  color: var(--ink);
  margin-bottom: 6px;
}
.start a:hover h3 { color: var(--accent-text); }
.start p { font-size: 14px; line-height: 1.7; color: var(--dim); }
@media (max-width: 760px) { .start { grid-template-columns: 1fr; gap: 22px; } }

.parts { list-style: none; border-top: 1px solid var(--border); margin-bottom: clamp(56px, 8vw, 88px); }
.parts > li {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.parts .part-name {
  font: 400 34px/1 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.parts .part-name:hover { color: var(--accent-text); }
.parts .part-name small {
  display: block;
  margin-top: 8px;
  font: 400 13px/1.4 var(--sans);
  color: var(--dim);
  letter-spacing: 0;
}
.parts .part-sum { font-size: 15px; line-height: 1.6; color: var(--ink); margin-bottom: 10px; }
.parts .part-links { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; }
.parts .part-links a {
  font-size: 13px;
  color: var(--dim);
  text-decoration: none;
}
.parts .part-links a:hover { color: var(--ink); }
@media (max-width: 640px) { .parts > li { grid-template-columns: 1fr; } }

/* ─── Part pages: a sticky rail beside the text ────────────────────────── */
main.wide { max-width: 1120px; }

.part {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
}

.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  font-family: var(--sans);
}
.rail summary { display: none; list-style: none; }
.rail summary::-webkit-details-marker { display: none; }
.rail .rail-home {
  display: block;
  font-size: 13px;
  color: var(--dim);
  text-decoration: none;
  margin-bottom: 18px;
}
.rail .rail-home:hover { color: var(--ink); }
.rail ol { list-style: none; margin-bottom: 28px; }
.rail ol a {
  display: block;
  padding: 5px 0 5px 14px;
  border-left: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.4;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.rail ol a:hover { color: var(--ink); }
.rail ol a.active { color: var(--ink); border-left: 2px solid var(--accent-text); padding-left: 13px; }
.rail .rail-parts a { border-left: none; padding-left: 0; }
.rail .rail-parts a[aria-current="page"] { color: var(--ink); }

.part-body { min-width: 0; max-width: 680px; }
.part-body h1 { font-size: clamp(44px, 6vw, 68px); }

@media (max-width: 960px) {
  .part { grid-template-columns: 1fr; gap: 0; }
  .rail {
    position: static;
    max-height: none;
    margin-bottom: 40px;
    padding: 16px 20px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .rail summary {
    display: block;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink);
  }
  .rail summary::after { content: ' ▾'; color: var(--dim); }
  .rail[open] summary { margin-bottom: 14px; }
  .rail ol { margin-bottom: 18px; }
}

/* Each section is a page-within-the-page: one plain heading, no number. */
.part-body .manual-section h2 { font-size: clamp(30px, 3.6vw, 40px); }

/* One main way in the text; the alternatives on a quiet line after it. */
.also {
  font-size: 13px !important;
  color: var(--dim);
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.also b { font-weight: 500; color: var(--ink); }

/* A note for the other device, kept beside the topic it belongs to. */
.on-iphone {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  margin: 22px 0 8px;
  padding: 16px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.on-iphone svg { width: 16px; height: 16px; margin-top: 3px; stroke: var(--dim); fill: none; stroke-width: 1.6; }
.on-iphone p { margin: 0 !important; font-size: 13px !important; line-height: 1.7 !important; }
.on-iphone p b { color: var(--ink); font-weight: 500; }

.shot { margin: 28px 0 32px; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.shot.pair { max-width: 540px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: end; }
.shot figcaption { grid-column: 1 / -1; margin-top: 10px; font-size: 13px; color: var(--dim); line-height: 1.55; }

/* Recipes: the features put together, as numbered steps. */
.recipe {
  margin: 20px 0;
  padding: 22px 24px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.recipe h3 { margin-top: 0 !important; }

/* Previous / next */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: clamp(48px, 7vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.pager a { text-decoration: none; color: inherit; display: block; }
.pager a span { display: block; font: 400 13px/1.4 var(--sans); color: var(--dim); margin-bottom: 4px; }
.pager a strong { font: 400 24px/1.2 var(--serif); color: var(--ink); }
.pager a:hover strong { color: var(--accent-text); }
.pager .next { text-align: right; grid-column: 2; }

/* ─── Shortcuts page ───────────────────────────────────────────────────── */
.sc-tools {
  position: sticky;
  top: 84px;
  z-index: 5;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 20px;
  background: var(--bg);
}
.sc-filter {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--ink);
  font: 400 14px var(--sans);
}
.sc-filter:focus { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
}
.seg button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--dim);
  font: 500 13px var(--sans);
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--bg-panel); color: var(--ink); }
.shortcuts-table { max-width: none; scroll-margin-top: 150px; }
.shortcut-group { scroll-margin-top: 150px; }
.shortcuts-table .shortcut-group-label {
  font: 500 13px/1.4 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.sc-empty { display: none; font-size: 14px; color: var(--dim); padding: 24px 0; }
.shortcuts-table [hidden], [data-device][hidden], .rail [hidden] { display: none !important; }

/* Shortcuts: the filter and the device switch ride in the rail's column,
   so they stay in reach without a bar across the table. */
.rail-col {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.rail-col .rail { position: static; max-height: none; overflow: visible; }
.rail-col .sc-tools {
  position: static;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0;
  margin-bottom: 26px;
  background: none;
}
.rail-col .sc-filter { flex: none; height: 34px; font-size: 13px; }
.rail-col .seg { display: grid; grid-template-columns: 1fr 1fr; }
.rail-col .seg button { height: 26px; font-size: 12px; }
@media (max-width: 960px) {
  .rail-col { position: static; max-height: none; overflow: visible; }
  .rail-col .sc-tools { flex-direction: row; margin-bottom: 14px; }
  .rail-col .sc-filter { flex: 1; }
  .rail-col .seg { display: inline-flex; }
}
/* A word in place of keys reads as a quiet note, not a heading. */
.shortcuts-table .shortcut-combo { font: 400 13px/1.4 var(--sans); color: var(--dim); }
.rail-col { scrollbar-width: none; }
.rail-col::-webkit-scrollbar { display: none; }
.rail-col > .rail-home { display: block; font: 400 13px var(--sans); color: var(--dim); text-decoration: none; margin-bottom: 18px; }
.rail-col > .rail-home:hover { color: var(--ink); }
/* Room for the filter's focus ring inside the column's scroll box. */
.rail-col { padding: 4px; margin: -4px; }

/* ─── Full build ───────────────────────────────────────────────────────── */
.shot.phone { max-width: 260px; }
.shot.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 620px; }
.shot.phones figcaption, .shot.pair figcaption { grid-column: 1 / -1; }
.shot.half { max-width: 420px; }
@media (max-width: 560px) {
  .shot.phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot.phones picture:nth-child(3) { display: none; }
}

/* Two-column reference tables: what you type, what it does. */
.ref-table {
  width: 100%;
  max-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  margin: 8px 0 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}
.ref-table th, .ref-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
  color: var(--dim);
}
.ref-table tr:first-child th, .ref-table tr:first-child td { border-top: none; }
.ref-table thead th { background: var(--bg-elev); color: var(--ink); font: 500 13px var(--sans); }
.ref-table td:first-child { white-space: nowrap; color: var(--ink); width: 34%; }
@media (max-width: 560px) { .ref-table td:first-child { white-space: normal; } }

/* Small figures of speech the app itself uses. */
.manual-section h4 {
  font: 500 15px/1.4 var(--sans);
  color: var(--ink);
  margin: 24px 0 8px;
}
.manual-section .lede { color: var(--ink); font-size: 15px; }
.soon-banner {
  max-width: 680px;
  margin: 0 0 32px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--accent-tint);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}
/* A key combination never breaks across lines. */
.keys { white-space: nowrap; }

/* On a big monitor the page's type has grown and a laptop-sized bar looks lost:
   a size up, here only. Laptops and phones keep the sizes above. */
@media (min-width: 1800px) {
  :root { --bar-top: 16px; --bar-h: 46px; }
  .topbar .cap-glass { padding: 4px; border-radius: 14px; }
  .topbar .tb-brand { gap: 10px; padding: 3px 16px 3px 6px; }
  .topbar .tb-brand img { border-radius: 8px; }
  .topbar .tb-brand span { top: -1px; font-size: 19px; }
  .topbar .tb-get { padding: 4px 20px; font-size: 16px; }
  .topbar .tb-tool svg { width: 20px; height: 20px; }
  .top-pages a { --line-top: 24.5px; font-size: 17px; }
  .top-pages a + a { margin-left: 34px; }
  .top-pages a + a::before { left: -17px; }
}
