/* omit. The page is a diff: red is what gets cut, green is what stays. */

@font-face { font-family: "Geist"; src: url(/fonts/geist.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist-mono.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #f2f0ea;
  --ink: #15171a;
  --muted: #565c64;
  --line: #dcd8cf;
  --red: #c41f2b;
  --green: #17722f;
  --amber: #8a5a00;
  --del-bg: #ffe8e5;
  --add-bg: #ddf4e2;
  --slab-red: #cf222e;
  --slab-green: #1a7f37;
  --term-bg: #111316;
  --term-line: #111316;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0b0c0e;
    --surface: #131518;
    --ink: #eceef1;
    --muted: #9ba2ab;
    --line: #272a30;
    --red: #ff7b72;
    --green: #56d364;
    --amber: #e3b341;
    --del-bg: #da363329;
    --add-bg: #2386362e;
    --slab-red: #cf222e;
    --slab-green: #238636;
    --term-bg: #131518;
    --term-line: #2a2e34;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0c0e;
  --surface: #131518;
  --ink: #eceef1;
  --muted: #9ba2ab;
  --line: #272a30;
  --red: #ff7b72;
  --green: #56d364;
  --amber: #e3b341;
  --del-bg: #da363329;
  --add-bg: #2386362e;
  --slab-red: #cf222e;
  --slab-green: #238636;
  --term-bg: #131518;
  --term-line: #2a2e34;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
code, pre { font-family: var(--mono); }
p > code, li > code, dd > code, figcaption > code { font-size: .9em; padding: .1em .35em; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); }
.band p > code, .band li > code, .band dd > code { background: var(--bg); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 6px; }
.skip:focus { top: 12px; }

/* Bar */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.mark { display: block; flex: none; line-height: 0; border-radius: 6px; }
.mark svg { height: 28px; width: auto; }
.lg-red { fill: var(--slab-red); }
.lg-green { fill: var(--slab-green); }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: .9rem; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 0; }
.nav a:hover { color: var(--ink); }
.chip { font: 500 .78rem var(--mono); text-decoration: none; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.theme { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
.theme:hover { border-color: var(--ink); }
.theme svg { width: 16px; height: 16px; }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 112px); }
.eyebrow, .hunk { font: 500 .8rem/1.4 var(--mono); color: var(--muted); letter-spacing: .01em; }
.headline { margin-top: 22px; font: 600 clamp(1.4rem, 6.3vw, 4.9rem)/1.1 var(--mono); letter-spacing: -.045em; }
.row { display: flex; text-decoration: none; }
.row > span:last-child { padding: .32em .4em .34em .45em; min-width: 0; }
.sign { flex: none; width: 1.5em; display: grid; place-items: center; font-weight: 500; }
.row-del { background: var(--slab-red); color: #fff; border-radius: .22em .22em 0 0; }
.row-del .sign { background: #0003; border-radius: .22em 0 0 0; }
.row-del s { position: relative; text-decoration: none; }
.row-del s::after { content: ''; position: absolute; left: -.06em; right: -.06em; top: 54%; height: .09em; background: #fff; transform-origin: left; }
.row-add { background: var(--add-bg); color: var(--ink); border-radius: 0 0 .22em .22em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--slab-green) 35%, transparent); }
.row-add .sign { background: var(--slab-green); color: #fff; border-radius: 0 0 0 .22em; }
.credit { margin-top: 14px; font: 400 .85rem var(--mono); color: var(--muted); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(40px, 6vw, 72px); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; letter-spacing: -.01em; }
.hero-copy .cmd { margin-top: 28px; max-width: 460px; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 18px; }
.btn { display: inline-block; padding: 11px 18px; background: var(--ink); color: var(--bg); border-radius: 8px; font-weight: 500; text-decoration: none; }
.btn:hover { background: var(--slab-red); color: #fff; }
.link { font-weight: 500; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; font: 400 .8rem var(--mono); color: var(--muted); }
.facts li::before { content: '+ '; color: var(--green); }

/* Command line with copy */
.cmd { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.band .cmd { background: var(--bg); }
.cmd + .cmd { margin-top: 8px; }
.cmd code { flex: 1; min-width: 0; padding: 11px 14px; font-size: .88rem; overflow-x: auto; white-space: nowrap; }
.cmd code::before { content: '$ '; color: var(--muted); }
.cmd-slash code::before { content: none; }
.mark img { display: block; }
.cmd button { flex: none; min-width: 68px; padding: 0 14px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); font: 500 .78rem var(--mono); cursor: pointer; }
.cmd button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* Terminal */
.term { min-width: 0; border-radius: 12px; background: var(--term-bg); border: 1px solid var(--term-line); color: #d7dbe0; overflow: hidden; }
.term figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #ffffff17; font: 400 .76rem/1.4 var(--mono); color: #9ba2ab; }
.term figcaption code { padding: 0; border: 0; background: none; color: #d7dbe0; font-size: 1em; }
.term pre { padding: 16px; font-size: .8rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.term pre:focus-visible { outline-offset: -3px; }
.t-cmd { color: #fff; font-weight: 600; }
.t-bad { color: #ff8b82; }
.t-ok { color: #56d364; }
.t-warn { color: #e3b341; }
.stat { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.stat b { font-weight: 600; margin-right: 4px; }
.stat .add { color: #56d364; }
.stat .del { color: #ff8b82; }
.stat i { width: 9px; height: 9px; border-radius: 2px; background: #da3633; }
.hero-term { box-shadow: 0 24px 60px -30px #0009; }
.stack { display: grid; gap: 12px; min-width: 0; }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.wrap.section { border-top: 1px solid var(--line); }
.band { background: var(--surface); border-top: 1px solid var(--line); }
.head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.head h2 { margin-top: 14px; font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
.head h2 + p { margin-top: 18px; color: var(--muted); font-size: 1.1rem; max-width: 62ch; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.02em; font-weight: 600; }
.aside { margin-top: 28px; color: var(--muted); font-size: .97rem; max-width: 78ch; }

.tag { display: inline-block; margin-bottom: 14px; padding: 3px 9px; border-radius: 999px; font: 500 .72rem/1.5 var(--mono); border: 1px solid var(--ink); }
.tag-all { background: var(--ink); color: var(--bg); }

/* Refusals */
.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-block: clamp(32px, 4vw, 52px); border-top: 1px solid var(--line); }
.case:last-child { padding-bottom: 0; }
.case-copy h3 { font-size: clamp(1.35rem, 2.3vw, 1.75rem); }
.case-copy p:not(.tag) { margin-top: 14px; color: var(--muted); }

/* Safety / editorial */
.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.half { padding: clamp(22px, 3vw, 34px); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.half h3 { font-size: 1.6rem; }
.half ul { margin-top: 16px; }
.half li { padding: 9px 0 9px 22px; border-top: 1px solid var(--line); position: relative; }
.half li::before { content: '−'; position: absolute; left: 2px; color: var(--red); font-family: var(--mono); font-weight: 600; }
.half-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.modes div { padding-top: 14px; border-top: 2px solid var(--ink); }
.modes dt { font: 600 .95rem var(--mono); }
.modes dt span { margin-left: 6px; font-weight: 400; font-size: .75rem; color: var(--muted); }
.modes dd { margin-top: 6px; color: var(--muted); font-size: .95rem; }

/* Discipline */
.triad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3.5vw, 48px); }
.triad h3 span { display: block; margin-bottom: 6px; font: 500 .75rem var(--mono); letter-spacing: 0; color: var(--muted); }
.triad h3.sub { margin-top: 30px; }
.triad p { margin-top: 12px; color: var(--muted); }
.rungs { margin-top: 18px; counter-reset: rung; border-radius: 10px; overflow: hidden; font-size: .95rem; }
.rungs li { counter-increment: rung; display: block; padding: 9px 12px 9px 50px; position: relative; background: var(--del-bg); border-bottom: 1px solid var(--bg); }
.rungs li::before { content: '− ' counter(rung); position: absolute; left: 0; top: 0; bottom: 0; width: 40px; display: grid; place-items: center; font: 600 .78rem var(--mono); color: var(--red); background: color-mix(in srgb, var(--slab-red) 14%, transparent); }
.rungs li.keep, .kept li { background: var(--add-bg); }
.rungs li.keep::before { content: '+ ' counter(rung); color: var(--green); background: color-mix(in srgb, var(--slab-green) 18%, transparent); }
.kept { margin-top: 14px; border-radius: 10px; overflow: hidden; font-size: .95rem; }
.kept li { padding: 9px 12px 9px 50px; position: relative; border-bottom: 1px solid var(--bg); }
.kept li::before { content: '+'; position: absolute; left: 0; top: 0; bottom: 0; width: 40px; display: grid; place-items: center; font: 600 .78rem var(--mono); color: var(--green); background: color-mix(in srgb, var(--slab-green) 18%, transparent); }
.mini { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .8rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* CI */
.ci-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.points li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); }
.points li:first-child { padding-top: 0; border-top: 0; }
.points b, .limits b { color: var(--ink); font-weight: 600; }

/* Limits */
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 64px); }
.limits li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); }
.limits b { display: block; margin-bottom: 4px; }

/* Install */
.steps { counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 64px minmax(0, 1fr); padding-block: 28px; border-top: 1px solid var(--line); }
.steps > li::before { content: counter(step, decimal-leading-zero); font: 500 .85rem/2.1 var(--mono); color: var(--muted); }
.steps > li > * { grid-column: 2; }
.steps > li > p { margin-top: 6px; color: var(--muted); }
.steps > li > .cmd { margin-top: 14px; max-width: 460px; }
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.agents > div { padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.agents .cmd { background: var(--surface); }
.agents h4 { font-size: 1.02rem; font-weight: 600; }
.agents p { margin: 4px 0 14px; color: var(--muted); font-size: .95rem; }

/* Docs */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.docs a { display: block; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color .15s, transform .15s; }
.docs a:hover { color: inherit; border-color: var(--ink); transform: translateY(-2px); }
.docs b { display: block; font-weight: 600; }
.docs b::after { content: ' →'; color: var(--red); }
.docs span { display: block; margin-top: 4px; color: var(--muted); font-size: .93rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 32px; font-size: .9rem; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.foot p { font-family: var(--mono); font-size: .82rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Notes pages */
.note { max-width: 780px; padding-block: clamp(36px, 6vw, 72px); }
.note-back { font: 500 .82rem var(--mono); color: var(--muted); text-decoration: none; }
.note h1 { margin: 22px 0 14px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; }
.pin { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-radius: 8px; background: var(--add-bg); font: 400 .8rem/1.5 var(--mono); }
.note article { margin-top: 32px; }
.note article > * + * { margin-top: 1em; }
.note article h1 { font-size: 1.9rem; }
.note article h2 { margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--line); font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; }
.note article h3 { margin-top: 1.8em; font-size: 1.15rem; }
.note article ul, .note article ol { padding-left: 1.3em; }
.note article ul { list-style: disc; }
.note article ol { list-style: decimal; }
.note article li + li { margin-top: .4em; }
.note article a { color: var(--red); }
.note article pre { padding: 14px 16px; border-radius: 10px; background: var(--term-bg); border: 1px solid var(--term-line); color: #d7dbe0; font-size: .8rem; line-height: 1.65; overflow-x: auto; }
.note article pre code { padding: 0; border: 0; background: none; font-size: 1em; }
.note article blockquote { margin: 1em 0 0; padding-left: 16px; border-left: 3px solid var(--slab-red); color: var(--muted); }
.note article table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .93rem; }
.note article th, .note article td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.note article td code, .note article th code { font-size: .88em; }
.note article img { max-width: 100%; height: auto; }
.note article svg { width: 16px; height: 16px; }
.pl-c { color: #8b949e; }
.pl-k, .pl-ent { color: #ff8b82; }
.pl-s, .pl-pds { color: #a5d6ff; }
.pl-c1, .pl-en, .pl-v { color: #79c0ff; }
.note-src { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .93rem; color: var(--muted); }

/* Small screens */
@media (max-width: 900px) {
  .nav { display: none; }
  .chip { margin-left: auto; }
  .hero-grid, .case, .ci-grid, .triad, .limits { grid-template-columns: minmax(0, 1fr); }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .wrap { width: min(1140px, 100% - 32px); }
  .halves, .agents { grid-template-columns: minmax(0, 1fr); }
  .steps > li { grid-template-columns: 40px minmax(0, 1fr); }
  .term pre { font-size: .74rem; padding: 14px; }
}

/* Motion: one strike across "words", once. */
@media (prefers-reduced-motion: no-preference) {
  .row-del s::after { animation: strike .55s .35s cubic-bezier(.6, 0, .2, 1) both; }
  @keyframes strike { from { transform: scaleX(0); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .docs a { transition: none; }
}
