:root {
  --ink: #10201b;
  --ink-soft: #4f615a;
  --ink-faint: #7d8b85;
  --paper: #ffffff;
  --wash: #f4f7f5;
  --rule: #e0e7e3;
  --accent: #1f6f5c;
  --accent-strong: #165546;
  --accent-soft: #e6f2ed;
  --accent-line: #cde3d9;
  --danger: #de350b;
  --head-h: 4.75rem;
  --max: 70rem;
  --measure: 42rem;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 1.25rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  min-height: var(--head-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 1.3rem;
  letter-spacing: 0;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.95rem;
}

.nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  color: var(--ink-soft);
  transition: background-color 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--wash);
  color: var(--ink);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  background: var(--wash);
  color: var(--ink);
  font-weight: 600;
}

.hero {
  padding: 4.5rem 0 5rem;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  max-width: 24ch;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

.hero-lede {
  max-width: 34rem;
  margin: 0 0 2rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 32, 27, 0.1), inset 0 -2px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 0.15s;
}

.btn span { transition: transform 0.15s; }

.btn:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

.btn:hover span { transform: translateX(3px); }

.hero-shot {
  margin: 3.5rem 0 0;
  padding: clamp(0.75rem, 2.5vw, 1.75rem);
  border: 1px solid var(--rule);
  border-radius: 20px;
  background-color: var(--wash);
  background-image: radial-gradient(circle, rgba(31, 111, 92, 0.16) 1px, transparent 1.2px);
  background-size: 16px 16px;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(16, 32, 27, 0.05), 0 18px 40px -20px rgba(16, 32, 27, 0.28);
}

.section { padding: 4.5rem 0; }
.section + .section { border-top: 1px solid var(--rule); }

.section h2 {
  margin: 0 0 2.25rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.grid h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 600;
}

.grid p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.features h3::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1rem;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%231f6f5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 1.15rem no-repeat;
}

.support .grid h3 {
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.support .grid p {
  font-size: 1.05rem;
  color: var(--ink);
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3.5rem;
  padding: 3.5rem 0 5rem;
}

@media (min-width: 62rem) {
  .page.has-toc {
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: start;
  }
  .toc {
    position: sticky;
    top: calc(var(--head-h) + 1.5rem);
  }
}

.toc { font-size: 0.92rem; }

.toc p {
  margin: 0 0 0.6rem;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

.toc a {
  display: block;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  color: var(--ink-soft);
}

.toc a:hover {
  background: var(--wash);
  color: var(--ink);
  text-decoration: none;
}

.prose { max-width: var(--measure); }

.prose h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.updated {
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-faint);
}

.prose h2 {
  margin: 2.75rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.prose h3 {
  margin: 2rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.prose p,
.prose li { color: #26352f; }

.prose ul,
.prose ol { padding-left: 1.3rem; }

.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--accent); }

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.prose a:hover { text-decoration-color: var(--accent); }

.callout {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 0.97rem;
}

.callout p { margin: 0; }

table {
  width: 100%;
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 0.94rem;
}

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

tbody tr:last-child th,
tbody tr:last-child td { border-bottom: none; }

thead th {
  background: var(--wash);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-foot {
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
  background: var(--wash);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

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

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--ink); }

.lead {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.tag {
  display: inline-block;
  vertical-align: middle;
  padding: 0.35rem 0.55rem;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
}

.prose code,
.prose kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.prose code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--wash);
}

.prose kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.lozenge {
  display: inline-block;
  padding: 0 0.35rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #42526e;
  background: #dfe1e6;
}

.lozenge-progress { color: #0747a6; background: #deebff; }
.lozenge-done { color: #006644; background: #e3fcef; }

.message {
  margin: 1rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--danger);
  border-radius: 0 8px 8px 0;
  background: #fff5f2;
  font-size: 0.95rem;
}

.message p { margin: 0; }

.table-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.table-wrap table { margin: 0; }

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.kv th {
  width: 9rem;
  white-space: nowrap;
  background: var(--wash);
  font-weight: 600;
}

.split-list {
  columns: 2 15rem;
  column-gap: 2.5rem;
}

.split-list li { break-inside: avoid; }

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding: 3rem 0 5rem;
}

.docs-nav { font-size: 0.92rem; }

.docs-nav a {
  display: block;
  padding: 0.32rem 0.75rem;
  border-radius: 6px;
  line-height: 1.45;
  color: var(--ink-soft);
  transition: background-color 0.15s, color 0.15s;
}

.docs-nav a:hover {
  background: var(--wash);
  color: var(--ink);
  text-decoration: none;
}

.docs-nav-home {
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.docs-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.docs-nav-group + .docs-nav-group { margin-top: 1.5rem; }

.docs-nav-heading {
  margin: 0 0 0.4rem;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.docs-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

@media (min-width: 62rem) {
  .docs-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }
  .docs-nav {
    position: sticky;
    top: calc(var(--head-h) + 1.5rem);
    max-height: calc(100vh - var(--head-h) - 3rem);
    padding-bottom: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

@media (max-width: 61.99rem) {
  .docs-nav {
    order: 2;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
  }
}

.crumbs {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.prose .crumbs a {
  color: var(--ink-faint);
  text-decoration: none;
}

.prose .crumbs a:hover { color: var(--accent); }

.docs-article > h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.docs-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2.5rem 3rem;
  margin: 2.5rem 0;
}

.docs-home h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.docs-home p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.docs-home ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.docs-home li { margin: 0; }
.prose .docs-home a { text-decoration: none; }
.prose .docs-home a:hover { text-decoration: underline; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.prose .pager a {
  display: block;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.prose .pager a:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px -8px rgba(16, 32, 27, 0.35);
}

.pager small {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-faint);
}

.pager .next {
  grid-column: 2;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
