/* Design tokens mirror apps/flutter/lib/core/theme/{app_colors,spacing}.dart
   so the marketing site and the product feel like one brand. */
:root {
  /* --primary is used as a foreground color (text/icons/links) on light or
     tinted backgrounds; --primary-strong is used as a solid fill behind
     white text (buttons, banners) or as text on a white surface. They're the
     same value in light mode — dark mode below repoints --primary to a
     lighter tint so foreground text still clears 4.5:1, while
     --primary-strong stays put since it's always paired with white. */
  --primary: #2456e5;
  --primary-strong: #2456e5;
  --primary-dark: #1c44c2;
  --primary-muted: #e8edfc;
  /* Success/warning darkened slightly from their original values so they
     clear 4.5:1 against a white surface (they sat at ~4.3:1 / ~3.9:1). */
  --success: #166e4a;
  --warning: #9c6208;
  --danger: #cc3b3b;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #14161a;
  --text-muted: #5b616e;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04), 0 8px 24px rgba(20, 22, 26, 0.04);
  --container: 1160px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0f1013;
  --surface: #17191d;
  /* Lightened from #2a2d33 — that value was only ~1.3:1 against --surface,
     too low to read as a visible divider/input border. */
  --border: #3a3e46;
  --text: #f3f4f6;
  --text-muted: #a3a9b3;
  --primary-muted: #1b2540;
  /* --primary itself (used as text/icon color on --primary-muted and other
     dark surfaces) was only ~2.6:1 there — well under the 4.5:1 AA minimum
     for text. This lighter tint clears ~5.6:1. */
  --primary: #6c9bff;
  --success: #34c285;
  --warning: #e0a030;
  --danger: #f16565;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1013;
    --surface: #17191d;
    --border: #3a3e46;
    --text: #f3f4f6;
    --text-muted: #a3a9b3;
    --primary-muted: #1b2540;
    --primary: #6c9bff;
    --success: #34c285;
    --warning: #e0a030;
    --danger: #f16565;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Belt-and-suspenders: the real fix for the nav overflow is making
     .nav-inner/.nav-actions wrap (below), but this keeps any future
     off-by-a-few-pixels regression from producing a page-wide scrollbar.
     `clip`, not `hidden` — `hidden` makes this element its own scroll
     container, which silently breaks every `position: sticky` on the
     page (the nav itself included) because the browser then measures
     "stuck" against this container instead of the real viewport
     scroller. `clip` still clips overflow with no scrollbar, but doesn't
     create that container. */
  overflow-x: clip;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 16px;
  /* Brand + theme-toggle + Harga/Jadwalkan Demo buttons + hamburger together
     are wider than a phone viewport — wrap onto a second line instead of
     forcing the whole page to scroll horizontally. */
  flex-wrap: wrap;
  row-gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  row-gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px;
  cursor: pointer;
}

.theme-toggle button {
  border: none;
  background: transparent;
  color: inherit;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.theme-toggle button[aria-pressed="true"] {
  background: var(--primary-strong);
  color: white;
}

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

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary { background: var(--primary-strong); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--text-muted); }

.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---- Hero ---- */

.hero {
  padding: 88px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-muted);
  color: var(--primary);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 52ch;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

.hero-fineprint { font-size: 13px; color: var(--text-muted); }

/* Abstract dashboard mockup — deliberately built from shapes, not a stock
   illustration or a claimed screenshot. */
.mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mockup-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.mockup-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--border); }

.mockup-body { padding: 20px; display: grid; gap: 14px; }

.mockup-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.mockup-kpi {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.mockup-kpi .label { font-size: 11px; color: var(--text-muted); }
.mockup-kpi .value { font-size: 18px; font-weight: 700; margin-top: 4px; }

.mockup-bars {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: end;
  gap: 8px;
  height: 110px;
}

.mockup-bars span {
  flex: 1;
  background: var(--primary);
  opacity: 0.85;
  border-radius: 4px 4px 0 0;
}

.mockup-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.mockup-list .item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.mockup-list .swatch { width: 8px; height: 8px; border-radius: 999px; background: var(--success); }

/* ---- Sections ---- */

section { padding: 72px 0; }

.section-head { max-width: 640px; margin: 0 0 44px; }

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

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

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---- Stats bar ---- */

.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stats-grid .num { font-size: 30px; font-weight: 800; color: var(--primary); }
.stats-grid .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---- Positioning ---- */

.positioning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.positioning-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
}

.positioning-card h3 { margin: 0 0 16px; font-size: 17px; }

.positioning-card ul { margin: 0; padding-left: 20px; color: var(--text-muted); display: grid; gap: 8px; }

.positioning-card.no ul { color: var(--text-muted); }
.positioning-card.no li { text-decoration: line-through; opacity: 0.7; }

.positioning-card.yes { border-color: var(--primary); }

/* ---- Feature / module cards ---- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
}

.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-muted);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.card .icon svg { width: 22px; height: 22px; }

.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0 0 14px; color: var(--text-muted); font-size: 14px; }

.card ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 13.5px; display: grid; gap: 6px; }

/* ---- Roles ---- */

.role-card { text-align: left; }
.role-card .role-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-muted);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.role-card .features { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.role-card .features li { display: flex; gap: 8px; font-size: 13.5px; color: var(--text-muted); }
.role-card .features li svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* ---- Feature menu (manually-scrolled, not auto-rotating — see index.html
   comment above the section for why) ---- */

.feature-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-inline: max(24px, calc((100% - var(--container)) / 2 + 24px));
}

.feature-menu {
  list-style: none;
  margin: 0;
  padding: 4px 0 16px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.feature-chip {
  flex: none;
  scroll-snap-align: start;
  width: 200px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm, 10px);
  padding: 16px;
}

.feature-chip h4 { margin: 0 0 6px; font-size: 14.5px; }
.feature-chip p { margin: 0; font-size: 13px; color: var(--text-muted); }

.feature-nav {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.feature-nav svg { width: 18px; height: 18px; }
.feature-nav:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 640px) {
  .feature-nav { display: none; }
  .feature-menu-wrap { padding-inline: 20px; }
}

/* ---- How it works ---- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  position: relative;
}

.step .step-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.step h3 { margin: 0 0 8px; font-size: 15.5px; }
.step p { margin: 0; color: var(--text-muted); font-size: 13.5px; }

/* ---- Pricing ---- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.plan.featured { border-color: var(--primary-strong); box-shadow: 0 0 0 1px var(--primary-strong); }

.plan .plan-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: white;
  background: var(--primary-strong);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.plan h3 { margin: 0 0 6px; font-size: 17px; }
.plan .plan-desc { color: var(--text-muted); font-size: 13px; margin: 0 0 18px; }

.plan .price { font-size: 26px; font-weight: 800; margin: 0; }
.plan .price small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--text-muted); }
.plan .price-note { font-size: 12px; color: var(--text-muted); margin: 4px 0 20px; }

.plan ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; flex: 1; }

.plan ul li { display: flex; gap: 8px; font-size: 13.5px; color: var(--text-muted); }
.plan ul li svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

.pricing-footnote { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 24px; }
.pricing-share { text-align: center; color: var(--text-muted); font-size: 15px; line-height: 1.7; max-width: 62ch; margin: 20px auto 0; }
.pricing-share a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Security ---- */

.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.security-item {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.security-item .icon {
  width: 36px; height: 36px; border-radius: 9px; background: var(--primary-muted); color: var(--primary);
  display: grid; place-items: center; flex-shrink: 0;
}
.security-item .icon svg { width: 18px; height: 18px; }
.security-item h4 { margin: 0 0 4px; font-size: 14.5px; }
.security-item p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* ---- FAQ ---- */

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 4px 20px;
}

.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 400;
}

.faq details[open] summary::after { content: "\2212"; }

.faq p { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }

/* ---- Final CTA ---- */

.cta-banner {
  background: var(--primary-strong);
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 32px); }
.cta-banner p { margin: 0 0 28px; color: rgba(255,255,255,0.85); }
.cta-banner .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.cta-banner .btn-outline:hover { border-color: #fff; }
.cta-banner .btn-primary { background: #fff; color: var(--primary-strong); }
.cta-banner .btn-primary:hover { background: rgba(255,255,255,0.9); }

/* ---- Self-registration form ---- */

.register-form { text-align: left; margin-top: 8px; }

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.field-full { grid-column: 1 / -1; }

.register-form .field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.85);
}

.register-form input,
.register-form select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}

.register-form input::placeholder { color: rgba(255, 255, 255, 0.75); }
.register-form input:focus,
.register-form select:focus { outline: 2px solid #fff; outline-offset: 1px; }

.register-form select option { color: var(--text); }

.register-error {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  margin: 0 0 16px;
  text-align: left;
}

.register-success {
  text-align: left;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 22px;
}

.register-success h3 { margin: 0 0 10px; }
.register-success dl { margin: 12px 0; }
.register-success dt { font-size: 12px; color: rgba(255, 255, 255, 0.75); margin-top: 8px; }
.register-success dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; font-family: ui-monospace, monospace; }

@media (max-width: 720px) {
  .register-grid { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */

footer { border-top: 1px solid var(--border); padding: 48px 0 28px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 { font-size: 13px; margin: 0 0 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { text-decoration: none; color: var(--text-muted); font-size: 14px; }
.footer-grid a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Mobile nav ---- */

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---- Responsive ---- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .positioning-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .steps, .pricing-grid, .security-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.nav-links-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }
  .nav { position: sticky; }
  .nav-inner { position: relative; }
  .nav-toggle { display: inline-flex; }
  /* The theme toggle and the two CTA buttons move into the dropdown menu
     (as .nav-mobile-actions, below) so the bar itself is just brand +
     hamburger — otherwise it doesn't fit a phone width on one line and
     wraps across three rows. Scoped to :has(.nav-toggle) so terms.html/
     privacy.html — which have no hamburger/dropdown to move them into —
     keep their (smaller) theme-toggle + "Kembali ke Beranda" pair visible. */
  .nav-actions:has(.nav-toggle) > .theme-toggle,
  .nav-actions:has(.nav-toggle) > .btn { display: none; }
  .nav-mobile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
  .nav-mobile-actions .btn { width: 100%; }
  .grid-3, .grid-4, .grid-2, .steps, .pricing-grid, .security-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 56px 0 48px; }
  section { padding: 52px 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Hide the in-menu duplicate (theme toggle + CTA buttons) outside the
   mobile dropdown — at desktop widths .nav-links is a horizontal list and
   this <li> would otherwise render inline among Modul/Harga/FAQ/etc. */
.nav-mobile-actions { display: none; }

/* ---- Panduan Pengguna (panduan.html) ----------------------------------
   Docs layout: fixed-width sidebar of role guides, a centered prose
   column, and an optional "on this page" mini-TOC. Content itself is
   rendered client-side from Markdown (assets/markdown.js + guide.js) — the
   rules below only style the container elements and the tags the
   renderer emits (h1-h4, p, ul/ol, table, blockquote, code). */

.guide-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 200px;
  gap: 40px;
  align-items: start;
  /* padding-top/-bottom only — a plain `padding: 40px 0 80px` shorthand
     would zero out .container's left/right 24px, invisibly at desktop
     (the 240px/200px side columns leave their own whitespace) but
     leaving content flush against the edge with no side columns to hide
     it once the single-column mobile layout kicks in below. */
  padding-top: 40px;
  padding-bottom: 80px;
}

.guide-sidebar {
  position: sticky;
  top: 88px;
}

.guide-nav-group + .guide-nav-group { margin-top: 24px; }
.guide-nav-group h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.guide-nav-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.guide-nav-group a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}
.guide-nav-group a:hover { background: var(--bg); color: var(--text); }
.guide-nav-group a[aria-current="page"] {
  background: var(--primary-muted);
  color: var(--primary);
  font-weight: 600;
}
.guide-content {
  min-width: 0;
  max-width: 74ch;
  font-size: 16px;
}
/* Same negative tracking the hero/section headings use elsewhere on this
   site (.hero h1, .section-head h2) — plain default letter-spacing at
   these weights/sizes is what was reading as "unstyled browser text". */
.guide-content h1 {
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.guide-content h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.guide-content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.guide-content h3 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; }
.guide-content p { color: var(--text); line-height: 1.75; margin: 0 0 15px; }
.guide-content ul, .guide-content ol { line-height: 1.75; margin: 0 0 15px; padding-left: 24px; }
.guide-content li { margin-bottom: 6px; }
.guide-content li > ul { margin-top: 6px; margin-bottom: 6px; }
/* Custom marker color instead of the browser's flat-black bullet/number —
   a small touch, but it's what makes a list read as designed rather than
   pasted-in plain text. */
.guide-content ul > li::marker { color: var(--primary); }
.guide-content ol > li::marker { color: var(--primary); font-weight: 700; }
.guide-content strong { font-weight: 700; }
/* No underline by default (matches nav/footer links elsewhere on this
   site) — weight + color carry the "this is a link" signal instead, with
   an underline reserved for hover/focus so it still reads as interactive
   without looking like default browser blue-underline text. */
.guide-content a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
}
.guide-content a:hover,
.guide-content a:focus-visible {
  text-decoration: underline;
}
.guide-content code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.88em;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
.guide-content pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 15px;
}
.guide-content pre code { background: none; border: none; padding: 0; }
.guide-content blockquote {
  margin: 0 0 15px;
  padding: 12px 18px;
  border-left: 3px solid var(--primary);
  background: var(--primary-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  font-size: 15px;
}
.guide-content blockquote p:last-child { margin-bottom: 0; }
.guide-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 15px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.guide-content th, .guide-content td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.guide-content thead { background: var(--bg); }
.guide-content th { color: var(--text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
.guide-content tbody tr:last-child td { border-bottom: none; }
.guide-content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.guide-toc { position: sticky; top: 88px; font-size: 13px; }
.guide-toc h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 8px; }
.guide-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--border);
}
.guide-toc a {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.guide-toc a:hover { color: var(--text); }
/* Set by guide.js's scroll-spy (setupTocScrollSpy) as the reader scrolls
   past each heading — not a route/page state like the sidebar's
   aria-current="page", so a plain boolean "true" fits better here. */
.guide-toc a[aria-current="true"] {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .guide-toc { display: none; }
  .guide-sidebar { position: static; }
}

@media (max-width: 640px) {
  /* Tighter vertical rhythm at phone width — the desktop values (40px/
     80px top/bottom padding, 32px h1) were sized for a page with three
     grid columns' worth of visual weight; alone in a single column on a
     ~360-400px screen they read as oversized empty space rather than
     structure. */
  .guide-layout { padding-top: 20px; padding-bottom: 48px; gap: 20px; }
  .guide-content h1 { font-size: 26px; }
  .guide-content h2 { font-size: 19px; margin: 28px 0 10px; }
}
