/* zipRACK documentation. Tokens match site/site.css; the layout follows laravel.com/docs. */

:root {
  --navy:      #061B35;
  --blue:      #0649D4;
  --orange:    #FD5A01;

  --bg:        #F7F8FB;
  --surface:   #FFFFFF;
  --surface-2: #EDF1F7;
  --ink:       #061B35;
  --ink-2:     #33465F;
  --muted:     #5D7189;
  --border:    #DFE5EE;
  --border-2:  #C2CEDF;
  --primary:   #0645C2;
  --primary-ink:#FFFFFF;
  --primary-bg:#EAF1FF;
  --accent:    #D64901;
  --accent-bg: #FFF4EC;
  --rail:      #061B35;
  --hole:      #F7F8FB;
  --slab-a:    #0649D4;
  --slab-b:    #FD5A01;
  --mark-hl:   #FFE3CF;

  --code-bg:   #061B35;
  --code-bar:  #0C2A4C;
  --code-ink:  #C9D8EC;
  --code-dim:  #6E88A8;

  --shadow:    0 1px 2px rgba(6,27,53,.06), 0 8px 24px -14px rgba(6,27,53,.28);
  --shadow-lg: 0 2px 6px rgba(6,27,53,.08), 0 30px 60px -20px rgba(6,27,53,.35);
  --radius:    12px;

  --display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 28px;
  --topbar-h: 64px;
  --sidebar-w: 284px;
  --toc-w: 224px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #04121F;
    --surface:   #08203A;
    --surface-2: #0C2A4A;
    --ink:       #E9EFF8;
    --ink-2:     #C3D2E6;
    --muted:     #90A5C0;
    --border:    #143254;
    --border-2:  #204977;
    --primary:   #6BA0FF;
    --primary-ink:#04121F;
    --primary-bg:#0B2547;
    --accent:    #FF8845;
    --accent-bg: #2A1609;
    --rail:      #1C4576;
    --hole:      #04121F;
    --slab-a:    #2C6BF0;
    --slab-b:    #FD5A01;
    --mark-hl:   #5A2A0C;
    --code-bg:   #020C17;
    --code-bar:  #0A2340;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 10px 30px -16px rgba(0,0,0,.8);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 30px 60px -20px rgba(0,0,0,.9);
  }
}

:root[data-theme="dark"] {
  --bg:        #04121F;
  --surface:   #08203A;
  --surface-2: #0C2A4A;
  --ink:       #E9EFF8;
  --ink-2:     #C3D2E6;
  --muted:     #90A5C0;
  --border:    #143254;
  --border-2:  #204977;
  --primary:   #6BA0FF;
  --primary-ink:#04121F;
  --primary-bg:#0B2547;
  --accent:    #FF8845;
  --accent-bg: #2A1609;
  --rail:      #1C4576;
  --hole:      #04121F;
  --slab-a:    #2C6BF0;
  --slab-b:    #FD5A01;
  --mark-hl:   #5A2A0C;
  --code-bg:   #020C17;
  --code-bar:  #0A2340;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 10px 30px -16px rgba(0,0,0,.8);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 30px 60px -20px rgba(0,0,0,.9);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 20px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.nav-open, body.search-open { overflow: hidden; }

img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
code, kbd { font-family: var(--mono); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: var(--primary-ink);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; }

kbd {
  font-size: 11px; font-weight: 500; line-height: 1;
  padding: 3px 6px; border-radius: 5px;
  border: 1px solid var(--border-2); border-bottom-width: 2px;
  background: var(--surface); color: var(--muted);
}

/* ───────── logo ───────── */

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: none; }
.logo:hover { text-decoration: none; }
.logo svg { display: block; height: 30px; width: auto; flex: none; }
.logo .wordmark {
  font-family: var(--display); font-weight: 800; font-size: 25px;
  letter-spacing: -.028em; line-height: 1; color: var(--ink); white-space: nowrap;
}
.logo .wordmark em { font-style: normal; }

/* ───────── top bar ───────── */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 0 var(--gutter);
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .spacer { flex: 1; }
.topbar .section {
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  color: var(--muted); text-decoration: none;
  padding-left: 14px; border-left: 1px solid var(--border-2); line-height: 22px;
}
.topbar .section:hover { color: var(--ink); }

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 260px; height: 38px; padding: 0 8px 0 12px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border-2); border-radius: 10px;
  font: inherit; font-size: 14px; cursor: pointer; text-align: left;
  box-shadow: 0 1px 2px rgba(6,27,53,.04);
}
.search-trigger:hover { border-color: var(--primary); color: var(--ink-2); }
.search-trigger svg { width: 16px; height: 16px; flex: none; }
.search-trigger .label { flex: 1; }

.ver {
  display: flex; align-items: center; gap: 0;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--border-2); border-radius: 999px; white-space: nowrap; overflow: hidden;
}
.ver b { font-weight: 600; color: var(--primary-ink); background: var(--primary); padding: 4px 9px; }
.ver span { padding: 4px 9px; }
.ver span + span { border-left: 1px solid var(--border); }

.iconbtn {
  flex: none;
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border-2);
  border-radius: 10px; color: var(--ink-2); cursor: pointer; padding: 0;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn svg { width: 18px; height: 18px; display: block; }
.iconbtn .moon { display: none; }
:root[data-theme="dark"] .iconbtn .moon { display: block; }
:root[data-theme="dark"] .iconbtn .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .iconbtn .moon { display: block; }
  :root:not([data-theme="light"]) .iconbtn .sun { display: none; }
}
#menu-toggle { display: none; }

/* ───────── docs shell ───────── */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 56px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  align-items: start;
}

.sidebar {
  position: sticky; top: var(--topbar-h);
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 30px 6px 48px 0;
  scrollbar-width: thin;
}
.nav-scrim { display: none; }

.group + .group { margin-top: 22px; }
.group summary {
  display: flex; align-items: center; gap: 11px;
  list-style: none; cursor: pointer; user-select: none;
  padding: 4px 6px 4px 0; margin-bottom: 8px;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--ink);
}
.group summary::-webkit-details-marker { display: none; }
.group summary::after {
  content: ""; margin-left: auto; width: 7px; height: 7px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .15s;
}
.group:not([open]) summary::after { transform: rotate(-45deg); }
.gicon {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; background: var(--primary-bg); color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.gicon svg { width: 16px; height: 16px; }

.group ul { list-style: none; margin: 0 0 0 7px; padding: 0; position: relative; }
/* the rail */
.group ul::before {
  content: ""; position: absolute; left: 4px; top: 3px; bottom: 3px; width: 6px;
  background: var(--rail); border-radius: 4px; opacity: .9;
}
.group li { position: relative; }
.group li::before {
  content: ""; position: absolute; left: 6px; top: 14px;
  width: 2px; height: 2px; border-radius: 50%; background: var(--hole); z-index: 1;
}
.group li a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4.5px 10px 4.5px 24px; border-radius: 0 8px 8px 0;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2); text-decoration: none;
}
.group li a:hover { background: var(--surface-2); color: var(--ink); }
.group li.sub a { padding-left: 38px; font-size: 13.5px; color: var(--muted); }
.group li.sub a::before { content: "↳"; position: absolute; left: 22px; opacity: .6; }
.group li a[aria-current="page"] {
  background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--orange), var(--shadow);
}
.tag {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted);
  padding: 1px 6px; border-radius: 5px; background: var(--surface-2); white-space: nowrap;
}
a[aria-current="page"] .tag { color: var(--accent); background: var(--accent-bg); }

/* ───────── doc ───────── */

.doc { padding: 44px 0 80px; min-width: 0; max-width: 780px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
.doc-head { margin-bottom: 8px; }
.doc h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(2.1rem, 1.6rem + 2vw, 2.9rem); line-height: 1.08;
  margin: 0; text-wrap: balance;
}
.doc-tag { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
.doc-tag code {
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-bg); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 2px 9px; border-radius: 999px;
}

.toc-inline {
  display: none;
  margin: 24px 0 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.toc-inline summary {
  cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--ink);
}
.toc-inline ul { list-style: none; margin: 0; padding: 0 16px 14px; columns: 2; column-gap: 24px; }
.toc-inline li { font-size: 14px; padding: 3px 0; break-inside: avoid; }
.toc-inline li.sub { padding-left: 14px; }
.toc-inline a { color: var(--ink-2); text-decoration: none; }
.toc-inline a:hover { color: var(--primary); }

/* ───────── prose ───────── */

.prose { color: var(--ink-2); font-size: 16.5px; }
.prose > :first-child { margin-top: 28px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--muted); }
.prose ol > li::marker { font-family: var(--mono); font-size: .85em; font-weight: 600; color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

.prose h2, .prose h3, .prose h4 { position: relative; color: var(--ink); font-family: var(--display); text-wrap: balance; }
.prose h2 {
  font-weight: 700; font-size: 1.72rem; letter-spacing: -.022em; line-height: 1.2;
  margin: 2.4em 0 .7em;
}
.prose h3 { font-weight: 700; font-size: 1.24rem; letter-spacing: -.012em; line-height: 1.3; margin: 2em 0 .55em; }
.prose h4 { font-weight: 700; font-size: 1.05rem; margin: 1.7em 0 .5em; }
.prose .hash {
  position: absolute; left: -.95em; padding-right: .3em;
  color: var(--accent); text-decoration: none; opacity: 0; transition: opacity .12s;
}
.prose h2:hover .hash, .prose h3:hover .hash, .prose h4:hover .hash { opacity: 1; }
.prose h2 code, .prose h3 code { font-size: .86em; }

.prose :not(pre) > code {
  font-size: .86em; font-weight: 500; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .1em .36em; border-radius: 6px; overflow-wrap: anywhere;
}
.prose a code { color: var(--primary); }

/* tables */
.table-wrap {
  margin: 1.4em 0 1.6em; overflow-x: auto;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.prose th {
  text-align: left; font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); padding: 10px 14px; white-space: nowrap;
}
.prose td { padding: 10px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.prose td:first-child { color: var(--ink); }
.prose td:first-child code { white-space: nowrap; overflow-wrap: normal; }
.prose td :not(pre) > code { font-size: .88em; }

/* callouts */
.callout {
  display: flex; gap: 14px; margin: 1.6em 0;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--primary-bg);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  box-shadow: inset 4px 0 0 var(--slab-a);
}
.callout.warning {
  background: var(--accent-bg);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  box-shadow: inset 4px 0 0 var(--orange);
}
.callout-icon { flex: none; width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.callout.warning .callout-icon { color: var(--accent); }
.callout-icon svg { width: 22px; height: 22px; display: block; }
.callout-body { min-width: 0; color: var(--ink-2); }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body > :first-child { margin-top: 0; }

/* code */
.code {
  margin: 1.4em 0 1.7em; border-radius: var(--radius); overflow: hidden;
  background: var(--code-bg); box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--code-bar) 70%, transparent);
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 38px; padding: 0 10px 0 16px; background: var(--code-bar);
}
.code-head .lang {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--code-dim);
}
.code-head .lang::before {
  content: ""; width: 6px; height: 14px; border-radius: 2px; background: var(--orange);
  transform: skewX(-6deg);
}
.code.plain .code-head .lang::before { background: var(--code-dim); opacity: .5; }
.copy {
  font: 500 12px var(--body); color: var(--code-ink);
  background: transparent; border: 1px solid rgba(201,216,236,.18); border-radius: 6px;
  padding: 4px 10px; cursor: pointer;
}
.copy:hover { background: rgba(201,216,236,.1); }
.copy[data-done] { color: #8FE3C8; border-color: rgba(143,227,200,.4); }
.code pre {
  margin: 0; padding: 18px 20px 20px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.7; color: var(--code-ink); background: transparent;
  tab-size: 4; scrollbar-width: thin; scrollbar-color: var(--code-bar) transparent;
}
.code pre code { font-family: var(--mono); display: block; min-width: max-content; }
.code.plain pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
.code pre:focus-visible { outline-offset: -3px; }

/* page foot */
.source { margin: 56px 0 0; font-size: 13.5px; color: var(--muted); }
.source code { font-size: 12.5px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.pager a {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.pager a:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.pager span { font-size: 12.5px; color: var(--muted); }
.pager strong { font-family: var(--display); font-size: 16.5px; color: var(--ink); letter-spacing: -.01em; }
.pager .next { text-align: right; }
.pager .prev span::before { content: "← "; }
.pager .next span::after { content: " →"; }

/* on this page */
.toc {
  position: sticky; top: var(--topbar-h);
  max-height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 46px 0 40px; font-size: 13.5px; scrollbar-width: thin;
}
.toc-title {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a {
  display: block; padding: 4px 0 4px 14px; margin-left: -1px;
  color: var(--muted); text-decoration: none; line-height: 1.45;
  border-left: 2px solid transparent;
}
.toc li.sub a { padding-left: 26px; font-size: 13px; }
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--primary); border-left-color: var(--orange); font-weight: 500; }

/* ───────── footer ───────── */

.foot { border-top: 1px solid var(--border); background: var(--surface); }
.foot .in {
  max-width: 1480px; margin: 0 auto; padding: 22px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
  font-size: 13.5px; color: var(--muted);
}
.foot .spacer { flex: 1; }
.foot strong { color: var(--ink); font-family: var(--display); }
.foot code { font-size: 12.5px; }
.fname { display: flex; flex-direction: column; gap: 2px; }
.acr { font-size: 12.5px; }
.acr b { color: var(--accent); font-weight: 700; }

/* ───────── search ───────── */

.search { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search[hidden] { display: none; }
.search-scrim { position: absolute; inset: 0; background: rgba(4,18,31,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.search-panel {
  position: relative; width: 100%; max-width: 660px; max-height: 76vh;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.search-field svg { width: 20px; height: 20px; color: var(--primary); flex: none; }
.search-field input {
  flex: 1; min-width: 0; height: 58px; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 17px; color: var(--ink);
}
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field kbd { cursor: pointer; }
.search-results { overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.search-results:empty { display: none; }
.search-group + .search-group { margin-top: 6px; }
.search-group h3 {
  margin: 0; padding: 8px 10px 4px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.hit {
  display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2);
  border: 1px solid transparent;
}
.hit-h { display: block; font-weight: 600; color: var(--ink); font-size: 14.5px; }
.hit-x { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 2px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hit mark { background: var(--mark-hl); color: inherit; border-radius: 3px; padding: 0 1px; }
.hit[aria-selected="true"] { background: var(--primary-bg); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.search-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14.5px; }
.search-foot {
  display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); background: var(--bg);
}
.search-foot kbd { margin-right: 3px; }

/* ───────── home ───────── */

.home main { overflow: hidden; }
.hero {
  position: relative;
  background:
    radial-gradient(600px 300px at 82% 30%, color-mix(in srgb, var(--slab-a) 16%, transparent), transparent 70%),
    radial-gradient(420px 260px at 92% 78%, color-mix(in srgb, var(--slab-b) 14%, transparent), transparent 70%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero-in {
  position: relative; max-width: 1180px; margin: 0 auto; padding: 88px var(--gutter) 96px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: center;
}
.hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.04em; line-height: 1;
  font-size: clamp(2.8rem, 2rem + 4vw, 4.6rem); margin: 0 0 22px;
}
.hero h1 em { font-style: normal; color: var(--slab-a); }
.hero-lede { font-size: 1.2rem; line-height: 1.65; color: var(--ink-2); margin: 0; max-width: 40em; text-wrap: pretty; }
.hero-lede strong { color: var(--ink); }
.hero-lede code { font-size: .86em; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); padding: .08em .34em; border-radius: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px;
  border-radius: 11px; border: 1px solid var(--border-2); background: var(--surface);
  font: 600 15px var(--body); color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(6,27,53,.05);
}
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.hero-art { display: grid; place-items: center; }
.hero-art svg { width: 210px; height: auto; filter: drop-shadow(0 30px 40px rgba(6,27,53,.25)); }

.paths, .why, .index { max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: -44px; position: relative; }
.path {
  display: flex; flex-direction: column; gap: 8px;
  padding: 26px 28px; border-radius: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.path:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary); text-decoration: none; }
.path-kicker { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.path strong { font-family: var(--display); font-size: 1.45rem; letter-spacing: -.02em; color: var(--ink); }
.path-text { color: var(--ink-2); line-height: 1.6; }
.path-text code { font-size: .88em; }
.path-go { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--primary); }

.why { padding-top: 88px; }
.why h2, .index h2 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem);
  margin: 0 0 12px;
}
.why-lede { color: var(--ink-2); font-size: 1.1rem; max-width: 46em; margin: 0 0 32px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-grid article {
  padding: 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.why-grid article::before {
  content: ""; position: absolute; left: 24px; top: 0; width: 34px; height: 4px;
  border-radius: 0 0 3px 3px; background: var(--slab-a);
}
.why-grid article:nth-child(2)::before { background: var(--slab-b); }
.why-grid h3 { font-family: var(--display); font-size: 1.15rem; letter-spacing: -.01em; margin: 6px 0 8px; }
.why-grid p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.why-grid code { font-size: .86em; }

.index { padding-top: 88px; padding-bottom: 104px; }
.index h2 { margin-bottom: 28px; }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.gcard {
  padding: 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.gcard header { display: flex; align-items: center; gap: 12px; }
.gcard .gicon { width: 34px; height: 34px; border-radius: 10px; }
.gcard .gicon svg { width: 18px; height: 18px; }
.gcard h3 { margin: 0; font-family: var(--display); font-size: 1.2rem; letter-spacing: -.015em; }
.gcard p { margin: 12px 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.gcard ul { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--border); }
.gcard li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 15px; }
.gcard li.sub { padding-left: 16px; font-size: 14px; }
.gcard li a { color: var(--ink); text-decoration: none; font-weight: 500; }
.gcard li.sub a { color: var(--ink-2); font-weight: 400; }
.gcard li a:hover { color: var(--primary); text-decoration: underline; }

/* ───────── responsive ───────── */

@media (max-width: 1240px) {
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: 48px; }
  .toc { display: none; }
  .toc-inline { display: block; }
  .ver span { display: none; }
}

@media (max-width: 1000px) {
  :root { --gutter: 20px; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc { margin: 0 auto; width: 100%; }
  #menu-toggle { display: grid; }
  .sidebar {
    position: fixed; z-index: 70; top: 0; left: 0; bottom: 0;
    width: min(320px, 86vw); max-height: none;
    padding: 24px 16px 48px 18px;
    background: var(--bg); border-right: 1px solid var(--border); box-shadow: var(--shadow-lg);
    transform: translateX(-102%); transition: transform .2s ease;
    visibility: hidden;
  }
  .nav-open .sidebar { transform: none; visibility: visible; }
  .nav-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4,18,31,.45); }
  .nav-open .nav-scrim { display: block; }
  .search-trigger { width: auto; }
  .search-trigger .label, .search-trigger kbd { display: none; }
  .search-trigger { width: 38px; padding: 0; justify-content: center; }
  .ver { display: none; }
  .hero-in { grid-template-columns: 1fr; padding-top: 64px; }
  .hero-art { display: none; }
  .why-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --topbar-h: 58px; }
  .topbar { gap: 10px; }
  .topbar .section { display: none; }
  .logo .wordmark { font-size: 22px; }
  .logo svg { height: 26px; }
  .doc { padding-top: 32px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 1.45rem; }
  .prose .hash { display: none; }
  .toc-inline ul { columns: 1; }
  .code { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
  .pager { grid-template-columns: 1fr; }
  .paths { grid-template-columns: 1fr; }
  .search { padding-top: 12px; }
  .search-foot { display: none; }
  .hero-lede { font-size: 1.08rem; }
}
