/* Workroom — local preview stylesheet.
   Visual language follows the Goal Driven AI V2 reference: warm paper,
   black type, restrained red, thin rules, square controls, no shadows. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 300; font-display: swap; src: url(./fonts/manrope-300.woff2) format("woff2"), url(./fonts/manrope-300.ttf) format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url(./fonts/manrope-400.woff2) format("woff2"), url(./fonts/manrope-400.ttf) format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url(./fonts/manrope-500.woff2) format("woff2"), url(./fonts/manrope-500.ttf) format("truetype"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url(./fonts/ebgaramond-italic-400.woff2) format("woff2"), url(./fonts/ebgaramond-italic-400.ttf) format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(./fonts/ibmplexmono-400.woff2) format("woff2"), url(./fonts/ibmplexmono-400.ttf) format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(./fonts/ibmplexmono-500.woff2) format("woff2"), url(./fonts/ibmplexmono-500.ttf) format("truetype"); }

:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --ink: #090909;
  --muted: #57534c;
  --accent: #d01920;
  --button-ink: #fff;
  --rule: rgba(9, 9, 9, .20);
  --rule-strong: rgba(9, 9, 9, .48);
  --sans: "Manrope", Arial, sans-serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(22px, 5vw, 64px);
  --section-space: clamp(58px, 7vw, 104px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--button-ink); }
h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
h1, h2, h3 { overflow-wrap: break-word; text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.5vw, 2.875rem); font-weight: 300; letter-spacing: -.035em; line-height: 1.1; }
h3 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.024em; line-height: 1.2; }
p { max-width: 62ch; overflow-wrap: break-word; text-wrap: pretty; }
strong { font-weight: 500; color: var(--ink); }
a { color: inherit; text-underline-offset: .24em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

.wrap { width: min(100%, 1360px); margin-inline: auto; padding-inline: var(--gutter); }
.wrap > * { min-width: 0; }
.muted { color: var(--muted); }
.prose > p + p { margin-top: 20px; }
.label {
  font-family: var(--mono); font-size: .8125rem; font-weight: 500;
  letter-spacing: .02em; color: var(--muted);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: var(--gutter); z-index: 100;
  padding: 12px 18px; background: var(--ink); color: var(--bg);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--rule); }
@media (min-width: 700px) and (min-height: 520px) {
  .site-header {
    position: sticky; top: 0; z-index: 20;
    /* Reveal answers the reader (scroll up, focus), so it snaps. */
    transition: transform 240ms var(--ease-out);
    will-change: transform;
  }
  /* Set by assets/header.js after a downward scroll; cleared on the way back up.
     Hiding is the system tidying up, so it can take longer. */
  .site-header.is-hidden { transform: translateY(-100%); transition: transform 360ms var(--ease-out); }
  html { scroll-padding-top: calc(var(--header-h) + 16px); }
}
@media (min-width: 700px) and (min-height: 520px) and (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header.is-hidden { transition: none; }
}
.nav-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 32px; min-height: var(--header-h);
}
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--sans); font-size: 1.125rem; font-weight: 400;
  letter-spacing: .13em; line-height: 1; text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0 24px; padding: 0; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); font-family: var(--mono); font-size: .8125rem; text-decoration: none;
}

/* Controls */
.button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 40px;
  min-height: 56px; min-width: 200px; padding: 15px 22px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--button-ink);
  font-family: var(--mono); font-size: .875rem; font-weight: 500; line-height: 1.5;
  text-decoration: none; border-radius: 0;
}
.button svg { flex: none; width: 20px; height: 20px; }
/* Arrow-only affordance: quiet at rest, rule fades in on hover/focus.
   Keeps link rows (cases, footer) free of permanent underlines. */
.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--mono); font-size: .875rem;
  text-decoration: underline; text-decoration-color: transparent;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

/* Hero */
.hero { padding-block: clamp(44px, 6vw, 88px) var(--section-space); }
.hero h1 {
  max-width: 13ch;
  font-size: clamp(2rem, 11vw, 3.375rem);
  font-weight: 300; letter-spacing: -.03em; line-height: 1.04;
}
@media (min-width: 740px) { .hero h1 { font-size: clamp(3.375rem, 7.3vw, 6rem); } }
.hero h1 em {
  /* Match Manrope's 0.54 x-height so both faces read at the same optical size. */
  font-size: 1em; font-size-adjust: .54;
  color: var(--accent); font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: -.02em;
}
.hero-body {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 28px 88px; margin-top: clamp(32px, 4vw, 56px); align-items: start;
}
.hero .lead { max-width: 34ch; font-size: clamp(1.1875rem, 1.65vw, 1.375rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }

/* Sections */
.section { padding-block: var(--section-space); border-top: 1px solid var(--rule); }
.editorial {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 28px 88px; align-items: start;
}
.editorial h2 { max-width: 16ch; }
.editorial .prose { color: var(--muted); }
.editorial .prose strong, .prose .ink { color: var(--ink); font-weight: 400; }

/* Situation: one quiet, wide passage */
.situation .prose p:first-child { color: var(--ink); font-size: clamp(1.1875rem, 1.65vw, 1.375rem); line-height: 1.55; max-width: 40ch; }

/* Conversation */
.prompt {
  margin-block: 8px 28px; padding-block: 28px 4px;
}
.prompt blockquote p {
  max-width: 30ch;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.25; letter-spacing: -.01em;
  color: var(--ink);
}
.prompt .q { color: var(--accent); }
.prompt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 20px; min-height: 44px; }
.copy-button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); border-radius: 0;
  font-family: var(--mono); font-size: .8125rem; cursor: pointer;
}
.copy-button[hidden] { display: none; }
.copy-status { display: inline-block; font-family: var(--mono); font-size: .8125rem; color: var(--muted); }

/* Worked example */
.example-label { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: clamp(40px, 5vw, 64px); padding-bottom: 14px; }
.example-label .example-tag { margin-top: 0; }
.example-flow {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
}
.example-flow li { position: relative; padding: 22px 32px 28px 0; }
.example-flow li + li { padding-left: 32px; border-left: 1px solid var(--rule); }
.example-flow .kind { display: flex; align-items: center; gap: 10px; }
.example-flow .kind .arrow { color: var(--accent); font-family: var(--mono); }
.example-flow .title {
  margin-top: 14px; max-width: 24ch;
  font-family: var(--serif); font-style: italic; font-size: 1.5rem; line-height: 1.25;
}
.example-flow .what { margin-top: 10px; color: var(--muted); font-size: .9375rem; line-height: 1.6; max-width: 34ch; }
.example-tag {
  display: inline-block; margin-top: 16px; padding: 2px 8px;
  border: 1px solid var(--rule-strong);
  font-family: var(--mono); font-size: .8125rem; letter-spacing: .02em; color: var(--muted);
}
.returns-head { margin-top: clamp(40px, 5vw, 64px); }
.returns {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px;
  margin-top: 16px; padding: 0; list-style: none;
}
.returns li {
  padding-block: 12px;
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem); font-weight: 300; line-height: 1.4; letter-spacing: -.01em;
}
.caption { margin-top: 28px; color: var(--muted); font-size: .9375rem; }
.caption em { font-family: var(--serif); font-size: 1.125rem; }

/* Steps */
.section-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px 88px; margin-bottom: 48px; }
.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 40px;
  padding: 0; list-style: none; counter-reset: step;
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 1rem; }
.steps p + p { margin-top: 12px; }

/* Existing notes + file ownership */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 88px; }
/* Pair columns must match optically: the second column's h3 takes the h2's
   display size/weight so the two heads sit on one line at one scale. */
.pair h2 { max-width: 18ch; margin-bottom: 24px; }
.pair-head { max-width: 20ch; margin-bottom: 24px; font-size: clamp(2rem, 3.5vw, 2.875rem); font-weight: 300; letter-spacing: -.035em; line-height: 1.1; }
.pair .prose { color: var(--muted); }
.pair > div + div { padding-left: 44px; margin-left: -44px; border-left: 1px solid var(--rule); }

/* Install */
.mid-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-block: clamp(40px, 5vw, 64px) 0; }
.mid-cta .button { margin: 0; }
.mid-cta span { font-size: .9375rem; }

.install { padding-bottom: calc(var(--section-space) * 1.2); }
.install-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 36px 88px; align-items: start; }
.install h2 { max-width: 14ch; }
.install .lead { margin-top: 20px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 24px; min-height: 88px; padding-block: 20px;
}
.footer-inner .wordmark { font-size: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; }
.footer-made { color: var(--muted); font-size: .8125rem; }

/* Responsive */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 40px; }
}
@media (max-width: 900px) {
  .hero-body, .editorial, .section-head, .install-grid, .pair { grid-template-columns: minmax(0, 1fr); }
  .pair > div + div { padding-left: 0; margin-left: 0; border-left: 0; padding-top: 8px; }
  .example-flow { grid-template-columns: minmax(0, 1fr); }
  .example-flow li, .example-flow li + li { padding: 22px 0 26px; border-left: 0; }
  .returns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .button { width: 100%; min-width: 0; }
  /* One swipeable row instead of three wrapped ones; the fade says there is more,
     and the end padding lets the last link scroll clear of it. */
  .nav-inner > nav { flex: 0 1 100%; width: 100%; min-width: 0; }
  .nav-links {
    gap: 0 18px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap;
    max-width: 100%;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter) 48px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a:focus-visible { outline-offset: -2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Inline code */
code { font-family: var(--mono); font-size: .875em; padding: 1px 4px; background: rgba(9, 9, 9, .06); overflow-wrap: break-word; }

/* Before → after diagrams. Illustrative only; each SVG carries its own text alternative. */
.compare { margin: clamp(48px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); }
.compare-pair {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px 28px; align-items: start;
}
.compare-pane { padding-top: 0; }
.compare-label { margin-bottom: 12px; font-size: 1rem; line-height: 1.4; color: var(--muted); }
.compare-step {
  display: inline-block; margin-right: 10px;
  color: var(--accent); font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 2rem; line-height: 1; letter-spacing: -.01em;
}
.compare-arrow { align-self: center; color: var(--accent); font-family: var(--mono); font-size: 1.5rem; }
.graph { display: block; width: 100%; height: auto; }
.graph .g-edge line { stroke: rgba(9, 9, 9, .38); stroke-width: 1; }
.graph .g-edge-strong line { stroke: rgba(9, 9, 9, .62); }
.graph .g-edge-dashed line { stroke-dasharray: 3 3; }
.graph .g-src circle { fill: var(--muted); }
.graph .g-faint circle { fill: #858077; }
.graph .g-idea circle { fill: var(--ink); }
.graph .g-question circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.graph .g-excluded circle { fill: var(--bg); stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 2.5; }
.graph .g-map { fill: var(--ink); }
.graph .g-home { fill: var(--ink); }
.graph .g-page rect { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.graph .g-select { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 5 4; }
.graph .g-text text { font-family: var(--mono); font-size: 11px; fill: var(--muted); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.compare-caption { margin-top: 20px; color: var(--muted); font-size: .9375rem; }
.compare-caption p { margin-top: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; list-style: none; font-size: .875rem; color: var(--ink); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.key { display: inline-block; flex: none; width: 12px; height: 12px; }
.key-map { background: var(--ink); }
.key-idea { background: var(--ink); border-radius: 50%; }
.key-src { width: 10px; height: 10px; background: var(--muted); border-radius: 50%; }
.key-faint { width: 10px; height: 10px; background: #858077; border-radius: 50%; }
.key-question { border: 2px solid var(--accent); border-radius: 50%; }
.key-excluded { border: 1.5px dashed var(--muted); border-radius: 50%; }
.key-page { width: 10px; height: 13px; border: 1.5px solid var(--ink); }

/* Video placeholders: a printed, risograph-style frame. Visibly unfinished,
   never a fake player (no play button, no timeline). Decoration is CSS only. */
.video-slot { margin-top: 36px; }
.video-wide { margin-top: clamp(40px, 5vw, 64px); }
.video-wide .video-frame { max-width: 880px; }
.video-frame {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  aspect-ratio: 16 / 9; padding: clamp(18px, 3.2vw, 36px);
  border: 1px solid var(--ink);
  background:
    radial-gradient(rgba(9, 9, 9, .13) .9px, transparent 1.3px) 0 0 / 7px 7px,
    #ebe6da;
}
/* Overprinted red disc, cropped by the frame */
.video-frame::before {
  content: ""; position: absolute; z-index: -1;
  right: -7%; top: -22%; width: 44%; aspect-ratio: 1;
  border-radius: 50%; background: var(--accent); opacity: .92; mix-blend-mode: multiply;
}
/* Crop marks in the four corners */
.video-frame::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--ink), var(--ink)) left top / 16px 1px,
    linear-gradient(var(--ink), var(--ink)) left top / 1px 16px,
    linear-gradient(var(--ink), var(--ink)) right top / 16px 1px,
    linear-gradient(var(--ink), var(--ink)) right top / 1px 16px,
    linear-gradient(var(--ink), var(--ink)) left bottom / 16px 1px,
    linear-gradient(var(--ink), var(--ink)) left bottom / 1px 16px,
    linear-gradient(var(--ink), var(--ink)) right bottom / 16px 1px,
    linear-gradient(var(--ink), var(--ink)) right bottom / 1px 16px;
  background-repeat: no-repeat;
}
.video-kind {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .8125rem; font-weight: 500; letter-spacing: .04em; color: var(--ink);
}
.video-kind::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.video-topic {
  max-width: 24ch; color: var(--ink);
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.375rem, 2.6vw, 2.125rem); line-height: 1.15; letter-spacing: -.01em;
}
.video-slot .video-topic { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.video-wide .video-topic { font-size: clamp(1.375rem, 2.6vw, 2.125rem); }
@media (max-width: 600px) {
  .video-frame { aspect-ratio: auto; min-height: 220px; padding: 96px 18px 20px; }
  .video-frame::before { width: 30%; top: -12%; right: -5%; }
}

/* Publishing features */
.lead-sm { font-size: clamp(1.1875rem, 1.65vw, 1.375rem); line-height: 1.55; max-width: 40ch; }
/* Intake / publishing feature trio: PDF copy is genuinely longer, so its
   column widens instead of stretching its neighbours' whitespace. */
.features {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px 48px;
  margin-top: clamp(40px, 5vw, 64px);
}
.features h3 { margin-bottom: 10px; font-size: 1.25rem; }
.features p { color: var(--muted); font-size: 1rem; }

/* Technical details */
.specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px;
  margin: clamp(36px, 4vw, 56px) 0 0;
}
.specs > div {
  display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 6px 24px;
  padding-block: 14px;
}
.specs dt { font-weight: 500; line-height: 1.5; }
.specs dd { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }

/* FAQ */
.faq { margin: clamp(36px, 4vw, 56px) 0 0; max-width: 78ch; }
.faq > div { padding-block: 22px; border-top: 1px solid var(--rule); }
.faq dt { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); font-weight: 500; letter-spacing: -.012em; line-height: 1.35; }
.faq dd { margin: 10px 0 0; color: var(--muted); line-height: 1.65; }
.faq dd p + p { margin-top: 12px; }
.faq dd a { color: var(--ink); }

/* Purchase / install status */
.status h3 { font-size: 1.625rem; font-weight: 400; letter-spacing: -.022em; }
.status-line { margin-top: 10px; color: var(--muted); }
.offer + .status-line { margin-top: 16px; font-size: .9375rem; }
.status-line a { color: var(--ink); }
.status .button { margin-block: 28px; }

@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs { grid-template-columns: minmax(0, 1fr); }
}
/* Side by side, each diagram drops below ~360px wide and its labels below 9px,
   so stack them earlier than the rest of the layout, at a readable size. */
@media (max-width: 900px) {
  .compare-pair { grid-template-columns: minmax(0, 1fr); }
  .compare-pair .graph { max-width: 560px; }
  .compare-arrow { transform: rotate(90deg); justify-self: start; margin-left: 8px; }
}
/* On phones the diagrams take the full screen width, and their labels grow
   so they stay readable once the drawing is scaled down. */
@media (max-width: 600px) {
  .compare-pair .graph { width: calc(100% + 2 * var(--gutter)); max-width: none; margin-inline: calc(-1 * var(--gutter)); }
  .graph .g-text text { font-size: 14px; }
}
@media (max-width: 760px) {
  .features { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .specs > div { grid-template-columns: minmax(0, 1fr); }
}

/* Offer */
.offer { margin-top: 20px; padding-left: 1.1em; list-style: disc; }
.offer li { padding-block: 4px; }
.offer li::marker { color: var(--muted); }
.checkout-pending { margin-top: 20px; font-family: var(--mono); font-size: .875rem; }

/* Buyer guide page */
.doc-hero { padding-block: clamp(40px, 5vw, 72px) clamp(40px, 5vw, 64px); }
.doc-hero h1 { max-width: 18ch; font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 300; letter-spacing: -.03em; line-height: 1.06; }
.doc-hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); font-size-adjust: .54; }
.doc-hero .lead { margin-top: 24px; max-width: 46ch; font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.55; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 40px 72px; align-items: start; }
.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.doc-toc ol { margin-top: 8px; padding: 0; list-style: none; }
.doc-toc a { display: flex; min-height: 40px; align-items: center; color: var(--muted); font-size: .9375rem; text-decoration: none; }
.doc-body > section { padding-block: 0 clamp(48px, 6vw, 80px); }
.doc-body > section + section { padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule); }
.doc-body h2 { margin-bottom: 20px; font-size: clamp(1.75rem, 2.8vw, 2.25rem); }
.doc-body h3 { margin: 32px 0 10px; font-size: clamp(1.375rem, 2.4vw, 1.625rem); }
.doc-body p, .doc-body li { color: var(--muted); }
.doc-body p + p { margin-top: 14px; }
.doc-body .doc-steps { margin-top: 12px; padding-left: 1.4em; }
.doc-body .doc-steps li + li { margin-top: 10px; }
.doc-body .ink { color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.facts > div { padding-block: 14px; }
.facts dt { font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 1.125rem; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}

/* Diagram colours: one per content type. Shapes differ too, so colour is never the only cue. */
:root {
  --c-map: #090909;
  --c-idea: #1f4e8c;
  --c-source: #8a5a00;
  --c-note: #1f4e8c;
  --c-question: #d01920;
  --c-faint: #858077;
}
.graph .edge { stroke: rgba(9, 9, 9, .34); stroke-width: 1; transition: opacity .18s ease, stroke .18s ease, stroke-width .18s ease; }
.graph .g-text { transition: opacity .18s ease; }
.graph .edge.dashed { stroke-dasharray: 3 3; }
.graph .node { transition: opacity .18s ease; cursor: default; }
.graph .node .ring { fill: none; stroke: none; }
.graph .t-map .shape, .graph .t-home .shape { fill: var(--c-map); }
.graph .t-idea .shape { fill: var(--c-idea); }
.graph .t-note .shape { fill: var(--c-note); }
.graph .t-source .shape { fill: var(--c-source); }
.graph .t-question .shape { fill: var(--bg); stroke: var(--c-question); stroke-width: 2.25; }
.graph .t-faint .shape { fill: var(--c-faint); }
.graph .t-excluded .shape { fill: var(--bg); stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 2.5; }
.graph .t-page .shape { fill: var(--bg); stroke: var(--c-note); stroke-width: 1.75; }
.key-source { width: 10px; height: 10px; background: var(--c-source); border-radius: 50%; }
.key-idea, .key-note { background: var(--c-idea); border-radius: 50%; }
.key-page { border-color: var(--c-note); }

/* Interactive layer: only after the script marks the figure as live. */
.compare.is-live .node { cursor: pointer; }
.compare.is-live .node:focus { outline: none; }
.compare.is-live .node:focus-visible .ring,
.compare .node.is-current .ring { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.compare.has-active .node:not(.hl) { opacity: .16; }
.compare.has-active .edge:not(.hl) { opacity: .1; }
.compare.has-active .edge.hl { stroke: var(--ink); stroke-width: 2; }
.compare.has-active .g-text { opacity: .35; }
.graph-readout {
  min-height: 3.3em; margin-top: 18px; padding: 0;
  font-size: .9375rem; line-height: 1.55; color: var(--ink);
}
.graph-readout[hidden] { display: none; }
.graph-readout .rk { font-family: var(--mono); font-size: .8125rem; color: var(--muted); }

/* Agents: illustrative conversations, deliberately plain (no logos, no product chrome) */
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; margin-top: clamp(40px, 5vw, 64px); }
.agent-scene { display: flex; flex-direction: column; }
.agent-head { margin-bottom: 16px; }
.agent-name { font-size: 1.25rem; font-weight: 400; letter-spacing: -.02em; }
.agent-where { margin-left: 6px; font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.scene { flex: none; }
.scene-chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 34ch; padding: 10px 14px; font-size: .9375rem; line-height: 1.5; }
.msg-you { align-self: flex-end; background: rgba(9, 9, 9, .07); }
.msg-agent { align-self: flex-start; border: 1px solid var(--rule-strong); }
.scene-term { padding: 18px 20px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: .8125rem; line-height: 1.6; }
.scene-term p { max-width: none; }
.scene-term p + p { margin-top: 6px; }
.term-you { color: #fff; font-weight: 500; }
.scene-turns p { font-size: .9375rem; line-height: 1.55; }
.scene-turns p + p { margin-top: 14px; }
.turn-who { display: block; margin-bottom: 2px; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
@media (max-width: 760px) {
  .agents { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* Cases (jobs the method fits): ruled columns, no box, eyebrow marks the job.
   Formats/modules override this via .formats / .modules on the same <ul>. */
.cases { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; margin-top: clamp(40px, 5vw, 64px); }
.case { display: flex; flex-direction: column; padding-top: 20px; border-top: 1px solid var(--rule-strong); }
.case-who { margin-bottom: 10px; font-family: var(--mono); font-size: .75rem; font-weight: 500; color: var(--accent); }
.case h3 { margin-bottom: 12px; }
.case > p:not(.case-who) { color: var(--muted); font-size: 1rem; }
/* The "holds / you work with" tail: separated, indented, and it pins itself to the
   card bottom so every card reads with the same footprint. */
.case-holds { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.case-label { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; color: var(--ink); }
.case .text-link { display: inline-block; margin-top: 12px; }
/* Demo links read in the accent; the arrow carries the same signal as the underline did. */
.case .text-link[href^="demos/"], .case .text-link[href^="https"] { color: var(--accent); }

/* Number belongs to the row: it hangs in the left margin of the name column. */
.formats .cases, .modules .cases { display: block; margin-top: 0; border-top: 1px solid var(--rule-strong); }
.formats .case, .modules .case {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2px 64px;
  padding-block: 32px; border-top: 0; border-bottom: 1px solid var(--rule);
  counter-increment: fmt;
}
.formats .cases, .modules .cases { counter-reset: fmt; }
.formats .case-who, .modules .case-who { display: none; }
/* Catalogue rows keep the sans voice; the hairline rule is the row's marker. */
.formats .case h3, .modules .case h3 {
  margin: 0;
  font-size: clamp(1.375rem, 2vw, 1.625rem);
}
/* Row rhythm: in the main catalogue the holds block redraws its own separating
   rule (page-level override); inside .more the rows stay rule-free. */
.formats .case > p, .modules .case > p { grid-column: 2; }
.formats .case > p:first-of-type, .modules .case > p:first-of-type { grid-row: 1; align-self: start; }
.formats .case > p:not(:first-of-type), .modules .case > p:not(:first-of-type) { margin-top: 34px; }
.formats .case-holds, .modules .case-holds { margin-top: 34px; padding-top: 0; border-top: 0; }
.formats .case .muted, .modules .case .muted { font-size: .9375rem; }
.formats .case p:has(.text-link), .modules .case p:has(.text-link) { margin-top: 34px; }
@media (max-width: 1080px) { .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cases { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .formats .case, .modules .case { grid-template-columns: minmax(0, 1fr); padding-block: 28px; }
  .formats .case > p, .modules .case > p { grid-column: 1; }
  .formats .case > p:first-of-type, .modules .case > p:first-of-type { grid-row: auto; }
}

/* Touch and pointer layer (mobile-native + review-animations).
   Hover styles apply only to precise pointers, so a tap never leaves one stuck;
   every tappable thing gets its own press state instead of the browser's grey flash. */
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); }
html { -webkit-tap-highlight-color: transparent; }
a, button, .compare.is-live .node { touch-action: manipulation; }
.button, .copy-button, .nav-links a, .compare.is-live .graph {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.button, .copy-button { transition: transform 140ms var(--ease-out), background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
.button:active, .copy-button:active { transform: scale(0.97); }
.button:active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.copy-button:active { border-color: var(--accent); color: var(--accent); }
.text-link:active, .nav-links a:active, .doc-toc a:active { color: var(--accent); }
:is(.text-link, .nav-links a, .doc-toc a):focus-visible { text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
  .button:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
  .text-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
  .copy-button:hover { border-color: var(--accent); color: var(--accent); }
  .doc-toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .button:active, .copy-button:active { transform: none; }
}

/* Motion (find-animation-opportunities, round 4).
   1. Diagram build-up: assets/graphs.js animates .shape and new .edge elements
      once per figure; .pre-reveal hides only those targets until it starts.
   2. Hero entrance (sales page and buyer guide), reused from the Goal Driven AI V2 reference (750ms, 90ms stagger),
      gated on html.js-motion so no-JS and reduced motion stay static. */
.graph .shape { transform-box: fill-box; transform-origin: center; }
.compare.pre-reveal .rv { opacity: 0; }
html.js-motion .hero h1,
html.js-motion .hero-body > *,
html.js-motion .doc-hero > * { animation: wr-rise 750ms cubic-bezier(.16, 1, .3, 1) both; }
html.js-motion .hero-body > :first-child,
html.js-motion .doc-hero > :nth-child(2) { animation-delay: 90ms; }
html.js-motion .hero-body > :nth-child(2),
html.js-motion .doc-hero > :nth-child(3) { animation-delay: 180ms; }
@keyframes wr-rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.js-motion .hero h1,
  html.js-motion .hero-body > *,
  html.js-motion .doc-hero > * { animation: none; }
}

/* Legal pages (Impressum, Datenschutz) */
.legal-page { max-width: calc(72ch + 2 * var(--gutter)); margin-inline: 0; padding-block: clamp(40px, 5vw, 72px); }
.legal-page h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 300; letter-spacing: -.03em; line-height: 1.06; margin-bottom: 16px; }
.legal-page h2 { margin: 40px 0 12px; font-size: 1.375rem; font-weight: 400; letter-spacing: -.02em; }
.legal-page p, .legal-page li { color: var(--muted); }
.legal-page p + p { margin-top: 12px; }
.legal-page strong { color: var(--ink); font-weight: 500; }
.legal-page a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal-page .provider-info { margin-top: 24px; }
.legal-page .provider-info p { margin-top: 0; color: var(--ink); }
.legal-page ul { margin-top: 12px; padding-left: 1.25em; }
.legal-page details { margin-top: 12px; }
.legal-page .licence-text { display: block; margin-top: 32px; }
.legal-page summary { cursor: pointer; color: var(--ink); }
.legal-page details pre { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; color: var(--muted); }

/* Buyer guide: install routes and code blocks */
.doc-body pre {
  margin: 12px 0 0; padding: 14px 16px; overflow-x: auto;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: .8125rem; line-height: 1.6;
}
.doc-body pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.install-route { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); }
.install-route h4 { margin: 0; font-size: 1.25rem; font-weight: 500; line-height: 1.3; letter-spacing: -.018em; }
.route-where { margin-left: 6px; font-family: var(--mono); font-size: .8125rem; font-weight: 400; color: var(--muted); }
.install-route p { margin-top: 10px; }
.repo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 20px; }
.download-actions { margin-top: 22px; }

/* Print. The buyer guide is the page people save or print: keep the content,
   drop the chrome, wrap commands instead of clipping them, and spell out links. */
@media print {
  .site-header, .skip-link, .doc-toc, .prompt-tools { display: none; }
  .doc-layout { display: block; }
  .doc-body pre {
    background: none; color: var(--ink); border: 1px solid var(--rule-strong);
    white-space: pre-wrap; overflow: visible; break-inside: avoid;
  }
  .doc-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--mono); font-size: .8em; color: var(--muted); overflow-wrap: anywhere;
  }
  h2, h3, h4 { break-after: avoid; }
  /* Diagrams never scrolled into view would otherwise print half-built. */
  .compare.pre-reveal .rv { opacity: 1; }
}

/* Mac app */
.app-title { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.app-icon { display: block; width: 96px; height: 96px; }
@media (max-width: 600px) { .app-icon { width: 72px; height: 72px; } }

/* Hero rotating phrase (assets/rotator.js). Letters leave by blurring up and
   arrive by rising out of a blur; words never break mid-word. */
.rotator-word { display: inline-block; white-space: nowrap; }
.rotator-char { display: inline-block; }
.rotator-char.is-out { animation: wr-char-out 320ms cubic-bezier(.4, 0, 1, 1) both; }
.rotator-char.is-in { animation: wr-char-in 560ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes wr-char-out {
  to { opacity: 0; filter: blur(6px); transform: translate3d(0, -.28em, 0); }
}
@keyframes wr-char-in {
  from { opacity: 0; filter: blur(8px); transform: translate3d(0, .4em, 0) scale(.92); color: var(--accent); }
  60% { color: var(--accent); }
  to { opacity: 1; filter: none; transform: none; }
}
.rotator { display: block; }
.rotator-button {
  margin: 0; padding: 0; border: 0; border-radius: 4px; background: none;
  color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit;
  text-align: left; cursor: pointer;
}
.rotator-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.rotator-hint {
  display: inline-block; margin-left: .2em; vertical-align: .6em;
  font-size: .45em; line-height: 1; color: var(--muted);
  transition: color 160ms ease;
}
.rotator-button:focus-visible .rotator-hint { color: var(--accent); }
@media (hover: hover) { .rotator-button:hover .rotator-hint { color: var(--accent); } }
.rotator-hint.is-spin { animation: wr-hint-spin 520ms cubic-bezier(.16, 1, .3, 1); }
@keyframes wr-hint-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .rotator-hint.is-spin { animation: none; }
}
