/* ── Sheetly rebuild · storybook-on-parchment ─────────────────────────
   Palette is the app's own (stave-expo/src/theme/tokens.ts cream + colors.ts).
   Type: Nunito (display), DM Sans (UI/body), Playfair (wordmark only). */

@font-face { font-family: "Nunito"; src: url("assets/fonts/nunito-latin.woff2") format("woff2"); font-weight: 700 1000; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/fonts/dmsans-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/fonts/dmsans-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/fonts/dmsans-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("assets/fonts/playfair-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --paper-top: #F8F1E1;
  --paper: #EFE3C8;
  --card: #FCF6E6;
  --ink: #3A2415;
  --ink-deep: #2A1A0C;
  --body: #7A6450;
  --muted: #8A745C;
  --gold: #C4952A;
  --gold-light: #D4A94A;
  --gold-dark: #A67B1E;
  --gold-text: #A8761A;
  --espresso: #5C3B22;
  --espresso-deep: #3C2414;
  --cta-text: #F6ECD6;
  --band: #2C1A0E;
  --band-deep: #150C06;
  --line: rgba(74, 46, 28, 0.14);
  --line-strong: rgba(74, 46, 28, 0.22);
  --shadow: 58, 36, 22; /* warm espresso, never black */

  --font-display: "Nunito", ui-rounded, system-ui, sans-serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-wordmark: "Playfair Display", Georgia, serif;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --page-w: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper-top);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(196, 149, 42, 0.6); outline-offset: 3px; border-radius: 6px; }

h1, h2 { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(34px, 3.7vw, 50px); color: var(--ink); }
h1 em { font-style: normal; color: var(--gold-text); }
h2 { font-size: clamp(30px, 3.6vw, 44px); color: var(--gold-text); }
.sub { color: var(--body); font-size: 18px; max-width: 46ch; }

/* ── Buttons: sticker-pressed, chunky 3D edge ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-weight: 700; text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.06em;
  border: 0; border-radius: var(--r-md); cursor: pointer;
  box-shadow: 0 4px 0 var(--edge, transparent);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge, transparent); filter: brightness(1.07); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 transparent !important; }
.btn-primary { background: var(--espresso); color: var(--cta-text); --edge: var(--espresso-deep); }
.btn-gold { background: var(--gold); color: var(--ink-deep); --edge: var(--gold-dark); }
.btn-sm { font-size: 13px; padding: 11px 18px; }
.btn-lg { font-size: 15px; padding: 16px 30px; border-radius: var(--r-lg); }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper-top);
  transition: box-shadow 0.25s ease;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(var(--shadow), 0.08); }
.nav-inner {
  max-width: var(--page-w); margin: 0 auto; height: 68px;
  display: flex; align-items: center; gap: 32px; padding: 0 24px;
}
.wordmark {
  font-family: var(--font-wordmark); font-weight: 800; font-size: 27px;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); text-decoration: none; padding: 8px 2px;
}
.nav-links a:hover { color: var(--gold-text); }
.nav-sentinel { height: 1px; }

/* ── Hero ── */
.hero {
  max-width: var(--page-w); margin: 0 auto;
  padding: 56px 24px 110px;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center;
}
.hero-copy .sub { margin-top: 20px; }
.cta-row { margin-top: 32px; display: flex; align-items: center; gap: 18px; }
.cta-note { font-size: 14px; font-weight: 500; color: var(--muted); }

.hero-demo { position: relative; }
.hero-mascot {
  position: absolute; bottom: -46px; right: -30px; width: 138px; height: auto; z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(var(--shadow), 0.22));
}
.score-card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-xl);
  padding: 24px 24px 20px;
  box-shadow: 0 8px 0 rgba(var(--shadow), 0.10), 0 18px 40px rgba(var(--shadow), 0.12);
}
.score-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.score-title { font-family: var(--font-display); font-weight: 900; font-size: 24px; color: var(--ink); }
.score-composer { font-size: 13px; color: var(--muted); margin-top: 2px; }
.play-btn {
  flex: none; width: 62px; height: 62px; border-radius: 50%;
  background: var(--gold); color: var(--ink-deep); border: 0; cursor: pointer;
  box-shadow: 0 4px 0 var(--gold-dark);
  display: grid; place-items: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}
.play-btn:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 6px 0 var(--gold-dark); }
.play-btn:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.play-btn svg { width: 30px; height: 30px; }
.play-btn .icon-stop { display: none; }
.play-btn[aria-pressed="true"] .icon-play { display: none; }
.play-btn[aria-pressed="true"] .icon-stop { display: block; }

.staff-wrap { margin: 18px 0 6px; }
.staff-wrap svg { width: 100%; height: auto; display: block; }
.staff-line { stroke: var(--line-strong); stroke-width: 1.6; }
.staff-bar { stroke: var(--line-strong); stroke-width: 2; }
.staff-time { font-family: var(--font-display); font-weight: 900; font-size: 27px; fill: var(--gold-text); }
.note-head { fill: var(--ink-deep); transition: fill 0.1s ease, transform 0.1s ease; }
.note-stem { stroke: var(--ink-deep); stroke-width: 2; transition: stroke 0.1s ease; }
.note-open .note-head { fill: var(--card); stroke: var(--ink-deep); stroke-width: 2.4; }
.note.is-on .note-head { fill: var(--gold); stroke: var(--gold-dark); }
.note.is-on .note-stem { stroke: var(--gold-dark); }
.note.is-on { transform: translateY(-2px); }
.note { transition: transform 0.1s ease; }

.pill-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pill {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); background: transparent;
  border: 2px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 9px 15px; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { color: var(--gold-text); border-color: var(--gold); }
.pill:active { transform: translateY(2px); }
.pill.is-active {
  color: var(--ink-deep); background: rgba(196, 149, 42, 0.16); border-color: var(--gold);
}
.demo-hint { margin-top: 16px; font-size: 13px; color: var(--muted); padding-right: 104px; }

/* ── Sections shared ── */
section { scroll-margin-top: 90px; }
.section-head { max-width: var(--page-w); margin: 0 auto; padding: 0 24px; text-align: center; }
.section-head .sub { margin: 14px auto 0; }

/* ── Scan transformation ── */
.scan { background: var(--paper); padding: 88px 0 92px; }
.transform-stage {
  max-width: var(--page-w); margin: 52px auto 0; padding: 0 24px;
  display: flex; align-items: center; justify-content: center; gap: 48px;
}
.stage-col { display: flex; flex-direction: column; align-items: center; gap: 16px; flex: none; width: min(540px, 100%); }
.stage-card { width: 100%; border-radius: var(--r-lg); }

/* The scan scene: an old page on the table, the phone hovering mid-scan */
.scan-scene { position: relative; flex: 1.1; max-width: 520px; padding: 0 40px 34px 0; }
.scene-paper {
  width: 100%; height: 540px; object-fit: cover; object-position: center top;
  border-radius: 10px;
  transform: rotate(-2deg);
  box-shadow: 0 10px 0 rgba(var(--shadow), 0.07), 0 22px 44px rgba(var(--shadow), 0.22);
}
.scene-phone {
  position: absolute; right: 0; bottom: 0;
  width: 176px;
  transform: rotate(3.5deg);
  filter: drop-shadow(0 16px 22px rgba(var(--shadow), 0.32)) drop-shadow(0 34px 54px rgba(var(--shadow), 0.2));
}
/* phone-only variant: no paper photo, the phone carries the scene */
.scan-scene.phone-only { display: flex; justify-content: center; padding: 0; }
.scan-scene.phone-only .scene-phone {
  position: static;
  width: min(300px, 70vw);
  transform: rotate(-2.5deg);
}
.stage-clean {
  display: block; border: 0; padding: 0; text-align: inherit; font: inherit;
  background: none; cursor: pointer;
  box-shadow: 0 6px 0 rgba(var(--shadow), 0.12), 0 20px 40px rgba(var(--shadow), 0.16);
  border-radius: var(--r-lg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stage-clean:hover { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(var(--shadow), 0.12), 0 24px 44px rgba(var(--shadow), 0.18); }
.stage-clean:active { transform: translateY(2px); }
.stage-clean .paper { border-radius: var(--r-lg); border: 2px solid rgba(196, 149, 42, 0.45); }
.stage-caption { font-size: 14px; font-weight: 500; color: var(--muted); }
.stage-caption-gold { color: var(--gold-text); font-weight: 700; }

.stage-arrow { position: relative; flex: none; width: 84px; }
.stage-arrow svg { width: 84px; height: 39px; display: block; }
.stage-arrow path { stroke: var(--gold); stroke-width: 9; fill: none; }
.paper { padding: 26px 28px 22px; }
.paper-title { font-family: var(--font-wordmark); font-weight: 800; font-size: 24px; margin-bottom: 8px; }

.clean-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.clean-head .paper-title { margin-bottom: 2px; }
.paper-composer { font-size: 13px; color: var(--muted); }
.clean-play {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold); color: var(--ink-deep);
  box-shadow: 0 3px 0 var(--gold-dark);
  display: grid; place-items: center;
}
.clean-play svg { width: 22px; height: 22px; }
.clean-play .icon-stop { display: none; }
.stage-clean.live .clean-play .icon-play { display: none; }
.stage-clean.live .clean-play .icon-stop { display: block; }
.meta-row { display: flex; gap: 8px; margin-top: 4px; }
.meta-chip {
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold-text); background: rgba(196, 149, 42, 0.12);
  border: 1.5px solid rgba(196, 149, 42, 0.35); border-radius: 10px; padding: 5px 10px;
}
.note-flag { stroke: var(--ink-deep); stroke-width: 2.2; transition: stroke 0.1s ease; }
.clean-paper .note-flag { stroke: var(--gold-dark); }
.note.is-on .note-flag { stroke: var(--gold-dark); }
.clean-paper { background: var(--card); }
.clean-paper .note-head { fill: var(--gold-dark); }
.clean-paper .note-stem { stroke: var(--gold-dark); }
.clean-paper .note-open .note-head { fill: var(--card); stroke: var(--gold-dark); }
.clean-paper .paper-title { color: var(--ink); }

/* ── Coach ── */
.coach {
  max-width: var(--page-w); margin: 0 auto;
  padding: 100px 24px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center;
}
.coach-copy .sub { margin-top: 18px; }
.coach-mascot { width: 168px; margin-top: 36px; filter: drop-shadow(0 10px 14px rgba(var(--shadow), 0.2)); }
/* Real iPhone 17 Pro mockups (Apple bezel renders composited with app screenshots) */
.mockup-portrait {
  justify-self: center;
  width: min(340px, 82vw);
  filter: drop-shadow(0 14px 22px rgba(var(--shadow), 0.2)) drop-shadow(0 34px 60px rgba(var(--shadow), 0.18));
}

/* ── Player ── */
.player { background: var(--paper); padding: 92px 0 100px; }
.mockup-landscape {
  display: block;
  width: min(840px, calc(100% - 48px));
  margin: 48px auto 0;
  filter: drop-shadow(0 14px 22px rgba(var(--shadow), 0.2)) drop-shadow(0 34px 60px rgba(var(--shadow), 0.18));
}
/* The player video bakes its own parchment background and warm shadow */
video.mockup-landscape { filter: none; height: auto; }

/* ── Band + footer ── */
.band { background: var(--band); color: var(--cta-text); }
.band-inner {
  max-width: var(--page-w); margin: 0 auto; padding: 92px 24px 76px;
  display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center;
}
.band h2 { color: var(--gold-light); }
.band-mascot { width: 158px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35)); }
.band-note { font-size: 14px; color: rgba(246, 236, 214, 0.6); }
.foot {
  max-width: var(--page-w); margin: 0 auto; padding: 26px 24px 34px;
  border-top: 1px solid rgba(246, 236, 214, 0.14);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.wordmark-foot { color: var(--cta-text); font-size: 22px; }
.foot-links { display: flex; gap: 22px; margin-left: auto; }
.foot-links a {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(246, 236, 214, 0.72); text-decoration: none;
}
.foot-links a:hover { color: var(--gold-light); }
.foot-copy { font-size: 13px; color: rgba(246, 236, 214, 0.55); }

/* ── Motion ── */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal-tilt { transform: translateY(26px) rotate(2.5deg); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1); }

@media (prefers-reduced-motion: no-preference) {
  /* Load-in cascade: the hero assembles itself */
  .hero-copy h1 { animation: rise 0.7s 0.05s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-copy .sub { animation: rise 0.7s 0.16s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-copy .cta-row { animation: rise 0.7s 0.27s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-demo { animation: rise 0.8s 0.34s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } }

  .hero-mascot { animation: bob 3.2s ease-in-out infinite alternate; }
  @keyframes bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
  /* Mascot keeps the beat while the demo plays (toggled by JS) */
  .hero-mascot.dancing { animation: dance 0.48s ease-in-out infinite alternate; }
  @keyframes dance { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-12px) rotate(3deg); } }

  /* Idle shimmer: the clean score quietly plays itself */
  .clean-paper .note-head { animation: notegold 13.5s infinite; animation-delay: calc(var(--i) * 0.45s); }
  @keyframes notegold {
    0%, 9%, 100% { fill: var(--gold-dark); }
    3%, 6% { fill: var(--gold); }
  }
  .stage-clean.live .note-head { animation: none; }

  .band-mascot:hover { animation: wiggle 0.55s ease; }
  @keyframes wiggle {
    25% { transform: rotate(-4deg); }
    50% { transform: rotate(3deg); }
    75% { transform: rotate(-2deg); }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-tilt { opacity: 1; transform: none; }
  .note, .note-head, .note-stem, .note-flag, .btn, .pill, .play-btn, .stage-clean { transition: none; }
}

/* ── Mobile ── */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; gap: 84px; padding-top: 36px; padding-bottom: 72px; }
  .hero-mascot { bottom: -42px; right: -6px; width: 104px; }
  .coach { grid-template-columns: 1fr; gap: 48px; padding: 72px 24px; }
  .coach-mascot { display: none; }
  .paper { padding: 20px 16px 14px; }
  .transform-stage { flex-direction: column; gap: 22px; }
  .stage-col { max-width: 100%; }
  .scan-scene { max-width: 100%; padding: 0 24px 26px 0; }
  .scene-paper { height: 430px; }
  .scene-phone { width: 128px; }
  .stage-arrow { transform: rotate(90deg); width: 72px; }
  .stage-arrow svg { width: 72px; height: 33px; }
  .band-inner { padding: 68px 24px 56px; }
  .foot { flex-direction: column; gap: 14px; text-align: center; }
  .foot-links { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Document pages · privacy / terms / support
   Same parchment world as the landing page: cream card on paper, gold
   section numbers, sticky contents rail that turns into a chip bar on
   phones. Everything here is `doc-` prefixed so nothing collides.
   ═════════════════════════════════════════════════════════════════════ */

/* ── Doc hero ── */
.doc-hero {
  position: relative;
  max-width: var(--page-w); margin: 0 auto;
  padding: 56px 24px 40px;
  overflow: hidden;
}
.doc-hero-copy { max-width: 640px; }
.doc-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-text); background: rgba(196, 149, 42, 0.12);
  border: 1.5px solid rgba(196, 149, 42, 0.35); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 18px;
}
.doc-hero h1 { font-size: clamp(34px, 4.6vw, 54px); }
.doc-hero .sub { margin-top: 16px; max-width: 52ch; }
.doc-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.doc-hero-mascot {
  position: absolute; right: 26px; bottom: 18px;
  width: 150px; height: auto; pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(var(--shadow), 0.2));
}

/* ── Layout: contents rail + prose ── */
.doc-body {
  max-width: var(--page-w); margin: 0 auto;
  padding: 0 24px 96px;
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 44px;
  align-items: start;
}
.doc-toc { position: sticky; top: 88px; }
.doc-toc-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px; padding-left: 14px;
}
.doc-toc ol {
  list-style: none; counter-reset: toc;
  border-left: 2px solid var(--line);
}
.doc-toc a {
  display: block; padding: 8px 14px; margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 14px; font-weight: 500; line-height: 1.35;
  color: var(--body); text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.doc-toc a:hover { color: var(--gold-text); border-left-color: rgba(196, 149, 42, 0.45); }
.doc-toc a.is-current {
  color: var(--ink); font-weight: 700;
  border-left-color: var(--gold);
}

/* ── The prose card ── */
.doc-prose {
  counter-reset: sec;
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-xl);
  padding: 46px 52px 44px;
  box-shadow: 0 8px 0 rgba(var(--shadow), 0.08), 0 18px 40px rgba(var(--shadow), 0.10);
}
.doc-prose > section { scroll-margin-top: 96px; }
.doc-prose > section + section { margin-top: 42px; }
.doc-prose p { color: var(--body); font-size: 16.5px; line-height: 1.75; max-width: 68ch; }
.doc-prose p + p { margin-top: 14px; }
.doc-prose strong { color: var(--ink); font-weight: 700; }

.doc-prose h2 {
  counter-increment: sec;
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(23px, 2.3vw, 28px);
  margin-bottom: 16px;
}
.doc-prose h2::before {
  content: counter(sec, decimal-leading-zero);
  flex: none;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--gold-text); background: rgba(196, 149, 42, 0.14);
  border: 1.5px solid rgba(196, 149, 42, 0.34); border-radius: 999px;
  padding: 5px 11px;
  transform: translateY(-3px);
}
.doc-prose h3 {
  font-family: var(--font-display); font-weight: 900; font-size: 18px;
  color: var(--ink); letter-spacing: -0.01em;
  margin: 26px 0 8px;
}
.doc-prose ul { list-style: none; margin: 14px 0 0; }
.doc-prose li {
  position: relative; padding-left: 26px; margin-top: 10px;
  color: var(--body); font-size: 16.5px; line-height: 1.7; max-width: 66ch;
}
.doc-prose li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
}
.doc-prose .list-yes li::before,
.doc-prose .list-no li::before {
  content: "✓"; width: auto; height: auto; border-radius: 0; background: none;
  left: 0; top: 0; font-weight: 800; font-size: 15px; color: var(--gold-text);
}
.doc-prose .list-no li::before { content: "✕"; color: #A85A3A; }
.doc-prose a {
  color: var(--gold-text); font-weight: 500;
  text-decoration: underline; text-decoration-color: rgba(196, 149, 42, 0.42);
  text-underline-offset: 3px; text-decoration-thickness: 1.5px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.doc-prose a:hover { color: var(--gold-dark); text-decoration-color: var(--gold); }
.doc-lede {
  font-size: 18px !important; color: var(--ink) !important; line-height: 1.65 !important;
  padding-bottom: 30px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

/* Plain-english callout */
.doc-note {
  background: rgba(196, 149, 42, 0.10);
  border: 1.5px solid rgba(196, 149, 42, 0.30);
  border-left: 5px solid var(--gold);
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin: 22px 0 0;
}
.doc-note-title {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-text);
  margin-bottom: 8px;
}
.doc-note p { color: var(--ink); font-size: 16px; }

/* At-a-glance card grid */
.glance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; margin-top: 22px;
}
.glance {
  background: rgba(246, 236, 214, 0.62);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 18px 18px 16px;
}
.glance-key {
  font-family: var(--font-display); font-weight: 900; font-size: 15px;
  color: var(--ink); margin-bottom: 6px;
}
.glance p { font-size: 14.5px !important; line-height: 1.6 !important; margin: 0; }

/* ── Support: FAQ accordions ── */
.faq { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: rgba(246, 236, 214, 0.62);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.faq details[open] { border-color: rgba(196, 149, 42, 0.45); background: rgba(196, 149, 42, 0.07); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 17px 20px;
  font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; margin-left: auto;
  width: 13px; height: 13px;
  background: linear-gradient(var(--gold-text) 0 0) center/100% 2.4px no-repeat,
              linear-gradient(var(--gold-text) 0 0) center/2.4px 100% no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq summary:hover { color: var(--gold-text); }
.faq .faq-answer { padding: 0 20px 18px; }
.faq .faq-answer p { font-size: 16px; }
.faq .faq-answer p + p { margin-top: 10px; }

/* ── Support: contact card ── */
.contact-card {
  position: relative;
  background: var(--band); color: var(--cta-text);
  border-radius: var(--r-xl);
  padding: 34px 36px;
  margin-top: 22px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  box-shadow: 0 8px 0 rgba(var(--shadow), 0.14), 0 20px 40px rgba(var(--shadow), 0.16);
}
.contact-card img { width: 116px; flex: none; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.35)); }
.contact-copy { flex: 1; min-width: 220px; }
.contact-card .contact-title {
  font-family: var(--font-display); font-weight: 900; font-size: 22px;
  color: var(--gold-light); margin-bottom: 6px;
}
.contact-card p { color: rgba(246, 236, 214, 0.72) !important; font-size: 15.5px !important; }
.contact-card .btn { margin-top: 16px; }

/* ── Cross-links between doc pages ── */
.doc-links {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-top: 22px;
}
.doc-link-card {
  display: block; text-decoration: none !important;
  background: rgba(246, 236, 214, 0.62);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 18px 20px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.doc-link-card:hover {
  transform: translateY(-3px); border-color: rgba(196, 149, 42, 0.5);
  box-shadow: 0 6px 0 rgba(var(--shadow), 0.08);
}
.doc-link-card .link-title {
  font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.doc-link-card .link-title::after {
  content: "→"; color: var(--gold-text); font-family: var(--font-ui); font-weight: 700;
  transition: transform 0.15s ease;
}
.doc-link-card:hover .link-title::after { transform: translateX(4px); }
.doc-link-card .link-desc { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ── Slim closing band for doc pages ── */
.band-slim .band-inner { padding: 62px 24px 48px; gap: 18px; }
.band-slim .band-inner h2 { font-size: clamp(26px, 3vw, 34px); }
.band-slim .band-mascot { width: 118px; }

/* ── Back to top ── */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold); color: var(--ink-deep);
  box-shadow: 0 4px 0 var(--gold-dark), 0 10px 24px rgba(var(--shadow), 0.24);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { filter: brightness(1.06); }
.to-top:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.to-top svg { width: 22px; height: 22px; }

/* ── Doc pages · mobile ── */
@media (max-width: 980px) {
  .doc-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .doc-body > * { min-width: 0; }
  .doc-hero { padding-bottom: 26px; }
  .doc-hero-mascot { position: static; width: 108px; margin: 26px 0 0; }
  .doc-toc {
    position: sticky; top: 68px; z-index: 10;
    margin: 0 -24px; padding: 10px 0;
    background: var(--paper-top);
    box-shadow: 0 1px 0 var(--line);
  }
  .doc-toc-title { display: none; }
  .doc-toc ol {
    display: flex; gap: 8px; border-left: 0;
    overflow-x: auto; scrollbar-width: none;
    padding: 0 24px 2px;
  }
  .doc-toc ol::-webkit-scrollbar { display: none; }
  .doc-toc li { flex: none; }
  .doc-toc a {
    margin-left: 0; padding: 8px 14px; white-space: nowrap;
    border: 1.5px solid var(--line-strong); border-radius: 999px;
    font-size: 13px; font-weight: 700;
  }
  .doc-toc a:hover { border-color: var(--gold); }
  .doc-toc a.is-current {
    color: var(--ink-deep); background: rgba(196, 149, 42, 0.16); border-color: var(--gold);
  }
  .doc-prose { padding: 30px 22px 30px; border-radius: var(--r-lg); }
  /* Nav (68) + the sticky chip rail (~52) both sit above the section */
  .doc-prose > section { scroll-margin-top: 132px; }
  .doc-prose h2 { gap: 10px; }
  .contact-card { padding: 26px 22px; gap: 18px; }
  .contact-card img { width: 88px; }
  .to-top { right: 16px; bottom: 16px; }
}

/* Support reads as a help page, not a contract — no section numbers there */
.doc-prose.unnumbered h2::before { display: none; }
.doc-prose.unnumbered h2 { color: var(--gold-text); }
/* Current page in the top nav */
.nav-links a.is-here { color: var(--ink); }
.nav-links a.is-here::after {
  content: ""; display: block; height: 2px; margin-top: 4px;
  background: var(--gold); border-radius: 2px;
}
/* First section needs the same breathing room as the ones between */
.doc-prose > section:first-of-type { margin-top: 40px; }
.doc-prose ul + p { margin-top: 14px; }
/* Email address as a button label — uppercase mangles an address */
.btn-email { text-transform: none; letter-spacing: 0.01em; }
/* Buttons inside the prose card: keep button colors, not link colors */
.doc-prose a.btn { text-decoration: none; }
.doc-prose a.btn-gold { color: var(--ink-deep); }
.doc-prose a.btn-primary { color: var(--cta-text); }
