/*
  Public site: landing, docs, roadmap, pricing. Same frame as the app at /app: an h-11
  header on the shell colour, then a rounded body. Card, badge, and button styles follow the
  app's components. Every colour comes from the shared token file.
*/
@import url("/static/tokens.css");

:root {
  --tint: color-mix(in oklch, var(--foreground) 5%, transparent);
  --tint-strong: color-mix(in oklch, var(--foreground) 8%, transparent);
  --ring-soft: color-mix(in oklch, var(--foreground) 10%, transparent);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-3xl: calc(var(--radius) * 2.4);
  --wrap: 72rem;
  color-scheme: light;
}
.dark { color-scheme: dark; }

* { box-sizing: border-box; }

html {
  background: var(--shell);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  transition: background-color 300ms ease-out;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 12px 12px;
  background: var(--shell);
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; }

a { color: inherit; text-underline-offset: 3px; }
.prose a, .lede a, .muted a, .note a, .foot-brand a, .card-pad p a, .price-note a { text-decoration: underline; text-decoration-color: color-mix(in oklch, currentColor 40%, transparent); }
.prose a:hover, .lede a:hover, .muted a:hover, .note a:hover, .foot-brand a:hover, .card-pad p a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.icon { width: 1rem; height: 1rem; flex: none; }

/* Theme-specific images: logo and diagram twins. */
html:not(.dark) .only-dark, .dark .only-light { display: none !important; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: var(--radius-lg);
  background: var(--primary); color: var(--primary-foreground); text-decoration: none; font-size: 0.875rem; font-weight: 500;
}
.skip:focus { top: 8px; }

/* Buttons, after the app's button component. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 2rem; padding: 0 10px; border-radius: var(--radius-lg);
  border: 1px solid transparent; background: transparent; color: var(--foreground);
  font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid color-mix(in oklch, var(--ring) 50%, transparent); outline-offset: 0; border-color: var(--ring); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 82%, var(--background)); }
.btn-outline { border-color: var(--border); background: var(--background); }
.dark .btn-outline { border-color: var(--input); background: color-mix(in oklch, var(--input) 30%, transparent); }
.btn-outline:hover { background: var(--muted); }
.dark .btn-outline:hover { background: color-mix(in oklch, var(--input) 50%, transparent); }
.btn-ghost:hover { background: var(--tint-strong); }
.btn-icon { width: 2rem; padding: 0; }
.btn-lg { height: 2.25rem; padding: 0 12px; }
.btn-xl { height: 2.5rem; padding: 0 16px; font-size: 0.9375rem; }

/* Badges, after the app's badge component. */
.badge {
  display: inline-flex; align-items: center; gap: 4px; width: fit-content;
  height: 1.25rem; padding: 0 8px; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.75rem; font-weight: 500; white-space: nowrap; line-height: 1;
}
.badge .icon { width: 0.75rem; height: 0.75rem; }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { border-color: var(--border); color: var(--foreground); }
.badge-shipped { background: color-mix(in oklch, var(--green) 14%, transparent); color: var(--green); }
.badge-next { background: color-mix(in oklch, var(--turning) 16%, transparent); color: var(--turning); }
.badge-later { border-color: var(--border); color: var(--muted-foreground); }
.badge-open { border-color: var(--border); color: var(--muted-foreground); border-style: dashed; }

/* Cards, after the app's card component. */
.card {
  background: var(--card); color: var(--card-foreground);
  border-radius: var(--radius-xl); box-shadow: 0 0 0 1px var(--ring-soft);
}
.card-pad { padding: 20px; }
.muted { color: var(--muted-foreground); }

/* Header: h-11 on the shell colour, like the app. */
.site-top { position: relative; z-index: 30; }
.bar { display: flex; align-items: center; gap: 8px; height: 2.75rem; min-width: 0; }
.brand { display: inline-flex; align-items: center; flex: none; border-radius: 8px; }
.brand img { display: block; }
/* The wordmark already holds the leaf, so only one shows: the leaf below 768px, the wordmark above.
   Scoped under .brand so these beat `.brand img { display: block }`. */
.brand .brand-mark { width: 1.75rem; height: 1.75rem; object-fit: contain; }
.brand .brand-logo { display: none; height: 1.75rem; width: auto; }
/* The "Yield" chip after the logo, like the app's Badge: logo green on a light tint. */
.brand { gap: 6px; }
.brand .brand-chip {
  padding: 0 6px; font-weight: 600; letter-spacing: 0.025em;
  color: var(--green); background: color-mix(in oklch, var(--green) 10%, transparent);
  border-color: color-mix(in oklch, var(--green) 30%, transparent);
}
.foot-brand .foot-copy { font-size: 0.8125rem; }
.site-nav { display: none; margin-inline-start: 4px; }
.site-nav ul, .menu-links { list-style: none; margin: 0; padding: 0; }
.site-nav ul { display: flex; gap: 4px; align-items: center; }
.nav-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 1.75rem; padding-block: 0; padding-inline: 8px 10px;
  border-radius: 999px; background: var(--secondary); color: var(--muted-foreground);
  font-size: 0.75rem; font-weight: 500; text-decoration: none; transition: color 150ms ease, background-color 150ms ease;
}
.nav-pill .icon { width: 0.75rem; height: 0.75rem; }
.nav-pill:hover { color: var(--foreground); }
.nav-pill[aria-current="page"] { background: color-mix(in oklch, var(--background) 80%, transparent); color: var(--foreground); box-shadow: 0 0 0 1px var(--ring-soft); }
.bar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.bar-end .open-app { display: none; }

.theme-icons { position: relative; width: 1rem; height: 1rem; }
.theme-icons .icon { position: absolute; inset: 0; transition: transform 300ms ease-out, opacity 300ms ease-out; }
.i-moon { opacity: 0; transform: scale(0) rotate(-90deg); }
.dark .i-sun { opacity: 0; transform: scale(0) rotate(90deg); }
.dark .i-moon { opacity: 1; transform: none; }

/* Mobile menu: details/summary, so it opens with the keyboard and works without script. */
.menu { position: static; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu .i-close, .menu[open] .i-open { display: none; }
.menu[open] .i-close { display: block; }
.menu-panel {
  position: absolute; inset-inline: 0; top: calc(2.75rem + 4px);
  padding: 8px; border-radius: var(--radius-xl);
  background: var(--popover); color: var(--popover-foreground);
  box-shadow: 0 0 0 1px var(--ring-soft), 0 16px 40px color-mix(in oklch, var(--foreground) 14%, transparent);
}
.menu-links { display: grid; gap: 2px; }
.menu-link {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-lg);
  color: var(--muted-foreground); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.menu-link:hover { background: var(--tint); color: var(--foreground); }
.menu-link[aria-current="page"] { background: var(--muted); color: var(--foreground); }
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 2px 2px; margin-top: 6px; border-top: 1px solid var(--border); }
.menu-actions .btn { height: 2.25rem; }

/* The rounded body. */
.frame-body {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--body); border-radius: 1.5rem; overflow: clip;
  transition: background-color 300ms ease-out;
}
main { flex: 1; min-width: 0; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* Sections and type. */
.section { padding: clamp(40px, 7vw, 88px) 0; }
.section-tight { padding-top: 0; }
.section + .section:not(.section-tight) { padding-top: 0; }
h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; }
.section-head { max-width: 42rem; margin-bottom: 28px; }
.section-head h2 { margin: 12px 0 8px; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.15; }
.section-head p { margin: 0; color: var(--muted-foreground); }
.lede { color: var(--muted-foreground); font-size: 1.0625rem; max-width: 42rem; text-wrap: pretty; }
.page-head h1 { margin: 14px 0 10px; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; line-height: 1.1; }
.page-head .lede { margin: 0; }

/* Landing hero. */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 5vw, 64px); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { margin: 16px 0 16px; font-size: clamp(2.25rem, 5.4vw, 3.75rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; max-width: 14ch; }
.hero .lede { margin: 0 0 8px; }
.hero-note { margin: 0; color: var(--muted-foreground); font-size: 0.875rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-shot { margin: 0; padding: 8px; }
.hero-shot img { display: block; width: 100%; border-radius: calc(var(--radius-xl) - 4px); }
.hero-shot figcaption { padding: 10px 6px 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--muted-foreground); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts .icon { color: var(--green); }

figcaption { color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.45; }

/* Grids of cards. */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.feature { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.feature h3 { margin: 10px 0 0; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted-foreground); font-size: 0.875rem; line-height: 1.55; }
.feature-icon {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-lg);
  background: var(--secondary); color: var(--foreground);
}
.feature .badge { margin-top: auto; }
.feature p + .badge { margin-top: 8px; }

.steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: step; }
.step { padding: 20px; counter-increment: step; display: flex; flex-direction: column; gap: 6px; }
.step::before {
  content: counter(step); display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem;
  border-radius: 999px; background: var(--primary); color: var(--primary-foreground);
  font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.step h3 { margin: 8px 0 0; font-size: 1rem; font-weight: 600; }
.step p { margin: 0; color: var(--muted-foreground); font-size: 0.875rem; }

.diagram { margin: 0; padding: 8px; }
.diagram img { display: block; width: 100%; border-radius: calc(var(--radius-xl) - 4px); }
.diagram figcaption { padding: 8px 8px 4px; }

.split { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.stack { display: grid; gap: 12px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.875rem; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks .icon { margin-top: 2px; color: var(--green); }
.checks-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin: 12px 0 16px; }

/* Tables, as a card. */
.table-card { overflow-x: auto; border-radius: var(--radius-xl); background: var(--card); box-shadow: 0 0 0 1px var(--ring-soft); margin: 16px 0; }
.table-card table, table.numbers { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table-card th, .table-card td { text-align: start; padding: 9px 12px; vertical-align: top; border-top: 1px solid var(--border); }
.table-card thead th { border-top: 0; background: color-mix(in oklch, var(--muted) 50%, transparent); color: var(--muted-foreground); font-size: 0.75rem; font-weight: 500; }
.table-card td.n, .table-card th.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.numbers td.n { font-weight: 600; }
.table-card small { color: var(--muted-foreground); }

/* Notes and callouts, after the app's alert. */
.note {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: start;
  margin: 16px 0; padding: 12px 14px; border-radius: var(--radius-xl);
  background: var(--card); box-shadow: 0 0 0 1px var(--ring-soft); font-size: 0.875rem;
}
.note > .icon { margin-top: 2px; color: var(--muted-foreground); }
.note > div > :first-child { margin-top: 0; }
.note > div > :last-child { margin-bottom: 0; }
.note p { margin: 0; }
.note p + p { margin-top: 6px; }
.note-title { font-weight: 600; }
.note.warn > .icon { color: var(--turning); }
.note.warn { box-shadow: 0 0 0 1px color-mix(in oklch, var(--turning) 40%, transparent); background: color-mix(in oklch, var(--turning) 6%, var(--card)); }

/* Call-to-action band. */
.cta-band {
  padding: clamp(28px, 5vw, 48px); border-radius: var(--radius-3xl);
  background: var(--primary); color: var(--primary-foreground);
  display: grid; gap: 20px; align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.15; }
.cta-band p { margin: 0; color: color-mix(in oklch, var(--primary-foreground) 72%, transparent); }
.cta-band .actions { margin: 0; justify-content: flex-end; }
.cta-band .btn-primary { background: var(--primary-foreground); color: var(--primary); }
.cta-band .btn-primary:hover { background: color-mix(in oklch, var(--primary-foreground) 88%, var(--primary)); }
.cta-band .btn-outline { background: transparent; color: var(--primary-foreground); border-color: color-mix(in oklch, var(--primary-foreground) 28%, transparent); }
.cta-band .btn-outline:hover { background: color-mix(in oklch, var(--primary-foreground) 10%, transparent); }
.cta-band .small { font-size: 0.8125rem; margin-top: 10px; }

/* Docs: sidebar, content, table of contents. */
.docs {
  width: min(78rem, 100% - 32px); margin-inline: auto;
  display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr);
  padding: 20px 0 64px; align-items: start;
}
.side-head { margin: 0 0 6px; padding: 0 8px; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.sidebar { font-size: 0.875rem; }
.sidebar ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.side-group { margin-top: 18px; }
.side-top { margin-top: 4px; }
.sidebar a {
  display: block; padding: 5px 8px; border-radius: 8px; color: var(--muted-foreground); text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.sidebar a:hover { background: var(--tint); color: var(--foreground); }
.sidebar a[aria-current="page"] { background: var(--card); color: var(--foreground); font-weight: 500; box-shadow: 0 0 0 1px var(--ring-soft); }
.sidebar-toggle { width: 100%; justify-content: flex-start; height: 2.5rem; }
.sidebar-toggle .chev { margin-inline-start: auto; transition: transform 160ms var(--ease); }
.sidebar-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
.sidebar.js .sidebar-groups { display: none; padding: 4px 0 8px; }
.sidebar.js.is-open .sidebar-groups { display: block; }
.sidebar:not(.js) .sidebar-toggle { display: none; }

.toc { display: none; font-size: 0.8125rem; }
.toc ul { border-inline-start: 1px solid var(--border); }
.toc a { display: block; padding: 4px 10px; margin-inline-start: -1px; border-inline-start: 1px solid transparent; color: var(--muted-foreground); text-decoration: none; }
.toc a:hover { color: var(--foreground); border-inline-start-color: var(--foreground); }

.crumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 0.8125rem; color: var(--muted-foreground); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--muted-foreground); opacity: 0.7; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--foreground); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--foreground); font-weight: 500; }

.prose { min-width: 0; max-width: 46rem; font-size: 0.9375rem; line-height: 1.7; }
.prose-wide { max-width: none; }
.prose h1 { margin: 0 0 8px; font-size: clamp(1.625rem, 3vw, 2rem); font-weight: 600; line-height: 1.15; }
.prose > .lede { margin: 0 0 24px; font-size: 1.0625rem; line-height: 1.6; }
.prose h2 { margin: 40px 0 10px; font-size: 1.25rem; font-weight: 600; line-height: 1.3; scroll-margin-top: 16px; }
.prose h3 { margin: 28px 0 8px; font-size: 1.0625rem; font-weight: 600; scroll-margin-top: 16px; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0; padding-inline-start: 1.3rem; }
.prose li { padding-inline-start: 2px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--muted-foreground); }
.prose ol > li::marker { font-variant-numeric: tabular-nums; font-weight: 500; }
.prose strong { font-weight: 600; }
.prose code {
  font-family: var(--mono); font-size: 0.85em; padding: 1px 5px; border-radius: 6px;
  background: var(--tint-strong); overflow-wrap: anywhere;
}
.prose pre {
  margin: 16px 0; padding: 12px 14px; overflow-x: auto; border-radius: var(--radius-xl);
  background: var(--card); box-shadow: 0 0 0 1px var(--ring-soft);
  font-family: var(--mono); font-size: 0.8125rem; line-height: 1.6;
}
.prose pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.prose figure { margin: 24px 0; }
.prose figure img {
  display: block; border-radius: var(--radius-xl); background: var(--card);
  box-shadow: 0 0 0 1px var(--ring-soft);
}
.prose figcaption { margin-top: 8px; }
.prose dl { margin: 16px 0; display: grid; gap: 2px; }
.prose dt { font-weight: 600; margin-top: 12px; }
.prose dt:first-child { margin-top: 0; }
.prose dd { margin: 0; color: var(--foreground); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.prose .table-card { font-size: 0.875rem; line-height: 1.55; }

.pager { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 56px; }
.pager-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none !important;
  transition: background-color 150ms ease, transform 150ms var(--ease);
}
.pager-card:hover { background: color-mix(in oklch, var(--card) 92%, var(--foreground)); }
.pager-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-foreground); font-size: 0.8125rem; }
.pager-title { font-weight: 500; }
.pager-card.next { text-align: end; align-items: flex-end; }

.doc-groups { display: grid; gap: 12px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.doc-group h2 { margin: 0 0 10px; font-size: 1rem; font-weight: 600; }
.doc-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc-group li { margin: 0; padding: 0; }
.doc-group li a { font-weight: 500; text-decoration: none; }
.doc-group li a:hover { text-decoration: underline; }
.doc-group li p { margin: 2px 0 0; color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.5; }

/* Roadmap. */
.lanes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); align-items: start; }
.lane-head { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.lane-head h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.lane > p { margin: 0 0 12px; color: var(--muted-foreground); font-size: 0.875rem; }
.lane ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item { padding: 14px 16px; }
.item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.item-head strong { font-weight: 600; font-size: 0.9375rem; }
.item p { margin: 0; color: var(--muted-foreground); font-size: 0.875rem; }
.item p a { color: var(--foreground); }

/* Pricing. */
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); align-items: stretch; }
.plan { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.plan > p { margin: 0; font-size: 0.875rem; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 0 !important; }
.amount { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.amount-hidden { font-size: 1.5rem; }
.per { color: var(--muted-foreground); font-size: 0.875rem; }
.price-sub { margin: 0 !important; color: var(--muted-foreground); font-size: 0.875rem; }
.price-note { margin: 0 !important; font-size: 0.8125rem; color: var(--muted-foreground); }
.plan .checks { padding-top: 12px; border-top: 1px solid var(--border); margin-top: 4px; }
.plan-action { margin-top: auto; padding-top: 12px; }
.plan-action .btn { width: 100%; }
.walk-examples { display: block; margin-top: 2px; color: var(--muted-foreground); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.plans-note { margin: 12px 0 0; font-size: 0.875rem; }
.included h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.included > p { margin: 0; font-size: 0.875rem; }

/* Footer, at the bottom of the rounded body. */
.site-foot { border-top: 1px solid var(--border); font-size: 0.875rem; }
.foot-grid { display: grid; gap: 28px; padding: 32px 0 36px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.foot-brand p { margin: 0 0 6px; color: var(--muted-foreground); max-width: 26rem; }
.foot-brand .foot-title { color: var(--foreground); font-weight: 600; }
.foot-cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.foot-head { margin: 0 0 8px; font-weight: 500; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot nav a { color: var(--muted-foreground); text-decoration: none; }
.site-foot nav a:hover { color: var(--foreground); text-decoration: underline; }

@media (min-width: 480px) {
  .bar-end .open-app { display: inline-flex; }
}

@media (min-width: 768px) {
  body { padding: 8px 16px 16px; gap: 8px; }
  .menu { display: none; }
  .brand .brand-mark { display: none; }
  .brand .brand-logo { display: block; }
  .site-nav { display: block; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; }
  .docs { grid-template-columns: 13rem minmax(0, 1fr); gap: 40px; padding-top: 32px; }
  .sidebar { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding-bottom: 16px; }
  .sidebar-toggle, .sidebar.js .sidebar-toggle { display: none; }
  .sidebar.js .sidebar-groups { display: block; padding: 0; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-card.next { grid-column: 2; }
}

@media (min-width: 1200px) {
  .docs { grid-template-columns: 13rem minmax(0, 1fr) 12rem; }
  .docs.no-toc { grid-template-columns: 13rem minmax(0, 1fr); }
  .toc { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  body { padding: 0; background: #fff; }
  .site-top, .sidebar, .toc, .pager, .site-foot { display: none; }
  .frame-body { border-radius: 0; background: #fff; }
}

/* Right to left: chevrons and arrows point the reading way; numbers, code and week ids stay left to right. */
[dir="rtl"] .chev, [dir="rtl"] .i-arrow { transform: scaleX(-1); }
[dir="rtl"] .sidebar-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
[dir="rtl"] .pager-card .icon { transform: scaleX(-1); }
[dir="rtl"] code, [dir="rtl"] pre, [dir="rtl"] .n, [dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .prose { line-height: 1.85; }

/* Language menu in the site header: a details element, so it works without script. */
.lang { position: relative; }
.lang > summary { list-style: none; }
.lang > summary::-webkit-details-marker { display: none; }
.lang-panel {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 50; min-width: 11rem;
  padding: 6px; border-radius: var(--radius-xl); background: var(--popover); color: var(--popover-foreground);
  box-shadow: 0 0 0 1px var(--ring-soft), 0 16px 40px color-mix(in oklch, var(--foreground) 14%, transparent);
}
.lang-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lang-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px;
  border-radius: var(--radius-lg); color: var(--muted-foreground); font-size: 0.875rem; text-decoration: none;
}
.lang-panel a:hover { background: var(--tint); color: var(--foreground); }
.lang-panel a[aria-current="true"] { color: var(--foreground); font-weight: 500; }
.lang-label { display: none; }
@media (min-width: 768px) { .lang-label { display: inline; } }
.note.lang-note { margin: 0 0 20px; }
