/* edgegoat docs. Light is the default; dark follows the operating system unless
   the visitor picked a theme with the toggle (Voodoo.js writes data-theme on <html>). */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f9f8;
  --bg-elev: #ffffff;
  --fg: #142029;
  --muted: #56646f;
  --border: #dde4e8;
  --brand: #1f7a6c;
  --brand-strong: #17695c;
  --brand-bright: #2e9c8a;
  --brand-soft: rgba(46, 156, 138, 0.1);
  --on-brand: #ffffff;
  --accent: #f2a93b;
  --code-bg: #eef3f5;
  --fail-bg: #fdecec;
  --fail-border: #e5a3a3;
  --tip-bg: #fff6e6;
  --tip-border: #f0c97a;
  --header-bg: rgba(255, 255, 255, 0.82);
  --mesh-a: rgba(46, 156, 138, 0.22);
  --mesh-b: rgba(242, 169, 59, 0.2);
  --mesh-c: rgba(80, 140, 230, 0.14);
  --grid-line: rgba(20, 32, 41, 0.05);
  --editor-bg: #ffffff;
  --editor-fg: #000000;
  --editor-bar: #f3f3f3;
  --editor-tab: #ffffff;
  --editor-border: #e2e2e2;
  --editor-gutter: #237893;
  --shadow-sm: 0 1px 2px rgba(16, 28, 36, 0.06);
  --shadow: 0 1px 2px rgba(16, 28, 36, 0.05), 0 12px 32px rgba(16, 28, 36, 0.08);
  --shadow-lg: 0 2px 4px rgba(16, 28, 36, 0.05), 0 24px 60px rgba(16, 28, 36, 0.14);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Cascadia Code', 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1116;
    --bg-soft: #10181f;
    --bg-elev: #141d25;
    --fg: #e7eef3;
    --muted: #98a6b2;
    --border: #24313c;
    --brand: #5fd0bd;
    --brand-strong: #84e2d2;
    --brand-bright: #5fd0bd;
    --brand-soft: rgba(95, 208, 189, 0.12);
    --on-brand: #06231e;
    --code-bg: #17222c;
    --fail-bg: #2a1618;
    --fail-border: #7a3a3e;
    --tip-bg: #2a2214;
    --tip-border: #6e5523;
    --header-bg: rgba(11, 17, 22, 0.78);
    --mesh-a: rgba(46, 156, 138, 0.28);
    --mesh-b: rgba(242, 169, 59, 0.12);
    --mesh-c: rgba(80, 140, 230, 0.16);
    --grid-line: rgba(231, 238, 243, 0.04);
    --editor-bg: #1e1e1e;
    --editor-fg: #d4d4d4;
    --editor-bar: #252526;
    --editor-tab: #1e1e1e;
    --editor-border: #333333;
    --editor-gutter: #858585;
    --shadow-sm: none;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1116;
  --bg-soft: #10181f;
  --bg-elev: #141d25;
  --fg: #e7eef3;
  --muted: #98a6b2;
  --border: #24313c;
  --brand: #5fd0bd;
  --brand-strong: #84e2d2;
  --brand-bright: #5fd0bd;
  --brand-soft: rgba(95, 208, 189, 0.12);
  --on-brand: #06231e;
  --code-bg: #17222c;
  --fail-bg: #2a1618;
  --fail-border: #7a3a3e;
  --tip-bg: #2a2214;
  --tip-border: #6e5523;
  --header-bg: rgba(11, 17, 22, 0.78);
  --mesh-a: rgba(46, 156, 138, 0.28);
  --mesh-b: rgba(242, 169, 59, 0.12);
  --mesh-c: rgba(80, 140, 230, 0.16);
  --grid-line: rgba(231, 238, 243, 0.04);
  --editor-bg: #1e1e1e;
  --editor-fg: #d4d4d4;
  --editor-bar: #252526;
  --editor-tab: #1e1e1e;
  --editor-border: #333333;
  --editor-gutter: #858585;
  --shadow-sm: none;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

[v-cloak] { display: none !important; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, pre:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

button { font: inherit; color: inherit; }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 50;
}
.skip:focus { left: 8px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 5.6vw, 60px); margin: 0 0 16px; font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 14px; font-weight: 800; }
h3 { font-size: 18px; margin: 0; }

code { font-family: var(--mono); font-size: 0.86em; background: var(--code-bg); padding: 1px 6px; border-radius: 6px; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; font-size: 14px; }

/* ------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 16px; height: 64px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -0.5px; flex: none; }
.brand:hover { color: var(--fg); }
.brand b { color: var(--brand); }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover { color: var(--fg); background: var(--brand-soft); }
.header-actions { display: flex; gap: 8px; flex: none; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.icon-button:hover { border-color: var(--brand); color: var(--brand); }
.menu-button { display: none; }

@media (max-width: 860px) {
  .menu-button { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    margin: 8px 0 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 16px; }
}

/* ------------------------------------------------ buttons and labels */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: var(--on-brand);
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--brand);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.button:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); transform: translateY(-1px); box-shadow: var(--shadow); }
.button.ghost { background: var(--bg-elev); color: var(--fg); border-color: var(--border); }
.button.ghost:hover { border-color: var(--brand); color: var(--brand); }

.kicker { margin: 0 0 8px; color: var(--brand); font-weight: 800; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.section-lede { color: var(--muted); font-size: 18px; max-width: 760px; margin: 0 0 28px; }

.band { padding: 88px 0; }
.band.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; isolation: isolate; }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(42% 60% at 12% 18%, var(--mesh-a), transparent 70%),
    radial-gradient(38% 55% at 88% 12%, var(--mesh-b), transparent 70%),
    radial-gradient(45% 60% at 70% 95%, var(--mesh-c), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.eyebrow span { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-weight: 800; font-family: var(--mono); font-size: 13px; }
.grad {
  background: linear-gradient(100deg, var(--brand-bright) 10%, #3a8fd8 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { font-size: 22px; color: var(--fg); margin: 0 0 12px; font-weight: 600; }
.hero-text { color: var(--muted); margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.badges img { display: block; height: 20px; }
.hero-side { position: relative; display: grid; }
.hero-mascot { justify-self: end; margin-right: 24px; width: 168px; height: 168px; margin-bottom: -30px; position: relative; z-index: 1; filter: drop-shadow(0 18px 30px rgba(16, 28, 36, 0.18)); }

/* Terminal frame */
.terminal {
  width: 100%;
  border: 1px solid var(--editor-border);
  border-radius: 12px;
  background: var(--editor-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 14px; padding: 0 12px; background: var(--editor-bar); border-bottom: 1px solid var(--editor-border); height: 40px; }
.term-tabs { display: flex; gap: 2px; height: 100%; align-items: flex-end; overflow-x: auto; }
.term-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 var(--mono);
  padding: 10px 12px 11px;
  cursor: pointer;
  border-top: 2px solid transparent;
  transition: color 0.15s;
}
.term-tab:hover { color: var(--fg); }
.term-tab[aria-selected="true"] { color: var(--fg); background: var(--editor-bg); border-top-color: var(--brand-bright); }
.terminal .code-block { margin: 0; border: 0; border-radius: 0; box-shadow: none; position: relative; }
.terminal .code-bar { position: absolute; top: 10px; right: 8px; min-height: 0; padding: 0; background: none; border: 0; }
.terminal .code-bar .dots, .terminal .code-tab { display: none; }
.terminal .code-block pre { padding: 18px 90px 18px 18px; font-size: 15px; }
.terminal .line::before { content: '$ '; color: var(--editor-gutter); user-select: none; -webkit-user-select: none; }

/* ------------------------------------------------ editor style code blocks */
.code-block {
  margin: 20px 0;
  border: 1px solid var(--editor-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--editor-bg);
  box-shadow: var(--shadow);
}
.code-bar {
  display: flex;
  align-items: stretch;
  gap: 14px;
  min-height: 38px;
  padding: 0 6px 0 14px;
  background: var(--editor-bar);
  border-bottom: 1px solid var(--editor-border);
  font: 500 13px/1 var(--font);
  color: var(--muted);
}
.dots { display: flex; gap: 7px; align-items: center; flex: none; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.code-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 14px;
  margin-bottom: -1px;
  background: var(--editor-tab);
  border-top: 2px solid var(--brand-bright);
  border-right: 1px solid var(--editor-border);
  border-left: 1px solid var(--editor-border);
  color: var(--fg);
}
.file-icon { font: 800 10px/1 var(--mono); letter-spacing: -0.02em; color: #b8a400; flex: none; }
.file-icon[data-lang="ts"] { color: #3178c6; }
.file-icon[data-lang="sh"] { color: #3f9a4f; }
.file-icon[data-lang="yaml"] { color: #a074c4; }
:root[data-theme="dark"] .file-icon[data-lang="js"] { color: #cbcb41; }
:root[data-theme="dark"] .file-icon[data-lang="ts"] { color: #519aba; }
:root[data-theme="dark"] .file-icon[data-lang="sh"] { color: #89e051; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .file-icon[data-lang="js"] { color: #cbcb41; }
  :root:not([data-theme="light"]) .file-icon[data-lang="ts"] { color: #519aba; }
  :root:not([data-theme="light"]) .file-icon[data-lang="sh"] { color: #89e051; }
}
.code-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy {
  flex: none;
  align-self: center;
  margin-left: auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 12.5px/1 var(--font);
  padding: 7px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.copy:hover { color: var(--fg); border-color: var(--editor-border); background: var(--editor-bg); }
.code-block pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 16px 18px;
  background: var(--editor-bg);
  color: var(--editor-fg);
  font: 14px/1.65 var(--mono);
  font-variant-ligatures: none;
  tab-size: 2;
}
.code-block pre code { font: inherit; background: none; padding: 0; border-radius: 0; }
.shiki, .shiki span { color: var(--shiki-light); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shiki, :root:not([data-theme="light"]) .shiki span { color: var(--shiki-dark); }
}
:root[data-theme="dark"] .shiki, :root[data-theme="dark"] .shiki span { color: var(--shiki-dark); }
.code-block pre.numbered { padding-left: 0; }
.numbered code { counter-reset: line; }
.numbered .line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 3.4em;
  padding-right: 1.5em;
  text-align: right;
  color: var(--editor-gutter);
  user-select: none;
  -webkit-user-select: none;
}
.snippet-code { max-height: 380px; overflow: auto; white-space: pre; }
.showcase .code-block { margin: 0; box-shadow: var(--shadow-lg); }
.showcase .code-block pre { font-size: 15px; padding-top: 20px; padding-bottom: 20px; }

/* ------------------------------------------------ how it works */
.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.steps li { position: relative; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px 22px; box-shadow: var(--shadow-sm); }
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 800;
  margin-bottom: 14px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* ------------------------------------------------ category tiles */
.tiles { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); }
.tile img { flex: none; }
.tile h3 { font-size: 18px; }
.tile p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.count { font-size: 12px; color: var(--brand); background: var(--brand-soft); font-weight: 700; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: middle; letter-spacing: 0; }

/* ------------------------------------------------ bugs */
.bugs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.bugs li { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; background: var(--bg-elev); }
.bugs a { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.bugs p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ------------------------------------------------ catalog */
.catalog-ui { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.filters { display: grid; gap: 6px; }
.filters label { font-size: 14px; font-weight: 700; color: var(--muted); }
.filters input {
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  width: 100%;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.filters input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: 999px;
  padding: 7px 13px;
  font: 600 14px/1.2 var(--mono);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--brand); }
.chip .n { font: 700 12px/1 var(--font); color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 3px 7px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip.on .n { background: rgba(255, 255, 255, 0.22); color: var(--on-brand); }
.chip.small { font-size: 13px; padding: 5px 11px; }
.chip.ghost { border-style: dashed; color: var(--muted); font-family: var(--font); }
.tag-filter { margin-top: 18px; }
.tag-filter-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.tag-filter .chips { margin-top: 8px; }
.status { color: var(--muted); font-size: 15px; margin: 18px 0 10px; }
.snippet { margin: 0 0 18px; }
.snippet summary { cursor: pointer; font-weight: 700; color: var(--brand); width: fit-content; }
.snippet .code-block { margin-top: 12px; }

.catalog-body { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) {
  .catalog-body { grid-template-columns: minmax(0, 1fr) 360px; }
  .detail { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
}
.cases { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.case { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg); transition: border-color 0.15s; }
.case:hover { border-color: var(--brand); }
.case.picked { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.case-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.case-head h3 { flex: 1 1 200px; overflow-wrap: anywhere; font-size: 17px; }
.gen { color: var(--brand); background: var(--brand-soft); }
.value { display: block; margin: 10px 0; padding: 8px 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.case p { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.more {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.more:hover, .more[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font: 600 12px/1.7 var(--font);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 9px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.tag:hover { color: var(--brand); border-color: var(--brand); }
.ref { font-size: 14px; font-weight: 600; margin-left: 4px; }

.detail { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); padding: 18px; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.detail h3 { font-size: 20px; overflow-wrap: anywhere; }
.detail h3:focus { outline: none; }
.detail dl { margin: 12px 0; }
.detail dt { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 12px; }
.detail dd { margin: 4px 0 0; font-size: 15px; }
.detail .value { margin: 0; }
.detail .code-block { margin: 14px 0 0; }
.detail .snippet-code { font-size: 12.5px; }
.close { border: 1px solid var(--border); background: var(--bg); border-radius: 8px; padding: 5px 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.close:hover { border-color: var(--brand); color: var(--brand); }
.hint { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 959px) {
  .detail { display: none; }
  .detail.open {
    display: block;
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 78vh;
    overflow: auto;
    z-index: 40;
    background: var(--bg-elev);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
  }
}

/* ------------------------------------------------ guides list */
.guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.guides a {
  display: block;
  height: 100%;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.guides a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); color: var(--fg); }
.guides strong { display: block; font-size: 17px; line-height: 1.3; margin-bottom: 6px; color: var(--brand); }
.guides span { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ------------------------------------------------ FAQ accordion */
.faq { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden; }
.faq-q {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 700;
  font-size: 17px;
  padding: 18px 20px;
  cursor: pointer;
  color: var(--fg);
}
.faq-q:hover { color: var(--brand); }
.faq-a { padding: 0 20px 4px; color: var(--muted); }
.faq-a p { margin: 0 0 16px; }

/* ------------------------------------------------ guide pages */
.guide { max-width: 820px; padding: 40px 0 72px; }
.guide h2 { font-size: 28px; margin: 48px 0 12px; }
.crumbs { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.lede { font-size: 20px; color: var(--muted); }
.callout { border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; border: 1px solid; }
.callout.fail { background: var(--fail-bg); border-color: var(--fail-border); }
.callout.tip { background: var(--tip-bg); border-color: var(--tip-border); }
table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; vertical-align: top; }
thead th { background: var(--bg-soft); }

/* ------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); font-size: 15px; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 0.8fr 1.6fr; gap: 40px; }
.footer-brand p { margin: 14px 0 0; max-width: 320px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg); margin: 6px 0 14px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-list a { text-decoration: none; font-weight: 600; }
.footer-list a:hover { text-decoration: underline; }
.projects li { display: grid; gap: 1px; }
.projects span { font-size: 14px; line-height: 1.45; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }
.footer-bottom p { margin: 0; }

.notfound { text-align: center; padding-top: 64px; }

/* ------------------------------------------------ responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-mascot { width: 128px; height: 128px; margin-bottom: -22px; margin-right: 12px; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-more { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .band { padding: 60px 0; }
  .hero { padding: 40px 0 60px; }
  .tagline { font-size: 19px; }
  .eyebrow { font-size: 13px; border-radius: 16px; }
  .section-lede { font-size: 16px; }
  .catalog-ui { padding: 16px; border-radius: 14px; }
  .tiles, .bugs, .guides { grid-template-columns: 1fr; }
  .code-block pre { font-size: 13px; }
  .showcase .code-block pre, .terminal .code-block pre { font-size: 13px; }
  .numbered .line::before { width: 2.4em; padding-right: 1em; }
  .footer-grid { grid-template-columns: 1fr; }
  .dots { display: none; }
  .code-bar { padding-left: 0; }
  .code-tab { border-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.show-all { margin: 14px auto 0; display: flex; }
