/* ============================================================
   Zoryn — shared tokens
   Dark terminal, warm amber accent.
   ============================================================ */

:root {
  /* Palette — dark terminal base, adjustable via accent */
  --bg-0: #0b0a08;            /* near-black, very warm */
  --bg-1: #13110e;
  --bg-2: #1a1714;
  --bg-3: #221e1a;
  --bg-4: #2c2722;
  --border: #2e2822;
  --border-strong: #3a3128;

  --text-1: #f4ead9;          /* primary */
  --text-2: #c7b99e;          /* secondary */
  --text-3: #8a7f6c;          /* tertiary / meta */
  --text-4: #5a5246;          /* disabled */

  --accent: #f0a02d;           /* amber — "заря" */
  --accent-strong: #ffb344;
  --accent-soft: rgba(240, 160, 45, 0.12);
  --accent-line: rgba(240, 160, 45, 0.28);

  --rose: #e07a5f;             /* warm secondary */
  --moss: #7a9161;             /* muted green for OK */
  --sky: #6b8ea8;              /* for links in docs */
  --red: #c7553d;

  /* Syntax — monokai-ish, warm */
  --syn-keyword: #e07a5f;
  --syn-string: #c9a87a;
  --syn-number: #d8a657;
  --syn-comment: #5a5246;
  --syn-fn: #f0a02d;
  --syn-punct: #8a7f6c;
  --syn-flag: #a8927a;
  --syn-ok: #7a9161;
  --syn-err: #c7553d;

  --mono: "JetBrains Mono", "IBM Plex Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter Tight", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Space Grotesk", "Inter Tight", ui-sans-serif, system-ui, sans-serif;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset,
              0 12px 40px -16px rgba(0, 0, 0, 0.6);
  --glow: 0 0 0 1px var(--accent-line), 0 0 40px -10px var(--accent-soft);
}

/* Light theme overrides (opt-in via data-theme="light") */
:root[data-theme="light"] {
  --bg-0: #f7f2e7;
  --bg-1: #f1ebdc;
  --bg-2: #eadfc8;
  --bg-3: #e0d3b7;
  --bg-4: #d3c4a4;
  --border: #d9caa8;
  --border-strong: #c2b08a;

  --text-1: #23201a;
  --text-2: #3e382e;
  --text-3: #6a6252;
  --text-4: #9a907c;

  --accent: #b97005;
  --accent-strong: #8f5600;
  --accent-soft: rgba(185, 112, 5, 0.12);
  --accent-line: rgba(185, 112, 5, 0.32);

  --syn-keyword: #a5432d;
  --syn-string: #7a5a22;
  --syn-number: #8a5a00;
  --syn-comment: #9a907c;
  --syn-fn: #b97005;
  --syn-punct: #6a6252;
  --syn-flag: #5a5041;
  --syn-ok: #4d6a3d;
  --syn-err: #a5432d;
}

/* ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-0); color: var(--text-1); -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(240, 160, 45, 0.07), transparent 60%),
    var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-strong); }
code, kbd, pre { font-family: var(--mono); }

/* Selection */
::selection { background: var(--accent-soft); color: var(--text-1); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============================================================
   Top bar — shared across pages
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: stretch; gap: 16px;
  padding: 0 20px 0 12px;
  min-height: 54px;
  background: color-mix(in oklab, var(--bg-1) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar > * { align-self: center; }

/* Mascot block on the left of the topbar */
.tb-mark {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 6px 14px 6px 4px;
  margin-right: 4px;
  border-right: 1px solid var(--border);
  text-decoration: none;
}
.tb-mark img {
  display: block;
  height: 48px;
  width: auto;
}
.tb-mark .mark-light { display: none; }
:root[data-theme="light"] .tb-mark .mark-dark { display: none; }
:root[data-theme="light"] .tb-mark .mark-light { display: block; }

.wordmark {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.wordmark a {
  color: var(--text-1);
  transition: color 120ms;
}
.wordmark a:hover { color: var(--accent); }
.wordmark .mark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--accent);
  padding: 2px 6px;
  border: 1px solid var(--accent-line);
  border-radius: 3px;
  line-height: 1;
  position: relative;
  top: -1px;
}
.wordmark .slash {
  color: var(--text-3);
  font-weight: 400;
  font-size: 14px;
  font-family: var(--mono);
}

.nav-links {
  display: flex; gap: 4px;
  margin-left: auto;
  font-size: 13px;
}
.nav-links a {
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 120ms, background 120ms;
}
.nav-links a:hover { color: var(--text-1); background: var(--bg-2); }
.nav-links a.active { color: var(--accent); }

.tb-controls { display: flex; align-items: center; gap: 6px; }
.tb-controls .pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--bg-1);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 120ms, color 120ms;
}
.tb-controls .pill:hover { border-color: var(--border-strong); color: var(--text-1); }
.tb-controls .pill .dim { color: var(--text-3); }
.tb-controls .pill .on { color: var(--accent); }

/* Search form — pixel-matches Material's .md-search__form inline search
   in docs topbar (background/hover/height/radius/font are copied 1:1).
   Submitting (Enter) navigates to /docs/?q=<value>. */
.tb-controls .tb-search {
  position: relative;
  display: inline-flex; align-items: center;
  height: 1.8rem;
  width: 11.7rem;
  background-color: #00000042;
  border-radius: 0.1rem;
  transition: background-color 250ms;
}
.tb-controls .tb-search:hover,
.tb-controls .tb-search:focus-within { background-color: #ffffff1f; }
.tb-controls .tb-search svg {
  position: absolute;
  left: 0.8rem;
  top: 0.5rem;
  width: 0.8rem;
  height: 0.8rem;
  color: var(--text-3);
  pointer-events: none;
}
.tb-controls .tb-search input {
  width: 100%; height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: 0.8rem;
  padding: 0 0.8rem 0 2.2rem;
  box-sizing: border-box;
}
.tb-controls .tb-search input::placeholder { color: var(--text-3); }
.tb-controls .tb-search input::-webkit-search-cancel-button,
.tb-controls .tb-search input::-webkit-search-decoration { -webkit-appearance: none; }

/* ============================================================
   Shared components
   ============================================================ */

.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 140ms ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #1a1107;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); color: #1a1107; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text-1); border-color: var(--accent-line); }

/* Code block with copy */
.codeblock {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}
.codeblock .cb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.codeblock .cb-body {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-1);
  font-family: var(--mono);
  font-size: inherit;
  line-height: inherit;
}
.codeblock .copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 120ms;
}
.codeblock .copy-btn:hover { color: var(--accent); border-color: var(--accent-line); }
.codeblock .copy-btn.copied { color: var(--moss); border-color: var(--moss); }

/* Syntax tokens */
.tok-kw { color: var(--syn-keyword); }
.tok-str { color: var(--syn-string); }
.tok-num { color: var(--syn-number); }
.tok-com { color: var(--syn-comment); font-style: italic; user-select: none; }
.tok-fn { color: var(--syn-fn); }
.tok-pun { color: var(--syn-punct); }
.tok-flag { color: var(--syn-flag); }
.tok-ok { color: var(--syn-ok); }
.tok-err { color: var(--syn-err); }
.tok-dim { color: var(--text-3); }
.tok-prompt { color: var(--accent); user-select: none; }

/* Utility layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 28px; }

.hairline { height: 1px; background: var(--border); border: 0; margin: 0; }

/* Tooltip copy feedback */
.copy-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 8px 14px;
  background: var(--bg-3);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms, transform 180ms;
  z-index: 200;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}


/* ===== inline styles from site/index.html ===== */

  /* Hero mark — sits on top of hero-left column */
  .hero-mark {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 24px;
  }
  .hero-mark img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Subtle drop-shadow per theme */
  .hero-mark { filter: drop-shadow(0 18px 48px rgba(0,0,0,0.4)); }
  :root[data-theme="light"] .hero-mark {
    filter: drop-shadow(0 8px 24px rgba(26,23,20,0.12));
  }

  /* HERO layout */
  .hero {
    padding: 48px 28px 64px;
    border-bottom: 1px solid var(--border);
    background:
      radial-gradient(ellipse 900px 300px at 50% 0%, rgba(240, 160, 45, 0.07), transparent 70%),
      linear-gradient(to bottom, transparent, rgba(0,0,0,0.15));
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    max-width: 1320px;
    margin: 0 auto;
    align-items: start;
  }
  .hero-left { max-width: 460px; }
  .hero-eyebrow {
    display: flex; align-items: center; gap: 8px;
    width: fit-content;
    font-family: var(--mono); font-size: 11px;
    color: var(--accent);
    padding: 3px 8px;
    border: 1px solid var(--accent-line);
    border-radius: 3px;
    margin: 0 auto 22px;
  }
  .hero-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.5; }
  }
  .hero-title {
    font-family: var(--display);
    font-size: 54px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 18px 0;
  }
  .hero-title .brand {
    color: var(--accent);
    font-family: var(--mono);
    font-weight: 500;
    font-size: 48px;
  }
  .hero-title .brand::before { content: "$ "; color: var(--text-3); }
  .hero-tagline {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 28px;
    text-transform: none;
  }
  .hero-lede {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-2);
    margin-bottom: 14px;
  }
  .hero-etym {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.6;
    font-style: italic;
    padding-left: 14px;
    border-left: 2px solid var(--accent-line);
    margin-bottom: 30px;
  }
  .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

  /* Terminal demo */
  .term {
    background: var(--bg-1);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: var(--shadow-1), var(--glow);
    overflow: hidden;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;
    height: 460px;
    display: grid;
    grid-template-rows: auto 1fr;
  }
  .term-head {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
  }
  .term-dots { display: flex; gap: 6px; }
  .term-dots span {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--bg-4);
  }
  .term-dots span:nth-child(1) { background: #e07a5f; }
  .term-dots span:nth-child(2) { background: #d8a657; }
  .term-dots span:nth-child(3) { background: #7a9161; }
  .term-title {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 6px;
  }
  .term-title .sep { color: var(--text-4); margin: 0 6px; }
  .term-body {
    padding: 18px 20px 20px;
    overflow: hidden;
  }
  .term-line { white-space: pre-wrap; }
  .term-line .prompt { color: var(--accent); user-select: none; }
  .term-line .host { color: var(--moss); }
  .term-line .path { color: var(--sky); }
  .term-line .arrow { color: var(--text-3); }
  .term-line .stage {
    display: inline-block;
    padding: 0 6px;
    margin-right: 6px;
    color: var(--text-3);
    font-size: 11px;
    border: 1px solid var(--border);
    border-radius: 2px;
  }
  .term-line .stage.ok { color: var(--moss); border-color: var(--moss); }
  .term-line .stage.run { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
  .term-line.dim { color: var(--text-3); }
  .cursor { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: text-bottom; animation: blink 1s infinite; }
  @keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

  /* WORKFLOW section */
  .section {
    padding: 72px 28px;
    border-bottom: 1px solid var(--border);
  }
  .section-head {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
  }
  .section-title {
    font-family: var(--display);
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 6px 0 12px;
  }
  .section-sub {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.6;
  }

  /* Diagram: zoryn at the centre, maintainer above it (the maintainer
     drives everything), four service groups at the diagonal corners.
     Radiating lines drawn by JS from zoryn's edges to each block. */
  .diagram {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px 1fr;
    grid-template-rows: auto auto auto;
    gap: 28px 36px;
    align-items: stretch;
    position: relative;
  }
  .diag-grp-upstream { grid-column: 1; grid-row: 1; }
  .diag-you-slot     { grid-column: 2; grid-row: 1; display: flex; justify-content: center; align-items: flex-start; }
  .diag-grp-build    { grid-column: 3; grid-row: 1; }
  .diag-grp-publish  { grid-column: 1; grid-row: 2; }
  .diag-center       { grid-column: 2; grid-row: 2; }
  .diag-grp-query    { grid-column: 3; grid-row: 2; }
  .diag-test-slot    { grid-column: 2; grid-row: 3; display: flex; justify-content: center; align-items: flex-start; }
  .diag-you-slot .diag-node.you,
  .diag-test-slot .diag-node.test { min-width: 220px; }
  .diag-node.test {
    border-color: var(--accent-line);
    padding: 14px 16px;
    font-size: 13px;
  }
  .diag-node.test .name { color: var(--accent); margin-bottom: 4px; }
  .diag-node.test .sub { font-size: 11px; }
  .diag-node {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: var(--mono);
    font-size: 12px;
    transition: border-color 140ms;
  }
  .diag-node:hover { border-color: var(--accent-line); }
  .diag-node .name { color: var(--text-1); font-weight: 500; margin-bottom: 3px; }
  .diag-node .sub  { color: var(--text-3); font-size: 10.5px; line-height: 1.35; }
  .diag-node.you {
    border-color: var(--border-strong);
    padding: 14px 16px;
    font-size: 13px;
  }
  .diag-node.you .name { color: var(--accent); margin-bottom: 4px; }
  .diag-node.you .sub { font-size: 11px; }

  .diag-center {
    background: var(--bg-1);
    border: 1px solid var(--accent-line);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--glow);
    position: relative;
  }
  .diag-center .big {
    font-family: var(--mono);
    font-size: 32px;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: -0.02em;
  }
  .diag-center .big::before { content: "$ "; color: var(--text-3); font-size: 22px; }
  .diag-center .tag {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }
  .diag-center .pipe {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--accent-line);
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.9;
    text-align: center;
  }
  .diag-center .pipe .stage { display: inline-block; }
  .diag-center .pipe .arrow { color: var(--text-3); margin: 0 4px; }

  /* Each service group: stacked nodes under a mono header */
  .diag-group {
    display: grid;
    gap: 6px;
    align-content: start;
  }
  .diag-group .group-head {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 2px 0 4px;
    border-bottom: 1px solid var(--accent-line);
    margin-bottom: 4px;
  }

  .diag-lines { grid-column: 1 / -1; }

  /* features */
  .features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
  }
  .feat {
    background: var(--bg-1);
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 140ms;
  }
  .feat:hover { background: var(--bg-2); }
  .feat .feat-title {
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-1);
    margin: 4px 0 6px;
  }
  .feat .feat-desc {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
  }
  /* Command line at the bottom of each card — small, mono, easy to copy.
     `margin-top: auto` pushes it down so bottoms align across the row;
     `user-select: all` lets triple-click grab the whole command. */
  .feat .feat-tag {
    order: 10;              /* paint last in flex order → visually at bottom */
    margin-top: auto;       /* push against the bottom edge */
    padding-top: 12px;
    border-top: 1px dashed var(--accent-line);
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    user-select: all;       /* triple-click grabs the whole command */
    cursor: text;
  }
  /* "$ " shell prompt rendered as a pseudo-element so it isn't copied;
     clipboard receives just the command text. */
  .feat .feat-tag[data-cmd]::before {
    content: "$ ";
    color: var(--text-3);
    user-select: none;
  }
  .feat .feat-tag::selection { background: var(--accent-soft); color: var(--accent-strong); }

  /* Steps */
  .steps {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .step {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    position: relative;
    display: grid;
    gap: 8px;
  }
  .step .num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-4);
    letter-spacing: 0.1em;
  }
  .step .cmd {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
  }
  .step .cmd::before { content: "$ "; color: var(--text-3); }
  .step .st-title {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-1);
    margin-top: 4px;
  }
  .step .st-desc {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.5;
  }

  /* Install section */
  .install {
    max-width: 860px;
    margin: 0 auto;
  }
  .install .tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
  }
  .install .tab {
    padding: 10px 16px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
  }
  .install .tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }
  .install .codeblock { border-top-left-radius: 0; border-top-right-radius: 0; }

  /* Footer */
  footer {
    padding: 48px 28px 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-1);
  }
  .foot-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    font-size: 13px;
    color: var(--text-3);
  }
  .foot-grid .foot-links { display: flex; gap: 20px; font-family: var(--mono); }
  .foot-grid .foot-links a:hover { color: var(--accent); }

  /* Burger button — hidden on desktop, shown on mobile. Defined BEFORE
     media queries so responsive rules below correctly override display. */
  .burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    margin: 0 2px;
  }
  .burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-2);
    border-radius: 1px;
    margin: 2px 0;
    transition: transform 180ms, opacity 180ms;
  }
  .burger:hover span { background: var(--text-1); }

  /* Responsive */
  @media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    /* Collapse the 3×3 architecture grid into a single column.
       Children still had grid-column/grid-row set from the desktop rule
       and were silently creating implicit columns (and overflowing the
       page), so reset all slot placements to auto. SVG lines won't make
       sense vertically — hide them. */
    .diagram { grid-template-columns: 1fr; grid-template-rows: auto; }
    .diagram > * { grid-column: 1 !important; grid-row: auto !important; }
    .diag-lines { display: none; }
    .diag-right-col { grid-template-columns: 1fr; }
    .hero-title { font-size: 40px; }
    .hero-title .brand { font-size: 36px; }
    .section-title { font-size: 28px; }
  }
  @media (max-width: 600px) {
    .steps { grid-template-columns: 1fr; }
    .hero { padding: 32px 20px 48px; }
    .section { padding: 56px 20px; }
    .hero-title { font-size: 28px; line-height: 1.1; }
    .hero-title .brand { font-size: 28px; }
    .section-title { font-size: 22px; }
    .hero-lede { font-size: 15px; }
    .hero-left { max-width: 100%; }
    .hero-mark { max-width: 280px; }
    /* Topbar: hide the "/ maintainer-assistant" slash at very narrow widths
       so the logo + wordmark + burger + lang pill fit in 360–400px viewports. */
    .wordmark .slash { display: none; }
    /* Long code in the install section needs horizontal scroll rather
       than pushing page width. */
    .codeblock { overflow-x: auto; }
    .codeblock .cb-body { min-width: 0; }
    /* Burger-driven mobile nav: stack nav-links as a drop-down panel
       under the topbar when #topbar has the `open` class. */
    .burger { display: flex; }
    .topbar { position: relative; flex-wrap: wrap; }
    .nav-links {
      display: none;
      order: 99;
      flex-basis: 100%;
      flex-direction: column;
      gap: 2px;
      padding: 8px 12px 12px;
      border-top: 1px solid var(--border);
      margin: 0 -20px 0 -12px;   /* break out of topbar's own padding */
      background: var(--bg-1);
    }
    .nav-links a {
      padding: 10px 14px;
      border-radius: 4px;
      font-size: 14px;
    }
    .topbar.open .nav-links { display: flex; }
    .topbar.open .burger .b1 { transform: translateY(6px) rotate(45deg); }
    .topbar.open .burger .b2 { opacity: 0; }
    .topbar.open .burger .b3 { transform: translateY(-6px) rotate(-45deg); }
  }
  /* Page-level safety net — prevents any stray overflow from scrolling
     the whole body horizontally on narrow viewports. */
  html, body { overflow-x: hidden; }
