/* Shrink Code Demo. Design: "Shrink Code — page explorations", direction "B · Instrument — dark, number-first"
   (Claude Design, 29 November 2026). Dark only: one near-black ground, off-white ink, one muted grey, and
   orange for the 100× target and whatever is still short of it. Green is a passed check, red an error.
   Space Grotesk for headings, IBM Plex Mono for every figure, Inter for the rest.
   The design draws Apps, Shrink and Use; Scan, Choose, Scopes and the live-run views use the same pieces. */
:root {
  --bg: #0E0F10; --wash: #16181A; --card: #0E0F10;
  --ink: #EDEDEA; --body: #CFCFCA; --soft: #A3A39D; --muted: #A3A39D; --faint: #6B6D6F;
  --line: #2A2C2F; --field: #3A3C40; --hair: #26282B; --axis: #3A3C40;
  --accent: #EDEDEA; --on-accent: #0E0F10; --link: #EDEDEA; --link-hover: #FF8A5B;
  --hot: #FF8A5B;
  --amber-bg: rgba(255, 138, 91, 0.10); --amber-line: rgba(255, 138, 91, 0.35); --amber: #FF8A5B; --amber-big: #FF8A5B; --amber-mark: #FF8A5B;
  --green-bg: rgba(127, 214, 154, 0.10); --green-line: rgba(127, 214, 154, 0.30); --green: #7FD69A;
  --red-bg: rgba(255, 123, 114, 0.10); --red-line: rgba(255, 123, 114, 0.35); --red: #FF7B72;
  --seg1: #EDEDEA; --seg2: #A3A39D; --seg3: #6B6D6F; --seg4: #3A3C40;
  --ui: Inter, system-ui, sans-serif; --display: 'Space Grotesk', Inter, system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23EDEDEA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-family: var(--ui); color: var(--ink); }
a { color: var(--link); } a:hover { color: var(--link-hover); }
button, select, input, textarea { font-family: var(--ui); }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
code { font-family: var(--mono); font-size: 0.92em; }
.mono { font-family: var(--mono); }
.hot { color: var(--hot); } .green { color: var(--green); } .muted { color: var(--muted); }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.loading { max-width: 1240px; width: 100%; margin: 0 auto; padding: 28px 48px; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 12px; min-height: 40vh; justify-content: center; }

/* Header: the brand, the four stages as one pill of pills (the current one filled), the app picker.
   On the lineup the stages and the picker give way to "Scan a repository". */
header { max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; font: 600 18px var(--display); color: var(--ink); text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand-a { fill: none; stroke: var(--ink); stroke-width: 1.5; } .brand-b { fill: var(--hot); }
/* On load the dot starts as a full square, inset as far from the frame as the dot is, and shrinks into its corner. */
.brand-b { transform-box: view-box; transform-origin: 5px 17px; animation: brand-shrink 900ms cubic-bezier(.65, 0, .35, 1) 300ms both; }
@keyframes brand-shrink { from { transform: scale(2); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .brand-b { animation: none; } }
.stages { margin: 0; padding: 4px; list-style: none; display: flex; gap: 4px; background: var(--wash); border: 1px solid var(--line); border-radius: 999px; }
.stages[hidden], .apppick[hidden], .pillbtn[hidden] { display: none; }
.tab { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font: 400 14px var(--ui); color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-current="step"] { background: var(--ink); color: var(--bg); font-weight: 500; }
.tab .tick { font-size: 11px; }
/* The filled pill behind the chosen tab, and behind the chosen item of a switch, is one shape that slides
   to wherever the choice goes (app.js sets where). Until it has been placed, the item fills itself. */
.stages, .seg { position: relative; }
.stages.slid::before, .seg.slid::before { content: ""; position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); transform: translate(var(--x), var(--y)); border-radius: 999px; background: var(--ink); transition: transform .32s cubic-bezier(.3, .7, .2, 1), width .32s cubic-bezier(.3, .7, .2, 1); }
.stages.noslide::before, .seg.noslide::before { transition: none; }
.stages.slid .tab, .seg.slid button { position: relative; }
.stages.slid .tab[aria-current="step"], .seg.slid button[aria-pressed="true"] { background: none; }
/* The name keeps the width it has when chosen, so the tabs after it do not move. */
.tab .t { display: inline-grid; }
.tab .t::after { content: attr(data-t); font-weight: 500; height: 0; visibility: hidden; overflow: hidden; }
.pillbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--field); border-radius: 999px; background: none; font: 400 14px var(--ui); color: var(--ink); cursor: pointer; text-decoration: none; transition: border-color .12s; }
.pillbtn:hover { border-color: var(--ink); }
/* The pickers draw their own arrow, so that it sits in from the edge in every browser. */
.apppick, .taskpick select { appearance: none; -webkit-appearance: none; background: transparent var(--pick) no-repeat right 14px center / 12px 12px; color: var(--ink); border: 1px solid var(--field); cursor: pointer; min-width: 0; text-overflow: ellipsis; field-sizing: content; }
.apppick { height: 44px; padding: 0 38px 0 16px; font: 400 14px var(--ui); border-radius: 999px; max-width: 100%; }
.apppick:hover, .taskpick select:hover { border-color: var(--ink); }
/* The open list. Where the browser lets a page draw it (Chrome 135 and later), it is a card in the page's
   own type and colours; elsewhere it stays the system menu. */
@supports (appearance: base-select) {
  .apppick, .taskpick select, .apppick::picker(select), .taskpick select::picker(select) { appearance: base-select; }
  .apppick, .taskpick select { display: inline-flex; align-items: center; }
  .apppick::picker-icon, .taskpick select::picker-icon { display: none; }
  .apppick::picker(select), .taskpick select::picker(select) { margin: 6px 0; padding: 6px; min-width: max(anchor-size(width), 200px); background: var(--wash); color: var(--ink); border: 1px solid var(--field); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
  .apppick::picker(select) { position-area: block-end span-inline-start; }  /* right edges line up: the picker sits at the header's right */
  .apppick option, .taskpick option { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border-radius: 8px; font: 400 14px var(--ui); color: var(--muted); white-space: nowrap; cursor: pointer; }
  .apppick option:hover, .apppick option:focus-visible, .taskpick option:hover, .taskpick option:focus-visible { background: var(--hair); color: var(--ink); outline: 0; }
  .apppick option:checked, .taskpick option:checked { color: var(--ink); font-weight: 500; }
  .apppick option::checkmark, .taskpick option::checkmark { order: 1; margin-left: auto; padding-left: 12px; color: var(--ink); }
  .taskpick option:disabled { color: var(--faint); cursor: default; }
}

/* The page: one left-aligned column inside the header's width. The stages the design draws (Apps, Shrink, Use)
   use all of it; the others keep to a reading width. */
main { flex: 1; }
main[hidden] { display: none; }
.page { max-width: 1240px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; padding: 64px 48px 128px; }
.page > * { max-width: 880px; }
.page.full > * { max-width: none; }
.page.full { gap: 72px; }
.page.use { gap: 40px; }
.col { display: flex; flex-direction: column; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g10 { gap: 10px; } .g12 { gap: 12px; } .g14 { gap: 14px; } .g16 { gap: 16px; } .g20 { gap: 20px; } .g24 { gap: 24px; }
.grow { flex: 1; min-width: 0; }
.eyebrow { margin: 0; font: 400 12px var(--mono); color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
h1 { margin: 0; font: 600 56px/1.02 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
h1.xl { font-size: 64px; max-width: 880px; }
h1.mid { font-size: 36px; letter-spacing: -0.02em; line-height: 1.1; }
h2 { margin: 0; font: 500 18px var(--display); }
h2.h15 { font-size: 16px; } h2.h20 { font-size: 20px; } h2.h22 { font-size: 22px; } h2.h24 { font-size: 24px; }
.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.p15 { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.p14 { margin: 0; font-size: 14px; line-height: 1.55; color: var(--body); max-width: 70ch; }
.p13 { margin: 0; font-size: 13px; line-height: 1.6; color: var(--soft); max-width: 72ch; }
.p12 { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }

/* Facts under a heading: a label over a value, divided by hairlines */
.facts { margin: 0; display: flex; flex-wrap: wrap; gap: 12px 0; }
.facts > div { display: flex; flex-direction: column; gap: 4px; padding: 0 24px; border-left: 1px solid var(--line); }
.facts > div:first-child { padding-left: 0; border-left: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; color: var(--ink); }
.facts dd.amber { color: var(--amber); } .facts dd.green { color: var(--green); } .facts dd.red { color: var(--red); }
.quiet { font-size: 13px; color: var(--muted); }
.p13.warn { color: var(--amber); } .p13.good { color: var(--green); }
.kv { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; font-size: 14px; line-height: 1.5; max-width: 72ch; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--body); overflow-wrap: anywhere; }
/* Tags, still used for small labels */
.tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--body); }
.tag { background: var(--hair); border: 1px solid transparent; border-radius: 99px; padding: 4px 12px; }
.tag.mono { font-family: var(--mono); }
.tag.amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.tag.green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.tag.red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.tag.small { font-family: var(--mono); font-size: 12px; padding: 3px 10px; white-space: nowrap; }

/* Cards are outlines on the ground; a panel (the one thing a stage is about) is filled. */
.card { border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; margin: 0; background: transparent; }
.card.wash { background: var(--wash); padding: 20px 24px; gap: 8px; }
.card.dashed { border-style: dashed; border-color: var(--field); }
.panel { background: var(--wash); border: 1px solid var(--line); border-radius: 16px; padding: 36px 40px; display: flex; flex-direction: column; gap: 24px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); display: inline-block; }
.dot.ok { background: var(--green); } .dot.hot { background: var(--hot); } .dot.bad { background: var(--red); }
/* Alerts: a filled card. The text stays in the body colour; only a small dot carries the tone
   (miss red, warn orange, good green, none for plain information). */
.note { position: relative; margin: 0; font-size: 14px; line-height: 1.55; color: var(--body); background: var(--wash);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px 16px 42px; }
.note::before { content: ""; position: absolute; left: 20px; top: 23px; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.note.warn::before { background: var(--amber-mark); }
.note.good::before { background: var(--green); }
.note.miss::before { background: var(--red); }
.note b, .note .nt { color: var(--ink); font-weight: 600; }
.note .nt { display: block; margin-bottom: 4px; }
.note ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
.note .lbl { display: block; margin: 8px 0 4px; }
.note .tail { margin: 0; font: 12px/1.6 var(--mono); color: var(--body); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.note .tailpath { display: block; margin-top: 6px; overflow-wrap: anywhere; }

/* Disclosures: the secondary material of each stage */
.dgroup { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.dgroup details { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; gap: 10px; min-height: 64px; font-size: 16px; color: var(--ink); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary svg { flex: none; stroke: var(--muted); transition: transform .15s; }
summary .meta { font-size: 13px; }
details[open] > summary svg { transform: rotate(90deg); }
.dbody { padding: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.dbody > .p13, .dbody > .p12 { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 76ch; }
.dbody > .p12 { font-size: 13px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; font-size: 14px; line-height: 1.6; color: var(--soft); }
.two b { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.two b.ok { color: var(--green); }
.two ul { margin: 0; padding: 0; list-style: none; }

/* The "next" line at the bottom of each stage */
.next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.next span { font-size: 16px; color: var(--muted); }
.primary, .go { display: inline-flex; align-items: center; justify-content: center; font: 500 15px var(--ui); background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; min-height: 48px; padding: 0 22px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .12s; }
.primary:hover, .go:hover:not(:disabled) { background: #FFFFFF; }
.primary:active, .go:active:not(:disabled) { background: var(--body); }
a.primary:hover { color: var(--bg); }
.next .primary { min-height: 52px; padding: 0 26px; }
.go:disabled, .primary:disabled { background: var(--hair); color: var(--faint); cursor: default; }
.ghost { display: inline-flex; align-items: center; gap: 8px; font: 400 14px var(--ui); min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--field); background: none; color: var(--ink); cursor: pointer; transition: border-color .12s; }
.ghost:hover:not(:disabled) { border-color: var(--ink); }
.ghost:disabled { color: var(--faint); cursor: default; }
.ghost[aria-pressed="true"] { border-color: var(--ink); }
.ghost svg { fill: currentColor; }

/* Scan */
.scanrow { display: flex; flex-wrap: wrap; gap: 8px; }
.scanrow input { font: 14px var(--mono); color: var(--ink); background: var(--bg); border: 1px solid var(--field); border-radius: 8px; min-height: 44px; padding: 0 14px; min-width: 0; }
.scanrow input::placeholder, .ans::placeholder, .tin::placeholder { color: var(--faint); }
.scanrow input:disabled { background: var(--wash); border-color: var(--line); color: var(--muted); }
#scan-src { flex: 3 1 280px; } #scan-ref { flex: 1 1 120px; }
/* The empty state: "Start from a repository" */
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 48px 0 0; }
.hero .scanrow { width: 100%; margin-top: 12px; }
.hero .scanrow input { min-height: 52px; padding: 0 18px; }
.hero #scan-src { flex: 3 1 320px; } .hero #scan-ref { flex: 1 1 140px; }
.hero .scanout { width: 100%; }
.primary.big { min-height: 52px; padding: 0 26px; }
.legend .more { color: var(--soft); }
.inline-mono { font-family: var(--mono); font-size: 12px; }
.scanout { margin: 0; font: 13px/1.7 var(--mono); color: var(--body); background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.scanout .bad { color: var(--red); }
/* A figure and what it counts: the number first */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.stat { border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.stat b { font: 500 40px/1.1 var(--mono); letter-spacing: -0.02em; }
.stat span { font-size: 15px; line-height: 1.4; color: var(--muted); }
.split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.s1 { background: var(--seg1); } .s2 { background: var(--seg2); } .s3 { background: var(--seg3); } .s4 { background: var(--seg4); }
.legend > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .v { font-family: var(--mono); font-size: 14px; }
.legend .p { font-family: var(--mono); font-size: 13px; color: var(--muted); width: 56px; text-align: right; }

/* Choose: the contract's tasks, each opening to its steps */
.tasks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.tasks > li { border-top: 1px solid var(--line); }
.taskrow { display: flex; align-items: center; gap: 16px; }
.box { width: 20px; height: 20px; border-radius: 6px; background: var(--ink); display: grid; place-items: center; flex: none; }
.box svg { stroke: var(--bg); }
.taskrow button { flex: 1; min-width: 0; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; background: transparent; font: 400 16px var(--ui); color: var(--ink); text-align: left; cursor: pointer; }
.taskrow button > span:first-child { flex: 1; min-width: 0; line-height: 1.35; }
.taskrow svg.chev { flex: none; stroke: var(--muted); transition: transform .15s; }
.taskrow button[aria-expanded="true"] svg.chev { transform: rotate(90deg); stroke: var(--ink); }
.steps { margin: 0; padding: 0 0 20px 36px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 12px; align-items: baseline; font-size: 14px; color: var(--body); }
.steps .n { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 16px; flex: none; }

/* Shrink: the ratio as the page's headline, the sizes behind it, and the bar toward 100× */
.sizehero { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-end; justify-content: space-between; }
.giant { margin: 0; display: flex; flex-direction: column; gap: 4px; letter-spacing: 0; }
.giant .num { font: 500 clamp(72px, 15vw, 168px)/0.95 var(--mono); letter-spacing: -0.05em; color: var(--ink); }
.giant .sub { font: 500 28px/1.2 var(--display); color: var(--muted); letter-spacing: 0; }
.sizes { margin: 0; display: grid; grid-template-columns: auto auto; column-gap: 40px; row-gap: 14px; font-size: 15px; min-width: min(320px, 100%); }
.sizes dt { color: var(--muted); } .sizes dd { margin: 0; font-family: var(--mono); text-align: right; }
.sizes .sum { border-top: 1px solid var(--line); padding-top: 14px; }
.toward { position: relative; height: 10px; background: var(--hair); border-radius: 5px; }
.toward i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 5px; }
.toward::after { content: ""; position: absolute; right: 0; top: -8px; bottom: -8px; border-right: 2px dashed var(--hot); }
.scale { display: flex; justify-content: space-between; gap: 12px; font: 12px var(--mono); color: var(--muted); }
/* Size by judged round: the line, a button for every round, and what the picked round came to */
.chart svg { display: block; max-width: 100%; }
.chart text { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
.chart .grid { stroke: var(--hair); } .chart .axis { stroke: var(--axis); }
.chart .ceil { stroke: var(--hot); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .ceiltx { fill: var(--hot); paint-order: stroke; stroke: var(--wash); stroke-width: 5px; stroke-linejoin: round; }
.chart .area { fill: var(--ink); fill-opacity: 0.06; }
.chart .ln { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.chart .pt { fill: var(--ink); stroke: var(--wash); stroke-width: 2; }
.chart .pt.part { fill: var(--muted); stroke: none; }
.chart .cur { fill: var(--bg); stroke: var(--ink); stroke-width: 2.5; }
.chart .hit { fill: transparent; cursor: pointer; }
.roundbtns { display: grid; gap: 4px; }
.roundbtns.tight { gap: 2px; }
.roundbtns button { height: 44px; min-width: 0; padding: 0; border: 0; border-radius: 4px; cursor: pointer; background: linear-gradient(to top, var(--field) var(--h), transparent var(--h)); }
.roundbtns button.part { opacity: 0.45; }
.roundbtns button:hover { background: linear-gradient(to top, var(--muted) var(--h), transparent var(--h)); }
.roundbtns button[aria-pressed="true"] { background: linear-gradient(to top, var(--ink) var(--h), var(--line) var(--h)); }
.roundcap { display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 20px; font: 15px var(--mono); }
.roundcap .t { font: 500 20px var(--display); }
.roundcap .meta { margin-left: auto; }
.story { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.story li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 16px; align-items: baseline; }
.story b { font: 500 12px var(--mono); color: var(--muted); }
.story p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--body); max-width: 72ch; }
.story p.said { margin-top: 6px; font-size: 13px; color: var(--soft); }
@media (max-width: 560px) { .story li { grid-template-columns: minmax(0, 1fr); } }
.roundcap .meta a { color: inherit; text-decoration: none; }
.roundcap .meta a:hover, .roundcap .meta a:focus-visible { color: var(--ink); }
input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent); }

/* Use: the two apps side by side at one step, then what to do with the copy */
.usehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 32px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--wash); border: 1px solid var(--line); border-radius: 999px; }
.seg button { font: 400 14px var(--ui); min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer; background: none; color: var(--muted); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.mono { font-family: var(--mono); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 500; }
.seg.small { background: var(--bg); } .seg.small button { min-height: 34px; padding: 0 14px; }
.panel.proof { padding: 20px; gap: 16px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; }
.taskpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.taskpick select { min-height: 44px; max-width: min(100%, 520px); padding: 0 36px 0 12px; font: 400 15px var(--ui); background-color: var(--bg); border-radius: 8px; }
.segs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--field); border-radius: 50%; background: none; cursor: pointer; }
.pager button:not(:disabled):hover { border-color: var(--ink); }
.pager button svg { stroke: var(--ink); }
.pager button:disabled { cursor: default; border-color: var(--line); } .pager button:disabled svg { stroke: var(--faint); }
.pager .at { font: 14px var(--mono); min-width: 96px; text-align: center; white-space: nowrap; }
figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.well { background: var(--bg); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.shottag { font: 12px var(--mono); color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; }
.shottag.hot { color: var(--hot); }
figure.tall .pair { max-width: 860px; } figure.tall > .well { max-width: 430px; }
/* The screenshots are light in both apps, so what is drawn on them keeps to light-ground colours. */
.shot { position: relative; border-radius: 6px; overflow: hidden; background: #FFFFFF; }
/* A spinner sits under each screenshot and shows until the picture has loaded over it. */
.shot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -12px 0 0 -12px; border-radius: 50%; border: 2.5px solid rgba(0, 0, 0, .1); border-top-color: rgba(0, 0, 0, .5); animation: spin .9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .shot::before { animation: none; } }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.shot .none { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; background: var(--bg); color: var(--muted); font: 12px var(--mono); }
.shot .cell { position: absolute; width: 25%; height: 25%; border: 2px solid #B91C1C; border-radius: 6px; }
.verdictline { display: flex; align-items: baseline; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.verdictline .dot { position: relative; top: -1px; }
.verdictline b { color: var(--ink); font-weight: 500; }
.verdictline .meta { margin-left: auto; white-space: nowrap; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.duo .card { padding: 32px; align-items: flex-start; }
.duo .card > label, .duo .card > .tin, .duo .card > ul { align-self: stretch; }
.hostedno { min-height: 48px; display: inline-flex; align-items: center; letter-spacing: 0.08em; }
.sets { width: 100%; max-width: 560px; border-collapse: collapse; font-size: 14px; }
.sets th { padding: 8px 0; font-weight: 400; font-size: 13px; color: var(--muted); text-align: left; }
.sets td { padding: 12px 0; border-top: 1px solid var(--line); font-family: var(--mono); }
.sets th + th, .sets td + td { text-align: right; }
.sets td:first-child { font-family: var(--ui); }
.sets .bad { color: var(--red); }
.guardlist { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.guardlist .ghost { gap: 16px; }

/* Choose, live: questions, proposed tasks and the contract (only behind the local runner) */
.opt { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--ink); }
.opt input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.ans, .tin { font: 15px/1.45 var(--ui); color: var(--ink); background: var(--bg); border: 1px solid var(--field); border-radius: 8px; padding: 12px 14px; width: 100%; min-width: 0; }
.ans { resize: vertical; }
/* The plan: rows that open in place, the chevron at the row's end. A task row is a checkbox beside its
   disclosure; an answer row is a name, the answer in one line, and the chevron. */
.plan { gap: 48px; }
.rowhead { padding-bottom: 12px; }
.hint { font-size: 13px; color: var(--muted); }
.rows { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.rows > li, .rows > details { border-top: 1px solid var(--line); }
.rows summary { min-height: 56px; gap: 16px; padding: 8px 2px 8px 0; font-size: 15px; color: var(--ink); }
.rows summary svg { margin-left: auto; }
.rows details[open] > summary svg { stroke: var(--ink); }
.rows .dbody { padding: 0 0 20px; gap: 8px; }
.rows .dbody > .p12 { font-size: 13px; }
.trow { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.trow > input { width: 18px; height: 18px; margin: 19px 0 0; accent-color: var(--ink); cursor: pointer; }
.trow:has(> input:not(:checked)) .rt { color: var(--muted); text-decoration: line-through; }
.rt { flex: 1; min-width: 0; line-height: 1.35; }
.qsum { display: grid; grid-template-columns: 200px minmax(0, 1fr) 12px; }
.rl { line-height: 1.35; }
.rs { font-size: 14px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs .chip { margin-right: 4px; }
.rows.sub { margin-left: 20px; border-bottom: 0; }
.rows.sub > details:first-child { border-top-color: var(--hair); }
.rows.sub summary { min-height: 48px; font-size: 14px; }
.rows.sub .qsum { grid-template-columns: 180px minmax(0, 1fr) 12px; }
.dgroup.after { margin-top: 16px; }
.dgroup .dbody:has(> .rows.sub) { padding: 0; }
.flabel { font-size: 12px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.linkbtn { border: 0; background: none; padding: 0 4px; min-height: 44px; font: 400 14px var(--ui); color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--ink); }
.linkbtn[hidden] { display: none; }
.notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.55; color: var(--soft); max-width: 78ch; }
.mini { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.5; color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lbl { font: 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.doc { margin: 0; font: 13px/1.7 var(--mono); color: var(--body); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; }
.viewrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

/* Autonomous running: a switch, and the list of what was decided while it was on */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; align-self: flex-start; min-height: 28px; }
.switch input { position: absolute; opacity: 0; width: 36px; height: 20px; margin: 0; cursor: pointer; }
.switch .track { width: 36px; height: 20px; border-radius: 99px; background: var(--field); position: relative; flex: none; transition: background-color .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }
.swl { font: 500 16px var(--display); }
.autocard { position: relative; }
.dsum .rl { font-size: 12px; }
.rows .dbody .viewrow { margin-top: 4px; }

/* A running agent session: the spinner turns while the runner says the session is running */
.workrow { display: flex; align-items: center; gap: 12px; }
.worktx { font: 500 18px var(--display); font-variant-numeric: tabular-nums; }
.spin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2.5px solid var(--field); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card.working { border-color: var(--muted); }
.card.working .lbl { text-transform: none; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; border-color: var(--accent); } }

/* Shrink, live: the phases of a run as one bar of segments */
.phasebar { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.phasebar i { position: relative; height: 22px; margin: -8px 0; }  /* a 22px hover target around the 6px bar */
.phasebar i::before { content: ""; position: absolute; inset: 8px 0; border-radius: 3px; background: var(--hair); }
.phasebar i.done::before { background: var(--ink); } .phasebar i.now::before { background: var(--muted); }
.phasebar i::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap; font: 500 12px var(--ui); color: var(--bg); background: var(--ink); padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .1s; }
.phasebar i:first-child::after { left: 0; transform: none; } .phasebar i:last-child::after { left: auto; right: 0; transform: none; }
.phasebar i:hover::after { opacity: 1; }
.phaseline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--soft); }
.phases { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.phases li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }
.phases li .n { font-family: var(--mono); }
.phases li.done { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.phases li.now { background: var(--hair); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* The run log */
.runlog { margin: 0; padding: 0; list-style: none; max-height: 380px; overflow: auto; border-top: 1px solid var(--line); font-size: 13px; }
.runlog li { display: grid; grid-template-columns: 56px 84px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 8px; border-bottom: 1px solid var(--hair); color: var(--body); }
.runlog li.here { background: var(--wash); border-radius: 6px; }
.runlog li.miss span:last-child { color: var(--red); }
.runlog time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.runlog span:last-child { overflow-wrap: anywhere; font-family: var(--mono); line-height: 1.6; }
.chip { justify-self: start; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 99px; background: var(--hair); color: var(--soft); white-space: nowrap; }
.chip.contract { color: var(--ink); }
.chip.guard { background: var(--green-bg); color: var(--green); }
.chip.heldout, .chip.ask { background: var(--amber-bg); color: var(--amber); }

/* Apps: the lineup. Every finished copy on one scale toward 100×, then a card each, the ratio first. */
.panel.bars { padding: 40px 40px 32px; gap: 6px; }
.panel.bars > .between { margin-bottom: 24px; }
.targetkey { display: inline-flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--hot); }
.targetkey i { display: inline-block; width: 18px; border-top: 2px dashed var(--hot); }
.barrow { display: grid; grid-template-columns: 140px minmax(0, 1fr) 84px; gap: 20px; align-items: center; min-height: 52px; }
.barrow .track { position: relative; height: 52px; border-right: 2px dashed var(--hot); }
.barrow .track::before { content: ""; position: absolute; left: 0; right: 0; top: 25px; height: 2px; background: var(--hair); }
.barrow .track i { position: absolute; left: 0; top: 23px; height: 6px; border-radius: 3px; background: var(--ink); }
.barrow .val { font: 500 18px var(--mono); text-align: right; }
.barrow.ticks { min-height: 0; margin-top: 8px; }
.barrow.ticks div { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); }
.textlink { all: unset; cursor: pointer; font-size: 15px; color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.textlink:hover { color: var(--hot); }
.textlink:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.appgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.appcard { gap: 20px; }
.appcard .between { align-items: baseline; gap: 12px; }
.bigratio { font: 500 52px/1 var(--mono); letter-spacing: -0.02em; }
.meta13 { font: 13px var(--mono); color: var(--muted); }
.checkline { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.appcard .foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; }
.appcard .foot .textlink { font-size: 14px; }
.appcard .foot a { color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
svg.figma { flex: none; }
.primary svg.figma { margin-right: 10px; }
.figlink { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.appcard .foot a:hover { color: var(--hot); }
.appcard .phasebar { margin-top: 8px; }
.appcard .between:first-child { align-items: center; }
.runbadge { display: inline-flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.spin.sm { width: 12px; height: 12px; border-width: 2px; }
.note.checking { display: flex; align-items: center; gap: 10px; color: var(--muted); } .note.checking::before { display: none; }
.runbadge .dot { background: var(--hot); }
.meta .amber { color: var(--amber); }

/* Runs of one original, side by side: runs as columns, figures as rows; the open run's column is marked. */
.runswrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table.runs { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 13px; }
table.runs th, table.runs td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.runs tbody tr:last-child th, table.runs tbody tr:last-child td { border-bottom: 0; }
table.runs tbody th { font-weight: 400; color: var(--muted); width: 34%; }
table.runs td { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
table.runs thead th { background: var(--wash); font: 500 14px var(--display); }
table.runs .here { background: var(--wash); }
table.runs thead th.here { box-shadow: inset 0 -2px 0 var(--accent); }
table.runs .bad { color: var(--red); }
table.runs .na { color: var(--faint); font-family: var(--ui); }
.linkish { all: unset; cursor: pointer; color: var(--ink); text-decoration: underline; text-decoration-color: var(--field); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: var(--ink); }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Scopes: one app built to several contracts. Bars are to scale with each other; the orange rule is the 100× line. */
.sbars { position: relative; display: flex; flex-direction: column; gap: 20px; }
.sbar { display: flex; flex-direction: column; gap: 8px; }
.sbar b { font-weight: 500; color: var(--ink); }
.strack { position: relative; height: 10px; border-radius: 5px; background: var(--hair); }
.strack i { position: absolute; inset: 0 auto 0 0; border-radius: 5px 0 0 5px; background: var(--ink); }
.strack i.dep, .depkey { background: repeating-linear-gradient(135deg, var(--muted) 0 2px, transparent 2px 5px); border-radius: 0 5px 5px 0; }
.strack::after { content: ""; position: absolute; left: var(--target); top: -8px; bottom: -8px; border-right: 2px dashed var(--hot); }
.slegend { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.slegend .depkey { display: inline-block; width: 18px; height: 8px; margin-right: 6px; vertical-align: -1px; }
.scopelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
/* Where the size is */
.west { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-end; }
.west .n { display: block; font: 500 clamp(44px, 9vw, 84px)/0.95 var(--mono); letter-spacing: -0.04em; }
.west .k { display: block; margin-bottom: 10px; font: 12px var(--mono); color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.west .was .n { color: var(--muted); }
.west .delta { font: 500 20px var(--mono); padding-bottom: 8px; }
.wstack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--hair); }
.wstack i { display: block; height: 100%; }
.wstack .base, .wkey .base { background: var(--ink); } .wstack .all, .wkey .all { background: #B9B9B4; } .wstack .some, .wkey .some { background: #8A8A85; }
.wstack .one, .wkey .one { background: #5E5F5C; } .wstack .rest, .wkey .rest { background: #3A3C40; }
.wstack .cut, .wkey .cut { background: repeating-linear-gradient(135deg, var(--hot) 0 3px, transparent 3px 7px); }
.wkey { display: flex; flex-wrap: wrap; gap: 8px 24px; font: 12px var(--mono); color: var(--muted); }
.wkey span { display: inline-flex; align-items: center; gap: 8px; }
.wkey i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.duo .card.lever { gap: 4px; } .lever > * { align-self: stretch; }
.lever .p13 { margin: 4px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.wrow { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.wrow.fixed { cursor: default; }
.wrow input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1.5px solid var(--muted); border-radius: 5px; background: none; cursor: pointer; display: grid; place-items: center; }
.wrow input:checked { background: var(--ink); border-color: var(--ink); }
.wrow input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--bg); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.wrow input:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
.wrow .dot { width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--faint); justify-self: center; }
.wrow .name { font-size: 15px; line-height: 1.4; } .wrow .name .mono { font: 14px var(--mono); }
.wrow .b { font: 14px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.wrow .bar { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: var(--hair); overflow: hidden; }
.wrow .bar i { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.wrow.off .name { color: var(--muted); text-decoration: line-through; } .wrow.off .b { color: var(--hot); } .wrow.off .bar i { background: var(--hot); }
.wrow .why { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
.wfoot { font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 76ch; margin: 0; }
a.scopeslink { text-decoration: none; max-width: 720px; } a.scopeslink:hover { border-color: var(--muted); }
a.scopeslink b { color: var(--ink); font-weight: 500; }

@media (max-width: 720px) {
  header { padding: 16px 20px; }
  .loading { padding: 20px; }
  .stages { order: 3; flex-basis: 100%; justify-content: space-between; }
  .tab { padding: 0 12px; flex: 1; justify-content: center; }
  .page { padding: 32px 20px 80px; gap: 32px; }
  .page.full { gap: 48px; }
  h1 { font-size: 36px; } h1.xl { font-size: 40px; } h1.mid { font-size: 28px; }
  .lead { font-size: 16px; }
  .giant .sub { font-size: 20px; }
  .panel { padding: 24px 20px; } .panel.bars { padding: 24px 20px; } .panel.proof { padding: 12px; }
  .card, .duo .card { padding: 22px; }
  .barrow { grid-template-columns: 84px minmax(0, 1fr) 60px; gap: 12px; }
  .barrow .val { font-size: 15px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .well { padding: 12px; }
  .roundcap { gap: 6px 24px; } .roundcap .meta { margin-left: 0; flex-basis: 100%; }
  .roundbtns { gap: 2px; }
  .stat b { font-size: 32px; }
  .hero { padding-top: 16px; }
  .qsum, .rows.sub .qsum { grid-template-columns: minmax(0, 1fr) 12px; row-gap: 2px; }
  .qsum .rs { grid-column: 1; grid-row: 2; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .rows.sub { margin-left: 0; }
  .runlog li { grid-template-columns: 48px minmax(0, 1fr); } .runlog li .chip { grid-column: 2; } .runlog li span:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
