/* Baseline skeleton styles. Lane B owns the visual design and replaces these. */
/* Jost, self-hosted variable font (SIL OFL, fonts/OFL.txt); one file covers every weight. */
/* Google Fonts' split: the Latin-Ext file loads only on pages that use ş, ğ, İ and the like. */
@font-face { font-family: "Jost"; src: url("fonts/Jost-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; src: url("fonts/Jost-LatinExt.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Albert Sans, same setup (SIL OFL, fonts/AlbertSans-OFL.txt): every text that is not a title. */
@font-face { font-family: "Albert Sans"; src: url("fonts/AlbertSans-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Albert Sans"; src: url("fonts/AlbertSans-LatinExt.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #1b1b1f;
  --muted: #5c5c66;
  --paper: #ffffff;
  --rule: #e4e4e0;
  --link: #1f4fd1;
  --code-bg: #f4f4f1;
  --accent-text: #0e7f8f;
  --accent: #2bc4d9;
  --hover: #eef0f6;
  /* The figure tile: a post's own diagram on a dark panel (blog index cards). */
  --tile: #161616;
  --tile-hover: #222222;
  --tile-box: #2a2a2a;
  --tile-line: #8a8a94;
  --tile-ink: #ffffff;
  --tile-muted: #a0a0aa;
  /* The header band (mockup site-blog-index-starburst.html): dark on every page. */
  --band: #161616;
  --band-cell: #222222;
  --band-line: rgba(255, 255, 255, 0.16);
  --band-edge: rgba(255, 255, 255, 0.45);
  --band-ink: #ffffff;
  --band-muted: #a0a0aa;
  --measure: 46rem;
  /* Listing pages fill big monitors: the cap only stops 4K lines from running away. */
  --measure-wide: 120rem;
  --gutter: clamp(1rem, 3vw, 3rem);
  --space: 1rem;
  /* Two families, operator 2026-11-09: Jost titles, Albert Sans for the rest, code included. */
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* mow phases, one colour each wherever they appear: /runs cost bars, the timeline figure. */
  --s-plan: #2a78d6; --s-build: #eb6834; --s-review: #1baf7a; --s-fix: #eda100; --s-coord: #e87ba4;
  color-scheme: light;
}

/* Dark: the system setting unless the reader picked light, or the reader picked dark (theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ececec; --muted: #a0a0aa; --paper: #111111; --rule: #2c2c30; --link: #7aa7ff;
    --code-bg: #1c1c1f; --accent-text: #2bc4d9; --hover: #1d1f25;
    --s-plan: #3987e5; --s-build: #d95926; --s-review: #199e70; --s-fix: #c98500; --s-coord: #d55181;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ececec; --muted: #a0a0aa; --paper: #111111; --rule: #2c2c30; --link: #7aa7ff;
  --code-bg: #1c1c1f; --accent-text: #2bc4d9; --hover: #1d1f25;
  --s-plan: #3987e5; --s-build: #d95926; --s-review: #199e70; --s-fix: #c98500; --s-coord: #d55181;
  color-scheme: dark;
}

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

html { font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; }
h1, h2, h3, h4, h5, h6, .site-name { font-family: var(--font-title); }
body { margin: 0; background: var(--paper); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

a { color: var(--link); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* Local edit mode only (post-edit.js): the block being edited. */
.post-editing { outline: 2px solid var(--link); outline-offset: 4px; }
td.post-editing, th.post-editing { outline-offset: -2px; } /* the table's scroll box clips outside */

.skip-link { position: absolute; left: -999rem; }
.skip-link:focus { left: var(--space); top: var(--space); background: var(--paper); padding: 0.5rem; }

.site-header, .site-main, .site-footer, .page-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space);
}
.site-header, .site-footer { max-width: var(--measure-wide); padding-inline: var(--gutter); }

/* Header band: brand, nav, then the search box and theme menu on the right (site.js). */
.band { background: var(--band); color: var(--band-ink); border-bottom: 1px solid var(--band-line); }
/* Only the header row is pinned (never the hero, which filled a laptop screen), so home and search stay in reach; only from 48rem, below which the band wraps to two rows (113px). */
:root { --band-pin: 0px; }
.band-pin { position: sticky; top: 0; z-index: 20; }
@media (min-width: 48rem) { :root { --band-pin: 4.3125rem; } html { scroll-padding-top: calc(var(--band-pin) + 1rem); } }
/* Phones: the two-row header slides away while reading down and back on any scroll up (site.js); never while it holds focus, so an open search or theme menu stays. --band-pin stays 0 since it may be gone. */
@media (max-width: 47.99rem) {
  .band-pin { transition: transform 0.25s ease-out; }
  .band-pin.band-away:not(:focus-within) { transform: translateY(-100%); transition-duration: 0.15s; }
}
@media (max-width: 47.99rem) and (prefers-reduced-motion: reduce) { .band-pin { transition: none; } }
.band a:focus-visible, .band button:focus-visible, .band input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-header { display: flex; align-items: center; flex-wrap: wrap; gap: 0 1.5rem; min-height: 4.25rem; padding-block: 0.75rem; position: relative; }
.site-name { font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; color: var(--band-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; }
.site-name-dash { color: var(--accent); }
.site-logo { display: block; flex: none; }
.site-nav { display: flex; gap: 0.25rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; color: var(--band-muted); font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--band-ink); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--band-edge); background: transparent; color: var(--band-ink); cursor: pointer; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--band-cell); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.icon-btn[aria-current] { background: var(--band-cell); }
/* Word label under each icon on hover or keyboard focus; hover-only devices, so a tap never leaves one stuck. */
.icon-btn[data-tip] { position: relative; }
.icon-btn[data-tip]::after { content: attr(data-tip); position: absolute; z-index: 11; top: calc(100% + 0.375rem); left: 50%; transform: translateX(-50%); padding: 0.25rem 0.5rem; font: 400 0.8125rem/1.6 var(--font); white-space: nowrap; color: var(--band-ink); background: var(--band-cell); border: 1px solid var(--band-edge); pointer-events: none; opacity: 0; transition: opacity 120ms; }
.header-tools > .icon-btn:last-child::after { left: auto; right: -1px; transform: none; }
@media (hover: hover) { .icon-btn[data-tip]:hover::after { opacity: 1; } }
.icon-btn[data-tip]:focus-visible::after { opacity: 1; }
/* No label over an open search box or theme list. */
.icon-btn[aria-expanded="true"]::after, .site-search.open .icon-btn::after { display: none; }

/* Search: closed it is the icon alone; open, the box grows left from it with the icon at its left edge. */
/* The box draws the one border, closed or open; the icon button sits inside it, so no two borders overlap. */
.site-search { position: relative; display: flex; align-items: center; height: 44px; border: 1px solid var(--band-edge); transition: border-color 200ms; }
.site-search .search-btn { width: 42px; height: 42px; border: 0; }
.site-search input { width: 0; height: 42px; padding: 0; border: 0; font: inherit; font-size: 1rem; color: var(--band-ink); background: transparent; opacity: 0; }
.site-search input::placeholder { color: var(--band-muted); opacity: 1; }
.site-search input:focus-visible { outline: none; }
.site-search.open { background: var(--band-cell); }
/* The transition lives on the open state only: opening grows the box, closing snaps straight back to the icon. */
.site-search.open input { width: min(26rem, 40vw); padding: 0 0.75rem 0 0.25rem; opacity: 1; transition: width 200ms ease-out, opacity 150ms; }
.site-search.open:focus-within { border-color: var(--accent); }
.search-results { position: absolute; z-index: 10; top: calc(100% + 1px); left: -1px; right: -1px; max-height: min(70vh, 32rem); overflow-y: auto; background: var(--band-cell); border: 1px solid var(--band-edge); border-top: 0; }
.search-results a { display: block; padding: 0.75rem 1rem; color: var(--band-ink); text-decoration: none; border-top: 1px solid var(--band-line); }
.search-results a:hover, .search-results a:focus-visible { background: var(--band); outline: none; }
.search-results a:focus-visible .hit-title { text-decoration: underline; text-decoration-color: var(--accent); }
.hit-title { display: block; font-weight: 600; }
.hit-snippet { display: block; margin-top: 0.25rem; color: var(--band-muted); font-size: 0.875rem; line-height: 1.45; }
.search-none { margin: 0; padding: 0.75rem 1rem; color: var(--band-muted); }

/* Theme menu: three plain choices under the icon; the icon shows the current one. */
.theme-menu { position: relative; }
.theme-btn svg { display: none; }
.theme-menu[data-current="system"] .i-system, .theme-menu[data-current="light"] .i-light, .theme-menu[data-current="dark"] .i-dark { display: block; }
.theme-options { position: absolute; z-index: 10; right: 0; top: calc(100% + 0.25rem); min-width: 9rem; margin: 0; padding: 0; list-style: none; background: var(--band-cell); border: 1px solid var(--band-edge); }
.theme-options button { display: block; width: 100%; min-height: 44px; padding: 0 1rem; text-align: left; font: inherit; color: var(--band-muted); background: transparent; border: 0; cursor: pointer; }
.theme-options button:hover { color: var(--band-ink); background: var(--band); }
.theme-options button[aria-pressed="true"] { color: var(--band-ink); font-weight: 600; }

/* /search page form (on paper). */
.search-form label { display: block; margin-bottom: 0.5rem; font-size: 0.9375rem; font-weight: 600; }
.search-row { display: flex; gap: 0.5rem; }
.search-form input { flex: 1; min-width: 0; height: 44px; padding: 0 0.75rem; font: inherit; font-size: 1.0625rem; color: inherit; background: var(--paper); border: 1px solid var(--muted); }
.search-form button { height: 44px; padding: 0 1.25rem; font: inherit; font-weight: 700; color: #161616; background: var(--accent); border: 0; cursor: pointer; }
.search-form button:hover { filter: brightness(1.06); }
.search-form input:focus-visible { outline: 2px solid var(--link); outline-offset: 0; }

/* /contact form (on paper), the same field and button look as the search form. */
.contact-form { display: flex; flex-direction: column; max-width: 36rem; margin-top: 1.5rem; }
.contact-form label { margin: 1.25rem 0 0.5rem; font-size: 0.9375rem; font-weight: 600; }
.contact-form label:first-child { margin-top: 0; }
.contact-form input, .contact-form textarea { min-height: 44px; padding: 0.5rem 0.75rem; font: inherit; font-size: 1.0625rem; color: inherit; background: var(--paper); border: 1px solid var(--muted); border-radius: 0; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 0; }
.contact-form [aria-invalid="true"] { border-width: 2px; border-color: var(--ink); }
/* Ack checkbox: its own box so the 44px field rule doesn't stretch it; a drawn tick so the ink on the accent fill is always dark. */
/* No border here: the field border and the aria-invalid rule above must still reach the box. */
.contact-form .ack-row { display: flex; align-items: flex-start; margin-top: 1.25rem; }
.contact-form .ack-error { margin-top: 1.25rem; }
.contact-form .ack-error + .ack-row { margin-top: 0; }
.contact-form input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0; cursor: pointer; }
.contact-form input[type="checkbox"]:checked { background: var(--accent); }
.contact-form input[type="checkbox"]:checked::after { content: ""; display: block; width: 7px; height: 13px; margin: 2px auto 0; border: solid #161616; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.contact-form input[type="checkbox"]:focus-visible { outline-offset: 2px; }
/* Padding, not gap: the space between box and sentence still toggles the box. Line height 1.5 puts the box on the first line. */
.contact-form .ack-row label { margin: 0; padding-left: 0.75rem; font-size: 1rem; font-weight: 400; line-height: 1.5; cursor: pointer; }
.contact-form button { align-self: flex-start; margin-top: 1.5rem; height: 44px; padding: 0 1.5rem; font: inherit; font-weight: 700; color: #161616; background: var(--accent); border: 0; border-radius: 0; cursor: pointer; }
.contact-form button:hover { filter: brightness(1.06); }
.form-error, .field-error { font-weight: 600; }
.field-error { margin: 0 0 0.5rem; font-size: 0.9375rem; }
/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Phones: brand and search on the first row, the nav on its own row under them. */
@media (max-width: 720px) {
  .site-nav { order: 3; flex-basis: 100%; margin-left: -0.75rem; }
  /* The open box takes the first row from just after the logo, over the wordmark; the logo stays visible. */
  .site-search.open { position: absolute; z-index: 10; left: calc(var(--gutter) + 40px + 0.625rem); right: var(--gutter); top: 0.75rem; }
  .site-search.open input { width: 100%; }
}

/* The page title in its own band (blog index) under the header's hairline. */
.page-head { padding-block: 3rem 3.25rem; }
.page-head .index-title { color: var(--band-ink); margin: 0; }
@media (max-width: 640px) { .page-head { padding-block: 2rem 2.25rem; } }

/* Landing (/): the title and one Start here button in the band; the intro article and the three newest posts below. */
.hero { padding-block: 4.5rem 4rem; }
/* 5vw keeps "AI Way of Working: Shipping software" (17.8em) on one line from 800px up */
.page-head .hero-title { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 2.5rem; }
@media (max-width: 800px) { .hero-title br { display: none; } }
.nowrap { white-space: nowrap; }
/* mow's agent, skill and tool icons after "agents", smaller than the title */
.mics { display: inline-flex; gap: .08em; margin-left: .14em; vertical-align: .08em; }
.mic { display: inline-flex; width: .42em; height: .42em; border-radius: 50%; color: #161616; }
.mic.agent { background: #3ddc84; }
.mic.skill { background: #facc15; }
.mic.tool { background: #60a5fa; }
.mic-svg { width: 100%; height: 100%; fill: currentColor; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.25rem; font-weight: 700; color: #161616; background: var(--accent); text-decoration: none; }
.btn:hover { filter: brightness(1.06); }
/* the work-loop figure's start and end nodes */
.fig .idea rect { fill: #facc15; }
.fig .done rect { fill: #3ddc84; }
.fig .idea text, .fig .done text { fill: #161616; font-weight: 700; }
.home-intro { max-width: var(--measure); padding-top: 3rem; }
.home-intro > h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 1rem; }
.latest { padding-block: 2.5rem 4rem; }
.latest > h2 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.latest .grid { padding-top: 1.5rem; }
.more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2rem; font-weight: 700; }
@media (max-width: 640px) {
  .hero { padding-block: 2.5rem 3rem; }
  .page-head .hero-title { margin-bottom: 1.5rem; }
  .home-intro { padding-top: 2rem; }
}

/* /search: the form on paper, results as the index cards. */
.search-page h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 1.5rem 0 1.25rem; }
.search-page .search-form { max-width: 36rem; }
.search-count { color: var(--muted); margin: 1.5rem 0 0; }
.hits { list-style: none; margin: 1.5rem 0 4rem; padding: 0; max-width: var(--measure); }
.hits li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.hits a { font-weight: 600; font-size: 1.125rem; }
.hits time { display: block; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.hits p { margin: 0.25rem 0 0; }
/* Equal side columns keep the copyright centred on the page, not between the links and the edge. */
/* Contact us left, copyright centre, legal links right; stacked in that DOM order on phones. */
.site-footer { color: var(--muted); border-top: 1px solid var(--rule); font-size: 0.9375rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 1.5rem; }
.site-footer p { margin: 0.5rem 0; grid-row: 1; }
.site-footer p:first-child { grid-column: 1; justify-self: start; }
.site-footer p:nth-child(2) { grid-column: 3; justify-self: end; }
.site-footer .copyright { grid-column: 2; color: var(--ink); }
@media (max-width: 720px) {
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer p, .site-footer p:first-child, .site-footer p:nth-child(2), .site-footer .copyright { grid-column: 1; grid-row: auto; justify-self: center; }
}

/* Post page: Medium's column and type (ai-wow docs/policies/blog-reading.md, "How a post looks").
   Not .post: that class is the index card, whose flex gap and margin-0 headings would leak in. */
.post-page { max-width: 42.5rem; margin-inline: auto; font-size: 1.375rem; }
.post-page .post-header h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin: 1.5rem 0 1rem; }
.post-page .prose > p:first-child { font-size: 1.5rem; }
.post-page .prose p { margin: 0 0 1.75rem; }
.post-page .prose h2 { font-size: 1.75rem; line-height: 1.25; margin: 4rem 0 1rem; }
@media (max-width: 640px) {
  .post-page { font-size: 1.25rem; line-height: 1.65; }
  .post-page .post-header h1 { font-size: 2rem; }
  .post-page .prose > p:first-child { font-size: 1.3125rem; }
  .post-page .prose p { margin-bottom: 1.5rem; }
  .post-page .prose h2 { font-size: 1.5rem; margin-top: 3rem; }
}
/* Side contents: only where the rail fits right of the 56rem figures (6.75rem past the column). */
.post-toc-rail { display: none; }
@media (min-width: 87.5rem) {
  .post-page { position: relative; }
  .post-toc-rail { display: block; position: absolute; top: 0; bottom: 0; left: calc(100% + 8.75rem); width: 12.5rem; }
  .post-toc { position: sticky; top: calc(var(--band-pin) + 2rem); max-height: calc(100vh - var(--band-pin) - 4rem); overflow-y: auto; font-size: 0.875rem; line-height: 1.4; }
  .post-toc-title { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; }
  .post-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
  .post-toc a { display: block; padding: 0.375rem 0 0.375rem 0.875rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
  .post-toc a:hover { color: var(--ink); }
  .post-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--accent); }
}
.post-header .byline { display: block; color: var(--muted); font-size: 0.875rem; }
/* The post's AI topic between hairlines, as the mow mockup's action row (Copy link / Share come later). */
.post-topic { margin: 1rem 0 2.5rem; padding-block: 0.75rem; border-block: 1px solid var(--rule); color: var(--muted); font-size: 0.9375rem; }
.post-topic b { color: var(--ink); font-weight: 600; }
/* Language switch (post header, glossary): byline-sized links; the current language is ink text, never a link. */
.lang-switch { display: flex; align-items: center; margin: 0; color: var(--muted); font-size: 0.9375rem; white-space: nowrap; }
.lang-switch a, .lang-switch [aria-current] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 0.875rem; }
.lang-switch > :first-child { margin-left: -0.875rem; }
.lang-switch [aria-current] { color: var(--ink); font-weight: 600; }
/* Contents list (docs/brainstorms/mockups/mow.html): numbered rows with hairlines, each a 48px target. */
.prose ol.toc { list-style: none; padding: 0; margin: 0 0 1.75rem; counter-reset: t; }
.prose ol.toc li { counter-increment: t; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.prose ol.toc li:first-child { border-top: 1px solid var(--rule); }
.prose ol.toc a { display: flex; gap: 14px; padding: 12px 4px; min-height: 48px; box-sizing: border-box; text-decoration: none; color: var(--ink); }
.prose ol.toc a::before { content: counter(t); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.2em; }
.prose ol.toc a:hover { background: var(--hover); }
.empty { color: var(--muted); }

.prose img { max-width: 100%; height: auto; }
.prose table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; margin: 1rem 0 1.5rem; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 0.25rem 0.5rem; text-align: left; }
.prose code { font-family: inherit; background: var(--code-bg); padding: 0 0.2em; }
/* A long code line breaks out centred like the figures, up to 56rem; short blocks keep the column. */
.prose pre { background: var(--code-bg); padding: var(--space); overflow-x: auto; font-size: 1rem; width: max-content; min-width: 100%; max-width: min(56rem, calc(100vw - 2rem)); margin-left: 50%; transform: translateX(-50%); }
@media (max-width: 640px) { .prose pre { font-size: 0.9375rem; width: auto; max-width: none; margin-left: 0; transform: none; } }
.prose pre code { background: none; padding: 0; }
/* Long snake_case names have no break point and push phones sideways; pre scrolls on its own. */
.prose :not(pre) > code { overflow-wrap: anywhere; }

/* Figures: ```figure <name>``` in a post inlines content/figures/<name>.html. Process notation:
   ai-wow skills/docs/DIAGRAMS.md. Below 640px the SVG gives way to its numbered list. */
.prose figure { margin: 2rem 0; width: min(56rem, calc(100vw - 2rem)); margin-left: 50%; transform: translateX(-50%); }
.prose figure.in-column { width: auto; margin-left: 0; transform: none; }
.prose figcaption { font-size: 0.9375rem; color: var(--muted); text-align: center; margin-top: 0.75rem; }
.diagram { display: block; width: 100%; height: auto; }
.diagram rect { fill: var(--code-bg); }
.diagram text { font: 600 13px var(--font); fill: var(--ink); }
.diagram .sub { font: 400 11px var(--font); fill: var(--muted); }
.diagram .ln { stroke: var(--muted); fill: none; }
.diagram .back { stroke: var(--accent-text); fill: none; stroke-dasharray: 4 4; }
.diagram .tip { fill: var(--muted); }
.diagram rect.pool, .diagram .pool { fill: none; stroke: var(--rule); }
.diagram .lbl { font: 700 12px var(--font); fill: var(--muted); }
.diagram .ev, .diagram .gw { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.diagram .ev-end { fill: var(--paper); stroke: var(--ink); stroke-width: 3.5; }
.diagram .mk { font: 700 13px var(--font); fill: var(--ink); }
.diagram .msg { stroke: var(--muted); fill: none; stroke-dasharray: 5 4; }
.diagram .open { fill: none; stroke: var(--muted); }
.diagram .dot { fill: var(--paper); stroke: var(--muted); }
/* Step numbers on process figures; they match the phone list's numbering. */
.diagram .num rect { fill: var(--accent); }
.diagram .num text { font: 700 11px var(--font); fill: #161616; }
.steps-sm { display: none; }
/* A figure with no list of its own sits next to prose that already lists the steps: drop it on phones. A screenshot (.shot) has no text version, so it stays. */
@media (max-width: 640px) { .diagram, .prose figure:not(.cam-thread):not(.shot):not(:has(.steps-sm, .diagram.tall, .fig)) { display: none; } .steps-sm { display: block; } }
/* CAM thread figure: one chat message per row, the CAM page's look; text, so it stays on phones. */
.prose figure.cam-thread { background: #161616; color: #ececec; padding: 1.25rem 1.5rem; }
.cam-thread ol { list-style: none; margin: 0; padding: 0; }
.cam-thread li { display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; padding: 0.6rem 0; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.875rem; line-height: 1.45; }
.cam-thread li:first-child { border-top: 0; }
.cam-thread time { grid-row: span 2; color: #a0a0aa; font-variant-numeric: tabular-nums; }
.cam-thread .h { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }
.cam-thread .k { font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: #a0a0aa; }
.cam-thread p { grid-column: 2; margin: 0.15rem 0 0; color: #c8c8d0; overflow-wrap: anywhere; }
.cam-thread li.op p { color: #ffffff; font-weight: 500; }
.cam-thread li.op b { color: #2bc4d9; }
.cam-thread li.hot .k { color: #eda100; }
.prose figure.cam-thread figcaption { color: #a0a0aa; }
@media (max-width: 640px) { .prose figure.cam-thread { padding: 1rem; } .cam-thread li { grid-template-columns: 1fr; } .cam-thread time { grid-row: auto; } .cam-thread p { grid-column: 1; } }
/* Run graph from scripts/mow_figures.py rungraph (rules from docs/brainstorms/mockups/mow.html):
   green landed clean, yellow landed after a fix round, blue running, grey not started.
   It prints a wide and a tall SVG; phones get the tall one. */
.diagram.tall { display: none; max-width: 340px; margin: 0 auto; }
@media (max-width: 640px) { .diagram.tall { display: block; } }
.rungraph { max-width: 640px; margin: 0 auto; }
/* Two run graphs side by side; they wrap to one column when narrow. */
.runs-pair { display: flex; flex-wrap: wrap; gap: var(--space); align-items: flex-start; }
.runs-pair > .rungraph { flex: 1 1 260px; min-width: 0; }
.runs-pair > figcaption { flex-basis: 100%; }
.rungraph .panel { fill: var(--code-bg); }
.rungraph .d circle { fill: var(--rule); }
.rungraph .d text { font: 700 14px var(--font); fill: #161616; }
.rungraph .d text.w { font-size: 11px; }
.rungraph .d.pending text { fill: var(--muted); }
.rungraph .d.done circle { fill: #3ddc84; }
.rungraph .d.issues circle { fill: #facc15; }
.rungraph .d.running circle { fill: #60a5fa; }
.rungraph .nm { font: 500 11px var(--font); fill: var(--muted); }
.rungraph .e { fill: none; stroke-width: 1.5; }
.rungraph .e.done { stroke: var(--muted); }
.rungraph .e.pending { stroke: var(--muted); stroke-dasharray: 3 3; }
.rungraph .mk.done { fill: var(--muted); }
.rungraph .mk.pending { fill: var(--rule); }
.rungraph .j.done { fill: #3ddc84; }
.rungraph .j.pending { fill: var(--rule); }
.rungraph .lamp rect { fill: var(--rule); }
.rungraph .lamp circle { fill: var(--muted); }
.rungraph .lamp.on circle { fill: #facc15; }
/* Timeline from scripts/mow_figures.py timeline: one row per lane, one bar per agent call, hover a
   bar for its times. Rules copied from docs/brainstorms/mockups/mow.html, phase colours as /runs. */
.timeline .b { fill: var(--s-build); }
.timeline .r { fill: var(--s-review); }
.timeline .f { fill: var(--s-fix); }
.timeline .grid { stroke: var(--rule); fill: none; }
.timeline .tick { font: 500 11px var(--font); fill: var(--muted); }
.timeline .lg { font: 500 12px var(--font); fill: var(--ink); }
.timeline .rl { font: 400 12px var(--font); fill: var(--ink); }
.timeline .rl .k { font-weight: 700; }
.timeline .gl { font: 400 12px var(--font); fill: var(--muted); }
.timeline .grp { font: 700 12px var(--font); fill: var(--ink); }
.timeline .st { font: 500 11px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .wait { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; fill: none; }
/* Run view: per run a chat row, then each wave node with its lanes, on one time axis. Rules copied
   from docs/brainstorms/mockups/mow.html (--body and --line-strong map to --ink and --muted here). */
.runview .c { fill: var(--muted); }
.runview .b { fill: var(--s-build); }
.runview .r { fill: var(--s-review); }
.runview .f { fill: var(--s-fix); }
.runview .grid { stroke: var(--rule); fill: none; }
.runview .tick { font: 500 12px var(--font); fill: var(--muted); }
.runview .lg { font: 500 13px var(--font); fill: var(--ink); }
.runview .grp { font: 700 15px var(--font); fill: var(--ink); }
.runview .rl { font: 400 14px var(--font); fill: var(--ink); }
.runview .gl { font: 400 13px var(--font); fill: var(--muted); }
.runview .dur { font: 600 13px var(--font); fill: var(--ink); font-variant-numeric: tabular-nums; }
.runview .save { font: 700 14px var(--font); fill: var(--accent-text); }
.runview .wait { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; fill: none; }
.runview .d circle { fill: var(--rule); }
.runview .d text { font: 700 14px var(--font); fill: #161616; }
.runview .d text.w { font-size: 11px; }
.runview .d.pending text { fill: var(--muted); }
.runview .d.done circle { fill: #3ddc84; }
.runview .d.issues circle { fill: #facc15; }
.runview .d.running circle { fill: #60a5fa; }
.runview .e { fill: none; stroke-width: 1.5; }
.runview .e.done { stroke: var(--muted); }
.runview .e.pending { stroke: var(--muted); stroke-dasharray: 3 3; }
/* The landing mockup's mow card (docs/brainstorms/mockups/site-landing.html): one row of waves on
   the dark box-figure panel; the running lane pulses. */
.fig.mowg { max-width: 34rem; }
.mowg .panel { fill: #202020; }
.mowg .d circle { fill: #3a3a3a; }
.mowg .d text { font: 700 14px var(--font); fill: #161616; }
.mowg .d.wave text { font-size: 11px; }
.mowg .d.done circle { fill: #3ddc84; }
.mowg .d.issues circle { fill: #facc15; }
.mowg .d.running circle { fill: #60a5fa; animation: mowg-pulse 1.5s ease-in-out infinite; }
@keyframes mowg-pulse { 50% { fill: #bfdbfe; } }
@media (prefers-reduced-motion: reduce) { .mowg .d.running circle { animation: none; } }
.mowg .tid { font: 500 11px var(--font); fill: #a0a0aa; }
.mowg .e { fill: none; stroke-width: 1.5; }
.mowg .e.done { stroke: #e6e6e9; }
.mowg .e.pending { stroke: #5a5a62; }
.mowg .mk.done { fill: #e6e6e9; }
.mowg .mk.pending { fill: #5a5a62; }
.mowg .j.done { fill: #3ddc84; }
.mowg .j.pending { fill: #3a3a3a; }
.mowg .lamp rect { fill: #2a2a2a; }
.mowg .lamp circle { fill: #4a4a4a; }
.mowg .lamp.on circle { fill: #facc15; }

/* Box figure: the landing card style (dark panel, square boxes, one accent box). It is small enough to stay on phones. */
.prose figure:has(.fig) { background: #161616; padding: 1.5rem; }
.fig { display: block; width: 100%; max-width: 30rem; height: auto; margin: 0 auto; }
.fig rect { fill: #262626; }
.fig text { font: 600 15px var(--font); fill: #ffffff; }
.fig .sub { font: 400 12px var(--font); fill: #a0a0aa; }
.fig .note { font: 500 13px var(--font); fill: #a0a0aa; }
.fig .key rect { fill: #2bc4d9; }
.fig .key text, .fig .key .sub { fill: #161616; }
.fig .ln { stroke: #a0a0aa; stroke-width: 1.5; fill: none; }
.fig .back { stroke: #2bc4d9; stroke-width: 1.5; fill: none; stroke-dasharray: 5 4; }
.fig .tip { fill: #a0a0aa; }
.fig .tip-hot { fill: #2bc4d9; }
.fig .num rect { fill: #2bc4d9; }
.fig .num text { font: 700 12px var(--font); fill: #161616; }
.fig .key .num rect { fill: #161616; }
.fig .key .num text { fill: #2bc4d9; }
.prose figure:has(.fig) figcaption { color: #a0a0aa; }
/* The box SVG stays on phones, so its phone list would repeat it (and is dark ink on the dark panel). */
.prose figure:has(.fig) .steps-sm { display: none; }

/* Blog index (/blog): a card grid that fills the screen, the date archive on the right. */
.wide .site-main, .page-head { max-width: var(--measure-wide); padding-inline: var(--gutter); }
.index-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 1.5rem 0 0.75rem; }

.post { display: flex; flex-direction: column; gap: 0.75rem; color: var(--ink); text-decoration: none; }
.post h2, .post h3 { margin: 0; letter-spacing: -0.01em; }
.post:hover h2, .post:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post .sum { margin: 0; }
.byline { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.byline b { color: var(--ink); font-weight: 600; }
.byline time { font-variant-numeric: tabular-nums; }

/* The tile: the figure's own SVG, cropped by front-matter card_crop (its viewBox), never sliced. */
/* The SVG takes its height from its viewBox, so the box edge is the crop edge: nothing beyond it shows. */
/* Every tile is the same 16:9 box; the drawing scales to fit inside it, centred. */
.tile { display: block; aspect-ratio: 16 / 9; padding: 1rem; background: var(--tile); overflow: hidden; }
.post:hover .tile { background: var(--tile-hover); }
.tile > svg, .tile > .fig { display: block; width: 100%; height: 100%; max-width: none; margin: 0; }
.tile-words { display: flex; align-items: flex-end; padding: 1.5rem; color: var(--tile-ink); font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
/* Diagram classes from the figure rules above, recoloured for the dark tile; .tile wins on phones too. */
.tile .diagram { display: block; }
.tile .diagram rect { fill: var(--tile-box); }
.tile .diagram text, .tile .diagram .mk { fill: var(--tile-ink); }
.tile .diagram .sub, .tile .diagram .lbl, .tile .rungraph .nm { fill: var(--tile-muted); }
.tile .diagram .ln, .tile .diagram .msg, .tile .diagram .open, .tile .rungraph .e.done, .tile .rungraph .e.pending { stroke: var(--tile-line); }
.tile .diagram .tip, .tile .rungraph .mk.done { fill: var(--tile-line); }
.tile .diagram .back { stroke: var(--accent); }
.tile .diagram rect.pool, .tile .diagram .pool { fill: none; stroke: var(--tile-box); }
.tile .diagram .ev, .tile .diagram .gw, .tile .diagram .ev-end { fill: var(--tile); stroke: var(--tile-ink); }
.tile .diagram .dot { fill: var(--tile); stroke: var(--tile-line); }
.tile .diagram .num rect { fill: var(--accent); }
.tile .diagram .num text { fill: #161616; }

.index { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem; padding-bottom: 4rem; }
.rail { padding-top: 2.5rem; }
.rail h2 { font-size: 1.125rem; font-weight: 700; margin: 0 0 0.625rem; }
.rail-sub { font-size: 0.9375rem; font-weight: 600; color: var(--muted); margin: 1.5rem 0 0.25rem; }
.rail h2 + .rail-sub { margin-top: 0; }
/* Archive: year > month > day > titles, native <details>, newest year and month open. */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 1rem; }
.tree summary { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; cursor: pointer; color: var(--ink); font-variant-numeric: tabular-nums; }
.tree summary:hover { background: var(--hover); }
.tree summary::before { content: "+"; width: 1rem; color: var(--muted); }
.tree details[open] > summary::before { content: "−"; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary { list-style: none; }
.tree summary span { margin-left: auto; padding-right: 0.5rem; color: var(--muted); }
.tree > li > details > summary { font-weight: 700; border-top: 1px solid var(--rule); }
.tree-posts a { display: block; padding: 0.375rem 0 0.375rem 1.5rem; line-height: 1.35; }
.rss { display: inline-flex; align-items: center; min-height: 44px; margin-top: 1.25rem; font-weight: 700; color: var(--accent-text); }

/* At most 3 cards per row (operator): a column never drops below a third of the row, minus the gaps. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 20rem), calc((100% - 4rem) / 3)), 1fr)); gap: 3rem 2rem; padding-top: 2.5rem; align-content: start; }
.grid h2, .grid h3 { font-size: 1.3125rem; font-weight: 700; line-height: 1.25; margin-top: 0.375rem; }
.grid .byline { margin-top: auto; }
.grid .empty { grid-column: 1 / -1; margin: 0; }

/* Pager (ai-wow rules/ui-design.md, "List pages"): pages left, page size right, square. Shared by /runs and /blog (_pager.html). */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 0.75rem 0; font-size: 0.9375rem; }
.pager form { display: flex; align-items: center; gap: 0.375rem; margin: 0; }
.pager-arrow { display: grid; place-items: center; min-width: 44px; height: 44px; color: var(--ink); text-decoration: none; border: 1px solid var(--rule); }
a.pager-arrow:hover { background: var(--hover); }
.pager-arrow[aria-disabled="true"] { color: var(--muted); opacity: 0.5; }
.pager select, .pager-go { height: 44px; padding: 0 0.5rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 0; }
.pager-of, .pager-range { color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-range { margin-left: 0.25rem; }
.index-main .pager { margin: 2.5rem 0 0; }

@media (max-width: 960px) {
  /* Posts first on narrow screens; the archive follows them. */
  .index { grid-template-columns: 1fr; gap: 0; }
  .rail { padding-top: 2rem; border-top: 1px solid var(--rule); margin-top: 2.5rem; }
}
@media (max-width: 640px) {
  .grid { gap: 2.5rem; padding-top: 1.75rem; }
  .grid h2, .grid h3 { font-size: 1.25rem; }
}
