/* The front page: Luci, told in a Hermes-like editorial style. Black, the lockup's ivory and one lime.
   Lime fields carry the story (hero, early access); ivory carries the product; black carries the promises. */
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("assets/fonts/inter-tight-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("assets/fonts/inter-tight-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("assets/fonts/ibm-plex-mono-regular.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #000; --ivory: #f0f0e9; --lime: #c6f432; --lime-lt: #e3ff8a;
  --mute-dark: #a3a39b;   /* secondary text on black, 8:1 */
  --mute-light: #5c5c56;  /* secondary text on ivory, 6:1 */
  --rule-light: #c9c9c0;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --page: 1240px; --gutter: clamp(20px, 5vw, 64px); --nav: 72px;
  /* the names products.css (the shared team run and habits) expects */
  --paper: var(--ivory); --g1: #e4e4dc; --g2: #b9b9b0; --g3: var(--mute-light); --acc: var(--lime); --acc-lt: var(--lime-lt); --acc-dk: #7a9a12;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ink); color: var(--ivory); font: 400 1.0625rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.light :focus-visible, .field :focus-visible, .nav :focus-visible { outline-color: var(--ink); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--lime); font: 600 1.125rem/1 var(--display); text-decoration: none; }
.skip:focus { top: 12px; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; margin: 0; text-wrap: balance; } /* light and tall, the way Hermes sets its headlines */
.ph { display: block; } /* a phrase in a heading gets its own line, and only wraps inside itself when it can't fit */
p { margin: 0 0 16px; text-wrap: pretty; } /* no single word left alone on a paragraph's last line */

/* buttons: square, condensed, one job each */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; font: 600 1.1875rem/1 var(--display); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: background-color 120ms, color 120ms, transform 80ms; }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--lime); }
.btn-ink:hover { background: var(--ivory); color: var(--ink); }
.light .btn-ink { color: var(--ivory); }
.light .btn-ink:hover { background: var(--lime); color: var(--ink); }
.btn-line-ink { border-color: var(--ink); color: var(--ink); }
.btn-line-ink:hover { background: var(--ink); color: var(--lime); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

/* nav: links spread across the bar with the product's name in the middle, as Hermes does */
.nav { position: sticky; top: 0; z-index: 20; height: var(--nav); display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr 1fr; align-items: center; gap: 16px; padding: 0 var(--gutter); background: var(--lime); color: var(--ink); border-bottom: 1px solid rgba(0, 0, 0, 0.16); }
.nav-link { justify-self: center; padding: 8px 0; font: 600 0.9375rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; white-space: nowrap; }
.nav-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
/* the wordmark sits beside every page's name, and always links home; the name scrolls to the top */
.nav-mark { --mark: 28px; display: flex; align-items: center; gap: 14px; justify-self: center; text-decoration: none; line-height: 1; }
.nav-mark img { display: block; height: var(--mark); width: auto; max-width: none; }
.nav-home { display: block; flex: none; } /* the wordmark never squeezes */
/* the name matches the wordmark's lettering: its capitals stand as tall as the "l" in lcfr.ai (0.506 of the image
   height, Barlow capitals are 0.703 of the font size), and a line as tall as the image puts both on one baseline */
.nav-name { padding-left: 14px; border-left: 1px solid rgba(0, 0, 0, 0.4); font: 600 calc(var(--mark) * 0.73) / var(--mark) var(--display); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; }
.nav-cta { justify-self: end; min-height: 40px; padding: 8px 16px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* lime fields: the hero and the early-access call, one colour flooding the page the way Hermes uses blue */
.field { background: var(--lime); color: var(--ink); }
.field ::selection { background: var(--ink); color: var(--lime); }
.hero { max-width: var(--page); margin: 0 auto; padding: clamp(28px, 5vh, 72px) var(--gutter) clamp(40px, 6vh, 80px); min-height: calc(100dvh - var(--nav)); display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(28px, 4vw, 64px); }
.hero h1 { font-size: clamp(3.75rem, 7.4vw, 8rem); line-height: 0.9; letter-spacing: -0.005em; margin-bottom: 26px; }
.hero-sub { font-size: clamp(1.125rem, 1.4vw, 1.3125rem); line-height: 1.5; max-width: 38ch; margin-bottom: 28px; }
.hero-meta { margin: 22px 0 0; font-size: 0.9375rem; color: #34400f; }
.hero-art { margin: 0; justify-self: end; width: min(100%, 720px, calc(100dvh - var(--nav) - 96px)); }
.art-frame { aspect-ratio: 1; background: var(--ink); }
.art-frame img { width: 100%; height: 100%; }

/* dithered bands between colour fields; site.js paints them */
.band { height: 48px; background-size: 64px 48px; image-rendering: pixelated; }

/* shared section furniture */
.light { background: var(--ivory); color: var(--ink); }
.light ::selection { background: var(--ink); color: var(--lime); }
.label { margin: 0 0 14px; font: 600 0.875rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.1em; }
section > h2, .feature h2, .early h2, .mission h2 { font-size: clamp(2.75rem, 5.4vw, 5.25rem); line-height: 0.92; letter-spacing: -0.005em; margin-bottom: 20px; max-width: 16ch; }
.sec-sub { font-size: 1.1875rem; max-width: 58ch; color: var(--mute-light); margin-bottom: 36px; }

/* mission */
.mission { max-width: var(--page); margin: 0 auto; padding: clamp(72px, 10vw, 136px) var(--gutter) 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.mission-lines { margin: 0 0 24px; font: 300 clamp(1.5rem, 2.5vw, 2.25rem)/1.15 var(--display); }
.mission-lines span { display: block; }
.mission-lines span:last-child { display: inline; background: linear-gradient(transparent 60%, var(--lime) 60% 92%, transparent 92%); }
.mission-body { max-width: 50ch; font-size: 1.1875rem; color: var(--mute-light); margin: 0; }
.mission-art { width: 100%; aspect-ratio: 1; }

/* the team run, framed like a window into Luci */
.demo, .stages, .why { max-width: var(--page); margin: 0 auto; padding: clamp(80px, 10vw, 136px) var(--gutter) 0; }
.demo-frame { border: 1px solid var(--ink); background: var(--ivory); box-shadow: 8px 8px 0 var(--lime), 8px 8px 0 1px var(--ink); container-type: inline-size; }
.demo-bar span { white-space: nowrap; } /* on a phone, a whole label moves to the next row instead of breaking */
.demo-bar { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 10px 16px; background: var(--ink); color: var(--ivory); font: 600 0.8125rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.1em; }
.demo-bar span:first-child { color: var(--lime); }
.demo-bar span:last-child { margin-left: auto; color: var(--mute-dark); }
.demo-body { padding: clamp(14px, 2.4vw, 28px); overflow-x: auto; } /* on the narrowest phones the demo scrolls inside its window, not the page */
.demo-body .flag { margin: 0; padding: 10px 14px; border: 1px dashed var(--ink); box-shadow: inset 5px 0 0 var(--lime); font-size: 0.9375rem; max-width: none; }
.demo-body .meta, .why .meta { color: var(--mute-light); font-size: 0.9375rem; }
.demo-body .btn-row, .why .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-body .btn, .why .btn { min-height: 40px; padding: 8px 16px; font-size: 1.0625rem; border-color: var(--ink); background: var(--ivory); color: var(--ink); }
.demo-body .btn:hover, .why .btn:hover { background: var(--lime); }
.demo-body .btn.primary, .why .btn.primary { background: var(--ink); color: var(--lime); }
.demo-body .btn.primary:hover, .why .btn.primary:hover { background: var(--lime); color: var(--ink); }
.demo-body .run-q { font-size: 1.0625rem; }
.demo-body .run-tally { font-family: var(--display); font-size: 1.0625rem; letter-spacing: 0.02em; }
.demo-body .run-tally strong { font-weight: 300; font-size: 1.75rem; }
.demo-body .run-h { font-family: var(--display); font-weight: 600; letter-spacing: 0.1em; }
.static-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }

/* five stages: Hermes' feature grid, three across then two */
.stage-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 48px) clamp(20px, 2.5vw, 36px); }
.stage { grid-column: span 2; }
.stage:nth-child(n+4) { grid-column: span 3; }
.stage img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--ink); margin-bottom: 18px; }
.stage:nth-child(n+4) img { aspect-ratio: 16 / 10; object-position: 50% 100%; } /* their subjects sit low: the lighthouse, the rooftops */
.stage .label { margin-bottom: 8px; }
.stage h3 { font-size: clamp(1.75rem, 2.6vw, 2.375rem); line-height: 1; margin-bottom: 10px; }
.stage p:last-child { margin: 0; font-size: 1rem; max-width: 46ch; }

/* why Luci: the habits, by hand or with Luci (component from products.js) */
.why .habits { background: var(--ivory); box-shadow: 8px 8px 0 var(--lime), 8px 8px 0 1px var(--ink); }
.why .hb-head { background: var(--ink); color: var(--ivory); border-bottom-color: var(--ink); }
.why .hb-head h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.why .seg { font: 600 1rem/1 var(--display); letter-spacing: 0.04em; padding: 8px 14px; background: transparent; color: var(--ivory); border: 1px solid var(--ivory); margin-right: -1px; cursor: pointer; }
.why .seg[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.why .hb-label { font-family: var(--display); font-size: 1rem; letter-spacing: 0.02em; }
.why .hb-count { font-weight: 300; font-size: 2rem; }
.why .hb h4 { font: 600 1.1875rem/1.15 var(--display); letter-spacing: 0.01em; margin-bottom: 6px; }
.why .hb p { font-size: 0.9375rem; }
.why .hb-sum .hb-big { font: 300 2.25rem/1 var(--display); }
.why .hb-sum.is-luci .btn.primary { background: var(--ink); color: var(--lime); }
.why .hb-sum.is-luci .btn.primary:hover { background: var(--ivory); color: var(--ink); }
.why .hb-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.why .gains { margin-top: 28px; }
.why .gains strong { font: 600 1.125rem/1.2 var(--display); letter-spacing: 0.02em; }
.static-habits { margin: 0; padding-left: 20px; display: grid; gap: 10px; max-width: 70ch; }

/* Glasses: look first */
.feature { max-width: var(--page); margin: 0 auto; padding: clamp(80px, 10vw, 136px) var(--gutter) clamp(80px, 10vw, 136px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.feature-art { position: sticky; top: calc(var(--nav) + 24px); }
.feature-art img { width: 100%; aspect-ratio: 1; background: var(--ink); }
.feature-copy > p { font-size: 1.1875rem; max-width: 46ch; }
.feature .cta-row { margin-top: 28px; }
.search { margin: 26px 0 0; max-width: 520px; }
.search label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9375rem; }
.search-row { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid var(--ink); border-radius: 0; background: #fbfbf6; color: var(--ink); font-size: 1.0625rem; }
.search input::placeholder { color: #75756e; }
.results { max-width: 520px; }
.results:empty { display: none; }
.results .status { margin: 14px 0 0; font-size: 0.9375rem; color: var(--mute-light); }
.hits { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.hits li { padding: 12px 0; border-bottom: 1px solid var(--rule-light); }
.hits a { font: 300 1.5rem/1.1 var(--display); text-decoration: none; overflow-wrap: anywhere; }
.hits a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; }
.hits p { margin: 4px 0 0; font-size: 0.9375rem; }
.hits .meta { font: 0.75rem/1.4 var(--mono); color: var(--mute-light); }
.skeleton li { height: 64px; background: repeating-linear-gradient(90deg, var(--rule-light) 0 2px, transparent 2px 4px); opacity: 0.6; }
.agent { margin: 28px 0 0; max-width: 560px; background: var(--ink); color: var(--ivory); padding: 16px 18px 14px; }
.agent-h { margin: 0 0 10px; font: 600 1.375rem/1 var(--display); }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid #2c2c29; margin-bottom: 12px; }
.tabs button { background: none; border: 0; padding: 6px 0 8px; font: 600 1.0625rem/1 var(--display); color: var(--mute-dark); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs [aria-selected="true"] { color: var(--ivory); border-bottom-color: var(--lime); }
.agent :focus-visible { outline-color: var(--lime); }
.snip { position: relative; }
.snip pre { margin: 0; padding: 12px 84px 12px 0; font: 0.875rem/1.55 var(--mono); color: var(--lime); white-space: pre-wrap; overflow-wrap: anywhere; }
.snip .copy { position: absolute; right: 0; top: 6px; min-height: 32px; padding: 6px 12px; font: 600 1rem/1 var(--display); background: var(--ivory); color: var(--ink); border: 0; cursor: pointer; }
.snip .copy:hover { background: var(--lime); }
.fine { margin: 10px 0 0; font-size: 0.875rem; color: var(--mute-dark); }

/* your control: the promises, on black */
.control { max-width: var(--page); margin: 0 auto; padding: clamp(72px, 9vw, 120px) var(--gutter); }
.control .label { color: var(--lime); }
.where { list-style: none; margin: 12px 0 48px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #3a3a36; }
.where li { padding: 24px 24px 8px 0; }
.where li + li { padding-left: 24px; border-left: 1px solid #3a3a36; }
.where h3 { font-size: clamp(1.875rem, 2.8vw, 2.5rem); line-height: 1; margin-bottom: 12px; }
.where p { color: var(--mute-dark); max-width: 36ch; }
.where .tag { display: inline-block; margin: 4px 0 0; padding: 4px 8px; border: 1px solid var(--lime); color: var(--lime); font: 600 0.8125rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 48px; max-width: 1040px; }
.promises li { position: relative; padding-left: 24px; font-size: 1.0625rem; }
.promises li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--lime); }

/* early access */
.early { max-width: var(--page); margin: 0 auto; padding: clamp(72px, 9vw, 120px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.early-copy > p { font-size: 1.1875rem; max-width: 46ch; margin-bottom: 28px; }
.early-art { width: 100%; aspect-ratio: 1; }

/* questions */
.faq { max-width: var(--page); margin: 0 auto; padding: clamp(72px, 9vw, 120px) var(--gutter); }
.faq h2 { font-size: clamp(2.75rem, 5.4vw, 5.25rem); line-height: 0.9; margin-bottom: 28px; }
.faq details, .docs-body details { border-bottom: 1px solid var(--ink); max-width: 980px; }
.faq details:first-of-type, .docs-body details:first-of-type { border-top: 1px solid var(--ink); }
.faq summary, .docs-body summary { text-wrap: balance; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 18px 0; cursor: pointer; list-style: none; font: 300 clamp(1.625rem, 2.6vw, 2.375rem)/1.1 var(--display); }
.faq summary::-webkit-details-marker, .docs-body summary::-webkit-details-marker { display: none; }
.faq summary::after, .docs-body summary::after { content: "+"; font-family: var(--mono); font-size: 1.25rem; transition: transform 150ms; }
.faq details[open] summary::after, .docs-body details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover, .docs-body summary:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--lime); text-underline-offset: 6px; }
.faq details p, .docs-body details p { max-width: 62ch; font-size: 1.0625rem; padding-bottom: 8px; }

.foot { padding: clamp(48px, 7vw, 96px) var(--gutter) 40px; display: grid; gap: 32px; justify-items: center; }
.foot-mark { width: min(100%, 980px); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; font: 600 1.1875rem/1 var(--display); }
.foot nav a { text-decoration: none; padding: 6px 0; }
.foot nav a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; }
.foot-line { margin: 0; font-size: 0.875rem; color: var(--mute-dark); }

/* ---------- the Glasses page ---------- */
/* search in the lime hero, with example searches and results on lime */
.tries { margin: 12px 0 0; font-size: 0.9375rem; }
/* once results show, the copy grows: keep the picture at the top, in view */
.hero:has(.results:not(:empty)) { align-items: start; }
.hero:has(.results:not(:empty)) .hero-art { position: sticky; top: calc(var(--nav) + 24px); }
.field .results .status, .field .hits .meta { color: #34400f; }
.field .hits li { border-bottom-color: rgba(0, 0, 0, 0.22); }
.field .hits a:hover { text-decoration-color: var(--ink); }
.field .skeleton li { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px); }
.agent-sees { margin-top: 14px; }
.agent-sees summary { cursor: pointer; padding: 6px 0; font: 600 1.0625rem/1 var(--display); letter-spacing: 0.02em; }
.agent-sees .agent-view { margin-top: 8px; }
/* the same request, with and without a look first (component from products.js) */
.demo-body .lf-pair { gap: 16px; }
.demo-body .lf { min-height: 252px; }
.demo-body .lf figcaption { padding: 9px 12px; font: 600 0.875rem/1 var(--display); letter-spacing: 0.1em; }
.demo-body .lf-lines { padding: 12px; gap: 3px; font-size: 0.8125rem; }
.demo-body .lf-note { margin-top: 12px; color: var(--mute-light); font-size: 0.9375rem; }
.demo-body .lf-note .btn.chip { min-height: 36px; padding: 6px 12px; font-size: 1rem; }
/* what's inside: the catalogue as a waffle, its key beside it */
.inside { max-width: var(--page); margin: 0 auto; padding: clamp(80px, 10vw, 136px) var(--gutter); }
.inside .demo-frame { margin-bottom: 44px; }
.inside .waffle { margin: 0; display: grid; grid-template-columns: minmax(0, 698px) minmax(200px, 1fr); gap: 20px 40px; align-items: start; }
.inside .waffle-key { margin: 0 0 12px; grid-template-columns: minmax(0, 1fr); gap: 0; }
.inside .waffle-key li { padding: 7px 0; border-bottom: 1px solid var(--rule-light); font: 600 1.0625rem/1 var(--display); letter-spacing: 0.02em; }
.inside .waffle .meta { color: var(--mute-light); font-size: 0.9375rem; }
.light .promises li::before { box-shadow: 0 0 0 1px var(--ink); }
/* for your agent, and on your machine: on black */
.control .sec-sub { color: var(--mute-dark); }
.control code { font: 0.9375em var(--mono); color: var(--lime); }
.control.follow { padding-top: 0; }
.connect-grid, .local-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.local-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
section > h2.h-wide { max-width: none; }
.control .agent { max-width: none; margin: 0; padding: 20px 22px 18px; border: 1px solid #3a3a36; }
.agent .agent-h:not(:first-child) { margin-top: 24px; }
.tools-list h3 { font-size: clamp(1.875rem, 2.8vw, 2.5rem); line-height: 1; margin-bottom: 14px; }
.tools-list dl { margin: 0; }
.tools-list dl > div { padding: 16px 0; border-top: 1px solid #3a3a36; }
.tools-list dd { margin: 6px 0 0; color: var(--mute-dark); max-width: 46ch; }
.local-grid > div:first-child p:first-child { font-size: 1.1875rem; max-width: 48ch; }
.early-copy > .early-aside { margin: 26px 0 0; font-size: 1rem; }

/* ---------- the home page: two tools and a toy, then our purpose ---------- */
.doors .stage { display: flex; flex-direction: column; align-items: flex-start; }
.doors .stage img { align-self: stretch; }
.doors .status { margin: 0 0 18px; padding: 4px 8px; border: 1px solid var(--ink); font: 600 0.8125rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; }
.doors .btn { margin-top: auto; } /* the three buttons line up along the bottom */
.mission.closing { padding-bottom: clamp(80px, 10vw, 136px); }
.foot-home { display: block; width: min(100%, 980px); }
.foot-home .foot-mark { width: 100%; }

/* ---------- the catalogue: search and filters on lime, results on ivory, one entry in a dialog ---------- */
.cat-hero { max-width: var(--page); margin: 0 auto; padding: clamp(36px, 5vw, 72px) var(--gutter) clamp(48px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.cat-hero h1 { font-size: clamp(3.25rem, 6.4vw, 6.5rem); line-height: 0.92; margin-bottom: 20px; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.cat-art { width: 100%; aspect-ratio: 1; }
.cat-search { max-width: 680px; }
.cat-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 16px; }
.cat-filters label { display: grid; gap: 6px; margin: 0; font-weight: 500; font-size: 0.875rem; }
.cat-filters select { min-height: 44px; padding: 8px 36px 8px 12px; border: 1px solid var(--ink); border-radius: 0; background: #fbfbf6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); font-size: 1rem; appearance: none; cursor: pointer; }
.cat-filters .cat-check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 0.9375rem; cursor: pointer; }
.cat-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.cat-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cat-filters .cat-link { min-height: 44px; font-size: 0.9375rem; }
.cat-results { max-width: var(--page); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(72px, 9vw, 120px); }
.cat-count { font-size: clamp(2.25rem, 3.6vw, 3.25rem); line-height: 1; margin-bottom: 16px; }
.cat-chip { display: inline-block; margin: 0 0 16px; padding: 8px 12px; border: 1px solid var(--ink); background: var(--lime); }
.cat-cols, .cat-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 150px 110px; gap: 8px 28px; }
.cat-cols { padding: 10px 0; border-bottom: 1px solid var(--ink); font: 600 0.8125rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.1em; }
.cat-cols span:last-child, .cat-stars { text-align: right; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-row { padding: 18px 0; border-bottom: 1px solid var(--rule-light); }
.cat-row > p { margin: 4px 0 0; }
.cat-row.is-loading { height: 96px; margin-bottom: 8px; border-bottom: 0; background: repeating-linear-gradient(90deg, var(--rule-light) 0 2px, transparent 2px 4px); opacity: 0.5; }
.cat-name { font: 300 1.625rem/1.1 var(--display); text-decoration: none; overflow-wrap: anywhere; }
.cat-name:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.cat-desc { margin: 6px 0 0; max-width: 72ch; font-size: 0.9375rem; }
.cat-from { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 0.875rem; color: var(--mute-light); }
.cat-from .cat-link { color: var(--ink); }
.cat-type .tag { display: inline-block; padding: 4px 8px; border: 1px solid var(--ink); font: 600 0.8125rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.cat-lic, .cat-stars { font: 0.875rem/1.5 var(--mono); overflow-wrap: anywhere; }
.cat-empty { padding: 24px 0; font-size: 1.0625rem; }
.cat-pages { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.cat-pages p { margin: 0; font-size: 0.9375rem; color: var(--mute-light); text-align: center; }
.cat-pages .btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.cat-results .cat-note { margin-top: 28px; color: var(--mute-light); }
.cat-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--ink); background: var(--ivory); color: var(--ink); box-shadow: 8px 8px 0 var(--lime), 8px 8px 0 1px var(--ink); overflow: auto; }
.cat-dialog::backdrop { background: rgba(0, 0, 0, 0.62); }
.cat-dialog .demo-bar { position: sticky; top: 0; align-items: center; }
.cat-close { margin-left: auto; padding: 4px 0; border: 0; background: none; color: var(--ivory); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.cat-close:hover { color: var(--lime); }
.cat-dialog :focus-visible { outline-color: var(--ink); }
.cat-dialog .demo-bar :focus-visible { outline-color: var(--lime); }
.cat-body { padding: clamp(18px, 3vw, 32px); }
.cat-body h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1; margin-bottom: 12px; overflow-wrap: anywhere; }
.cat-body h3 { font-size: 1.75rem; line-height: 1; margin: 28px 0 12px; }
.cat-lede { max-width: 62ch; font-size: 1.0625rem; }
.cat-body .cta-row { margin-top: 18px; }
.cat-body .copy { border-color: var(--ink); background: transparent; color: var(--ink); }
.cat-body .copy:hover { background: var(--ink); color: var(--lime); }
.cat-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 0 0 16px; }
.cat-facts > div { display: contents; }
.cat-facts dt { font: 600 0.875rem/1.5 var(--display); text-transform: uppercase; letter-spacing: 0.08em; }
.cat-facts dd { margin: 0; overflow-wrap: anywhere; }
.cat-facts dd span { display: block; font-size: 0.8125rem; color: var(--mute-light); }
.cat-body .fine { color: var(--mute-light); }
.cat-body details { padding: 12px 0; border-top: 1px solid var(--ink); }
.cat-body details:last-child { border-bottom: 1px solid var(--ink); }
.cat-body summary { cursor: pointer; font: 600 1.125rem/1.3 var(--display); letter-spacing: 0.01em; }
.cat-sections, .cat-cites { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 20px; font-size: 0.9375rem; }
.cat-cites { font-size: 0.875rem; }
.cat-cites code { font: 0.75rem/1.5 var(--mono); overflow-wrap: anywhere; }

/* ---------- setup notes: the server URL and a live check in the hero, then the steps with an index beside them ---------- */
.setup-url { max-width: 560px; margin-top: 26px; }
.check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.check-row p { margin: 0; font-size: 0.9375rem; color: #34400f; }
.docs { max-width: var(--page); margin: 0 auto; padding: clamp(56px, 7vw, 104px) var(--gutter) clamp(72px, 9vw, 120px); display: grid; grid-template-columns: 220px minmax(0, 780px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.docs-nav { position: sticky; top: calc(var(--nav) + 32px); }
.docs-nav ol { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--ink); }
.docs-nav li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule-light); font: 300 1.375rem/1.1 var(--display); text-decoration: none; }
.docs-nav li a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.docs-nav p:not(.label) { margin: 0 0 8px; font-size: 0.9375rem; }
.docs-body > section + section { margin-top: clamp(64px, 8vw, 112px); }
.docs-body section > h2 { font-size: clamp(2.5rem, 4.4vw, 4.25rem); }
.docs-body p { max-width: 64ch; }
.docs-body .fine { color: var(--mute-light); } /* on ivory; the black boxes keep their lighter grey */
.docs-body .agent { max-width: none; margin: 20px 0 24px; }
.docs-body .agent p { color: var(--ivory); }
.docs-body .agent p.fine { color: var(--mute-dark); }
.agent a { color: var(--lime); }
.docs-body code { padding: 1px 5px; background: #e4e4dc; font: 0.875em var(--mono); }
.agent code { padding: 1px 5px; background: #1c1c19; color: var(--lime); font: 0.875em var(--mono); }
.agent details { max-width: none; border-color: #3a3a36; }
.agent summary { font-size: 1.375rem; padding: 12px 0; }
.docs-next { margin-top: 36px; }

@media (max-width: 1000px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav-link { display: none; }
  .nav-mark { justify-self: start; }
}
@media (max-width: 900px) {
  .hero, .mission, .feature, .early { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; padding-top: 40px; }
  .hero-art { justify-self: stretch; width: 100%; }
  .feature-art { position: relative; max-width: 560px; order: -1; }
  .mission-art, .early-art { max-width: 560px; }
  .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage, .stage:nth-child(n+4) { grid-column: auto; }
  .stage:nth-child(n+4) img { aspect-ratio: 1; }
  .where, .promises { grid-template-columns: minmax(0, 1fr); }
  .why .hb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .where li + li { padding-left: 0; border-left: 0; border-top: 1px solid #3a3a36; }
  .connect-grid, .local-grid, .inside .waffle { grid-template-columns: minmax(0, 1fr); }
  .cat-hero { grid-template-columns: minmax(0, 1fr); }
  .cat-art { max-width: 320px; }
  .cat-cols { display: none; }
  .cat-row { grid-template-columns: auto auto minmax(0, 1fr); gap: 10px 16px; align-items: center; }
  .cat-main { grid-column: 1 / -1; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; }
}
@media (max-width: 560px) {
  .stage-grid, .why .hb-list, .demo-body .lf-pair { grid-template-columns: minmax(0, 1fr); }
  .search-row .btn { padding: 10px 16px; }
  .nav-cta { padding: 8px 12px; font-size: 0.9375rem; }
  .nav-mark { --mark: 22px; gap: 10px; }
  .nav-name { padding-left: 10px; }
  .cat-art { display: none; } /* on a phone, the search and its results come first */
  .cat-pages { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 400px) {
  section > h2, .feature h2, .early h2, .mission h2, .faq h2 { font-size: 2.5rem; } /* so a phrase like "Five connected stages." still fits one line */
  .nav { gap: 10px; }
  .nav-mark { --mark: 18px; gap: 8px; }
  .nav-name { padding-left: 8px; }
  .nav-cta { padding: 6px 10px; font-size: 0.8125rem; letter-spacing: 0.04em; }
}
@media (max-width: 340px) {
  .nav-cta .more { display: none; } /* "Catalogue", "Connect": short enough to sit beside the wordmark */
}
@media (prefers-reduced-motion: reduce) {
  .btn, .faq summary::after { transition: none; }
}
