/* intentmodel.org — the look of the AIM site. Warm paper, dark ink, one accent:
   the same family as the Amy site, kept plainer because this is a specification. */

:root {
  --bg: #faf8f4;
  --plane: #fffdf9;
  --tint: #f3efe7;
  --ink: #2b2621;
  --soft: #574d43;
  --muted: #756d63;
  --line: #e2dacd;
  --hairline: #ece7df;
  --accent: #79583e;
  --dot: #b97b4a;
  --green: #23695a;
  --blue: #3c6283;
  --rose: #9a4553;
  --code-bg: #f6f2ea;
  --glow: #fff6e6;
  --shadow: 0 1px 2px rgba(43, 38, 33, .04), 0 18px 40px -22px rgba(43, 38, 33, .22);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --wide: min(100% - 40px, 1160px);
  --top: 61px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1714;
    --plane: #221e1a;
    --tint: #201c18;
    --ink: #f2ece3;
    --soft: #d2c7b8;
    --muted: #a3988a;
    --line: #3b342d;
    --hairline: #2d2823;
    --accent: #dcae82;
    --dot: #d2905c;
    --green: #74c5ae;
    --blue: #93b9da;
    --rose: #e79aa6;
    --code-bg: #211d19;
    --glow: #2a231c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1a1714;
  --plane: #221e1a;
  --tint: #201c18;
  --ink: #f2ece3;
  --soft: #d2c7b8;
  --muted: #a3988a;
  --line: #3b342d;
  --hairline: #2d2823;
  --accent: #dcae82;
  --dot: #d2905c;
  --green: #74c5ae;
  --blue: #93b9da;
  --rose: #e79aa6;
  --code-bg: #211d19;
  --glow: #2a231c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 20px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.022em; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--dot); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: var(--wide); margin: 0 auto; }
.wrap.narrow { width: min(100% - 40px, 820px); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--hairline); }
.top-inner { display: flex; align-items: center; gap: 20px; width: var(--wide); margin: 0 auto; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand strong { font-weight: 680; font-size: 1.08rem; }
.brand span { color: var(--muted); font-size: .92rem; }
.mark { width: 26px; height: 26px; flex: none; color: var(--soft); }
.mark circle { fill: var(--dot); }
.top-nav { display: flex; gap: 2px; margin-left: auto; }
.top-nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--soft); font-size: .93rem; white-space: nowrap; }
.top-nav a:hover { color: var(--ink); background: var(--tint); }
.top-nav a[aria-current="page"] { color: var(--ink); background: var(--tint); font-weight: 550; }
.top-tools { display: flex; align-items: center; gap: 6px; }
.pill { font: 600 .74rem/1 var(--mono); padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--accent); background: var(--plane); }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; background: none; color: var(--soft); cursor: pointer; }
.icon-button:hover { background: var(--tint); color: var(--ink); }
.icon-button svg { width: 18px; height: 18px; fill: currentColor; }

/* Footer */
.foot { border-top: 1px solid var(--hairline); margin-top: 40px; background: var(--tint); }
.foot-inner { width: var(--wide); margin: 0 auto; padding: 36px 0 44px; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand strong { display: block; letter-spacing: -.02em; }
.foot-brand span { color: var(--muted); font-size: .88rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; max-width: 560px; font-size: .92rem; }
.foot nav a { color: var(--soft); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }

/* Shared pieces */
.eyebrow { font: 600 .74rem/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 550; font-size: .98rem; border: 1px solid var(--ink); transition: transform .25s cubic-bezier(.18, .75, .2, 1); }
.button:hover { transform: translateY(-1px); }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.button-quiet:hover { border-color: var(--ink); }
.text-link { font-weight: 550; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent); padding-bottom: 1px; }
.text-link::after { content: " →"; }
.text-link:hover { border-bottom-color: currentColor; }
.copy { font: 600 .74rem/1 var(--font); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--plane); color: var(--soft); cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--ink); }
.tag, .badge { display: inline-block; font: 600 .68rem/1 var(--mono); padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.tag-current { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
/* Every context carries one of these two, wherever it is listed or shown. */
.context-visibility { color: var(--soft); border-color: var(--line); background: var(--plane); }
.badge { margin-left: 8px; }
.files .badge { padding: 2px 5px; font-size: .62rem; }

.section { padding: 84px 0; }
.section.first { padding-top: 56px; }
.section.tinted { background: var(--tint); border-block: 1px solid var(--hairline); }
.section h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); letter-spacing: -.032em; max-width: 24em; margin-bottom: 28px; }
.section h2 code { font-size: .82em; }
.section-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 28px 0 0; }
.aside { color: var(--soft); max-width: 46em; margin: 26px 0 0; }
.lede { font-size: 1.14rem; color: var(--soft); max-width: 44em; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cards-text { display: block; columns: 3 300px; column-gap: 16px; }
.cards-text .card { break-inside: avoid; margin-bottom: 16px; }
.card { display: block; background: var(--plane); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; text-decoration: none; }
.card h3 { font-size: 1.08rem; letter-spacing: -.018em; margin-bottom: 8px; }
.card p { color: var(--soft); font-size: .95rem; line-height: 1.6; margin: 0; }
.card code { font-size: .84em; background: var(--code-bg); padding: .08em .32em; border-radius: 5px; overflow-wrap: anywhere; }
a.card { transition: border-color .2s, transform .25s cubic-bezier(.18, .75, .2, 1), box-shadow .25s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.example-card { display: flex; flex-direction: column; }
/* The examples gallery: what a model is on the left, one drawing of it on the right. */
.ex-list { margin-top: 12px; }
.ex-show { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: center; padding: 34px 0; border-top: 1px solid var(--hairline); }
.ex-show-plain { grid-template-columns: minmax(0, 1fr); }
.ex-show h2 { font-size: 1.55rem; letter-spacing: -.02em; margin: 0 0 10px; }
.ex-show h2 a { color: inherit; text-decoration: none; }
.ex-show h2 a:hover { color: var(--accent); }
.ex-summary { font-size: 1.08rem; margin: 0 0 16px; }
.ex-holds-title { font: 600 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.ex-holds { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ex-holds li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: .93rem; color: var(--soft); }
.ex-label { font: 600 .72rem/1.4 var(--mono); color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.ex-label:hover { text-decoration: underline; }
@media (max-width: 520px) { .ex-holds li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.ex-actions { margin: 16px 0 0; }
.ex-preview { margin: 0; }
.ex-preview .picture-scroll { overflow: hidden; }
/* A preview shows the whole drawing, scaled to fit: the drawings' own minimum width is for their pages. */
.ex-preview .picture { min-width: 0 !important; max-height: 320px; }
.ex-preview figcaption { font-size: .82rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 820px) { .ex-show { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 0; } }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); margin-bottom: 14px; }
.card-foot { margin-top: auto !important; padding-top: 16px; font: 500 .74rem/1.5 var(--mono) !important; color: var(--muted) !important; }
.role { position: relative; padding-top: 26px; }
.role-n { font: 600 .74rem/1 var(--mono); color: var(--dot); display: block; margin-bottom: 12px; }
.status { border-left: 3px solid var(--dot); padding: 4px 0 4px 16px; color: var(--soft); max-width: 52em; margin: 0 0 28px; font-size: .97rem; }
.group-title { font-size: 1.35rem !important; margin: 52px 0 8px !important; }
.group-note { color: var(--soft); max-width: 46em; margin-bottom: 22px; font-size: .97rem; }

/* Landing */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  min-height: calc(100vh - var(--top));
  min-height: calc(100dvh - var(--top));
  padding: clamp(28px, 5vh, 64px) 0 20px;
  background: radial-gradient(ellipse 80% 90% at 50% -10%, var(--glow) 0%, transparent 70%);
}
.hero h1 { font-size: clamp(2.1rem, 3.4vw, 3rem); letter-spacing: -.035em; line-height: 1.02; margin-bottom: 18px; text-wrap: balance; }
.hero-lead { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.4; letter-spacing: -.018em; max-width: 30em; margin-bottom: 14px; }
.hero-text { color: var(--soft); max-width: 43em; font-size: 1rem; line-height: 1.55; margin: 0; }
.hero-text code, .hero-lead code { font-size: .88em; background: var(--code-bg); padding: .08em .32em; border-radius: 5px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 30px; }
.agent-line, .copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: .86rem; color: var(--muted); }
.agent-line code, .copy-row code { font-size: .84rem; color: var(--ink); background: var(--plane); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; overflow-wrap: anywhere; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 4.5vw, 60px); align-items: center; }
.hero-opening { align-self: center; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(32px, 6vw, 88px); }
.hero-resources { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.hero-resources nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .9rem; }
.hero-resources .button { min-height: 38px; padding: 6px 14px; font-size: inherit; }
.hero-resources dl { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 10px; min-width: 0; margin: 0; font-size: .85rem; }
.hero-resources dt { color: var(--muted); font-weight: 600; }
.hero-resources dd { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hero-resources dd code { font-size: .8rem; overflow-wrap: anywhere; }
.hero-resources .copy { flex: none; }
.section.context-examples { background: color-mix(in srgb, var(--green) 15%, var(--bg)); }
.proof-bar { font-size: .92rem; line-height: 1.5; color: var(--ink); background: color-mix(in srgb, var(--green) 8%, var(--plane)); border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line)); border-radius: 11px; padding: 10px 14px; margin: 18px 0 0; max-width: 43em; }
.proof-bar strong { color: var(--green); }
.context-overview { width: 100%; max-width: 500px; margin: 0 auto; }
.context-overview svg { display: block; width: 100%; height: auto; }
.context-overview figcaption { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 10px; }
.context-overview .hv-box rect:first-child, .context-overview .hv-out rect:first-child { fill: var(--bg); stroke: var(--line); stroke-width: 1.3; }
.context-overview .hv-out-ok rect:first-child { stroke: color-mix(in srgb, var(--green) 55%, var(--line)); fill: color-mix(in srgb, var(--green) 5%, var(--bg)); }
.context-overview .hv-halo { fill: none; stroke: color-mix(in srgb, var(--accent) 28%, transparent); stroke-width: 2; stroke-dasharray: 8 6; animation: aim-flow 3.2s linear infinite; }
.context-overview .hv-hub > rect { fill: color-mix(in srgb, var(--accent) 7%, var(--bg)); stroke: var(--accent); stroke-width: 1.6; }
.context-overview .hv-facet { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; }
.context-overview .hv-facet-req { fill: color-mix(in srgb, var(--green) 10%, var(--bg)); stroke: color-mix(in srgb, var(--green) 55%, var(--line)); }
.context-overview .hv-kicker { font: 600 8.5px var(--mono); letter-spacing: .06em; fill: var(--muted); }
.context-overview .hv-kicker-g { font: 600 8.5px var(--mono); letter-spacing: .06em; fill: var(--green); }
.context-overview .hv-hub-kicker { font: 650 9.5px var(--mono); letter-spacing: .06em; fill: var(--accent); }
.context-overview .hv-hub-sub { font: 550 8.8px var(--mono); fill: var(--soft); }
.context-overview .hv-title { font: 600 11.5px var(--font); fill: var(--ink); }
.context-overview .hv-ft { font: 600 9.5px var(--mono); fill: var(--ink); }
.context-overview .hv-ft-g { font: 600 9.5px var(--mono); fill: var(--green); }
.context-overview .hv-fs { font: 500 8px var(--mono); fill: var(--muted); }
.context-overview .hv-pill-ok { fill: color-mix(in srgb, var(--green) 14%, var(--bg)); stroke: color-mix(in srgb, var(--green) 45%, var(--line)); }
.context-overview .hv-pill-ok-t { font: 600 7.8px var(--mono); fill: var(--green); }
.context-overview .hv-pill-prop { fill: color-mix(in srgb, var(--rose) 13%, var(--bg)); stroke: color-mix(in srgb, var(--rose) 42%, var(--line)); }
.context-overview .hv-pill-prop-t { font: 600 7.8px var(--mono); fill: var(--rose); }
.context-overview .hv-rail { fill: none; stroke: color-mix(in srgb, var(--line) 80%, transparent); stroke-width: 1.6; }
.context-overview .hv-flow { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 5 5; animation: aim-flow 1.4s linear infinite; }
.context-overview .hv-flow-delay { animation-delay: -.7s; }
.context-overview .hv-flow-g { fill: none; stroke: var(--green); stroke-width: 1.8; stroke-dasharray: 5 5; animation: aim-flow 1.4s linear infinite; }
.context-overview .hv-hub-edge, .context-overview .hv-mini-edge { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 3; animation: aim-flow 1.8s linear infinite; }
.context-overview .hv-mini-n { fill: var(--plane); stroke: var(--line); }
.context-overview .hv-mini-a { fill: color-mix(in srgb, var(--accent) 14%, var(--bg)); stroke: var(--accent); }
.context-overview .hv-mini-g { fill: color-mix(in srgb, var(--green) 14%, var(--bg)); stroke: var(--green); }
.context-overview .hv-mini-t { font: 600 7.5px var(--mono); fill: var(--ink); }
.context-overview .hv-bar-bg { fill: color-mix(in srgb, var(--line) 70%, transparent); }
.context-overview .hv-bar-fill { fill: var(--green); transform-box: fill-box; }
@media (prefers-reduced-motion: reduce) {
  .context-overview .hv-halo, .context-overview .hv-flow, .context-overview .hv-flow-g, .context-overview .hv-hub-edge, .context-overview .hv-mini-edge { animation: none !important; }
}
.review-example { margin: 0; background: var(--plane); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.review-example figcaption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; padding: 14px 22px; background: var(--tint); font-size: .88rem; color: var(--soft); }
.review-example figcaption a { font-family: var(--mono); color: var(--ink); }
.review-example ol { list-style: none; padding: 0; margin: 0; }
.review-example li { padding: 18px 22px; border-top: 1px solid var(--line); }
.review-example strong { font-size: 1rem; }
.review-example pre { margin: 8px 0 0; font: .9rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--soft); }
.review-signoff { background: color-mix(in srgb, var(--green) 6%, var(--plane)); box-shadow: inset 3px 0 var(--green); }
.review-signoff strong { color: var(--green); }

.models { padding-top: 40px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 22px; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { font: 550 .93rem/1 var(--font); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--soft); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--ink); border-color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
html:not(.js) .tabs { display: none; }
.example-drawing { margin: 0; min-width: 0; }
/* The front page's examples: the words on top (quote left, note and link right), the drawing below in a box of
   one fixed size on every tab; the drawing is scaled to fit and centred in it. */
#examples .model-panel { grid-template-columns: minmax(0, 1fr); gap: 28px; }
#examples .words { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; }
#examples .words blockquote { font-size: clamp(1.05rem, 1.5vw, 1.2rem); margin-bottom: 0; }
#examples .words-note { margin-top: 0; }
#examples .picture-scroll { height: 420px; box-sizing: border-box; overflow: hidden; display: flex; align-items: center; justify-content: center; }
/* Shrunk to fit the box when too big, never enlarged: the drawing's own inline max-width (its natural width) stays. */
#examples .picture-scroll .picture { width: 100% !important; height: 100% !important; min-width: 0 !important; margin: 0; }
@media (max-width: 980px) {
  #examples .words { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #examples .picture-scroll { height: 260px; }
}
.example-drawing figcaption { font-size: .82rem; color: var(--muted); margin-top: 10px; }
html:not(.js) .model-panel[hidden] { display: grid; margin-top: 40px; }
.model-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
.model-panel[hidden] { display: none; }
.words blockquote { margin: 0 0 22px; font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.45; letter-spacing: -.014em; }
.words blockquote::before { content: "“"; }
.words blockquote::after { content: "”"; }
.words-note { color: var(--soft); font-size: .97rem; border-top: 1px solid var(--line); padding-top: 18px; }
.words-note code { font-size: .86em; }
.words-links { display: flex; align-items: center; gap: 16px; font-size: .95rem; margin: 0; }
.words-links span { color: var(--muted); font-size: .84rem; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.split p { color: var(--soft); }
.split code { font-size: .86em; background: var(--plane); border: 1px solid var(--hairline); padding: .08em .32em; border-radius: 5px; overflow-wrap: anywhere; }

.window { margin: 0; background: var(--plane); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.window figcaption { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--hairline); font: 500 .76rem/1 var(--mono); color: var(--muted); }
.window figcaption a { margin-left: auto; color: var(--accent); text-decoration: none; font-weight: 600; }
.window figcaption a:hover { text-decoration: underline; }
.window-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots { display: flex; gap: 5px; flex: none; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.window pre.code { margin: 0; border: 0; border-radius: 0; background: transparent; max-height: 30rem; }

/* Code */
pre.code { margin: 0 0 1.3em; padding: 16px 18px; background: var(--code-bg); border: 1px solid var(--hairline); border-radius: 12px; font-size: .82rem; line-height: 1.62; overflow: auto; tab-size: 2; }
pre.code.aim { white-space: pre-wrap; overflow-wrap: anywhere; }
pre.code code { font-size: inherit; background: none; padding: 0; border: 0; }
.code-holder { position: relative; }
.code-holder > .copy { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.code-holder:hover > .copy, .code-holder > .copy:focus-visible { opacity: 1; }

.t-h { font-weight: 650; }
.t-hash { color: color-mix(in srgb, var(--muted) 60%, transparent); font-weight: 400; }
.t-h1 .t-name { color: var(--ink); }
.t-h2 .t-type { color: var(--accent); }
.t-h2 .t-name { color: var(--ink); }
.t-h3 .t-type, .t-h4 .t-type { color: var(--green); font-weight: 600; }
.t-h3 .t-name { color: var(--soft); font-weight: 500; }
.t-fm, .t-fence, .t-key { color: var(--muted); }
.t-val { color: var(--ink); }
.t-field { color: var(--ink); font-weight: 550; }
.t-type { color: var(--blue); }
.t-mod { color: var(--muted); }
.t-block { color: var(--soft); }
.t-code { color: var(--accent); }
.t-id { font-weight: 650; }
.t-verb { color: var(--blue); font-weight: 600; }
.t-label { color: var(--ink); }
.t-addr { color: var(--muted); }
a.t-addr { text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); text-underline-offset: 3px; }
a.t-addr:hover { color: var(--accent); text-decoration-style: solid; }
.t-origin, .t-origin .t-addr, .t-origin .t-code { color: var(--rose); font-style: italic; font-weight: 500; }

pre.numbered { padding: 14px 0; counter-reset: ln; }
pre.numbered .line { display: block; padding: 0 18px 0 4.6em; min-height: 1.62em; }
pre.numbered .line::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3em; margin-left: -4.2em; margin-right: 1.2em; text-align: right; color: color-mix(in srgb, var(--muted) 55%, transparent); font-weight: 400; font-style: normal; user-select: none; -webkit-user-select: none; }
pre.numbered .line:target { background: color-mix(in srgb, var(--dot) 18%, transparent); box-shadow: inset 3px 0 0 var(--dot); }
pre.numbered.plain { white-space: pre; }

/* Documents */
.doc { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 56px; width: var(--wide); margin: 0 auto; padding: 36px 0 72px; align-items: start; }
.doc-single { grid-template-columns: minmax(0, 1fr); width: min(100% - 40px, 800px); }
.page { min-width: 0; max-width: 780px; }
.doc-wide .page { max-width: none; }
.side { position: sticky; top: calc(var(--top) + 20px); max-height: calc(100vh - var(--top) - 40px); overflow-y: auto; padding-right: 8px; font-size: .9rem; scrollbar-width: thin; }
.side-fold > summary { display: none; }
.side-title { font: 600 .7rem/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.side nav + nav, .side ol + .side-title { margin-top: 26px; }
.side ol { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 4px 10px; border-radius: 7px; color: var(--soft); text-decoration: none; line-height: 1.4; overflow-wrap: break-word; }
.side li a:hover { color: var(--ink); background: var(--tint); }
.side li a[aria-current="page"], .side li a.current { color: var(--ink); background: var(--tint); font-weight: 600; }
.side li a code { font-size: .86em; }
.toc ol ol { display: none; margin: 2px 0 6px 10px; border-left: 1px solid var(--line); padding-left: 4px; font-size: .94em; }
.toc li.open > ol, html:not(.js) .toc ol ol { display: block; }
.files li a { font: 500 .8rem/1.45 var(--mono); }
.files ol:first-of-type li a { font: inherit; }
.outline .o-type { color: var(--accent); font-weight: 600; }
.outline li a { font-size: .86rem; }

.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { color: var(--line); }
.crumbs [aria-current] { color: var(--soft); }
.source-links { display: flex; gap: 20px; margin: 48px 0 0; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: .86rem; }
.source-links a { color: var(--muted); }

.prose { overflow-wrap: break-word; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.036em; margin-bottom: .7em; }
.prose h2 { font-size: 1.55rem; letter-spacing: -.028em; margin: 2.4em 0 .7em; padding-top: 1.3em; border-top: 1px solid var(--hairline); }
.prose h3 { font-size: 1.2rem; margin: 2em 0 .6em; }
.prose h4 { font-size: 1.02rem; margin: 1.6em 0 .5em; }
.prose h1 + h2, .prose > h2:first-child { border-top: 0; padding-top: 0; }
.prose .anchor { margin-left: .4em; color: var(--line); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; }
.prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus-visible { opacity: 1; color: var(--dot); }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .28em 0; }
.prose li > p { margin-bottom: .5em; }
.prose :not(pre) > code { font-size: .86em; background: var(--code-bg); border: 1px solid var(--hairline); padding: .06em .34em; border-radius: 6px; overflow-wrap: anywhere; }
.prose a { color: var(--accent); }
.prose a.sec { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--dot); }
.prose a.sec:hover { color: var(--accent); }
.prose blockquote { margin: 0 0 1.2em; padding: 2px 0 2px 18px; border-left: 3px solid var(--line); color: var(--soft); }
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.4em 0; }
.prose img { border-radius: 10px; border: 1px solid var(--hairline); background: #fff; }
.table-wrap { overflow-x: auto; margin: 0 0 1.3em; border: 1px solid var(--line); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: 1px solid var(--hairline); }
.prose th { background: var(--tint); font-weight: 600; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.doc-banner { background: var(--plane); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 2em; font-size: .93rem; }
.doc-banner p:first-child { margin-bottom: 10px; color: var(--soft); }
.frontmatter { margin: 0 0 1.6em; font-size: .9rem; }
.frontmatter summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }
.amy pre.code { background: var(--plane); }

.file-head { margin-bottom: 20px; }
.file-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); letter-spacing: -.034em; margin-bottom: 8px; }
.file-facts { color: var(--muted); font-size: .88rem; margin: 0; }
.file-facts code { font-size: .92em; color: var(--soft); }
.example-head .eyebrow { margin-bottom: 18px; }
.model-files { margin-top: 3em; }
.model-files h2 { font-size: 1.55rem; letter-spacing: -.028em; padding-top: 1.3em; border-top: 1px solid var(--hairline); margin-bottom: .8em; }
.file-list, .entries { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--plane); }
.file-list li + li, .entries li + li { border-top: 1px solid var(--hairline); }
.file-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding: 11px 16px; text-decoration: none; }
.file-list a:hover, .entries a:hover { background: var(--tint); }
.file-name { font: 550 .84rem/1.4 var(--mono); overflow-wrap: anywhere; }
.file-note { margin-left: auto; padding-left: 16px; font-size: .8rem; color: var(--muted); }
.entries a { display: grid; gap: 2px; padding: 13px 16px; text-decoration: none; }
.entry-title { font-weight: 600; }
.entry-name { font: 500 .76rem/1.4 var(--mono); color: var(--muted); }
.entry-lead { color: var(--soft); font-size: .92rem; }
.is-index h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.04em; margin-bottom: 18px; }

/* Narrow screens */
@media (max-width: 980px) {
  .brand span { display: none; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 22px; }
  .side { position: static; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--plane); }
  .side-fold > summary { display: block; padding: 12px 16px; font-weight: 600; cursor: pointer; }
  .side-fold[open] > summary { border-bottom: 1px solid var(--hairline); }
  .side-fold > nav { padding: 14px 10px 4px; }
  .side-fold > nav:last-child { padding-bottom: 12px; }
  .model-panel, .split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --top: 101px; --wide: min(100% - 32px, 1160px); }
  body { font-size: 16px; }
  .top-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 4px; }
  .top-tools { margin-left: auto; }
  .top-nav { order: 3; width: 100%; margin: 0 -6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  .wrap.narrow, .doc-single { width: min(100% - 32px, 820px); }
  .hero { padding: 40px 0; }
  .hero-opening { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .section { padding: 60px 0; }
  .window pre.code { max-height: 24rem; }
  .agent-line code, .copy-row code { font-size: .72rem; padding: 6px 8px; }
  pre.code { font-size: .78rem; padding: 14px; }
  pre.numbered { padding: 12px 0; }
  pre.numbered .line { padding: 0 12px 0 3.5em; }
  pre.numbered .line::before { width: 2.4em; margin-left: -3.2em; margin-right: .8em; }
  .file-note { margin-left: 0; padding-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .top, .foot, .side, .copy, .source-links { display: none !important; }
  .doc { display: block; width: auto; }
  body { background: #fff; }
}

/* Pictures of a model: drawn at build time, see pictures.mjs */
.picture-figure { margin: 0 0 1.8em; }
.picture-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--plane); padding: 16px; scrollbar-width: thin; }
.picture { display: block; width: 100%; height: auto; margin: 0 auto; }
.picture-small .picture-scroll { padding: 12px 16px; }
.picture-figure figcaption { font-size: .82rem; line-height: 1.55; color: var(--muted); margin-top: 10px; }
.picture-figure figcaption code { font-size: .92em; }
.glance { margin: 1.4em 0 2em; }
.legend { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; margin-left: 4px; vertical-align: baseline; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg { display: inline-block; width: 22px; height: 0; border-top: 1.5px solid var(--muted); }
.lg-trace { border-top-style: dashed; opacity: .8; }
.lg-data { border-top-style: dotted; border-top-width: 2px; }
.lg-ext { height: 11px; width: 18px; border: 1px dashed var(--muted); border-radius: 3px; }
.picture marker path { fill: var(--muted); }
.pl { font: 600 9px var(--mono); letter-spacing: .1em; fill: var(--muted); }
.pe { fill: none; stroke: var(--muted); stroke-width: 1.15; }
.pe-trace { stroke-dasharray: 5 4; opacity: .7; }
.pe-data { stroke-dasharray: 1.5 4; stroke-linecap: round; stroke-width: 1.6; }
.pe-tree { stroke: var(--line); stroke-width: 1.6; }
.pvb { fill: var(--plane); }
.pv { font: 600 9.5px var(--mono); fill: var(--blue); }
.pv-trace { fill: var(--muted); }
.pv-data { fill: var(--green); }
.pn rect { fill: var(--bg); stroke: var(--line); stroke-width: 1; }
.pn .pb { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.pn-actor .pb { stroke: var(--accent); }
.pn-trigger .pb, .pn-event .pb { stroke: var(--rose); }
.pn-view .pb { stroke: var(--blue); }
.pn-work .pb { stroke: var(--ink); }
.pn-record .pb { stroke: var(--green); }
.pn-know .pb { stroke: var(--dot); }
.pt { font: 600 9px var(--mono); letter-spacing: .06em; fill: var(--muted); }
.pname { font: 600 13px var(--font); fill: var(--ink); }
.pr { font: 600 10.5px var(--mono); fill: var(--soft); }
.pn-req rect { fill: transparent; stroke-dasharray: 3 3; stroke: var(--muted); }
.pn-ext rect { fill: transparent; stroke-dasharray: 4 3; }
.pn-ext .pname { fill: var(--soft); }
.picture a:hover .pn rect, .picture a:focus-visible .pn rect { stroke: var(--accent); stroke-width: 1.4; }
.ps .ps-ring { fill: none; stroke: var(--line); }
.ps-dot { fill: var(--dot); }

/* Landing: shared knowledge, and the pictures under the file format */
.shared h3, .drawn h3 { font-size: 1.35rem; letter-spacing: -.024em; margin-bottom: 14px; }
.shared-entries { align-items: start; margin: 44px 0 0; }
.shared-entries p { color: var(--soft); }
.marks { list-style: none; margin: 22px 0 24px; padding: 0; display: grid; gap: 16px; }
.marks li { font-size: .93rem; color: var(--soft); }
.marks li > span:last-child { display: block; }
.origin { display: inline-block; margin-bottom: 7px; font: 600 .76rem/1.3 var(--mono); padding: 5px 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--plane); color: var(--ink); }
.split .origin code { font: inherit; background: none; border: 0; padding: 0; overflow-wrap: normal; }
.origin-proposed, .split .origin-proposed code { color: var(--rose); font-style: italic; }
.window-note { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--hairline); font-size: .86rem; color: var(--muted); }
.shared-context { margin-top: 72px; }
.shared-context .lede { max-width: 50em; }
.context-figure { margin: 30px 0 34px; }
.context-figure figcaption { font-size: .82rem; color: var(--muted); margin-top: 16px; text-align: center; }
.context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr) minmax(0, 1fr); grid-template-areas: ". above ." "said node names" ". from ."; gap: 34px; align-items: stretch; }
.ctx-part, .ctx-node { position: relative; background: var(--plane); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 15px; }
.ctx-node { grid-area: node; border-color: var(--accent); box-shadow: var(--shadow); }
.ctx-above { grid-area: above; }
.ctx-said { grid-area: said; }
.ctx-names { grid-area: names; }
.ctx-from { grid-area: from; }
.ctx-part::after { content: ""; position: absolute; border: 0 solid var(--muted); opacity: .55; }
.ctx-above::after { left: 50%; top: 100%; height: 34px; border-left-width: 1.5px; }
.ctx-from::after { left: 50%; bottom: 100%; height: 34px; border-left-width: 1.5px; }
.ctx-said::after { left: 100%; top: 50%; width: 34px; border-top-width: 1.5px; }
.ctx-names::after { right: 100%; top: 50%; width: 34px; border-top-width: 1.5px; }
.ctx-name { font: 600 .7rem/1.25 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 9px; }
.ctx-addr { margin: 0 0 8px; }
.ctx-addr code { font-size: .74rem; font-weight: 600; overflow-wrap: anywhere; }
.ctx-holds { margin: 0 0 8px; font-size: .95rem; line-height: 1.5; }
.ctx-def { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.context code { font-size: .86em; background: var(--code-bg); padding: .06em .3em; border-radius: 5px; overflow-wrap: anywhere; }
.drawn { margin-top: 56px; }
.drawn-lead { color: var(--soft); max-width: 46em; margin-bottom: 18px; }
@media (max-width: 760px) {
  .context { grid-template-columns: minmax(0, 1fr); grid-template-areas: "node" "names" "from" "said" "above"; gap: 12px; }
  .ctx-part::after { display: none; }
  .shared-context { margin-top: 52px; }
}

/* Package registry & package badges */
.tag-pkg { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tag-ext { color: var(--blue, #3b82f6); border-color: color-mix(in srgb, var(--blue, #3b82f6) 40%, transparent); background: color-mix(in srgb, var(--blue, #3b82f6) 8%, transparent); }
.pkg-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.pkg-pills a.tag { text-decoration: none; }
.pkg-pills a.tag:hover { border-color: var(--ink); color: var(--ink); }
.pkg-facets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.pkg-summary { margin: 0 0 1.8em; }
.pkg-used { margin: 1.4em 0 2em; }
.registry-bar { margin: 20px 0 28px; }

/* Production proof badge & quickstart */
.proof-bar { margin: 18px 0 22px; padding: 12px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); background: color-mix(in srgb, var(--green) 7%, transparent); font-size: .92rem; line-height: 1.5; color: var(--ink); }
.proof-bar strong { color: var(--green); }

/* Architecture diagram band & Requirements coverage chart */
.arch-band { fill: var(--plane); stroke: var(--line); stroke-width: 1; }
.cov-panel { margin: 1.4em 0 2em; border: 1px solid var(--line); border-radius: 14px; background: var(--plane); padding: 18px 20px; }
.cov-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 12px; }
.cov-head h3 { margin: 0; font-size: .98rem; }
.cov-stat { font: 600 .8rem/1 var(--mono); color: var(--muted); }
.cov-bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 16px; }
.cov-bar > .cov-fill { height: 100%; border-radius: 99px; background: var(--green); }
.cov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cov-item { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; gap: 6px 14px; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); font-size: .88rem; }
.cov-item:first-child { padding-top: 0; border-top: 0; }
.cov-id { font: 600 .78rem/1.4 var(--mono); color: var(--ink); text-decoration: none; white-space: nowrap; }
.cov-text { color: var(--soft); line-height: 1.45; }
.cov-sats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cov-ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); text-decoration: none; }
.cov-gap { color: var(--muted); }
@media (max-width: 720px) { .cov-item { grid-template-columns: 1fr; } .cov-sats { justify-content: flex-start; } }

/* Living diagrams: gentle edge flow, hover lift, interactive second-brain context */
@keyframes aim-flow {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}
@keyframes aim-bar {
  from { transform: scaleX(0); transform-origin: left center; }
  to { transform: scaleX(1); transform-origin: left center; }
}
.hero .picture .pe-edge,
.picture-process .pe-edge,
.picture-arch .pe-edge {
  stroke-dasharray: 6 6;
  animation: aim-flow 1.8s linear infinite;
}
.picture-arch .pe-data {
  stroke-dasharray: 3 5;
  animation: aim-flow 2.4s linear infinite;
}
.picture a g.pn { transition: filter .16s ease, opacity .16s ease; }
.picture a:hover g.pn rect,
.picture a:focus-visible g.pn rect {
  stroke-width: 1.8;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--ink) 12%, transparent));
}
.cov-fill { animation: aim-bar .65s cubic-bezier(.22, 1, .36, 1) both; }
.context .ctx-part,
.context .ctx-node {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.context .ctx-part:hover,
.context .ctx-node:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 12%, transparent);
}
.use-cases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.use-case-tag { display: inline-block; font: 600 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.process-panel .cov-panel { margin-top: 0; }
@media (max-width: 980px) { .use-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .use-cases { grid-template-columns: 1fr; } }
#why .why-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#why .card h3 { color: var(--ink); }
@media (max-width: 760px) { #why .why-cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .hero .picture .pe-edge, .picture-process .pe-edge, .picture-arch .pe-edge, .picture-arch .pe-data, .cov-fill {
    animation: none !important;
  }
}

/* Mini animated charts inside top-20% use-case cards */
.mini-chart { display: block; width: 100%; height: 74px; margin: 0 0 14px; border-radius: 10px; background: color-mix(in srgb, var(--plane) 75%, var(--bg)); border: 1px solid var(--line); }
.mini-chart .mc-node { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; }
.mini-chart .mc-accent { fill: color-mix(in srgb, var(--accent) 14%, var(--bg)); stroke: var(--accent); stroke-width: 1.3; }
.mini-chart .mc-green { fill: color-mix(in srgb, var(--green) 14%, var(--bg)); stroke: var(--green); stroke-width: 1.3; }
.mini-chart .mc-blue { fill: color-mix(in srgb, var(--blue, #3b82f6) 14%, var(--bg)); stroke: var(--blue, #3b82f6); stroke-width: 1.3; }
.mini-chart .mc-line { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 4 4; animation: aim-flow 2s linear infinite; }
.mini-chart .mc-solid { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; animation: aim-flow 1.6s linear infinite; }
.mini-chart text { font: 600 8.5px var(--mono); fill: var(--ink); }
.mini-chart .mc-sub { font: 600 7.5px var(--mono); fill: var(--muted); }
.use-cases .card { transition: transform .18s ease, border-color .18s ease; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.use-cases .card:hover { transform: translateY(-2px); border-color: var(--accent); }
.archive-fold { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.archive-fold > summary { font-weight: 550; font-size: .92rem; }
.archive-fold > .cards, .archive-fold > .entries { margin-top: 18px; }

/* Context Registry page */
.reg-options { margin: 28px 0 34px; }
.reg-option { display: flex; flex-direction: column; gap: 10px; }
.reg-option h3 { margin: 0; font-size: 1.15rem; }
.reg-option p { margin: 0; }
.reg-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: auto !important; padding-top: 8px; }
.reg-cmd { margin: 4px 0 0 !important; }
.reg-cmd code { font-size: .78rem; overflow-x: auto; white-space: nowrap; }
/* Run your own: three numbered steps, each a command to copy */
.reg-steps { list-style: none; counter-reset: reg-step; margin: 2px 0 0; padding: 0; display: grid; gap: 12px; }
.reg-steps li { counter-increment: reg-step; min-width: 0; }
.reg-step-say { display: block; font-size: .86rem; font-weight: 550; color: var(--ink); margin-bottom: 4px; }
.reg-step-say::before { content: counter(reg-step) "  "; color: var(--accent); font-family: var(--mono); }
.reg-steps .reg-cmd { flex-wrap: nowrap; align-items: flex-start; }
.reg-steps .reg-cmd code { white-space: pre; flex: 1 1 auto; min-width: 0; }
.reg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--plane); margin: 0 0 28px; }
.reg-input { flex: 1 1 240px; min-width: 0; font: inherit; font-size: .94rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; }
.reg-input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }
.reg-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.reg-pill { font: 550 .82rem/1 var(--sans); color: var(--soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.reg-pill:hover { border-color: var(--accent); color: var(--ink); }
.reg-pill.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.reg-count { font: 500 .8rem/1 var(--mono); color: var(--muted); margin-left: auto; }
.reg-section { margin: 0 0 36px; }
.reg-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 18px; margin-bottom: 12px; }
.reg-section-head .group-title { margin-top: 0; }
.reg-section-head .group-note { margin-bottom: 0; }
.reg-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.reg-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 18px; border-bottom: 1px solid var(--hairline); transition: background .14s; }
.reg-row[hidden] { display: none; }
.reg-row:last-child { border-bottom: 0; }
.reg-row:hover { background: color-mix(in srgb, var(--plane) 65%, var(--bg)); }
.reg-main { flex: 1 1 360px; min-width: 0; }
.reg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 5px; }
.reg-name { font-weight: 650; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.reg-name:hover { color: var(--accent); text-decoration: underline; }
.reg-desc { margin: 0 0 5px; font-size: .92rem; color: var(--soft); }
.reg-meta { margin: 0; font: 500 .78rem/1.45 var(--mono); color: var(--muted); }
.reg-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.reg-raw { font: 550 .84rem/1 var(--sans); color: var(--accent); text-decoration: none; white-space: nowrap; }
.reg-raw:hover { text-decoration: underline; }
.reg-note, .reg-empty { color: var(--muted); font-size: .92rem; margin: 8px 0 0; }

/* Intent vs. Rigid Harnesses visual comparison */
.start-note { margin-top: 20px; color: var(--soft); font-size: .98rem; max-width: 52em; }
.start-note code { font-size: .88em; background: var(--code-bg); padding: .08em .32em; border-radius: 5px; }
/* The three steps: the install command wraps inside its own box; the "More" row of plain link cards. */
.step-command { margin: 16px 0 10px; }
.step-command code { flex: 1 1 14em; min-width: 0; }
.step-token { font-size: .9rem; }
.team-limits { font-size: .95rem; color: var(--muted); margin: 0 0 6px; }
/* Six links: three in a row, two on a tablet, one on a phone, so no card is left alone on a line. */
.more-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .more-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .more-links { grid-template-columns: minmax(0, 1fr); } }
.more-links .card { padding: 18px 18px 16px; transition: border-color .18s ease; }
.more-links .card h3 { color: var(--ink); }
.more-links .card:hover { border-color: var(--accent); }
.usp-compare { margin-top: 22px; }
/* Each failure beside its answer: always two columns, one on a narrow screen. */
.usp-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 820px) { .usp-pairs { grid-template-columns: 1fr; } }
.usp-card { display: flex; flex-direction: column; gap: 12px; }
.usp-card h3 { margin: 0; font-size: 1.18rem; }
.usp-rules { border-color: color-mix(in srgb, var(--rose) 35%, var(--line)); }
.usp-intent { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); box-shadow: 0 6px 24px color-mix(in srgb, var(--green) 8%, transparent); }
.usp-badge { display: inline-block; align-self: flex-start; font: 600 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.usp-badge-bad { color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, transparent); border: 1px solid color-mix(in srgb, var(--rose) 32%, transparent); }
.usp-badge-good { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--green) 32%, transparent); }
.usp-svg { display: block; width: 100%; height: auto; border-radius: 10px; background: color-mix(in srgb, var(--plane) 75%, var(--bg)); border: 1px solid var(--line); padding: 4px; }
.usp-svg text { font: 600 9px var(--mono); fill: var(--ink); }
.usp-svg .us-sub { font: 500 7.8px var(--mono); fill: var(--muted); }
.usp-svg .us-box { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; }
.usp-svg .us-muted-box { stroke-dasharray: 4 3; }
.usp-svg .us-wall { fill: color-mix(in srgb, var(--rose) 12%, var(--bg)); stroke: var(--rose); stroke-width: 1.2; }
.usp-svg .us-intent { fill: color-mix(in srgb, var(--accent) 13%, var(--bg)); stroke: var(--accent); stroke-width: 1.4; }
.usp-svg .us-good { fill: color-mix(in srgb, var(--green) 13%, var(--bg)); stroke: var(--green); stroke-width: 1.4; }
.usp-svg .us-pill { fill: var(--bg); stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); stroke-width: 1.1; }
.usp-svg .us-bad-t { fill: var(--rose); }
.usp-svg .us-accent-t { fill: var(--accent); }
.usp-svg .us-good-t { fill: var(--green); }
.usp-svg .us-muted-t { fill: var(--muted); }
.usp-svg .us-flow-bad { fill: none; stroke: var(--rose); stroke-width: 1.6; stroke-dasharray: 3 4; animation: aim-flow 2.8s linear infinite; }
.usp-svg .us-flow-good { fill: none; stroke: var(--green); stroke-width: 1.6; stroke-dasharray: 5 5; animation: aim-flow 1.5s linear infinite; }
.usp-svg .us-meter-lbl { font: 550 8.5px var(--font); fill: var(--soft); }
.usp-svg .us-meter-val { font: 600 8.2px var(--mono); }
.usp-svg .us-track { fill: color-mix(in srgb, var(--line) 65%, transparent); }
.usp-svg .cov-fill { transform-box: fill-box; }
.usp-svg .us-fill-bad { fill: var(--rose); }
.usp-svg .us-fill-muted { fill: var(--muted); }
.usp-svg .us-fill-accent { fill: var(--accent); }
.usp-svg .us-fill-good { fill: var(--green); }
.usp-list { margin: 2px 0 0; padding-left: 1.15em; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--soft); }
.usp-list li strong { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .usp-svg .us-flow-bad, .usp-svg .us-flow-good { animation: none !important; }
}

/* Team picture: three agents each add a piece to one shared graph and the others are told; one 10 s loop, all keyframes share it */
.team-svg { max-width: 720px; margin: 4px 0 18px; }
.team-svg text { font-size: 10px; }
.team-svg .us-sub { font-size: 9px; }
.team-svg.team-wide { max-width: none; }
.team-svg.team-wide .pt { font-size: 9px; }
.team-svg.team-wide .pname { font-size: 10px; }
.team-svg.team-narrow { display: none; max-width: 420px; margin-left: auto; margin-right: auto; }
.team-svg.team-narrow .pt { font-size: 8.5px; }
.team-svg.team-narrow .pname { font-size: 9.5px; }
@media (max-width: 760px) {
  .team-svg.team-wide { display: none; }
  .team-svg.team-narrow { display: block; }
}
@media (min-width: 981px) {
  #synthesis .team-intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: center; }
  #synthesis .team-intro .lede { max-width: none; margin-top: 0; }
  #synthesis .synth-figure { margin: 0; }
  #live .team-intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
  #live .team-intro .lede { max-width: none; margin-top: 0; }
  #live .team-intro .team-svg { margin-top: 0; }
}
.team-svg .pt { font: 600 7px var(--mono); letter-spacing: .08em; fill: var(--muted); }
.team-svg .pname { font: 600 8.5px var(--mono); fill: var(--ink); }
.team-svg .pe { stroke: var(--muted); stroke-width: 1.1; }
.team-svg .team-n1, .team-svg .team-e1 { opacity: 0; animation: team-n1 10s ease-in-out infinite; }
.team-svg .team-n2, .team-svg .team-e2 { opacity: 0; animation: team-n2 10s ease-in-out infinite; }
.team-svg .team-n3, .team-svg .team-e3 { opacity: 0; animation: team-n3 10s ease-in-out infinite; }
.team-svg .team-c1 { opacity: .3; animation: aim-flow 1.5s linear infinite, team-c1 10s ease-in-out infinite; }
.team-svg .team-c2 { opacity: .3; animation: aim-flow 1.5s linear infinite, team-c2 10s ease-in-out infinite; }
.team-svg .team-c3 { opacity: .3; animation: aim-flow 1.5s linear infinite, team-c3 10s ease-in-out infinite; }
.team-svg .team-p1 { opacity: 0; animation: team-p1 10s ease-in-out infinite; }
.team-svg .team-p2 { opacity: 0; animation: team-p2 10s ease-in-out infinite; }
.team-svg .team-p3 { opacity: 0; animation: team-p3 10s ease-in-out infinite; }
@keyframes team-n1 { 0%, 18% { opacity: 0; } 21%, 93% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes team-n2 { 0%, 42% { opacity: 0; } 45%, 93% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes team-n3 { 0%, 67% { opacity: 0; } 70%, 93% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes team-c1 { 0%, 10% { opacity: .3; } 12%, 19% { opacity: 1; } 22%, 100% { opacity: .3; } }
@keyframes team-c2 { 0%, 35% { opacity: .3; } 37%, 44% { opacity: 1; } 47%, 100% { opacity: .3; } }
@keyframes team-c3 { 0%, 60% { opacity: .3; } 62%, 69% { opacity: 1; } 72%, 100% { opacity: .3; } }
@keyframes team-p1 { 0%, 46% { opacity: 0; } 48%, 57% { opacity: 1; } 60%, 71% { opacity: 0; } 73%, 82% { opacity: 1; } 85%, 100% { opacity: 0; } }
@keyframes team-p2 { 0%, 21% { opacity: 0; } 23%, 32% { opacity: 1; } 35%, 71% { opacity: 0; } 73%, 82% { opacity: 1; } 85%, 100% { opacity: 0; } }
@keyframes team-p3 { 0%, 21% { opacity: 0; } 23%, 32% { opacity: 1; } 35%, 46% { opacity: 0; } 48%, 57% { opacity: 1; } 60%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .team-svg [class*="team-"] { animation: none !important; }
  .team-svg .team-n1, .team-svg .team-n2, .team-svg .team-n3, .team-svg .team-e1, .team-svg .team-e2, .team-svg .team-e3 { opacity: 1; }
  .team-svg .team-c1, .team-svg .team-c2, .team-svg .team-c3 { opacity: .6; }
  .team-svg .team-p1, .team-svg .team-p2, .team-svg .team-p3 { opacity: 0; }
}
@media (max-width: 640px) {
  .reg-count { margin-left: 0; }
  .reg-actions { width: 100%; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .mini-chart .mc-line, .mini-chart .mc-solid { animation: none !important; }
}

/* Index pages that start with their listing; what to know about it stands small beside it (below it on a phone) */
.reg-page h1 { margin-bottom: 6px; }
.reg-lede { margin: 0 0 22px; color: var(--soft); font-size: 1.02rem; max-width: 64ch; }
.reg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px 36px; align-items: start; }
.reg-maincol { min-width: 0; }
.reg-side { display: grid; gap: 14px; position: sticky; top: 84px; min-width: 0; }
.side-box { border: 1px solid var(--line); border-radius: 12px; background: var(--plane); padding: 15px 16px 14px; font-size: .88rem; line-height: 1.5; color: var(--soft); min-width: 0; }
.side-box h3 { margin: 0 0 6px; font-size: .95rem; color: var(--ink); }
.side-box p { margin: 0 0 10px; }
.side-box p:last-child { margin-bottom: 0; }
.side-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.side-btns .button { padding: 8px 14px; font-size: .86rem; }
.side-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.side-box .reg-steps { gap: 10px; margin: 0 0 10px; }
.side-box .reg-step-say { font-size: .82rem; }
.side-box .reg-cmd code { font-size: .7rem; padding: 5px 8px; }
.side-box .copy { flex-shrink: 0; }
.side-copy { flex-wrap: nowrap; }
.side-copy code { font-size: .72rem; min-width: 0; }
.side-code { font-size: .74rem; margin: 0 0 8px; padding: 10px 12px; }
.reg-after { margin-top: 48px; }
@media (max-width: 940px) {
  .reg-layout { grid-template-columns: minmax(0, 1fr); }
  .reg-side { position: static; }
}
.reg-page .reg-toolbar { margin-bottom: 22px; }
.reg-page .reg-section { margin: 0 0 28px; }
.reg-page .reg-section-head { margin-bottom: 10px; }
.reg-page .reg-section-head .group-title { margin: 0 !important; font-size: 1.15rem !important; }
.context-catalog.section.first { padding-top: clamp(24px, 3vw, 40px); }
.context-catalog .reg-lede { max-width: none; margin-bottom: 16px; }
.context-catalog .reg-tabs { margin: 16px 0 22px; }
.catalog-header { align-items: center; margin-bottom: 16px; }
.catalog-header .reg-lede { margin-bottom: 0; }
.context-catalog .reg-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 0; border: 0; background: transparent; margin: 0 0 22px; }
.context-catalog .reg-desc { max-width: 90ch; }
.context-catalog .reg-input[type="search"] { grid-column: 1 / -1; width: 100%; background: var(--plane); }
.context-catalog .reg-pill { font-family: var(--font); }
.context-catalog .reg-count { white-space: nowrap; }
.context-catalog .reg-main { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .context-catalog .reg-toolbar { grid-template-columns: minmax(0, 1fr); }
  .context-catalog .reg-count { margin-left: 0; }
}
.side-copy code { white-space: nowrap; overflow-x: auto; }

/* Context detail pages */
.doc-single:has(.context-explorer) { width: var(--wide); }
.context-page { padding-block: 36px 72px; }
.context-page .pkg-pills { align-items: center; }
.context-intro { max-width: 76ch; color: var(--soft); margin: 8px 0 16px; }
/* What the example is (its README's opening) on top; the rest of the README open, after the explorer. */
.context-opening { max-width: 76ch; margin: 0 0 20px; }
.context-opening p { margin: 0; }
.context-notes { max-width: 78ch; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.context-notes > :first-child { margin-top: 0; }
.context-notes :target { background: var(--glow); }
.context-explorer { display: grid; grid-template-columns: clamp(16rem, 33%, 24rem) minmax(0, 1fr); margin: 22px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--plane); }
.context-explorer.tree-only { grid-template-columns: 1fr; }
.context-tree { min-width: 0; max-height: 34rem; overflow: auto; scrollbar-width: thin; background: var(--plane); border-right: 1px solid var(--line); padding: 14px 10px; }
.context-tree h2, .context-chart h2, .context-sources h2 { font-size: 1.15rem; }
.context-tree h2 { margin: 0 6px 10px; }
.model-outline, .model-outline ul { list-style: none; margin: 0; padding: 0; }
.model-outline ul { margin-left: 9px; padding-left: 5px; border-left: 1px solid var(--line); }
.model-outline li { margin: 0; }
.model-outline summary, .model-outline .model-link { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.model-outline summary { list-style: none; min-height: 32px; cursor: pointer; border-radius: 6px; font-size: .85rem; }
.model-outline summary::-webkit-details-marker { display: none; }
.model-outline summary::before { content: ''; width: 6px; height: 6px; flex: none; margin: 0 2px 0 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.model-outline details[open] > summary::before { transform: rotate(45deg); }
.model-outline .model-link { min-height: 32px; min-width: 0; flex: 1; padding: 3px 4px; font: 450 .86rem/1.35 var(--font); text-decoration: none; border-radius: 6px; }
.model-outline li > .model-link { padding-left: 25px; }
.model-outline summary:has(.model-link) { gap: 3px; }
.model-outline summary > .model-link { font-weight: 600; }
.model-outline summary:hover, .model-link:hover { background: var(--tint); }
.model-link span { min-width: 0; overflow-wrap: anywhere; }
.model-link small { flex: none; max-width: 45%; margin-left: auto; font: 400 .72rem/1.25 var(--font); color: var(--muted); overflow-wrap: anywhere; }
.model-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--icon-ink, var(--soft)); color: light-dark(var(--icon-ink, var(--soft)), color-mix(in srgb, var(--icon-ink, var(--soft)), white 36%)); }
.context-docs summary { cursor: pointer; }
.context-divider { display: none; }
@media (width > 760px) {
  .context-explorer:has(> .context-divider:not([hidden])) { grid-template-columns: var(--tree-width, clamp(16rem, 33%, 24rem)) 14px minmax(0, 1fr); }
  .context-explorer:has(> .context-divider:not([hidden])) > .context-tree { border-right: 0; }
  .context-divider:not([hidden]) { display: grid; place-items: center; background: linear-gradient(90deg, transparent calc(50% - .5px), var(--line) 0 calc(50% + .5px), transparent 0); cursor: col-resize; touch-action: none; user-select: none; }
  .context-divider::after { content: ''; width: 4px; height: 32px; border-radius: 2px; background: var(--muted); }
  .context-divider:is(:hover, :focus-visible, .dragging)::after { background: var(--accent); }
  .context-explorer:has(> .dragging) { user-select: none; }
}
.context-pane { min-width: 0; }
.context-pane > [hidden] { display: none; }
.model-outline .model-link[aria-current="true"] { background: var(--tint); box-shadow: inset 3px 0 var(--accent); }
.context-reader { padding: 18px; }
.reader-back { display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; margin-bottom: 12px; font: 600 .85rem/1.4 var(--font); color: var(--accent); background: transparent; border: 0; cursor: pointer; }
.reader-back::before { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: rotate(45deg); }
.reader-back:hover { text-decoration: underline; }
.reader-text { max-height: 28rem; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 18px clamp(14px, 3vw, 32px); background: var(--bg); border: 1px solid var(--hairline); border-radius: 9px; }
.reader-text h3 { margin: 0 0 .65em; font-size: 1.35rem; }
.reader-text > header h3, .reader-text > section:only-child h3 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.reader-text .reader-kind { margin: 0 0 4px; font: 600 .72rem/1.5 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.reader-text > section + section { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.reader-text :is(h4,h5,h6) { margin: 1.2em 0 .4em; font-size: .94rem; }
.reader-text p, .reader-text ul, .reader-text ol { margin-bottom: .75em; }
.reader-text pre { overflow: auto; }
.reader-text section > :last-child { margin-bottom: 0; }
.context-charts { min-width: 0; padding: 18px; }
.context-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 12px; margin-bottom: 15px; border-bottom: 1px solid var(--hairline); }
.context-tabs[hidden], .context-chart[hidden] { display: none; }
.context-tabs button { font: 600 .85rem/1.4 var(--font); padding: 6px 12px; color: var(--soft); border: 1px solid transparent; background: none; border-radius: 6px; cursor: pointer; }
.context-tabs button[aria-selected="true"] { background: var(--tint); border-color: var(--line); color: var(--ink); }
.context-chart + .context-chart:not([hidden]) { margin-top: 14px; }
.context-chart h2 { margin: 0 0 12px; overflow-wrap: anywhere; }
.context-canvas { overflow: auto; max-height: 29rem; padding: 18px; border: 1px solid var(--hairline); border-radius: 9px; background-color: var(--bg); background-image: radial-gradient(var(--line) .7px, transparent .8px); background-size: 12px 12px; scrollbar-width: thin; }
.context-source { display: inline-block; margin-top: 8px; color: var(--accent); font-size: .83rem; }
.context-bars { display: grid; gap: 12px; margin: 0; }
.context-bars > div { display: grid; grid-template-columns: minmax(6em, 30%) 1fr; gap: 12px; align-items: center; }
.context-bars dt { font: 550 .84rem/1.4 var(--font); overflow-wrap: anywhere; }
.context-bars dd { display: flex; align-items: center; gap: 10px; margin: 0; }
.context-bars dd span { flex: 1; background: var(--tint); border-radius: 3px; overflow: hidden; }
.context-bars i { display: block; height: .65rem; background: var(--green); }
.context-bars b { min-width: 2ch; text-align: right; font: 600 .8rem var(--mono); }
.context-docs { border-top: 1px solid var(--line); padding: 12px 0; }
.context-docs summary { overflow-wrap: anywhere; font-weight: 600; }
.context-docs .prose { max-width: 78ch; padding-top: 14px; }
.context-docs :target { background: var(--glow); }
.context-sources { margin: 22px 0; }
.context-sources h2 { margin-bottom: 12px; }
@media (max-width: 760px) {
  .context-explorer { grid-template-columns: minmax(0, 1fr); }
  .context-charts { padding: 14px; }
  .context-tree { max-height: 20rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .context-canvas { max-height: 21rem; padding: 12px; }
}

/* The hero: words type themselves, then the model draws itself (12 s loop). */
.words-model .wm-card { fill: var(--bg); stroke: var(--line); stroke-width: 1.3; }
.words-model .wm-line { font: 500 12.5px var(--font); fill: var(--ink); }
.words-model .wm-mask { fill: var(--bg); transform-box: fill-box; transform-origin: 100% 50%; }
.words-model .wm-node { fill: var(--bg); stroke: var(--line); stroke-width: 1.3; }
.words-model .wm-node-a { fill: color-mix(in srgb, var(--accent) 8%, var(--bg)); stroke: var(--accent); }
.words-model .wm-node-g { fill: color-mix(in srgb, var(--green) 8%, var(--bg)); stroke: color-mix(in srgb, var(--green) 60%, var(--line)); }
.words-model .wm-m1 { animation: wm-m1 12s linear infinite; }
.words-model .wm-m2 { animation: wm-m2 12s linear infinite; }
.words-model .wm-m3 { animation: wm-m3 12s linear infinite; }
.words-model .wm-n1 { opacity: 0; animation: wm-n1 12s ease-out infinite; }
.words-model .wm-n2 { opacity: 0; animation: wm-n2 12s ease-out infinite; }
.words-model .wm-n3 { opacity: 0; animation: wm-n3 12s ease-out infinite; }
.words-model .wm-n4 { opacity: 0; animation: wm-n4 12s ease-out infinite; }
.words-model .wm-badges { opacity: 0; animation: wm-badges 12s ease-out infinite; }
.words-model .wm-all { animation: wm-all 12s ease-in-out infinite; }
@keyframes wm-m1 { 0%, 2% { transform: scaleX(1); } 14%, 100% { transform: scaleX(0); } }
@keyframes wm-m2 { 0%, 22% { transform: scaleX(1); } 31%, 100% { transform: scaleX(0); } }
@keyframes wm-m3 { 0%, 40% { transform: scaleX(1); } 54%, 100% { transform: scaleX(0); } }
@keyframes wm-n1 { 0%, 15% { opacity: 0; } 19%, 100% { opacity: 1; } }
@keyframes wm-n2 { 0%, 32% { opacity: 0; } 36%, 100% { opacity: 1; } }
@keyframes wm-n3 { 0%, 55% { opacity: 0; } 59%, 100% { opacity: 1; } }
@keyframes wm-n4 { 0%, 62% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes wm-badges { 0%, 70% { opacity: 0; } 75%, 100% { opacity: 1; } }
@keyframes wm-all { 0%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
.tour-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.tour-head .lede { margin-bottom: 0; }
.tour-overview { max-width: 520px; width: 100%; margin: 0 0 0 auto; }
@media (max-width: 980px) { .tour-head { grid-template-columns: minmax(0, 1fr); gap: 24px; } .tour-overview { margin: 0 auto; } }
.tour-overview .context-overview { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .words-model [class*="wm-"] { animation: none !important; opacity: 1 !important; }
  .words-model .wm-mask { transform: scaleX(0); }
}
.synth-figure { max-width: 520px; }
.synth-figure .hv-hub > rect { fill: color-mix(in srgb, var(--accent) 7%, var(--bg)); stroke: var(--accent); stroke-width: 1.6; }

/* Registry as a catalog: cards with a picture drawn from each model. */
.reg-hero { margin: 0 0 22px; }
.reg-hero h1 { margin-bottom: 6px; }
.reg-hero .reg-lede { margin: 0; color: var(--soft); font-size: 1.08rem; }
.context-catalog .reg-search-big { font-size: 1.02rem; padding: 13px 16px; border-radius: 12px; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; border: 0; background: transparent; overflow: visible; border-radius: 0; }
.reg-grid .reg-card { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.reg-grid .reg-card:last-child { border-bottom: 1px solid var(--line); }
.reg-grid .reg-card:hover { background: var(--bg); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-2px); box-shadow: 0 8px 24px -16px color-mix(in srgb, var(--ink) 40%, transparent); }
.reg-thumb { height: 150px; padding: 12px 14px; background: var(--plane); border-bottom: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; overflow: hidden; pointer-events: none; }
.reg-thumb svg { width: 100% !important; height: 100% !important; min-width: 0 !important; max-width: 100% !important; }
.reg-grid .reg-card, .reg-grid .reg-main { min-width: 0; }
.reg-thumb-plain path { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 4; }
.reg-thumb-plain rect { fill: var(--bg); stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); stroke-width: 1.5; }
.reg-grid .reg-main { flex: 1 1 auto; padding: 14px 16px 6px; }
.reg-grid .reg-name { font-size: 1.05rem; }
.reg-grid .reg-name::after { content: ""; position: absolute; inset: 0; }
.reg-grid .reg-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reg-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 16px 14px; }
.reg-foot .reg-raw { color: var(--accent); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.reg-more { margin: 18px 0 0; }
.reg-invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin: 40px 0 0; padding: 24px 26px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.reg-invite h2 { margin: 0 0 6px; font-size: 1.3rem; }
.reg-invite p { margin: 0; color: var(--soft); max-width: 52ch; }
.reg-invite-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.reg-earlier { margin: 32px 0 0; }
.reg-earlier summary { cursor: pointer; color: var(--soft); font-size: .95rem; }
.reg-earlier .reg-grid { margin-top: 16px; }
.reg-card[data-visibility="public"] .context-visibility { display: none; }

/* Example detail page: at a glance, the main drawings, what must hold, and the next step. */
.glance { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; }
.glance > div { border: 1px solid var(--line); border-radius: 12px; background: var(--plane); padding: 9px 14px; min-width: 0; }
.glance dt { font: 600 .7rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
.glance dd { margin: 0; font-weight: 600; color: var(--ink); font-size: .95rem; }
.glance-pics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 22px 0 0; }
@media (min-width: 981px) { .glance-pics-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.glance-pic { margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 16px; min-width: 0; }
.glance-pic figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.context-rules { margin: 40px 0 0; }
.context-rules h2, .context-use h2, .context-browse { margin: 0 0 6px; font-size: 1.35rem; }
.context-rules-lede { color: var(--soft); margin: 0 0 14px; }
.rules-plain { padding-left: 1.1em; }
.rules-plain li { margin: 6px 0; }
.context-use { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin: 40px 0 0; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.context-use > div { flex: 1 1 420px; min-width: 0; }
.context-use p { margin: 0 0 10px; color: var(--soft); }
.context-use .copy-row code { font-size: .8rem; }
.context-use-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 !important; }
.context-browse { margin-top: 44px !important; margin-bottom: 14px !important; }
.context-dev { margin: 36px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.context-dev > summary { cursor: pointer; color: var(--soft); font-weight: 600; }
.context-dev .context-notes { margin-top: 14px; }
.glance-pic svg { width: 100% !important; height: auto !important; min-width: 0 !important; max-width: 100% !important; }

/* Examples page: grouped by kind of work, the drawing alternating sides. */
.ex-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.ex-jump .reg-pill { text-decoration: none; }
.ex-group { scroll-margin-top: 80px; }
.ex-group .ex-group-title { font-family: var(--mono); font-size: .8rem; font-weight: 600; line-height: 1.2; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 44px 0 0; }
@media (min-width: 821px) {
  .ex-show-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .ex-show-flip > .ex-text { order: 2; }
  .ex-show-flip > .ex-preview { order: 1; }
}
.ex-show .glance { margin: 14px 0 0; }
.ex-show .glance > div { padding: 6px 11px; }
.ex-show .glance dd { font-size: .86rem; }

/* Run your own: the opening above the server's README. */
.self-host { margin: 0 0 8px; }
.self-host h1 { margin-top: 4px; }
.self-host-figure { margin: 22px 0 0; border: 1px solid var(--line); border-radius: 14px; background: var(--plane); padding: 14px; }
.self-host-svg { display: block; width: 100%; height: auto; max-width: none; margin: 0; }
.self-host-svg text { font-size: 11px; }
.self-host-svg .us-sub { font-size: 9.5px; }
.self-host-svg .sh-machine { fill: none; stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); stroke-width: 1.5; stroke-dasharray: 6 5; }
.self-host-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.self-host-steps .card { margin: 0; }
.self-host-steps h3 { margin: 6px 0 4px; }
.self-host-steps p { margin: 0 0 8px; }
.self-host-steps .step-command { margin: 8px 0 0; }
.self-host-steps code { white-space: pre-wrap; word-break: break-all; }
.self-host-told { margin: 22px 0 0; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--green) 7%, var(--bg)); }
.self-host-told p { margin: 0 0 6px; }
.self-host-told-title { font-weight: 650; color: var(--ink); }
.self-host-note { display: flex; flex-direction: column; gap: 2px; font: 500 .85rem/1.5 var(--mono); color: var(--soft); }
.self-host-note ins { text-decoration: none; color: var(--green); font-weight: 700; }
.self-host-guide { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.prose .self-host-steps { padding-left: 0; }
.prose .self-host-steps > li { margin-left: 0; padding-left: 20px; }
.prose .self-host-steps > li::marker { content: none; }

/* The problem band: big, right under the hero. */
.section.drift-band { background: color-mix(in srgb, var(--rose) 8%, var(--bg)); border-block: 1px solid color-mix(in srgb, var(--rose) 22%, var(--line)); }
.drift-title { font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: -.04em; max-width: 18em; margin: 4px 0 30px; text-wrap: balance; }
.drift-title span { color: var(--accent); }
.drift-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
@media (min-width: 981px) { .drift-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 44px; } }
.drift-figure { margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); padding: 18px 18px 12px; }
.drift-figure figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.drift-svg { display: block; width: 100%; height: auto; }
.drift-svg text { font-family: var(--font); }
.drift-svg .dr-grid { stroke: var(--hairline); stroke-width: 1; }
.drift-svg .dr-agreed { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 6; fill: none; }
.drift-svg .dr-built { stroke: var(--rose); stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: dr-draw-built 12s linear infinite; }
.drift-svg .dr-aim { stroke: var(--green); stroke-width: 4; fill: none; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: dr-draw-aim 12s linear infinite; }
.drift-svg .dr-dot { fill: var(--bg); stroke: var(--rose); stroke-width: 2.5; }
.drift-svg .dr-tick { font-size: 12px; font-weight: 600; fill: var(--muted); }
.drift-svg .dr-qm { font-size: 22px; font-weight: 700; fill: var(--muted); }
.drift-svg .dr-bracket { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.drift-svg .dr-gap-t { font-size: 16px; font-weight: 700; fill: var(--ink); }
.drift-svg .dr-gap-s { font-size: 11px; fill: var(--muted); }
.drift-svg .dr-sw { stroke-width: 3; stroke-linecap: round; }
.drift-svg .dr-sw-agreed { stroke: var(--accent); stroke-dasharray: 4 3; }
.drift-svg .dr-sw-built { stroke: var(--rose); }
.drift-svg .dr-sw-aim { stroke: var(--green); stroke-width: 4; }
.drift-svg .dr-end { font-size: 12px; font-weight: 600; fill: var(--ink); }
.drift-svg .dr-end-strong { font-weight: 700; }
.drift-svg .dr-end-sub { font-size: 11px; fill: var(--muted); }
.drift-svg .dr-p, .drift-svg .dr-q, .drift-svg .dr-gap, .drift-svg .dr-aim-end { opacity: 0; }
.drift-svg .dr-p1 { animation: dr-p1 12s linear infinite; }
.drift-svg .dr-p2 { animation: dr-p2 12s linear infinite; }
.drift-svg .dr-p3 { animation: dr-p3 12s linear infinite; }
.drift-svg .dr-p4 { animation: dr-p4 12s linear infinite; }
.drift-svg .dr-p5 { animation: dr-p5 12s linear infinite; }
.drift-svg .dr-p6 { animation: dr-p6 12s linear infinite; }
.drift-svg .dr-q, .drift-svg .dr-gap { animation: dr-gap 12s linear infinite; }
.drift-svg .dr-aim-end { animation: dr-aim-end 12s linear infinite; }
@keyframes dr-draw-built { 0% { stroke-dashoffset: 100; } 45%, 94% { stroke-dashoffset: 0; } 98%, 100% { stroke-dashoffset: 100; } }
@keyframes dr-p1 { 0%, 1% { opacity: 0; } 3%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes dr-p2 { 0%, 8% { opacity: 0; } 10%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes dr-p3 { 0%, 16% { opacity: 0; } 18%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes dr-p4 { 0%, 24% { opacity: 0; } 26%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes dr-p5 { 0%, 32% { opacity: 0; } 34%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes dr-p6 { 0%, 40% { opacity: 0; } 42%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes dr-gap { 0%, 46% { opacity: 0; } 50%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes dr-draw-aim { 0%, 56% { stroke-dashoffset: 100; } 78%, 94% { stroke-dashoffset: 0; } 98%, 100% { stroke-dashoffset: 100; } }
@keyframes dr-aim-end { 0%, 78% { opacity: 0; } 82%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .drift-svg [class*="dr-"] { animation: none !important; }
  .drift-svg .dr-p, .drift-svg .dr-q, .drift-svg .dr-gap, .drift-svg .dr-aim-end { opacity: 1; }
  .drift-svg .dr-built, .drift-svg .dr-aim { stroke-dashoffset: 0; }
}
.drift-stats { display: flex; flex-direction: column; gap: 14px; }
.drift-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.drift-stat-label { font-size: .86rem; color: var(--soft); line-height: 1.35; }
.drift-stat-value { font-family: var(--font); font-weight: 650; font-size: clamp(1.9rem, 3vw, 2.5rem); letter-spacing: -.03em; color: var(--ink); line-height: 1.05; }
.drift-more { margin: 4px 0 0; }
