@import url("tokens.css");

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { max-width: 100%; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.hero .wrap > *, .feature > *, .gate > *, .tab-body > *, .steps-any > * { min-width: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
code, .mono { font-family: var(--mono); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }

/* nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule-soft); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.mark { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.mark b { display: grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 6px; font-family: var(--display); font-size: 18px; font-weight: 600; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 14.5px; }
.nav ul a { color: var(--ink-soft); text-decoration: none; }
.nav ul a:hover { color: var(--cobalt); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; font: 500 15px/1 var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--cobalt); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* hero */
.hero { padding-block: 72px 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.kicker { font-family: var(--display); font-style: italic; font-size: 19px; color: var(--cobalt); }
.hero h1 { font-size: clamp(40px, 4.8vw, 62px); line-height: 1.04; margin-top: 18px; }
.hero h1 em { font-style: italic; color: var(--cobalt); }
.lede { font-size: 19px; color: var(--ink-soft); margin-top: 24px; max-width: 34em; }
.cmd { display: flex; align-items: center; gap: 12px; margin-top: 32px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 12px 12px 16px; max-width: 560px; }
.cmd code { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); overflow-x: auto; white-space: nowrap; }
.cmd code span { color: var(--mute); }
.copy { flex: none; font: 500 13px var(--body); padding: 7px 12px; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft); cursor: pointer; }
.copy:hover { border-color: var(--cobalt); color: var(--cobalt); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font-size: 14px; color: var(--mute); }
.facts span::before { content: "✓ "; color: var(--ok); }

/* the spec sheet */
.sheet { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 1px 0 var(--rule-soft), 0 18px 40px -24px rgba(23, 33, 44, .35); font-size: 14px; min-width: 0; }
.sheet::after { content: ""; position: absolute; inset: 8px -8px -8px 8px; border: 1px solid var(--rule); border-radius: 4px; z-index: -1; background: var(--sheet); }
.tb { display: grid; grid-template-columns: 1.4fr 1fr 1fr; border-bottom: 1px solid var(--rule); }
.tb div { padding: 10px 14px; border-right: 1px solid var(--rule); min-width: 0; }
.tb div:last-child { border-right: 0; }
.tb small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.tb b { font-family: var(--mono); font-weight: 500; font-size: 13px; overflow-wrap: anywhere; }
.sheet-body { padding: 18px 20px 22px; display: grid; gap: 16px; }
.goal { font-family: var(--display); font-size: 20px; line-height: 1.35; }
.field { display: grid; gap: 6px; }
.field > .label { font-size: 11px; }
.fact { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; border-bottom: 1px dashed var(--rule-soft); padding-bottom: 6px; }
.fact span { color: var(--ink-soft); min-width: 0; }
.fact code { flex: none; font-size: 12px; color: var(--cobalt); background: var(--cobalt-wash); padding: 2px 6px; border-radius: 4px; }
.done { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--ink-soft); }
.done li::before { content: "☐"; font-family: var(--mono); color: var(--mute); margin-right: 8px; }
.stamp { position: absolute; right: 18px; bottom: 22px; transform: rotate(-8deg); border: 2.5px solid var(--ok); color: var(--ok); border-radius: 8px; padding: 6px 12px 5px; font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-align: center; line-height: 1.25; background: color-mix(in srgb, var(--sheet) 70%, transparent); animation: press .5s .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.stamp small { display: block; font-size: 9.5px; letter-spacing: .1em; font-weight: 500; }
@keyframes press { from { transform: rotate(-8deg) scale(1.25); } to { transform: rotate(-8deg) scale(1); } }

/* ticker strip */
.strip { border-block: 1px solid var(--rule); background: var(--sheet); }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; padding-block: 16px; font-family: var(--mono); font-size: 13px; color: var(--mute); }
.strip b { color: var(--ink); font-weight: 500; }

/* sections */
section { padding-block: 88px; }
section + section { border-top: 1px solid var(--rule-soft); }
.clause { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 32px; margin-bottom: 44px; }
.clause .no { font-family: var(--display); font-size: 56px; line-height: .9; color: var(--rule); font-weight: 400; }
.clause .no i { font-style: normal; font-size: 32px; vertical-align: top; margin-right: 2px; }
.clause h2 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; }
.clause p { margin-top: 16px; font-size: 18px; color: var(--ink-soft); max-width: 38em; }
.body-grid { margin-left: 152px; }

/* problems */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.three div { padding: 22px 28px 4px 0; }
.three div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.three h3 { font-size: 24px; }
.three p { margin-top: 10px; color: var(--ink-soft); font-size: 16px; }

/* loop */
.loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.step { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 20px 18px 18px; display: grid; gap: 10px; align-content: start; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -13px; left: 16px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 13px var(--mono); }
.step:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 50%; transform: translate(50%, -50%); color: var(--mute); font-family: var(--mono); z-index: 1; }
.step h3 { font-family: var(--mono); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.step p { font-size: 15px; color: var(--ink-soft); }
.step .out { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--rule); font-family: var(--mono); font-size: 12.5px; color: var(--cobalt); }
.record { margin-top: 26px; display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.record .cap { display: grid; align-content: center; padding-right: 8px; font-size: 14px; color: var(--mute); max-width: 150px; }
.record .cap b { color: var(--ink); font-weight: 600; display: block; }
.rec { border: 1px dashed var(--mute); border-radius: 6px; padding: 14px 16px; }
.rec code { font-weight: 600; font-size: 14px; }
.rec p { font-size: 14.5px; color: var(--ink-soft); margin-top: 4px; }

/* two-column feature */
.feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.points { display: grid; gap: 0; }
.points div { padding-block: 18px; border-top: 1px solid var(--rule); }
.points h3 { font-family: var(--body); font-size: 16px; font-weight: 600; }
.points p { font-size: 15.5px; color: var(--ink-soft); margin-top: 4px; }

/* panels */
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.panel-head .dots { display: flex; gap: 5px; }
.panel-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.panel-head .pill { margin-left: auto; }
.pill { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; }
.pill.ok { color: var(--ok); background: var(--ok-wash); }
.pill.warn { color: var(--warn); background: var(--warn-wash); }
.pill.stop { color: var(--stop); background: var(--stop-wash); }
.panel-body { padding: 18px; display: grid; gap: 14px; font-size: 14.5px; }
.lines { font-family: var(--mono); font-size: 13px; display: grid; gap: 4px; overflow-x: auto; }
.lines div { white-space: nowrap; }
.lines .y { color: var(--ok); }
.lines .n { color: var(--stop); }
.lines .m { color: var(--mute); }
.verdict { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--warn); border-radius: 6px; background: var(--warn-wash); }
.verdict b { font-family: var(--mono); font-size: 15px; letter-spacing: .08em; color: var(--warn); }
.verdict span { color: var(--ink-soft); font-size: 14px; }
.finding { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding-top: 12px; border-top: 1px solid var(--rule-soft); }
.finding .k { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--warn); padding-top: 2px; }
.finding p { color: var(--ink-soft); }
.finding code { font-size: 12.5px; color: var(--cobalt); }

pre.yaml { margin: 0; padding: 18px 20px; font: 13.5px/1.65 var(--mono); overflow-x: auto; color: var(--ink); }
pre.yaml .k { color: var(--cobalt); }
pre.yaml .s { color: var(--ok); }
pre.yaml .c { color: var(--mute); }
.note { position: relative; padding-left: 28px; margin-top: 18px; font-size: 15px; color: var(--ink-soft); }
.note::before { content: "¶"; position: absolute; left: 0; top: -2px; font-family: var(--display); font-size: 24px; line-height: 1; color: var(--cobalt); }

/* gate */
.gate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 14px; align-items: stretch; }
.stage { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--rule-soft); }
.stage:last-child { border-bottom: 0; }
.stage i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font: 700 12px var(--mono); color: var(--sheet); background: var(--ok); }
.stage i.x { background: var(--stop); }
.stage b { font-weight: 600; width: 58px; }
.stage code { font-size: 12.5px; color: var(--mute); min-width: 0; overflow-wrap: anywhere; }
.out-card { border-radius: 8px; padding: 16px 18px; border: 1px solid var(--rule); background: var(--sheet); }
.out-card h3 { font-family: var(--body); font-size: 17px; font-weight: 600; }
.out-card p { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.out-card .pill { display: inline-block; margin-bottom: 8px; }
.outs { display: grid; gap: 14px; }
.ledger { margin-top: 14px; background: var(--night); color: var(--night-fg); border-radius: 8px; padding: 16px 20px; font: 13px/1.6 var(--mono); overflow-x: auto; }
.ledger div { white-space: nowrap; }
.ledger .m { color: var(--night-mute); }
.ledger .ok { color: #7fd19a; }
.ledger .st { color: #f19a90; }

/* agent smith band */
.band { background: var(--night); color: var(--night-fg); padding-block: 84px; }
.band .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.band .label { color: #8fd3a6; }
.band h2 { font-size: clamp(34px, 4vw, 48px); margin-top: 12px; color: #fff; }
.band p { margin-top: 16px; color: var(--night-mute); max-width: 32em; }
.band p strong { color: var(--night-fg); font-weight: 500; }
.band a.more { display: inline-block; margin-top: 22px; color: #a9c0ff; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; border-top: 1px solid #2b3747; }
.stat { padding: 22px 0 20px; border-bottom: 1px solid #2b3747; }
.stat b { display: block; font-family: var(--display); font-weight: 500; font-size: clamp(40px, 4.4vw, 56px); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; font-size: 14.5px; color: var(--night-mute); }
.band small { display: block; margin-top: 14px; font-size: 12.5px; color: #6f7c8c; }

/* install */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); }
.tabs button { font: 500 14.5px var(--body); padding: 10px 16px; border: 0; background: none; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--cobalt); }
.tab-body { padding-top: 20px; display: grid; gap: 14px; }
.skills { width: 100%; border-collapse: collapse; font-size: 15px; }
.skills td { padding: 9px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.skills td:first-child { width: 1%; font-family: var(--mono); font-size: 13.5px; color: var(--cobalt); white-space: nowrap; padding-right: 20px; }
.skills td:last-child { color: var(--ink-soft); }
.tablewrap { overflow-x: auto; }

/* reading */
.reading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.reading a { display: block; text-decoration: none; padding: 20px 22px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); color: var(--ink); }
.reading a:hover { border-color: var(--cobalt); }
.reading .label { font-size: 11px; }
.reading h3 { font-size: 22px; margin-top: 8px; }
.reading p { font-size: 15px; color: var(--ink-soft); margin-top: 6px; }

/* consent banner (rendered only with site.legal; consent.js shows it) */
.consent { position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 20; width: min(440px, calc(100% - 32px)); display: grid; gap: 14px; padding: 20px; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 18px 50px color-mix(in srgb, var(--night) 22%, transparent); animation: consent-in .3s ease-out; }
.consent:focus { outline: none; }
.consent:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.consent h2 { font-size: 21px; line-height: 1.2; }
.consent p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.consent-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-choice { justify-content: center; background: var(--paper); color: var(--ink); border-color: var(--rule); }
.btn-choice:hover { border-color: var(--cobalt); color: var(--cobalt); }
.consent .consent-fine { font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.consent-fine a { color: var(--ink-soft); }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }
@media (max-width: 480px) { .consent { left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); padding: 16px; } }

/* privacy and imprint */
.legal { max-width: 44em; }
.legal h3 { font-size: 22px; margin: 36px 0 10px; }
.legal p, .legal li { font-size: 16px; color: var(--ink-soft); }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 1.2em; }
.legal-address { white-space: pre-line; }

footer { border-top: 1px solid var(--rule); padding-block: 28px 40px; font-size: 14px; color: var(--mute); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--ink-soft); text-decoration: none; }


/* series board */
.board { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 1px 0 var(--rule-soft), 0 24px 50px -30px rgba(23, 33, 44, .45); min-width: 0; overflow: hidden; }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.board-head b { font-family: var(--mono); font-size: 13.5px; font-weight: 600; }
.board-head span { font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.board-head .pill { margin-left: auto; }
.cols, .row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 40px 150px; gap: 10px; gap: 12px; align-items: center; padding: 10px 18px; }
.cols { padding-block: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--rule-soft); }
.cols .stg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; letter-spacing: 0; font-size: 9.5px; }
.row { border-bottom: 1px dashed var(--rule-soft); }
.row .id { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--cobalt); }
.row .t { min-width: 0; }
.row .t b { display: block; font-family: var(--mono); font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t small { font-size: 12px; color: var(--mute); }
.row .lane { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.lane i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--g); }
.g1 { --g: var(--cobalt); } .g2 { --g: var(--ok); } .g3 { --g: var(--warn); }
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.track i { height: 8px; border-radius: 2px; background: var(--rule-soft); transition: background .4s ease; }
.track i.on { background: var(--ok); }
.track i.now { background: var(--cobalt); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.board-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 14px 18px; background: var(--paper); }
.board-foot p { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }
.board-foot p b { color: var(--ink); font-weight: 600; }
.pr { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--rule); color: var(--mute); transition: all .4s ease; }
.pr.open { border-color: var(--ok); color: var(--ok); background: var(--ok-wash); }
.board-note { margin-top: 12px; font-size: 13.5px; color: var(--mute); }

/* six properties */
.six { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.six div { padding: 22px 26px 24px 0; border-bottom: 1px solid var(--rule); }
.six div:not(:nth-child(3n+1)) { padding-left: 26px; border-left: 1px solid var(--rule); }
.six h3 { font-size: 25px; }
.six p { margin-top: 8px; color: var(--ink-soft); font-size: 15.5px; }
.six code { font-size: 13.5px; }
.six .side { color: var(--mute); font-style: italic; font-size: 16px; margin-left: 4px; }

/* spec and verdict side by side */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.pair > * { min-width: 0; }
.three-pts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 36px; }
.three-pts > div { border-top: 1px solid var(--rule); padding-top: 14px; }
.three-pts h3 { font-family: var(--body); font-size: 16px; font-weight: 600; }
.three-pts p { font-size: 15px; color: var(--ink-soft); margin-top: 4px; }

/* other agents */
pre.prompt { margin: 0; padding: 16px 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; font: 13px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-soft); }
.steps-any { display: grid; gap: 22px; counter-reset: a; }
.steps-any > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.steps-any > div::before { counter-increment: a; content: counter(a); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 600 13px var(--mono); }
.steps-any .inner { display: grid; gap: 10px; min-width: 0; }
.steps-any h3 { font-family: var(--body); font-size: 16px; font-weight: 600; }
.steps-any p { color: var(--ink-soft); font-size: 15px; }

@media (max-width: 980px) {
  .hero .wrap, .feature, .band .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .step:nth-child(2)::after { display: none; }
  .record { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .record .cap { grid-column: 1 / -1; max-width: none; }
  .gate, .pair { grid-template-columns: minmax(0, 1fr); }
  .six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .six div:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .six div:nth-child(2n) { padding-left: 22px; border-left: 1px solid var(--rule); }
  .three-pts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .body-grid { margin-left: 0; }
  .clause { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .clause .no { font-size: 40px; }
  .nav ul { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  section { padding-block: 64px; }
  .hero { padding-block: 44px 40px; }
  .three, .loop, .record, .reading, .stats, .six { grid-template-columns: minmax(0, 1fr); }
  .six div:nth-child(2n) { padding-left: 0; border-left: 0; }
  .cols { display: none; }
  .row { grid-template-columns: 34px minmax(0, 1fr) 96px; }
  .row .lane { display: none; }
  .track i { height: 6px; }
  .board-foot { grid-template-columns: minmax(0, 1fr); }
  .three div, .three div + div { padding: 18px 0 6px; border-left: 0; border-top: 1px solid var(--rule); }
  .three { border-top: 0; }
  .step::after { display: none; }
  .tb { grid-template-columns: 1fr 1fr; }
  .tb div:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--rule); }
  .stamp { position: static; justify-self: end; margin-top: -6px; }
  .sheet::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .stamp, .track i.now { animation: none; } }

/* the hero scene: a VS Code window with the Claude Code panel. Its palette is VS Code's own,
   fixed in both themes like .ledger and .band, and kept as custom properties on .vsc. */
.ide-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ide-steps button { display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--mono); padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft); cursor: pointer; }
.ide-steps button b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rule-soft); color: var(--ink-soft); font-size: 12px; }
.ide-steps button[aria-pressed="true"] { border-color: var(--cobalt); color: var(--cobalt); background: var(--cobalt-wash); }
.ide-steps button[aria-pressed="true"] b { background: var(--cobalt); color: var(--sheet); }

.vsc { --bg: #1f1f1f; --side: #181818; --line: #2b2b2b; --fg: #cccccc; --dim: #8b8b8b; --blue: #0078d4; --k: #569cd6; --ty: #4ec9b0; --s: #ce9178; --c: #6a9955; --sel: #37373d;
  border-radius: 10px; overflow: hidden; border: 1px solid #3c3c3c; background: var(--bg); color: var(--fg); font: 13px/1.5 -apple-system, "Segoe UI", system-ui, sans-serif; box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .7); }
.vsc-title { position: relative; display: flex; justify-content: center; align-items: center; height: 34px; background: var(--side); border-bottom: 1px solid var(--line); }
.vsc-lights { position: absolute; left: 12px; display: flex; gap: 7px; }
.vsc-lights i { width: 11px; height: 11px; border-radius: 50%; background: #4a4a4a; }
.vsc-search { width: min(360px, 60%); text-align: center; font-size: 12px; color: var(--dim); background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px; padding: 2px 0; }
.vsc-main { display: grid; grid-template-columns: 44px 210px minmax(0, 1fr) 340px; height: 520px; }
.vsc-main > * { min-width: 0; min-height: 0; }
.vsc-act { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 12px; color: #858585; }
.vsc-act svg { width: 22px; height: 22px; }
.vsc-act svg:first-child { color: #d7d7d7; }
.vsc-h { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 9px 14px; }
.vsc-side { background: var(--side); border-right: 1px solid var(--line); overflow: hidden; }
.vsc-side .t { padding: 2px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.vsc-side .d::before { content: "⌄"; display: inline-block; width: 14px; color: var(--dim); }
.vsc-side .f { color: #c5c5c5; padding-left: 24px; }
.vsc-side .l1 { padding-left: 22px; } .vsc-side .l2 { padding-left: 34px; } .vsc-side .l3 { padding-left: 46px; } .vsc-side .l4 { padding-left: 58px; }
.vsc-side .f.l3 { padding-left: 60px; } .vsc-side .f.l4 { padding-left: 72px; }
.vsc-side .new { color: #73c991; }
.vsc-side .t { position: relative; padding-right: 26px; }
.vsc-side .new::after { content: "U"; position: absolute; right: 12px; color: #73c991; font-size: 12px; }
.vsc-side .on { background: var(--sel); }
.vsc-editor { display: flex; flex-direction: column; background: var(--bg); }
.vsc-tabs { display: flex; background: var(--side); border-bottom: 1px solid var(--line); overflow: hidden; }
.vsc-tabs .tab { padding: 7px 14px; font-size: 12.5px; color: var(--dim); border-right: 1px solid var(--line); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.vsc-tabs .tab.on { background: var(--bg); color: #ffffff; box-shadow: inset 0 1px 0 var(--blue); }
.vsc-crumb { padding: 4px 16px; font-size: 12px; color: var(--dim); }
.vsc-code { margin: 0; padding: 4px 0 16px; overflow: auto; flex: 1; font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: normal; counter-reset: ln; }
.vsc-code .ln { display: block; white-space: pre; padding-right: 16px; }
.vsc-code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 44px; padding-right: 18px; text-align: right; color: #6e7681; }
.vsc .k { color: var(--k); } .vsc .ty { color: var(--ty); } .vsc .s { color: var(--s); } .vsc .c { color: var(--c); }
.vsc .ok { color: #73c991; font-weight: 700; }
.vsc .cut { transition: color .4s; }
.vsc .cut.struck { text-decoration: line-through; color: var(--dim); }
.vsc .cut.struck .k { color: var(--dim); }
.vsc .vnote { display: inline-block; margin-left: 12px; font-family: -apple-system, "Segoe UI", system-ui, sans-serif; font-size: 11.5px; padding: 0 7px; border-radius: 4px; text-decoration: none; }
.vsc .vnote.red { color: #f48771; background: rgba(244, 135, 113, .12); }
.vsc .vnote.green { color: #73c991; background: rgba(115, 201, 145, .12); }
.vsc-claude { display: flex; flex-direction: column; background: var(--side); border-left: 1px solid var(--line); }
.cc-log { flex: 1; overflow-y: auto; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.cc-log > * { flex-shrink: 0; }
.cc-you { align-self: stretch; background: #2b2d31; border: 1px solid #3a3d42; border-radius: 8px; padding: 7px 10px; color: #e6e6e6; }
.cc-you.cc-cmd { align-self: flex-start; font: 600 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: #d7ba7d; padding: 4px 10px; }
.cc-ai { color: #e6e6e6; padding: 0 2px; }
.cc-tool { font-size: 12px; color: var(--dim); padding-left: 16px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-tool::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #73c991; }
.cc-tool b { color: #c5c5c5; font-weight: 600; margin-right: 4px; }
.cc-tool span { color: #6e7681; margin-left: 6px; }
.cc-tool span::before { content: "→ "; }
.cc-tool.agent::before { background: #b48ead; }
.cc-new { animation: ccin .4s ease both; }
@keyframes ccin { from { opacity: 0; transform: translateY(6px); } }
.cc-input { margin: 8px 12px 12px; border: 1px solid #3a3d42; border-radius: 8px; padding: 9px 10px; font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: #d7ba7d; background: #222; min-height: 20px; }
.cc-input .caret { display: inline-block; width: 7px; height: 14px; margin-left: 1px; vertical-align: -2px; background: #aeafad; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.vsc-status { display: flex; gap: 16px; height: 24px; align-items: center; padding: 0 0 0 0; font-size: 12px; color: #cccccc; background: var(--side); border-top: 1px solid var(--line); }
.vsc-status .br { background: var(--blue); color: #fff; height: 100%; display: flex; align-items: center; padding: 0 10px; }
.vsc-status .r { margin-left: auto; padding-right: 12px; }
.vsc-note { margin-top: 12px; font-size: 14px; color: var(--mute); }
@media (max-width: 1100px) {
  .vsc-main { grid-template-columns: 44px minmax(0, 1fr) 320px; }
  .vsc-side { display: none; }
}
@media (max-width: 760px) {
  .vsc-main { grid-template-columns: minmax(0, 1fr); height: auto; }
  .vsc-act { display: none; }
  .vsc-editor { height: 300px; }
  .vsc-claude { height: 420px; border-left: 0; border-top: 1px solid var(--line); }
  }
@media (prefers-reduced-motion: reduce) { .cc-new, .cc-input .caret { animation: none; } }

/* bubbles over the window */
.bubble { position: absolute; bottom: calc(100% - 136px); z-index: 2; width: min(470px, 100%); background: var(--paper); color: var(--ink); border: 1.5px solid var(--cobalt); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; box-shadow: 0 10px 30px -18px rgba(23, 33, 44, .5); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.bubble b { display: block; font-family: var(--display); font-size: 18px; font-weight: 500; color: var(--cobalt); margin-bottom: 2px; }
.bubble::after { content: ""; position: absolute; bottom: -9px; width: 16px; height: 16px; background: var(--paper); border-right: 1.5px solid var(--cobalt); border-bottom: 1.5px solid var(--cobalt); transform: rotate(45deg); }
.b0 { right: 0; } .b0::after { right: 140px; }
.b1 { left: 230px; } .b1::after { left: 60px; }
.b2 { left: 310px; } .b2::after { left: 120px; }
.b3 { right: 120px; } .b3::after { left: 60px; }
.b4 { left: 300px; } .b4::after { left: 140px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.cm { color: #6a9955; }

/* the running app in the Simple Browser tab */
.vsc-app { flex: 1; display: grid; place-items: center; background: #f4f5f2; padding: 18px; }
.app-card { width: min(320px, 100%); background: #fff; border-radius: 12px; padding: 18px; color: #1c232b; box-shadow: 0 10px 30px -16px rgba(0, 0, 0, .35); font-family: -apple-system, "Segoe UI", system-ui, sans-serif; }
.app-card h4 { margin: 0 0 10px; font-size: 20px; }
.app-add { display: flex; justify-content: space-between; border: 1px solid #d9dde3; border-radius: 8px; padding: 7px 8px 7px 10px; color: #8a929c; font-size: 13px; }
.app-add i { font-style: normal; background: #1c232b; color: #fff; border-radius: 6px; padding: 1px 9px; font-size: 12px; }
.app-filter { display: flex; gap: 6px; margin: 10px 0; font-size: 12px; }
.app-filter span { padding: 2px 9px; border-radius: 999px; background: #eef0f3; }
.app-filter .on { background: #1c232b; color: #fff; }
.app-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.app-card li { display: flex; align-items: center; gap: 9px; }
.app-card li i { width: 16px; height: 16px; border: 1.5px solid #9aa3ad; border-radius: 4px; }
.app-card li.is-done { color: #8a929c; text-decoration: line-through; }
.app-card li.is-done i { background: #2c7a45; border-color: #2c7a45; }
.app-card p { margin: 10px 0 0; font-size: 12px; color: #8a929c; }
@media (max-width: 760px) {
  .bubble { position: static; width: auto; margin-bottom: 14px; }
  .bubble::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }

/* motion */
.cc-tool.run::before { background: transparent; border: 1.5px solid #d7ba7d; border-top-color: transparent; width: 6px; height: 6px; top: 6px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.vsc-code .ln.in, .vsc-side .t.in, .vsc-tabs .tab.in, .vsc .ok.in, .vsc .vnote.in { animation: ccin .35s ease both; }
.app-card li { transition: color .3s; }
.app-card li i { transition: background .3s, border-color .3s; }
.vsc-app.in .app-card { animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.cc-input.typing { border-color: #4a6fa5; }
@media (prefers-reduced-motion: reduce) { .cc-tool.run::before { animation: none; } }

/* hero with the scene */
.hero-ide .wrap { display: block; }
.hero-ide h1 em { display: block; }
.hero-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.hero-row2 .cmd { margin-top: 0; flex: 1 1 420px; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 22px; }
.hero-split .lede { margin-top: 0; }
.hero-split .hero-row2 { margin-top: 0; }
.hero-ide .hero-text { max-width: none; }
@media (max-width: 980px) { .hero-split { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.hero-ide { padding-block: 36px 40px; }
.hero-ide h1 { font-size: clamp(38px, 4.4vw, 56px); margin-top: 10px; }
.hero-ide .facts { gap: 4px 16px; }
.hero-scene { margin-top: 26px; }
.hero-scene .ide-steps { margin-bottom: 0; }
.ide-stage { position: relative; }
@media (min-width: 761px) {
  .hero-scene .ide-stage { padding-top: 150px; }
  .hero-scene .bubble { bottom: calc(100% - 138px); }
}
.hero-split > *, .hero-row2 > * { min-width: 0; }
@media (max-width: 640px) { .hero-row2 .cmd { flex-basis: 100%; } }

/* questions */
.faq { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); padding-block: 4px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; font-family: var(--display); font-size: 21px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--cobalt); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; max-width: 46em; color: var(--ink-soft); }
