/* Cadence Reader marketing site.
   Palette and geometry sourced from CadenceReader/assets/brand — see docs/brand.md
   in that repository for the rationale. Dark is the primary identity; light mirrors
   the app's light theme so the site behaves the same way the app does. */

:root {
  color-scheme: dark;

  --canvas: #0b0b0c;
  --elevated: #16161a;
  --elevated-raised: #1c1c20;
  --elevated-border: #26262b;
  --header-bg: rgba(11, 11, 12, 0.78);
  --accent: #c8935a;
  --accent-pressed: #a87a4a;
  --accent-soft: rgba(200, 147, 90, 0.14);
  --text: #f2efea;
  --text-muted: #a8a29a;
  --text-faint: #857f78;
  --glow-1: rgba(200, 147, 90, 0.18);
  --glow-2: rgba(200, 147, 90, 0.09);
  --glow-strong-1: rgba(200, 147, 90, 0.4);
  --glow-strong-2: rgba(200, 147, 90, 0.16);
  --shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55);

  --max: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;
  --radius-sm: 8px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --canvas: #fbfaf8;
    --elevated: #ffffff;
    --elevated-raised: #ffffff;
    --elevated-border: #e9e5de;
    --header-bg: rgba(251, 250, 248, 0.78);
    --accent: #8c5e2a;
    --accent-pressed: #744d22;
    --accent-soft: rgba(140, 94, 42, 0.1);
    --text: #1a1916;
    --text-muted: #5c574f;
    --text-faint: #756f65;
    --glow-1: rgba(140, 94, 42, 0.1);
    --glow-2: rgba(140, 94, 42, 0.05);
    --glow-strong-1: rgba(140, 94, 42, 0.22);
    --glow-strong-2: rgba(140, 94, 42, 0.1);
    --shadow: 0 24px 48px -28px rgba(26, 25, 22, 0.25);
  }
}

/* Explicit theme override, set via the theme toggle and read back from a cookie.
   Takes the light palette outside of the media query so a choice sticks
   regardless of the OS setting. */
:root[data-theme='light'] {
  color-scheme: light;
  --canvas: #fbfaf8;
  --elevated: #ffffff;
  --elevated-raised: #ffffff;
  --elevated-border: #e9e5de;
  --header-bg: rgba(251, 250, 248, 0.78);
  --accent: #8c5e2a;
  --accent-pressed: #744d22;
  --accent-soft: rgba(140, 94, 42, 0.1);
  --text: #1a1916;
  --text-muted: #5c574f;
  --text-faint: #756f65;
  --glow-1: rgba(140, 94, 42, 0.1);
  --glow-2: rgba(140, 94, 42, 0.05);
  --glow-strong-1: rgba(140, 94, 42, 0.22);
  --glow-strong-2: rgba(140, 94, 42, 0.1);
  --shadow: 0 24px 48px -28px rgba(26, 25, 22, 0.25);
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
  scrollbar-color: var(--elevated-border) var(--canvas);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--canvas);
}

::-webkit-scrollbar-thumb {
  background: var(--elevated-border);
  border-radius: 999px;
  border: 3px solid var(--canvas);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

body {
  position: relative;
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 28rem at 12% -8%, var(--glow-1), transparent 60%),
    radial-gradient(34rem 26rem at 104% 12%, var(--glow-2), transparent 55%);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-pressed);
}

img {
  max-width: 100%;
  display: block;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--canvas);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: var(--gutter);
  top: var(--gutter);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.25rem 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--elevated-border);
}

.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-lockup {
  display: block;
  height: 32px;
  width: auto;
}

.brand-lockup img {
  height: 32px;
  width: auto;
}

.brand-lockup .lockup-light {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .brand-lockup .lockup-dark {
    display: none;
  }

  :root:not([data-theme='dark']) .brand-lockup .lockup-light {
    display: block;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--elevated-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--elevated-border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme='dark']) .theme-toggle .icon-moon {
    display: none;
  }
}

:root[data-theme='light'] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme='light'] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--canvas);
  box-shadow: 0 10px 24px -10px var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-pressed);
  color: var(--canvas);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px var(--accent);
}

.btn-ghost {
  border-color: var(--elevated-border);
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding: clamp(5rem, 13vw, 8.5rem) 0 clamp(3.5rem, 9vw, 6rem);
}

.hero-inner {
  max-width: 38rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-icon {
  position: relative;
  width: clamp(84px, 11vw, 116px);
  height: clamp(84px, 11vw, 116px);
  margin-bottom: 2.5rem;
}

.hero-icon::before {
  content: '';
  position: absolute;
  inset: clamp(-46px, -7vw, -70px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-strong-1), transparent 70%);
  z-index: -1;
}

.hero-icon--sm {
  width: 56px;
  height: 56px;
  margin-bottom: 1.75rem;
}

.hero-icon--sm::before {
  inset: -28px;
}

.hero-icon-tile {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 27%;
  background:
    radial-gradient(120% 120% at 22% 12%, rgba(200, 147, 90, 0.55), transparent 60%),
    linear-gradient(155deg, #1e1811 0%, #0e0d0b 75%);
  box-shadow: 0 30px 56px -20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-icon-tile img {
  width: 42%;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  line-height: 1.12;
  margin: 0 0 1.3rem;
  letter-spacing: -0.01em;
}

.hero h1 .accent {
  color: var(--accent);
  font-weight: 300;
}

.hero p.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 0 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

/* Sections */
section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-head {
  max-width: 40rem;
  margin: 0 auto 3.25rem;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.25;
  margin: 0 0 0.85rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--elevated-border);
  margin: 0;
}

/* Alternating full-bleed section backgrounds for visual rhythm */
.band {
  position: relative;
  background: var(--elevated);
  border-top: 1px solid var(--elevated-border);
  border-bottom: 1px solid var(--elevated-border);
  overflow: hidden;
}

.band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(40rem 22rem at 50% -12%, var(--glow-2), transparent 60%);
}

.band > .wrap {
  position: relative;
  z-index: 1;
}

/* Icon tile: the hero mark's gradient-tile treatment, reused at a smaller size
   so feature/privacy icons read as one family with the hero icon. */
.icon-tile {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 auto 1.1rem;
  border-radius: 27%;
  background:
    radial-gradient(120% 120% at 22% 12%, rgba(200, 147, 90, 0.4), transparent 60%),
    linear-gradient(155deg, #1e1811 0%, #0e0d0b 75%);
  box-shadow:
    0 14px 28px -14px rgba(0, 0, 0, 0.55),
    0 0 32px -10px var(--glow-strong-1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover .icon-tile {
  transform: translateY(-2px);
  box-shadow:
    0 18px 32px -14px rgba(0, 0, 0, 0.6),
    0 0 40px -8px var(--glow-strong-1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.icon-tile .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin: 0;
}

/* Light-theme variant: the repeated card/plan/format tiles switch to a warm
   cream tile so they sit on a light page instead of reading as dark holes.
   The single hero mark stays dark in both themes deliberately (it mirrors
   the fixed-dark app icon) and is not covered by this rule. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .icon-tile {
    background:
      radial-gradient(120% 120% at 22% 12%, rgba(140, 94, 42, 0.16), transparent 60%),
      linear-gradient(155deg, #ffffff 0%, #f2ebe0 75%);
    border: 1px solid var(--elevated-border);
    box-shadow:
      0 14px 26px -18px rgba(26, 25, 22, 0.28),
      0 0 24px -12px rgba(140, 94, 42, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  :root:not([data-theme='dark']) .card:hover .icon-tile {
    box-shadow:
      0 18px 30px -18px rgba(26, 25, 22, 0.32),
      0 0 30px -10px rgba(140, 94, 42, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }
}

:root[data-theme='light'] .icon-tile {
  background:
    radial-gradient(120% 120% at 22% 12%, rgba(140, 94, 42, 0.16), transparent 60%),
    linear-gradient(155deg, #ffffff 0%, #f2ebe0 75%);
  border: 1px solid var(--elevated-border);
  box-shadow:
    0 14px 26px -18px rgba(26, 25, 22, 0.28),
    0 0 24px -12px rgba(140, 94, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

:root[data-theme='light'] .card:hover .icon-tile {
  box-shadow:
    0 18px 30px -18px rgba(26, 25, 22, 0.32),
    0 0 30px -10px rgba(140, 94, 42, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Principles / feature grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.5rem;
}

.card {
  background: linear-gradient(165deg, var(--elevated-raised), var(--elevated) 65%);
  border: 1px solid var(--elevated-border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  max-width: 21rem;
}

/* Formats */
.format-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.format-group {
  background: linear-gradient(165deg, var(--elevated-raised), var(--elevated) 65%);
  border: 1px solid var(--elevated-border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.format-group:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.format-group .icon-tile {
  width: 44px;
  height: 44px;
}

.format-group .icon-tile .icon {
  width: 18px;
  height: 18px;
}

.format-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 1.1rem;
}

.format-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.format-chip {
  border: 1px solid var(--elevated-border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--canvas);
}

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.plan {
  background: linear-gradient(165deg, var(--elevated-raised), var(--elevated) 65%);
  border: 1px solid var(--elevated-border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plan.is-featured {
  border-color: var(--accent);
  background: var(--elevated-raised);
  box-shadow: var(--shadow);
  position: relative;
}

.plan.is-featured:hover {
  transform: none;
}

.plan.is-featured::before {
  content: 'Most popular';
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--canvas);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

.plan-tagline {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 1.5rem;
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex-grow: 1;
}

.plan-list li {
  display: flex;
  text-align: left;
  gap: 0.6rem;
  padding: 0.45rem 0;
  font-size: 0.92rem;
  color: var(--text);
  border-top: 1px solid var(--elevated-border);
}

.plan-list li:first-child {
  border-top: none;
}

.plan-list svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 0.2rem;
  color: var(--accent);
}

/* Privacy row */
.privacy-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
}

.privacy-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.privacy-item .icon-tile {
  width: 44px;
  height: 44px;
  margin-bottom: 0.9rem;
}

.privacy-item .icon-tile .icon {
  width: 18px;
  height: 18px;
}

.privacy-item h3 {
  font-size: 0.98rem;
  margin: 0 0 0.4rem;
}

.privacy-item p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.55;
  max-width: 18rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--elevated-border);
  padding: 2.5rem 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.footer-brand img {
  width: 18px;
  height: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--text);
}

/* Content pages (privacy / terms / support) */
.doc {
  padding: 0 0 4rem;
}

/* Doc page header: title on the left, page switcher on the right */
.doc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(1.75rem, 3vw, 2.5rem);
}

.doc-title .eyebrow {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.doc-title h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.3rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.doc-note {
  color: var(--text-faint);
  font-size: 0.88rem;
  margin: 0;
}

.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doc-tabs a {
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--elevated-border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.doc-tabs a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.doc-tabs a.is-current {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.doc-wrap {
  max-width: var(--max);
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

/* In-page section nav */
.doc-nav {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.doc-nav .eyebrow {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.doc-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.3;
  padding: 0.4rem 0 0.4rem 0.85rem;
  border-left: 2px solid var(--elevated-border);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.doc-nav a:hover {
  color: var(--text);
}

.doc-nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.doc-content {
  min-width: 0;
}

.doc-card {
  background: var(--elevated);
  border: 1px solid var(--elevated-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 4.5vw, 3.25rem);
}

.doc-notice {
  background: var(--accent-soft);
  border: 1px solid var(--elevated-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.doc h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.85rem;
  padding-top: 0.5rem;
  scroll-margin-top: 6rem;
}

.doc h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

.doc p,
.doc li {
  color: var(--text-muted);
  line-height: 1.7;
}

.doc ul {
  padding-left: 1.2rem;
}

.doc-content a {
  color: var(--accent);
}

.doc strong {
  color: var(--text);
}

@media (max-width: 860px) {
  .doc-wrap {
    grid-template-columns: 1fr;
  }

  .doc-nav {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .doc-nav .eyebrow {
    display: none;
  }

  .doc-nav a {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid var(--elevated-border);
    padding: 0.35rem 0.1rem;
  }

  .doc-nav a.is-active {
    border-bottom-color: var(--accent);
  }
}

/* Not-found page */
.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.notfound .wrap {
  max-width: 26rem;
  text-align: center;
}

.notfound .hero-icon {
  margin-left: auto;
  margin-right: auto;
}

.notfound h1 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.75rem;
}

.notfound p {
  color: var(--text-muted);
}

.notfound p:last-child {
  margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 860px) {
  .site-nav {
    gap: 1.1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--elevated);
    border: 1px solid var(--elevated-border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 0.25rem var(--gutter) 0.5rem;
  }

  .site-nav .nav-links.is-open {
    display: flex;
  }

  .site-nav .nav-links a {
    padding: 0.85rem 0;
    border-top: 1px solid var(--elevated-border);
  }

  .site-nav .nav-links a:first-child {
    border-top: none;
  }
}

@media (max-width: 560px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-links {
    gap: 1rem;
  }
}
