/* breakhound docs. One stylesheet, light and dark themes.
   Palette: navy #1c2340, teal #1fa692, tan #e8b878, cream #fdf3e3. */

:root {
  --navy: #1c2340;
  --teal: #1fa692;
  --tan: #e8b878;
  --cream: #fdf3e3;
  --bg: #fffbf4;
  --bg-alt: #fdf3e3;
  --surface: #ffffff;
  --text: #1c2340;
  --muted: #545b78;
  --border: #eadfca;
  --border-strong: #d9c9aa;
  --accent: #127a6a;
  --accent-strong: #1fa692;
  --accent-soft: rgba(31, 166, 146, 0.12);
  --tan-soft: rgba(232, 184, 120, 0.3);
  --danger: #c2334d;
  --warn: #a6640b;
  --green: #127a6a;
  --shadow: 0 1px 2px rgba(28, 35, 64, 0.06), 0 12px 32px -12px rgba(28, 35, 64, 0.18);
  --shadow-lg: 0 2px 4px rgba(28, 35, 64, 0.06), 0 30px 60px -20px rgba(28, 35, 64, 0.35);
  --radius: 14px;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #11162a;
    --bg-alt: #161c33;
    --surface: #1c2340;
    --text: #f4ecdd;
    --muted: #a9b0c8;
    --border: #2a3256;
    --border-strong: #3a4470;
    --accent: #4fd1bb;
    --accent-soft: rgba(79, 209, 187, 0.12);
    --tan-soft: rgba(232, 184, 120, 0.14);
    --danger: #ff8099;
    --warn: #f0b860;
    --green: #4fd1bb;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #11162a;
  --bg-alt: #161c33;
  --surface: #1c2340;
  --text: #f4ecdd;
  --muted: #a9b0c8;
  --border: #2a3256;
  --border-strong: #3a4470;
  --accent: #4fd1bb;
  --accent-soft: rgba(79, 209, 187, 0.12);
  --tan-soft: rgba(232, 184, 120, 0.14);
  --danger: #ff8099;
  --warn: #f0b860;
  --green: #4fd1bb;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--tan-soft);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 8px;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}

header.site .wrap { display: flex; align-items: center; gap: 10px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; margin-right: auto;
}
.brand img { width: 38px; height: 38px; }

nav.site { display: flex; align-items: center; gap: 2px; }
nav.site a {
  color: var(--muted); text-decoration: none; font-weight: 560; font-size: 0.94rem;
  padding: 8px 12px; border-radius: 8px;
}
nav.site a:hover { color: var(--text); background: var(--accent-soft); }

.stars {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.88rem;
  background: var(--surface);
}
.stars:hover { border-color: var(--accent-strong); }
.stars svg { width: 18px; height: 18px; }
.stars img { height: 20px; width: auto; display: block; }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent-strong); }
.icon-btn svg { width: 19px; height: 19px; }

.menu-toggle { display: none; }
.icon-sun { display: none; }
:root[data-theme='dark'] .icon-sun { display: block; }
:root[data-theme='dark'] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .icon-sun { display: block; }
  :root:not([data-theme='light']) .icon-moon { display: none; }
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  nav.site {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    padding: 10px 16px 18px; background: var(--bg);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
  }
  nav.site.open { display: flex; }
  nav.site a { padding: 12px; font-size: 1rem; }
}

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 650; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 10px 24px -10px rgba(28, 35, 64, 0.6); }
:root[data-theme='dark'] .btn-primary { background: var(--teal); color: #0c1222; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .btn-primary { background: var(--teal); color: #0c1222; }
}
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent-strong); }
.btn svg { width: 18px; height: 18px; }

/* Hero */

.hero { position: relative; padding: 72px 0 56px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(800px 420px at 85% 10%, var(--tan-soft), transparent 70%),
    radial-gradient(700px 420px at 0% 80%, var(--accent-soft), transparent 70%),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.eyebrow::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-strong); box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
  font-size: clamp(2.3rem, 1.3rem + 3.4vw, 3.9rem);
  line-height: 1.04; letter-spacing: -0.035em; font-weight: 850; margin-bottom: 18px;
}
.hero h1 .hl { color: var(--accent); background: linear-gradient(transparent 64%, var(--tan-soft) 64%); }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 22px; }

.trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  font-size: 0.9rem; color: var(--muted); margin: 0;
}
.trust strong { color: var(--text); }
.trust .orgs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.trust .orgs span {
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); font-weight: 650; font-size: 0.8rem; color: var(--text);
}

.hero-visual { position: relative; }
.hero-mascot {
  position: absolute; width: 128px; height: 128px; top: -70px; right: -10px; z-index: 2;
  filter: drop-shadow(0 12px 22px rgba(28, 35, 64, 0.3));
}

/* Install tabs */

.install { margin-top: 6px; max-width: 560px; }
.tablist { display: flex; gap: 4px; margin-bottom: 8px; }
.tablist button {
  font: 600 0.84rem/1 var(--sans); padding: 8px 12px; border-radius: 8px;
  border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer;
}
.tablist button[aria-selected='true'] { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.install .code { margin: 0; }

/* Animated terminal demo */

.demo {
  background: #0d1120; color: #d7dcef; border-radius: 16px; border: 1px solid #262e52;
  box-shadow: var(--shadow-lg); overflow: hidden; font: 13px/1.7 var(--mono);
}
.demo-bar {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  background: #161b31; border-bottom: 1px solid #262e52;
  font: 600 12px/1 var(--sans); color: #8c94b4;
}
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.demo-bar i:nth-child(2) { background: #febc2e; }
.demo-bar i:nth-child(3) { background: #28c840; }
.demo-bar span { margin-left: 10px; }
.demo-body { padding: 16px 18px 20px; min-height: 460px; overflow-x: auto; }
.demo-body p { margin: 0; white-space: pre; }
.demo .prompt { color: #4fd1bb; }
.demo .cmd {
  display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap;
  width: 0; animation: type 1.3s steps(22, end) 0.4s forwards;
}
.demo .caret {
  display: inline-block; width: 8px; height: 1.1em; vertical-align: -0.18em; background: #e8b878;
  animation: blink 1s steps(1) infinite, hide 0s 1.9s forwards;
}
.demo .dim { color: #8189ab; }
.demo .ok { color: #4fd1bb; }
.demo .high { color: #ff8099; font-weight: 700; }
.demo .med { color: #f0b860; font-weight: 700; }
.demo .rule { color: #9fb4ff; }
.demo .fn { color: #f4ecdd; font-weight: 600; }
.demo .str { color: #ce9178; }
.demo .step { opacity: 0; transform: translateY(4px); animation: show 0.35s var(--ease) forwards; }
.demo .summary { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #2f3860; }

@keyframes type { to { width: 22ch; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hide { to { visibility: hidden; } }
@keyframes show { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo .cmd { width: auto; animation: none; }
  .demo .caret { display: none; }
  .demo .step { opacity: 1; transform: none; animation: none; }
  .btn, .card, .fix { transition: none; }
}

/* Sections */

.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.kicker {
  display: block; font-size: 0.8rem; font-weight: 750; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}

/* Oracle cards */

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--accent-strong); }
.card img { width: 44px; height: 44px; margin-bottom: 14px; }
.card h3 { margin-bottom: 4px; }
.card .rule-id { font: 600 0.76rem/1.4 var(--mono); color: var(--accent); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.94rem; margin-bottom: 14px; }
.card .ex {
  margin-top: auto; padding: 10px 12px; border-radius: 10px; background: #0d1120; color: #d7dcef;
  font: 11.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.card .ex b { color: #ff8099; font-weight: 600; }
.card .ex i { color: #8189ab; font-style: normal; }

/* Steps */

.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  counter-reset: step; list-style: none; padding: 0; margin: 0;
}
.steps li {
  position: relative; padding: 24px 22px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px;
  border-radius: 10px; background: var(--navy); color: var(--tan); font-weight: 800;
}
.steps li img { position: absolute; top: 22px; right: 20px; width: 36px; height: 36px; }
.steps li p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Two column showcase */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split .code { margin: 0; }
.split-label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 10px; }
.split-label span {
  font-size: 0.76rem; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.note { font-size: 0.88rem; color: var(--muted); margin-top: 14px; }
.showcase-finding { margin-bottom: 20px; }

/* GitHub job summary mock */

.gh {
  border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow); font-size: 0.92rem;
}
.gh-top {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--bg-alt); font-weight: 650;
}
.gh-x {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #cf222e; color: #fff; font-size: 12px; font-weight: 800;
}
.gh-top small { margin-left: auto; color: var(--muted); font-weight: 500; }
.gh-body { padding: 16px 18px; }
.gh-body h4 { margin: 0 0 10px; font-size: 1.1rem; }
.gh-body table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.gh-body th, .gh-body td { text-align: left; padding: 7px 10px; border: 1px solid var(--border); }
.gh-body th { background: var(--bg-alt); }
.gh-ann {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px;
  background: rgba(207, 34, 46, 0.08); border: 1px solid rgba(207, 34, 46, 0.3);
  margin-bottom: 8px; font-size: 0.86rem;
}
.gh-ann.warn { background: rgba(191, 135, 0, 0.1); border-color: rgba(191, 135, 0, 0.35); }
.gh-ann code { background: none; padding: 0; }
.sev {
  display: inline-block; font: 700 0.7rem/1 var(--sans); letter-spacing: 0.05em;
  padding: 4px 7px; border-radius: 6px; background: rgba(207, 34, 46, 0.14);
  color: var(--danger); white-space: nowrap;
}
.sev.med { background: rgba(191, 135, 0, 0.16); color: var(--warn); }

/* Comparison table */

.table-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
table.compare { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.compare thead th { background: var(--bg-alt); font-size: 0.88rem; }
.compare tbody th { font-weight: 650; color: var(--muted); width: 17%; }
.compare .us { background: var(--accent-soft); font-weight: 600; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

/* Proof (real fixes) */

.fixes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fix {
  display: flex; flex-direction: column; gap: 8px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.fix:hover { border-color: var(--accent-strong); transform: translateY(-2px); }
.fix .repo { font: 600 0.88rem/1.3 var(--mono); color: var(--accent); }
.fix p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.fix .merged {
  align-self: flex-start; font-size: 0.74rem; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: #8250df; color: #fff;
}
.fix .oracle { margin-top: auto; font: 600 0.78rem/1.3 var(--mono); color: var(--muted); }
.fix.total { background: var(--navy); color: #fff; border-color: var(--navy); justify-content: center; }
.fix.total strong { font-size: 2.6rem; line-height: 1; color: var(--tan); }
.fix.total p { color: #c6cbe0; }

/* FAQ */

.faq { max-width: 820px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item h3 { margin: 0; font-size: 1.08rem; }
.faq-item button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 20px 4px; background: none; border: 0; color: var(--text);
  font: inherit; font-weight: 650; text-align: left; cursor: pointer;
}
.faq-icon {
  position: relative; flex: none; width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border-strong);
}
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  background: currentColor; transform: translate(-50%, -50%); transition: transform 0.2s var(--ease);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(0); }
.faq-a { padding: 0 4px 18px; color: var(--muted); }
.faq-a p { margin: 0; }

/* Final CTA */

.final {
  position: relative; overflow: hidden; border-radius: 24px; padding: 56px 48px;
  background: var(--navy); color: #f4ecdd;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center;
  border: 1px solid #2a3256;
}
.final::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 100% 0%, rgba(31, 166, 146, 0.35), transparent 70%);
}
.final > * { position: relative; z-index: 1; }
.final img { width: 160px; height: 160px; }
.final h2 { color: #fff; }
.final p { color: #c6cbe0; font-size: 1.08rem; }
.final .cta-row { margin-bottom: 0; }
.final .btn-primary { background: var(--tan); color: var(--navy); }
.final .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.final code { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Footer */

footer.site {
  margin-top: 96px; padding: 56px 0 32px; background: var(--bg-alt);
  border-top: 1px solid var(--border); font-size: 0.94rem;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h2 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 12px;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--text); text-decoration: none; }
.foot-grid a:hover { color: var(--accent); text-decoration: underline; }
.foot-grid li small { display: block; color: var(--muted); font-size: 0.82rem; }
.foot-about .brand { margin-bottom: 12px; }
.foot-about p { color: var(--muted); max-width: 36ch; }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted);
}

/* Guide pages */

.crumbs { padding: 24px 0 0; font-size: 0.88rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--border-strong); }
.crumbs a { color: var(--muted); }

.article-head { padding: 22px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.article-head h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); letter-spacing: -0.03em;
  font-weight: 850; max-width: 24ch;
}
.article-head .lead { max-width: 70ch; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.86rem; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }

.article-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }

.toc { position: sticky; top: 88px; font-size: 0.9rem; }
.toc h2 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; line-height: 1.4;
}
.toc a:hover { color: var(--text); border-left-color: var(--accent-strong); }
.toc-cta {
  margin-top: 22px; padding: 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.toc-cta p { margin: 0 0 8px; font-weight: 650; color: var(--text); }
.toc-cta code { display: block; font-size: 0.8rem; padding: 8px; }

.prose { max-width: 780px; font-size: 1.04rem; }
.prose section { margin-bottom: 48px; }
.prose h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.94rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--bg-alt); }

.callout {
  margin: 22px 0; padding: 16px 18px 16px 20px; border-radius: 12px;
  background: var(--accent-soft); border-left: 4px solid var(--accent-strong);
}
.callout p:last-child { margin: 0; }

.faq-list .q { padding: 18px 0; border-bottom: 1px solid var(--border); }
.faq-list h3 { margin: 0 0 6px; }
.faq-list p { margin: 0; color: var(--muted); }

.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.related a {
  display: block; padding: 18px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 650; line-height: 1.35;
}
.related a span { display: block; margin-top: 6px; font-weight: 400; font-size: 0.88rem; color: var(--muted); }
.related a:hover { border-color: var(--accent-strong); }

.guide-cta {
  margin: 48px 0; padding: 28px; border-radius: 18px; background: var(--navy); color: #f4ecdd;
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
}
.guide-cta img { width: 88px; height: 88px; }
.guide-cta h2 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.guide-cta p { color: #c6cbe0; margin: 0 0 12px; }
.guide-cta code { background: rgba(255, 255, 255, 0.1); color: #fff; }
.guide-cta .btn-primary { background: var(--tan); color: var(--navy); min-height: 42px; }

/* 404 */

.notfound { text-align: center; padding: 72px 0 24px; }
.notfound img { width: 180px; height: 180px; }
.notfound h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); letter-spacing: -0.03em; }
.notfound .lead { margin-inline: auto; }
.notfound .cta-row { justify-content: center; }
.notfound .related { text-align: left; margin-top: 40px; }

/* Code: pre-rendered with Shiki, VS Code Light+ and Dark+ themes. */

.code {
  --editor-bar: #f3f3f3;
  --editor-tab: #ffffff;
  --editor-border: #e2e2e2;
  --editor-text: #616161;
  --editor-gutter: #237893;
  --editor-bad: rgba(229, 72, 111, 0.13);
  --editor-ok: rgba(26, 138, 90, 0.13);
  margin: 22px 0; border: 1px solid var(--editor-border); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow); background: #fff;
}
.shiki, .shiki span {
  color: var(--shiki-light);
  font-style: var(--shiki-light-font-style);
  font-weight: var(--shiki-light-font-weight);
  text-decoration: var(--shiki-light-text-decoration);
}
.code .shiki { background-color: var(--shiki-light-bg); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .code {
    --editor-bar: #252526; --editor-tab: #1e1e1e; --editor-border: #3a3a3a;
    --editor-text: #cccccc; --editor-gutter: #858585;
    --editor-bad: rgba(255, 127, 158, 0.15); --editor-ok: rgba(76, 201, 143, 0.15);
    background: #1e1e1e;
  }
  :root:not([data-theme='light']) .shiki, :root:not([data-theme='light']) .shiki span {
    color: var(--shiki-dark);
    font-style: var(--shiki-dark-font-style);
    font-weight: var(--shiki-dark-font-weight);
    text-decoration: var(--shiki-dark-text-decoration);
  }
  :root:not([data-theme='light']) .code .shiki { background-color: var(--shiki-dark-bg); }
}
:root[data-theme='dark'] .code {
  --editor-bar: #252526; --editor-tab: #1e1e1e; --editor-border: #3a3a3a;
  --editor-text: #cccccc; --editor-gutter: #858585;
  --editor-bad: rgba(255, 127, 158, 0.15); --editor-ok: rgba(76, 201, 143, 0.15);
  background: #1e1e1e;
}
:root[data-theme='dark'] .shiki, :root[data-theme='dark'] .shiki span {
  color: var(--shiki-dark);
  font-style: var(--shiki-dark-font-style);
  font-weight: var(--shiki-dark-font-weight);
  text-decoration: var(--shiki-dark-text-decoration);
}
:root[data-theme='dark'] .code .shiki { background-color: var(--shiki-dark-bg); }

.code-bar {
  display: flex; align-items: stretch; min-height: 38px; background: var(--editor-bar);
  border-bottom: 1px solid var(--editor-border); font: 13px/1 var(--sans);
}
.code-dots { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; }
.code-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }
.code-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 12px;
  background: var(--editor-tab); color: var(--editor-text);
  border-left: 1px solid var(--editor-border); border-right: 1px solid var(--editor-border);
  box-shadow: inset 0 2px 0 var(--teal); margin-bottom: -1px; white-space: nowrap;
}
.terminal .code-tab, .output .code-tab {
  background: none; border: 0; box-shadow: inset 0 -1px 0 var(--editor-text);
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 600;
  margin: 0 0 -1px 2px; padding: 0 4px;
}
.file-icon { display: inline-grid; place-items: center; font: 700 10px/1 var(--sans); }
.file-icon-js::before { content: 'JS'; color: #b8960a; }
.file-icon-ts::before { content: 'TS'; color: #3178c6; }
.file-icon-yaml::before { content: 'YML'; color: #a074c4; }
.file-icon-json::before { content: '{ }'; color: #b8960a; }
.terminal .file-icon, .output .file-icon { display: none; }
.code-copy {
  position: relative; align-self: center; margin: 0 8px 0 auto;
  font: 600 12px/1 var(--sans); padding: 7px 11px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--editor-text); cursor: pointer;
}
.code-copy:hover { border-color: var(--editor-border); background: var(--editor-tab); }
.code-copy.v-copied { color: var(--green); }
.code pre {
  margin: 0; padding: 14px 0; overflow-x: auto;
  font: 13.5px/1.65 var(--mono); font-variant-ligatures: none; tab-size: 2;
}
.code pre code {
  display: block; min-width: max-content; background: none; color: inherit;
  padding: 0; border-radius: 0; font-size: inherit; counter-reset: line;
}
.code .line { display: inline-block; min-width: 100%; padding: 0 20px; }
.code.numbered .line { padding-left: 0; }
.code.numbered .line::before {
  counter-increment: line; content: counter(line); display: inline-block;
  width: 3.2em; padding-right: 1.2em; text-align: right; color: var(--editor-gutter); user-select: none;
}
.code .line.mark-bad { background: var(--editor-bad); box-shadow: inset 3px 0 0 #e5486f; }
.code .line.mark-ok { background: var(--editor-ok); box-shadow: inset 3px 0 0 #1a8a5a; }
.code.terminal .line::before { content: '$ '; color: var(--editor-gutter); user-select: none; }

/* Responsive */

@media (max-width: 1080px) {
  .cards, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .hero-mascot { width: 92px; height: 92px; top: -46px; right: 0; }
  .hero-visual { margin-top: 36px; }
  .fixes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc {
    position: static; margin-bottom: 32px; padding: 18px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  }
  .toc-cta { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .related { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hero { padding: 36px 0 40px; }
  .section { padding: 64px 0; }
  .cards, .steps, .fixes { grid-template-columns: minmax(0, 1fr); }
  .cta-row .btn { flex: 1 1 100%; }
  .demo { font-size: 10.5px; }
  .demo-body { padding: 14px 12px; min-height: 0; }
  .final { grid-template-columns: minmax(0, 1fr); padding: 36px 22px; text-align: center; border-radius: 18px; }
  .final img { width: 110px; height: 110px; margin: 0 auto; }
  .final .cta-row { justify-content: center; }
  .guide-cta { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .stars { display: none; }
  .code pre { font-size: 12.5px; }
  .tablist button { padding: 8px 10px; }
}

/* Polish */

code { font-variant-ligatures: none; }
.notfound img { display: block; margin: 0 auto 18px; }
.notfound .eyebrow { display: flex; justify-content: center; }
:root[data-theme='dark'] .final,
:root[data-theme='dark'] .guide-cta { background: linear-gradient(135deg, #1f2850, #15333a); border-color: #2f3a66; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .final,
  :root:not([data-theme='light']) .guide-cta { background: linear-gradient(135deg, #1f2850, #15333a); border-color: #2f3a66; }
}
