/* FlowDM public site. Layout: dark navy terminal-night ground, full-bleed editorial bands
   (dark / deep-blue / light paper), one reading column, figures that break wider than the text. */
:root {
  --ink: #050d16;        /* page ground, matches the terminal and the graphics */
  --ink-2: #0a1724;      /* raised surfaces */
  --deep: #071c31;       /* deep-blue band */
  --line: #1b3045;       /* hairlines */
  --text: #e9eff5;
  --muted: #94a6b8;
  --sky: #8cc7ff;        /* eyebrows, links */
  --teal: #3be0a8;       /* the one action colour */
  --paper: #edf2f6;      /* light band */
  --paper-text: #0b1826;
  --paper-muted: #4b5d6e;
  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 1.0625rem/1.65 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, .strip:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); }

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { font: 800 1.25rem/1 var(--f-display); color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--teal); }
.site-head nav { display: flex; gap: clamp(12px, 3vw, 28px); align-items: center; font-size: 0.9375rem; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--text); }
.site-head nav .login { color: var(--text); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
.site-head nav .login:hover { border-color: var(--sky); }

/* type */
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.prose, .reading { max-width: 64ch; }
.prose > * + *, .reading > * + *, .chapter > * + *, .welcome > * + * { margin-top: 1.05em; }
.pull { font-family: var(--f-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); line-height: 1.3; letter-spacing: -0.01em; padding-block: 0.35em; }
.pull strong { font-weight: 700; }
em { font-style: italic; }

/* bands */
.band { padding-block: clamp(72px, 10vw, 140px); }
.band h2 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.6rem); line-height: 1.04; margin-bottom: 0.5em; max-width: 20ch; }
.band h3 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem); line-height: 1.08; margin-bottom: 0.5em; }
.band.dark { background: var(--ink); }
.band.deep { background: radial-gradient(120% 90% at 85% 0%, #0d2b4a 0%, var(--deep) 55%, var(--ink) 100%); }
.band.light { background: var(--paper); color: var(--paper-text); }
.band.light a { color: #0b5fa8; }
.band.light .pull { color: var(--paper-text); }
.band.light p:not(.pull) { color: #26384a; }
.band.rule { border-top: 1px solid var(--line); }
.band .fig { margin: clamp(40px, 6vw, 72px) 0 0; }

/* hero */
.hero { padding-block: clamp(64px, 9vw, 120px) 0; text-align: center; overflow: hidden;
  background: radial-gradient(80% 60% at 50% 100%, #0c2a46 0%, rgba(5, 13, 22, 0) 70%), var(--ink); }
.hero h1 { font-size: clamp(2.5rem, 1.2rem + 5.6vw, 5.6rem); line-height: 0.98; font-weight: 800; max-width: 15ch; margin-inline: auto; letter-spacing: -0.035em; }
.hero-stage { max-width: 1280px; margin: clamp(40px, 6vw, 80px) auto 0; padding-inline: var(--gutter); perspective: 1600px; }
.hero-shot img { border-radius: 14px 14px 0 0; border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -30px 120px -40px rgba(59, 224, 168, 0.25), 0 40px 120px rgba(0, 0, 0, 0.6); }
.hero .fig { margin: 0; }

/* figures */
.fig img { border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2); }
.band.light .fig img { border-color: #c9d5df; box-shadow: 0 30px 80px -30px rgba(5, 13, 22, 0.45); }
.fig .tool { font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); margin-top: 12px; }

/* introducing: text beside hedge controls */
.split { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: minmax(0, 1fr); align-items: start; }
.split > * { min-width: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
  .tools-split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .sticky { position: sticky; top: 96px; }
}
.aside .fig { margin: 0; max-width: 400px; }

/* tools: one at a time */
.tool-stack { display: grid; gap: clamp(48px, 8vw, 96px); }
.tool-stack .fig { margin: 0; }

/* closing */
.closing { text-align: left; }
.cta-row { margin-top: 2em !important; }
.cta { display: inline-flex; align-items: center; gap: 0.4em; background: var(--teal); color: #03140e !important; text-decoration: none;
  font: 700 1.0625rem/1 var(--f-display); padding: 16px 26px; border-radius: 999px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(59, 224, 168, 0.6); }

/* course pages */
.course { max-width: 1240px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--gutter) 80px; display: grid; gap: 0 56px; grid-template-columns: minmax(0, 1fr); }
.course > * { min-width: 0; }
.rail { grid-row: 1; }
@media (min-width: 1000px) {
  .course { grid-template-columns: 260px minmax(0, 1fr); }
  .rail { grid-column: 1; grid-row: 1 / span 6; }
  .course > :not(.rail) { grid-column: 2; }
  .rail-menu { display: none; }
  .rail-desk { position: sticky; top: 88px; }
}
@media (max-width: 999px) { .rail-desk { display: none; } }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.9rem; line-height: 1.35; }
.rail a:hover { color: var(--text); background: var(--ink-2); }
.rail a[aria-current] { color: var(--text); background: var(--ink-2); box-shadow: inset 2px 0 0 var(--teal); }
.rail-title { font: 500 0.72rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); margin: 0 0 14px 10px; }
.rail-menu { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 32px; background: var(--ink-2); }
.rail-menu summary { cursor: pointer; padding: 12px 16px; font: 600 0.95rem/1 var(--f-display); list-style: none; display: flex; justify-content: space-between; }
.rail-menu summary::after { content: "+"; color: var(--sky); }
.rail-menu[open] summary::after { content: "–"; }
.rail-menu nav { padding: 0 8px 10px; }

.reading { max-width: 68ch; }
.chapter h1, .welcome h1, .solo h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.4rem); line-height: 1.05; margin-bottom: 0.6em; letter-spacing: -0.03em; }
.welcome h1 { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 0.15em; }
.welcome h1 + h2 { font: 500 clamp(1.15rem, 1rem + 0.7vw, 1.5rem)/1.3 var(--f-body); color: var(--sky); letter-spacing: 0; margin-top: 0 !important; }
.chapter h2, .welcome h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem); line-height: 1.15; margin-top: 2.2em !important; }
.chapter p, .welcome p { color: #cfdae5; }
.chapter p.pull, .welcome p.pull { color: var(--text); }
.chapter ul, .chapter ol { padding-left: 1.25em; display: grid; gap: 0.45em; color: #cfdae5; }
.chapter .fig { margin-block: 2.4em; }
.reading.chapter { max-width: none; }
.chapter > :not(.fig):not(.workflow):not(.strip) { max-width: 68ch; }
.chapter .fig.wide { max-width: 960px; }
.chapter .fig.medium { max-width: 720px; }
.chapter .fig.narrow { max-width: 440px; }
.strip { overflow-x: auto; margin-top: 1.2em; border-radius: 12px; }
.strip .fig { margin: 0; width: 1660px; max-width: none; }
.strip .fig img { width: 1660px; max-width: none; }

.workflow { margin-block: 2.4em; display: grid; gap: 24px; max-width: 960px; }
.wf-shots .fig { margin: 0; max-width: 520px; }
.wf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wf-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px 18px; background: var(--ink-2); }
.wf-steps strong { font: 700 1rem/1.3 var(--f-display); color: var(--text); }
.wf-steps p { margin-top: 4px; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.step-n { font: 500 0.8rem/1 var(--f-mono); color: var(--teal); border: 1px solid var(--line); border-radius: 999px; width: 30px; height: 30px; display: grid; place-items: center; }

.toc { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.ui-h { font: 500 0.75rem/1 var(--f-mono) !important; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); margin-bottom: 18px !important; }
.toc ol, .toc-list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--sky); text-decoration: underline; }
.locks { list-style: none; padding-left: 0 !important; }
.locks li { padding-left: 28px; position: relative; color: var(--muted); }
.locks li.open { color: var(--text); }
.locks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid var(--muted); }
.locks li.open::before { border-color: var(--teal); background: var(--teal); border-radius: 50%; }

.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 72px; max-width: 68ch; }
.pg { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); font: 600 1rem/1.3 var(--f-display); }
.pg span { font: 500 0.72rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pg.next { text-align: right; }
.pg:hover { border-color: var(--sky); }

.course-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 32px; max-width: 960px; }
.course-card { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); text-decoration: none; color: var(--text); }
.course-card strong { font: 700 1.1rem/1.25 var(--f-display); }
.course-card span { font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.course-card:hover { border-color: var(--teal); }

.solo { max-width: 860px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 80px; }
.eyebrow { font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); margin-bottom: 18px !important; }
.soon { color: var(--muted); font-size: 1.15rem; }

.disclosures-block { margin-top: 80px; padding-top: 32px; border-top: 1px solid var(--line); }
.disclosures h2 { font: 600 1.1rem/1.2 var(--f-display); margin-bottom: 16px; }
.disclosures p, .disclosures-page p { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.disclosures p + p { margin-top: 0.8em; }
.disclosures p strong { color: var(--text); font-weight: 600; }
.disclosures p:has(> strong:only-child) { margin-top: 1.6em; }
.disclosures-page h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-bottom: 0.8em; }
.disclosures-page > p + p { margin-top: 0.9em; }
.disclosures-page p:has(> strong:only-child) { margin-top: 2em; color: var(--text); font: 600 1.05rem/1.3 var(--f-display); }
.disclosures-page p { font-size: 0.975rem; color: #c3d0dc; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: #040a12; padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); }
.foot-inner { max-width: 1160px; }
.foot-inner p { font-size: 0.9rem; line-height: 1.65; color: #aebdcb; max-width: 100ch; }
.foot-inner p + p { margin-top: 12px; }
.foot-inner p:first-child strong { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.foot-inner a { color: var(--sky); }
.foot-inner a:hover { color: var(--text); }

/* motion: one moment on the landing page, gentle fades elsewhere; nothing moves for reduced-motion users */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hero-shot { animation: settle linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; transform-origin: 50% 100%; }
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  }
  .hero h1 { animation: lift 0.9s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes settle { from { transform: rotateX(16deg) scale(0.94); } to { transform: none; } }
@keyframes rise { from { opacity: 0.7; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes lift { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.zoom { display: block; cursor: zoom-in; }
.zoom:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 12px; }

/* v1.2 manuscript structure */
.chapter h3, .welcome h3:not(.ui-h) { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); line-height: 1.25; margin-top: 1.8em !important; }
.welcome h1 + p { font: 500 clamp(1.15rem, 1rem + 0.7vw, 1.5rem)/1.3 var(--f-body); color: var(--sky); margin-top: 0 !important; }
.welcome h1 + p + h2 { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); color: var(--text); margin-top: 0.6em !important; font-weight: 600; }
.welcome .toc { margin-top: 48px; }
.fig .cap { font-size: 0.875rem; line-height: 1.55; color: var(--muted); margin-top: 12px; max-width: 72ch; }
.chapter .cta-row { margin-top: 2.4em !important; }

/* landing: the question for your own AI model */
.band.question { border-top: 1px solid #d3dde6; }
.copyq { margin-top: 1.6em; display: grid; gap: 12px; justify-items: start; }
.copy-btn { border: 0; cursor: pointer; }
.copy-status { min-height: 1.4em; font-size: 0.95rem; color: #0b6b4c !important; font-weight: 600; }
.copy-view { width: 100%; border: 1px solid #c9d5df; border-radius: 12px; background: #ffffff; }
.copy-view summary { cursor: pointer; padding: 12px 16px; font: 600 0.95rem/1 var(--f-display); color: var(--paper-text); }
.copy-view summary:focus-visible { outline: 2px solid #0b5fa8; outline-offset: 2px; }
.copy-text { margin: 0; padding: 4px 16px 16px; white-space: pre-wrap; font: 400 0.92rem/1.6 var(--f-body); color: #26384a; }

/* course previews */
.lede { color: #cfdae5; font-size: 1.1rem; }
.locks .pg-list { list-style: none; padding: 6px 0 4px 0; margin: 0; display: grid; gap: 4px; font-size: 0.92rem; color: var(--muted); }
.locks li.open .pg-list { color: #cfdae5; }
.locks > li { padding-block: 4px; }
.locks > li > span { font-weight: 600; }
.preview-ch { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.preview-ch img { border-radius: 12px; border: 1px solid var(--line); margin-block: 1.6em; }
.locked-note { margin-top: 48px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); }
.locked-note .cta-row { margin-top: 0 !important; }
