@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

/* ── Design Tokens ── */
:root {
  /* Triplo brand green, taken from the app icon (#34A853). --brand is used for
     marks, icons and fills; --brand-dark is the accessible text tint (5.7:1 on
     white) used for links and anything type-sized. */
  --brand:        #34a853;
  --brand-dark:   #24753a;
  --brand-deep:   #11371b;
  --brand-light:  hsl(136, 55%, 96%);
  --brand-mid:    hsl(136, 35%, 84%);
  --brand-subtle: hsl(136, 40%, 93%);
  --ink:          #0d1411;
  --slate-700:    #334155;
  --slate-600:    #475569;
  --slate-500:    #64748b;
  --slate-400:    #94a3b8;
  --slate-300:    #cbd5e1;
  --slate-200:    #e2e8f0;
  --slate-100:    #f1f5f9;
  --slate-50:     #f8fafc;
  --white:        #ffffff;
  --green-600:    #16a34a;
  --red-600:      #dc2626;
  --amber-600:    #d97706;
  --blue-600:     #0a6fd8;
  --purple-600:   #8b3fc4;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-mono:    'SF Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  --nav-h:        64px;
  --sidebar-w:    272px;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul, ol { padding-left: 0; }

/* ── Top Nav ── */
.doc-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--slate-200);
}
.doc-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.doc-nav-section { flex-shrink: 0; }

/* Hamburger — hidden until the sidebar becomes a drawer */
.doc-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  background: var(--white);
  color: var(--slate-600);
  cursor: pointer;
}
.doc-menu-btn:hover { color: var(--ink); border-color: var(--slate-300); }
.cta-short { display: none; }

/* Scrim behind the drawer */
.doc-scrim {
  position: fixed;
  inset: var(--nav-h) 0 0;
  background: rgba(12, 24, 17, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 110;
}
.doc-scrim.is-open { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }
/* The lockup is the wordmark — no type beside it, or the name reads twice.
   28px matches the header on triplo.ai so the two sites line up. */
.doc-nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.doc-nav-brand .brand-logo { height: 32px; width: auto; display: block; }
.doc-nav-separator { width: 1px; height: 18px; background: var(--slate-200); flex-shrink: 0; }
.doc-nav-section { font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.doc-nav-links { display: flex; align-items: center; gap: 20px; flex: 1; list-style: none; }
.doc-nav-links a { font-size: 13px; font-weight: 500; color: var(--slate-500); transition: color 0.15s; }
.doc-nav-links a:hover { color: var(--ink); }
.doc-nav-links a.active { color: var(--brand-dark); font-weight: 600; }
.btn-nav-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: var(--brand);
  padding: 7px 16px;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-nav-doc:hover { background: var(--brand-dark); }

/* ── Page Shell ── */
.doc-shell { display: flex; padding-top: var(--nav-h); min-height: 100vh; }

/* ── Sidebar ── */
.doc-sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--slate-50);
  border-right: 1px solid var(--slate-200);
  overflow-y: auto;
  padding: 28px 16px 48px;
  flex-shrink: 0;
}
.doc-sidebar::-webkit-scrollbar { width: 4px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }
.sidebar-section { margin-bottom: 26px; }
.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-400);
  padding: 0 8px;
  margin-bottom: 6px;
}
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
  transition: background 0.12s, color 0.12s;
}
.sidebar-nav a:hover { background: var(--white); color: var(--ink); }
.sidebar-nav a.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.sidebar-nav a svg { flex-shrink: 0; opacity: 0.55; }
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-divider { height: 1px; background: var(--slate-200); margin: 8px 0; }

/* ── Content ── */
.doc-content { flex: 1; min-width: 0; margin-left: var(--sidebar-w); max-width: 840px; padding: 52px 56px 80px; }

/* ── Article Typography ── */
.doc-page-title {
  font-size: clamp(30px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 12px;
}
.doc-page-desc {
  font-size: 17px;
  color: var(--slate-500);
  line-height: 1.65;
  margin-bottom: 48px;
  max-width: 620px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--slate-200);
}
.doc-section { margin-bottom: 56px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.doc-section h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.doc-section h2 .section-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.doc-section h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 30px 0 10px;
}
.doc-section h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--slate-700);
  margin: 22px 0 8px;
}
.doc-section p { color: var(--slate-600); margin-bottom: 14px; line-height: 1.72; }
.doc-section p:last-child { margin-bottom: 0; }
.doc-section ul, .doc-section ol { margin: 0 0 14px 0; padding-left: 20px; color: var(--slate-600); }
.doc-section li { margin-bottom: 7px; line-height: 1.7; }
.doc-section li::marker { color: var(--slate-400); }
.doc-section strong { color: var(--ink); font-weight: 650; }
.doc-section a:not(.doc-card):not(.btn-nav-doc):not(.dl-btn):not(.dl-vt) { color: var(--brand-dark); font-weight: 500; border-bottom: 1px solid var(--brand-mid); transition: border-color .15s; }
.doc-section a:not(.doc-card):not(.btn-nav-doc):not(.dl-btn):not(.dl-vt):hover { border-bottom-color: var(--brand); }
.doc-section hr { border: none; height: 1px; background: var(--slate-200); margin: 32px 0; }

/* ── Steps ── */
.doc-steps { display: flex; flex-direction: column; gap: 0; margin: 20px 0; }
.doc-step { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--slate-100); }
.doc-step:last-child { border-bottom: none; }
.step-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.doc-step-body { flex: 1; min-width: 0; }
.doc-step-body strong { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.doc-step-body p { margin: 0 0 8px; font-size: 13.5px; color: var(--slate-500); }
.doc-step-body p:last-child { margin-bottom: 0; }

/* ── Callouts ── */
.doc-callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 10px; margin: 20px 0;
  font-size: 13.5px; line-height: 1.65;
}
.doc-callout.tip    { background: var(--brand-light);   border: 1px solid rgba(52,168,83,0.30); color: var(--brand-deep); }
.doc-callout.info   { background: hsl(210,50%,96%);     border: 1px solid hsl(210,40%,85%);     color: hsl(210,55%,28%); }
.doc-callout.warn   { background: hsl(40,80%,96%);      border: 1px solid hsl(40,60%,80%);      color: hsl(35,70%,28%); }
.doc-callout.danger { background: hsl(0,60%,97%);       border: 1px solid hsl(0,60%,85%);       color: hsl(0,60%,33%); }
.doc-callout svg { flex-shrink: 0; margin-top: 2px; }
.doc-callout p { margin: 0 0 8px; color: inherit; }
.doc-callout p:last-child { margin-bottom: 0; }
.doc-callout code { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.08); color: inherit; }
.doc-callout a { color: inherit !important; font-weight: 600; border-bottom: 1px solid currentColor !important; }

/* Footnotes — small, muted attribution blocks for implementation details */
.doc-footnote {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
  font-size: 0.85em;
  line-height: 1.65;
  color: var(--slate-600);
}
.doc-footnote p { margin: 0 0 12px; }
.doc-footnote p:last-child { margin-bottom: 0; }
.doc-footnote strong { color: var(--slate-700); }
.doc-footnote a { color: var(--brand-dark); font-weight: 600; }

/* ── Code ── */
.doc-code {
  background: #101a14;
  border-radius: 10px;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.72;
  color: #cfe6d8;
  overflow-x: auto;
  margin: 16px 0;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.doc-code .ck { color: #7dd39b; }
.doc-code .cs { color: #f0c070; }
.doc-code .cc { color: rgba(255,255,255,0.34); font-style: italic; }
.doc-code .cp { color: #c99ef0; }
code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--slate-100);
  color: var(--brand-dark);
  padding: 1.5px 6px;
  border-radius: 4px;
  border: 1px solid var(--slate-200);
  white-space: nowrap;
}
.doc-code code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }

/* ── Tables ── */
.doc-table-wrap { overflow-x: auto; margin: 20px 0; border-radius: 10px; border: 1px solid var(--slate-200); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: var(--slate-50); }
th { padding: 10px 14px; text-align: left; font-weight: 700; color: var(--slate-700); border-bottom: 1px solid var(--slate-200); white-space: nowrap; }
td { padding: 10px 14px; color: var(--slate-600); border-bottom: 1px solid var(--slate-100); vertical-align: top; }
td code { white-space: normal; }
tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.fmt-badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
  padding: 2px 7px; border-radius: 4px; margin: 2px;
}
.ui-label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--slate-300);
  padding: 2px 9px; border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
}
kbd {
  display: inline-flex; align-items: center;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  color: var(--slate-700);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-bottom-width: 2px;
  padding: 2px 7px; border-radius: 5px;
  line-height: 1.5; white-space: nowrap;
}
.plan-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2.5px 8px; border-radius: 100px;
  background: hsl(40,85%,94%); color: hsl(35,75%,32%);
  border: 1px solid hsl(40,60%,84%);
  vertical-align: middle;
}
.beta-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--slate-100); color: var(--slate-500);
  border: 1px solid var(--slate-200);
  vertical-align: middle; margin-left: 6px;
}

/* ── Card grid ── */
.doc-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.doc-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.doc-card:hover { border-color: var(--brand-mid); box-shadow: 0 3px 16px rgba(52,168,83,0.12); transform: translateY(-1px); }
.doc-card-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); flex-shrink: 0;
}
.doc-card-body { min-width: 0; }
.doc-card-body strong { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.doc-card-body p { font-size: 12.5px; color: var(--slate-500); margin: 0; line-height: 1.55; }

/* ── Definition rows ── */
.def-list { margin: 20px 0; border: 1px solid var(--slate-200); border-radius: 10px; overflow: hidden; }
.def-row { display: flex; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--slate-100); }
.def-row:last-child { border-bottom: none; }
.def-row:nth-child(odd) { background: var(--slate-50); }
.def-term { flex: 0 0 172px; font-size: 13px; font-weight: 700; color: var(--ink); }
.def-desc { flex: 1; font-size: 13px; color: var(--slate-600); line-height: 1.65; min-width: 0; }
.def-desc p { margin: 0 0 6px; font-size: 13px; }
.def-desc p:last-child { margin-bottom: 0; }

/* ── Flow diagram ── */
.doc-figure { margin: 24px 0; }
.doc-figure svg { width: 100%; height: auto; display: block; }
.doc-figure figcaption { font-size: 12px; color: var(--slate-400); margin-top: 10px; text-align: center; }

/* ── In-page TOC ── */
.doc-toc {
  position: fixed;
  top: calc(var(--nav-h) + 48px);
  right: 24px;
  width: 208px;
  display: flex; flex-direction: column; gap: 2px;
  max-height: calc(100vh - var(--nav-h) - 96px);
  overflow-y: auto;
}
.doc-toc::-webkit-scrollbar { width: 3px; }
.doc-toc::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 3px; }
.doc-toc-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate-400); margin-bottom: 6px;
}
.doc-toc a {
  font-size: 12px; color: var(--slate-400);
  padding: 3px 8px;
  border-left: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
  line-height: 1.5;
}
.doc-toc a:hover { color: var(--slate-700); }
.doc-toc a.active { color: var(--brand-dark); border-left-color: var(--brand); font-weight: 600; }

/* ── Breadcrumb ── */
.doc-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--slate-400); margin-bottom: 24px; }
.doc-breadcrumb a { color: var(--brand-dark); transition: color 0.12s; }
.doc-breadcrumb a:hover { color: var(--brand-dark); }
.doc-breadcrumb svg { color: var(--slate-300); }

/* ── Prev / next ── */
.doc-page-nav { display: flex; gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--slate-200); }
.doc-page-nav a {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}
.doc-page-nav a:hover { border-color: var(--brand-mid); box-shadow: 0 2px 12px rgba(52,168,83,0.10); }
.doc-page-nav .nav-dir { font-size: 11px; color: var(--slate-400); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.doc-page-nav .nav-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.doc-page-nav .next { text-align: right; }

/* ── Footer ── */
.doc-footer { background: var(--ink); padding: 32px 24px; margin-left: var(--sidebar-w); }
.doc-footer-inner { max-width: 840px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
/* The footer sits on --ink, so it takes the white-wordmark file. */
.doc-footer-brand { display: flex; align-items: center; }
.doc-footer-brand .brand-logo { height: 28px; width: auto; display: block; }
.doc-footer-links { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
.doc-footer-links a { font-size: 12px; color: rgba(255,255,255,0.38); transition: color 0.15s; }
.doc-footer-links a:hover { color: rgba(255,255,255,0.75); }
.doc-footer-copy { font-size: 11px; color: rgba(255,255,255,0.22); margin-left: auto; }


/* ── UI screenshots ────────────────────────────────────────────────────────
   The app window is a dark, frameless card. Screenshots are presented on a
   soft plinth so the transparent corners read as intentional rather than
   clipped, and so a dark capture sits comfortably in a light page. */
.doc-shot {
  margin: 24px 0;
  background: linear-gradient(160deg, hsl(136,18%,95%) 0%, var(--slate-100) 100%);
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
}
.doc-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(13,20,17,0.22), 0 2px 6px rgba(13,20,17,0.12);
}
.doc-shot figcaption {
  font-size: 12.5px;
  color: var(--slate-500);
  margin-top: 16px;
  line-height: 1.55;
  text-align: center;
}
.doc-shot--narrow img { max-width: 380px; }
.doc-shot--panel  img { max-width: 480px; }
.doc-shot--tall   img { max-width: 560px; }

/* Hero shot on the overview page — no plinth, more presence. */
.doc-hero-shot { margin: 8px 0 40px; }
.doc-hero-shot img {
  display: block; width: 100%; height: auto;
  border-radius: 13px;
  box-shadow: 0 18px 44px rgba(13,20,17,0.26), 0 3px 8px rgba(13,20,17,0.14);
}
.doc-hero-shot figcaption {
  font-size: 12.5px; color: var(--slate-400);
  margin-top: 14px; text-align: center;
}

/* ── Changelog (generated from changelog.csv) ── */
.cl-lede { font-size: 15px; color: var(--slate-600); margin-bottom: 16px; }
.cl-filter { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--slate-200); border-radius: 11px; background: var(--slate-50); }
.cl-tab {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--slate-500);
  padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cl-tab:hover { color: var(--ink); }
.cl-tab.is-on { background: var(--white); color: var(--brand-dark); box-shadow: 0 1px 2px rgba(13,20,17,0.1); }

.cl-major h2 .cl-span { font-size: 13px; font-weight: 500; color: var(--slate-400); margin-left: 2px; }

.cl-item {
  border-left: 2px solid var(--slate-200);
  padding: 0 0 22px 20px;
  margin-left: 8px;
  position: relative;
}
.cl-item::before {
  content: ""; position: absolute; left: -6px; top: 6px;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--white); border: 2px solid var(--brand);
}
.cl-item:last-child { padding-bottom: 4px; }
.cl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cl-version { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--ink); }
.cl-track {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px;
}
.cl-track-desktop { background: var(--brand-light); color: var(--brand-deep); }
.cl-track-mobile { background: var(--slate-100); color: var(--slate-600); }
.cl-date { font-size: 12.5px; color: var(--slate-400); margin-left: auto; }
.cl-changes { margin: 10px 0 0; padding-left: 18px; }
/* Change lines are written by hand and sometimes carry a bare URL, so let
   them break rather than pushing the page wide on a small phone. */
.cl-changes li { font-size: 14.5px; line-height: 1.65; color: var(--slate-600); margin-bottom: 4px; overflow-wrap: anywhere; }
.cl-platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cl-os {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--slate-500);
  border: 1px solid var(--slate-200); border-radius: 5px; padding: 2px 7px;
}

/* ── Responsive ── */
@media (max-width: 1180px) {
  .doc-toc { display: none; }
  .doc-content { padding: 44px 40px 64px; }
}
@media (max-width: 900px) {
  .doc-card-grid { grid-template-columns: 1fr; }
  .def-row { flex-direction: column; gap: 4px; }
  .def-term { flex: none; }
}
@media (max-width: 768px) {
  .doc-shot { padding: 14px; border-radius: 10px; }
  :root { --sidebar-w: 0px; }
  .doc-content { margin-left: 0; padding: 32px 20px 56px; }
  .doc-footer { margin-left: 0; }
  .doc-nav-links { display: none; }
  .doc-page-nav { flex-direction: column; }
  .doc-page-nav .next { text-align: left; }

  /* Nav: room for the menu button, and a CTA that gives up its long label */
  .doc-nav-inner { gap: 10px; padding: 0 12px; }
  .doc-nav-brand .brand-logo { height: 28px; }
  .doc-menu-btn { display: inline-flex; }
  .btn-nav-doc { margin-left: auto; padding: 8px 12px; font-size: 12.5px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }

  /* The sidebar is not deleted on mobile — it slides in. Losing it entirely
     left phone readers with no way to reach any other page. */
  .doc-sidebar {
    display: block;
    width: min(84vw, 320px);
    z-index: 120;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 24px 60px rgba(12, 24, 17, 0.28);
    padding: 20px 14px 40px;
  }
  .doc-sidebar.is-open { transform: none; }

  /* Long unbreakable tokens are the other way the page grows past the
     viewport. Tables and code blocks scroll on their own; inline pills have
     to be allowed to wrap instead. */
  code, .ui-label, kbd { white-space: normal; overflow-wrap: anywhere; }
  .doc-breadcrumb { flex-wrap: wrap; row-gap: 4px; }

  /* A three-line heading centred its icon against the middle of the text.
     Pin it to the first line instead. */
  .doc-section h2 { align-items: flex-start; font-size: 21px; }
  .doc-section h2 .section-icon { margin-top: 1px; }
}

@media (max-width: 560px) {
  .doc-nav-separator, .doc-nav-section { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .doc-sidebar, .doc-scrim { transition: none; }
}

/* ── Downloads ───────────────────────────────────────────────────────────────
   The picker on downloads.html. One card per build, the visitor's platform
   marked by the detect script, and nothing that hard-codes a version number —
   every string comes from downloads.csv through build.py. */

.dl-lede {
  font-size: 16px;
  color: var(--slate-600);
  max-width: 62ch;
}
.dl-detect {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px;
  font-size: 13px; font-weight: 500;
  color: var(--brand-dark);
  background: var(--brand-light);
  border: 1px solid var(--brand-mid);
  padding: 6px 12px; border-radius: 999px;
}
.dl-detect::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); flex: none;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.dl-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
  padding: 18px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.dl-card:hover {
  border-color: var(--brand-mid);
  box-shadow: 0 10px 28px -18px rgba(13, 20, 17, 0.4);
  transform: translateY(-1px);
}
/* The build matching the visitor's own machine. */
.dl-card.is-you {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.dl-card.is-you::before {
  content: "Your platform";
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.dl-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.dl-name {
  font-size: 16px; font-weight: 650; line-height: 1.3;
  color: var(--ink); margin: 0;
}
.dl-variant {
  display: block;
  font-size: 12.5px; font-weight: 500;
  color: var(--slate-500);
  margin-top: 2px;
}
.dl-card-head .fmt-badge { margin: 2px 0 0; flex: none; }

.dl-note {
  font-size: 13px; line-height: 1.6;
  color: var(--slate-600);
  margin: 0 0 16px;
  flex: 1;
}

.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  font-size: 14px; font-weight: 600;
  color: var(--white);
  background: var(--brand-dark);
  border: 1px solid var(--brand-dark);
  border-radius: 9px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.dl-btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--white); }
.dl-btn svg { flex: none; }
.dl-btn span { display: inline; color: inherit; }

.dl-meta {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--slate-500);
  text-align: center;
}
.dl-dot { color: var(--slate-300); margin: 0 2px; }
.dl-vt {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  align-self: center;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.dl-vt:hover { border-bottom-color: var(--brand-mid); }
.dl-vt svg { flex: none; }

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