:root {
  --ink:      #14161d;
  --ink-2:    #1a1d27;
  --ink-3:    #21252f;
  --paper:    #f4f5f8;
  --paper-2:  #ffffff;
  --line-d:   #2b2f3b;
  --line-l:   #e3e5ec;
  --fg-d:     #e8eaf1;
  --fg-l:     #1a1d27;
  --muted-d:  #969cae;
  --muted-l:  #59606f;
  --signal-d: #d98f66;
  --signal-l: #a4512a;
  --wire:     #c88a2c;
  --sock-d:   #98a3ec;
  --sock-l:   #5661b8;
  /* the agent's colour on the page (tackle's wire): the agent panel and its cards */
  --agent-d:  #eba63f;
  --agent-l:  #b06f14;
  /* text on a signal fill: the ink belongs to the fill */
  --signal-ink-d: #14161d;
  --signal-ink-l: #ffffff;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 60rem;
  --radius: 12px;
  --danger-d: #e5484d;
  --danger-l: #c22a2a;

  --bg: var(--ink); --surface: var(--ink-2); --surface-2: var(--ink-3);
  --text: var(--fg-d); --muted: var(--muted-d); --line: var(--line-d);
  --signal: var(--signal-d); --signal-soft: rgba(217,143,102,.12); --sock: var(--sock-d);
  --danger: var(--danger-d); --agent: var(--agent-d); --signal-ink: var(--signal-ink-d);
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 18px 40px -24px rgba(0,0,0,.7);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--paper); --surface: var(--paper-2); --surface-2: #eef0f4;
    --text: var(--fg-l); --muted: var(--muted-l); --line: var(--line-l);
    --signal: var(--signal-l); --signal-soft: rgba(164,81,42,.10); --sock: var(--sock-l);
    --danger: var(--danger-l); --agent: var(--agent-l); --signal-ink: var(--signal-ink-l);
    --shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 40px -28px rgba(20,22,29,.28);
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink); --surface: var(--ink-2); --surface-2: var(--ink-3);
  --text: var(--fg-d); --muted: var(--muted-d); --line: var(--line-d);
  --signal: var(--signal-d); --signal-soft: rgba(217,143,102,.12); --sock: var(--sock-d);
  --danger: var(--danger-d); --agent: var(--agent-d); --signal-ink: var(--signal-ink-d);
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 18px 40px -24px rgba(0,0,0,.7);
}
:root[data-theme="light"] {
  --bg: var(--paper); --surface: var(--paper-2); --surface-2: #eef0f4;
  --text: var(--fg-l); --muted: var(--muted-l); --line: var(--line-l);
  --signal: var(--signal-l); --signal-soft: rgba(164,81,42,.10); --sock: var(--sock-l);
  --danger: var(--danger-l); --agent: var(--agent-l); --signal-ink: var(--signal-ink-l);
  --shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 40px -28px rgba(20,22,29,.28);
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.62; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--signal); }

.statusbar { border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.statusbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; padding: .85rem 1.5rem; }
.statusbar b { color: var(--text); font-weight: 600; }
.statusbar .dot { color: var(--signal); }
.statusbar a { color: inherit; text-decoration: none; }
.statusbar a:hover { color: var(--signal); }
.theme-toggle { font: inherit; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: .25rem .6rem; cursor: pointer; letter-spacing: .1em; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }

/* statusbar cross-page nav: brand plus page links, left-adjacent */
.sb-left { display: flex; align-items: center; gap: 1.15rem; min-width: 0; }
.sb-brand { display: inline-flex; align-items: center; gap: .35em; flex-shrink: 0; }
.sb-nav { display: flex; align-items: center; gap: .95rem; }
.sb-nav a { color: var(--muted); text-decoration: none; }
.sb-nav a:hover, .sb-nav a:focus-visible { color: var(--text); text-decoration: underline; }
.sb-nav a.active { color: var(--text); }
.sb-meta { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.sb-family { color: var(--muted); text-decoration: none; white-space: nowrap; }
.sb-family:hover, .sb-family:focus-visible { color: var(--signal); }
@media (max-width: 30rem) {
  .sb-meta-text { display: none; }
  .sb-nav { gap: .7rem; }
}

.hero { padding: clamp(3.25rem, 8vw, 5.5rem) 0 2.5rem; }
.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--signal); margin: 0 0 1.3rem; }
.wordmark { font-family: var(--mono); font-weight: 600; font-size: clamp(2.5rem, 8vw, 4.2rem); letter-spacing: -.02em; margin: 0; line-height: 1; display: flex; align-items: center; gap: .14em; }
/* The caret, sized to the wordmark's own font-size rather than a fixed
   pixel value, so it scales with the clamp() above instead of drifting from
   the text beside it at the viewport's extremes. */
.wordmark .mark { flex: none; width: .82em; height: .82em; }
.wordmark .cursor { display: inline-block; width: .56ch; height: .88em; margin-left: .12em; transform: translateY(.06em); background: var(--signal); animation: blink 1.15s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
h1.lede { font-size: clamp(1.6rem, 4.3vw, 2.5rem); line-height: 1.14; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; margin: 1.4rem 0 1rem; max-width: 24ch; }
.sub { font-size: 1.1rem; color: var(--muted); max-width: 62ch; margin: 0 0 2rem; }
.sub b { color: var(--text); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.btn { font-family: var(--mono); font-size: .92rem; text-decoration: none; border-radius: 8px; padding: .7rem 1.15rem; display: inline-flex; align-items: center; gap: .5rem; border: 1px solid transparent; transition: transform .12s ease, background .15s ease, border-color .15s ease; }
.btn-primary { background: var(--signal); color: var(--signal-ink); font-weight: 600; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); background: var(--surface); }
.btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.term { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hero .term { margin-top: 3rem; }
.term-bar { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.term-bar .lamp { width: .6rem; height: .6rem; border-radius: 50%; background: var(--line); }
.term-bar .lamp:nth-child(3) { background: var(--signal); }
.term-bar .title { margin-left: auto; letter-spacing: .04em; }
.term pre { margin: 0; padding: 1.1rem 1.25rem 1.3rem; overflow-x: auto; font-family: var(--mono); font-size: .84rem; line-height: 1.7; color: var(--text); font-variant-numeric: tabular-nums; }
.c-dim { color: var(--muted); } .c-sig { color: var(--signal); font-weight: 600; } .c-you { color: var(--wire); }
.c-bad { color: var(--danger); font-weight: 600; }
.live, .mail { color: var(--signal); } .mail { font-weight: 600; }
.pulse { display: inline-block; animation: pulse 1.9s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

section { padding: clamp(2.75rem, 6.5vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
.kicker::before { content: "$ "; color: var(--signal); }
h2 { font-size: clamp(1.4rem, 3.3vw, 1.95rem); letter-spacing: -.015em; line-height: 1.16; margin: 0 0 1rem; text-wrap: balance; }
h3.subhead { font-size: 1.05rem; margin: 2rem 0 .75rem; letter-spacing: -.01em; }
.lead { font-size: 1.06rem; color: var(--muted); max-width: 64ch; margin: 0 0 1.75rem; }
.lead b { color: var(--text); font-weight: 600; }
code.i, .lead code, .note code, .row .d code, .adr .d code { font-family: var(--mono); font-size: .86em; background: var(--surface); border: 1px solid var(--line); padding: .05em .38em; border-radius: 5px; color: var(--text); }

.modes { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 44rem) { .modes { grid-template-columns: repeat(3,1fr); } }
.mode { background: var(--bg); padding: 1.3rem 1.3rem; }
.mode .t { font-family: var(--mono); color: var(--signal); font-size: .82rem; letter-spacing: .04em; margin: 0 0 .5rem; }
.mode p { margin: 0; color: var(--muted); font-size: .95rem; }
.mode p b { color: var(--text); font-weight: 600; }

.toolgroups { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 44rem) { .toolgroups { grid-template-columns: 1fr 1fr; } }
.tg { background: var(--bg); padding: 1.3rem 1.3rem; }
.tg h3 { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin: 0 0 .6rem; }
.tg code { font-family: var(--mono); font-size: .82rem; color: var(--text); }
.tg p { margin: .45rem 0 0; color: var(--muted); font-size: .93rem; }
.tg p b { color: var(--text); font-weight: 600; }
.lifecycle { font-family: var(--mono); font-size: .78rem; color: var(--muted); display: block; margin-top: .5rem; }
.lifecycle b { color: var(--signal); font-weight: 600; }

/* addressing rows */
.adr { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.adr .row2 { display: grid; grid-template-columns: 1fr; gap: .25rem; padding: 1.1rem 1.25rem; }
@media (min-width: 44rem) { .adr .row2 { grid-template-columns: 11rem 1fr; gap: 1.3rem; align-items: baseline; } }
.adr .row2 + .row2 { border-top: 1px solid var(--line); }
.adr .k { font-family: var(--mono); font-size: .82rem; color: var(--signal); }
.adr .d { color: var(--text); font-size: .96rem; }
.adr .d .m { color: var(--muted); }

/* CLI reference - same row2 layout as addressing rows, wider key column
   for full command signatures */
.cliref .row2 { grid-template-columns: 1fr; }
@media (min-width: 44rem) { .cliref .row2 { grid-template-columns: 15rem 1fr; } }
.cliref .k { font-size: .8rem; }

.tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1.5rem; }
.tab { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--line); border-radius: 7px; padding: .42rem .7rem; color: var(--muted); background: var(--surface); }
.tab.sig { border-color: var(--signal); color: var(--text); }
.tab.sig b { color: var(--signal); }

.rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 1fr; gap: .3rem; padding: 1.2rem 1.3rem; }
@media (min-width: 44rem) { .row { grid-template-columns: 8rem 1fr; gap: 1.4rem; align-items: baseline; } }
.row + .row { border-top: 1px solid var(--line); }
.row .k { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); }
.row .d { color: var(--text); font-size: .98rem; }
.row .d b { font-weight: 600; }
.row .d .m { color: var(--muted); }
.note { margin: 1.5rem 0 0; font-size: .98rem; color: var(--muted); max-width: 66ch; }
.note b { color: var(--text); font-weight: 600; }

pre.code { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.3rem; overflow-x: auto; font-family: var(--mono); font-size: .85rem; line-height: 1.8; margin: 0; color: var(--text); box-shadow: var(--shadow); }
pre.code .cm { color: var(--muted); } pre.code .pr { color: var(--signal); } pre.code .k2 { color: var(--wire); }
.codegap { margin-top: 1rem; }
/* .note carries no bottom margin, so prose following one used to butt up
   against it. No existing page put anything after a note; the hosted page
   does. Additive, so nothing that already renders correctly moves. */
.note + .note, .note + .lead, .note + p { margin-top: 1.5rem; }

footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.foot a:hover { color: var(--signal); border-bottom-color: var(--signal); }
.foot .mm { color: var(--text); font-weight: 600; }



/* index link cards - a grid of anchors out to the specific pages. Same
   hairline-grid construction as .toolgroups, but each cell is a link with a
   trailing arrow that slides on hover. */
.cards { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 44rem) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--bg); padding: 1.4rem 1.4rem; text-decoration: none; color: inherit; display: block; transition: background .15s ease; }
.card:hover, .card:focus-visible { background: var(--surface); outline: none; }
.card h3 { font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin: 0 0 .55rem; display: flex; align-items: baseline; gap: .5rem; }
.card h3 .arrow { margin-left: auto; color: var(--muted); transition: transform .15s ease, color .15s ease; }
.card:hover h3 .arrow, .card:focus-visible h3 .arrow { color: var(--signal); transform: translateX(3px); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card p b { color: var(--text); font-weight: 600; }

/* self-hosted demo video - same shell as .term (border, radius, shadow), with
   a caption strip beneath. The <video> carries a poster so first paint and
   reduced-motion show a still frame; preload="none" keeps the page light. */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hero .demo { margin-top: 3rem; }
.demo video { display: block; width: 100%; height: auto; background: var(--surface-2); }
.demo-cap { font-family: var(--mono); font-size: .8rem; color: var(--muted); padding: .85rem 1.25rem; border-top: 1px solid var(--line); }
.demo-cap b { color: var(--signal); font-weight: 600; }

/* the product name, when it appears in prose - echoes the wordmark */
.mstr { font-family: var(--mono); color: var(--signal); font-weight: 600; font-size: .94em; letter-spacing: -.01em; }

/* left TOC - shown only when the viewport has room beside the column */
html { scroll-behavior: smooth; }
section, header.hero { scroll-margin-top: 1.25rem; }
.toc { display: none; }
@media (min-width: 84rem) {
  .toc {
    display: block; position: fixed; top: 19.5rem;
    left: calc((100vw - var(--maxw)) / 2 - 11.5rem); width: 9.5rem;
    font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  }
  .toc a {
    display: block; padding: .28rem 0 .28rem .75rem; color: var(--muted);
    text-decoration: none; border-left: 2px solid var(--line);
  }
  .toc a:hover { color: var(--text); }
  .toc a.active { color: var(--signal); border-left-color: var(--signal); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (prefers-reduced-motion: reduce) { .wordmark .cursor, .pulse { animation: none; } .btn { transition: none; } }

/* reference tables: plain hairline tables for fields, operators, states */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.ref { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.ref th { text-align: left; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: .7rem 1rem; font-weight: 600; }
table.ref td { padding: .7rem 1rem; border-top: 1px solid var(--line); vertical-align: top; color: var(--text); }
table.ref td:first-child { font-family: var(--mono); font-size: .84rem; color: var(--signal); white-space: nowrap; }
table.ref td code { font-family: var(--mono); font-size: .86em; }
table.ref td .m { color: var(--muted); }
.tbl-wrap + .note, .tbl-wrap + p { margin-top: 1.25rem; }

/* keyboard keys */
kbd { font-family: var(--mono); font-size: .82em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; background: var(--surface); color: var(--text); white-space: nowrap; }

/* page screenshots: a light and a dark capture of the same view; the one
   matching the current theme shows. Hidden images with loading="lazy" are
   never fetched, so each visitor downloads one of the pair. */
.shot { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-family: var(--mono); font-size: .8rem; color: var(--muted); padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
.shot .on-l { display: none; }
@media (prefers-color-scheme: light) { .shot .on-d { display: none; } .shot .on-l { display: block; } }
:root[data-theme="dark"] .shot .on-d { display: block; }
:root[data-theme="dark"] .shot .on-l { display: none; }
:root[data-theme="light"] .shot .on-d { display: none; }
:root[data-theme="light"] .shot .on-l { display: block; }

/* the four parts of the page: a heading line, then its screenshot */
.part + .part { margin-top: 3rem; }
.part h3 { font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin: 0 0 .45rem; }
.part p { margin: 0 0 1.1rem; color: var(--muted); max-width: 64ch; }
.part p b { color: var(--text); font-weight: 600; }
.part.side { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 44rem) { .part.side { grid-template-columns: 1fr 16rem; gap: 2.5rem; } }
.part.side .shot { max-width: 22rem; justify-self: center; }

/* the three ideas: numbered mode cells */
.mode .n { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin: 0 0 .35rem; }

/* agent cards on the landing page use the agent colour (tackle's wire) */
.tg.agent h3 { color: var(--agent); }

/* prose sections in the docs and guide pages */
.prose p { max-width: 66ch; }
.prose p + pre.code, .prose pre.code + p, .prose pre.code + .note { margin-top: 1rem; }
.prose h3.subhead:first-of-type { margin-top: 1.5rem; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.4rem; margin: 0 0 .8rem; max-width: 64ch; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.6rem; height: 1.6rem; border: 1px solid var(--line); border-radius: 50%; font-family: var(--mono); font-size: .78rem; display: flex; align-items: center; justify-content: center; color: var(--signal); }
ul.plain { margin: 0 0 1.25rem; padding-left: 1.2rem; max-width: 64ch; }
ul.plain li { margin: .3rem 0; }
ul.plain li::marker { color: var(--signal); }

/* inline code in prose, lists, cells and cards: the same chip as .lead code */
.sub code, .prose p code, .prose li code, .part p code, .mode p code, .tg p code, .card p code, .steps code, ul.plain code, table.ref td:not(:first-child) code, .demo-cap code {
  font-family: var(--mono); font-size: .86em; background: var(--surface); border: 1px solid var(--line); padding: .05em .38em; border-radius: 5px; color: var(--text);
}

/* screenshots inside prose and list sections get room on both sides */
section .wrap > .shot { margin: 1.75rem 0; }
.part .shot { margin: 0; }
.nw { white-space: nowrap; }
pre.code.codegap { margin-top: 1rem; }
table.ref td code { white-space: nowrap; }
table.ref.cmds td code { white-space: normal; }

/* six page links: let the statusbar nav wrap on a phone rather than overflow */
@media (max-width: 30rem) {
  .sb-left { flex-wrap: wrap; gap: .45rem 1rem; }
  .sb-nav { flex-wrap: wrap; gap: .35rem .8rem; }
}
h2 code { font-size: .88em; overflow-wrap: anywhere; }
@media (max-width: 44rem) { table.ref td:first-child { white-space: normal; overflow-wrap: anywhere; } }
