/* Ausmentum: process flow sheet on paper. Bands stack top to bottom; each band's .inner holds the gutter. */
:root {
  --paper: #eef1ec;
  --paper-alt: #e4e9e3;
  --surface: #fbfcf9;
  --sunk: #dde3dc;
  --ink: #1b2320;
  --muted: #56625c;
  --line: #c3cbc4;
  --edge: #7d8a83;
  --product: #9a5a00;
  --product-tint: #fbefd9;
  --hot: #c4351a;
  --warm: #7a55b8;
  --cold: #1f6bb5;
  --power: #237a45;
  --proven: #237a45;
  --pilot: #9a5a00;
  --vision: #7a55b8;
  --focus: #1b2320;
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111513; --paper-alt: #161b18; --surface: #1c221f; --sunk: #252d29;
    --ink: #e5ebe7; --muted: #9ba7a1; --line: #36403b; --edge: #74817a;
    --product: #e6a548; --product-tint: #2c2416;
    --hot: #f2734a; --warm: #ad8cec; --cold: #5ea9ee; --power: #4fc27d;
    --proven: #4fc27d; --pilot: #e6a548; --vision: #ad8cec; --focus: #e5ebe7;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cold); outline-offset: 2px; }

.inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(56px, 8vw, 96px); }
.band.alt { background: var(--paper-alt); }

/* Type */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
h2 {
  font-family: var(--font-display);
  font-stretch: 105%;
  font-weight: 780;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.1;
  margin-bottom: 18px;
}
h3 { font: 700 17px/1.3 var(--font-body); }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 60ch; margin: 22px 0 0; }
.lede strong { color: var(--ink); }
.section-lede { color: var(--muted); max-width: 66ch; margin: 0 0 28px; font-size: 17px; }
.prose p { margin: 0 0 16px; max-width: 62ch; }
.pull {
  font-family: var(--font-display);
  font-stretch: 80%;
  font-weight: 650;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.25;
  color: var(--product);
  max-width: 40ch;
  margin: 36px 0 0;
}
.pull.small { font-size: clamp(19px, 2vw, 22px); margin-top: 8px; }
.fine { font-size: 13.5px; color: var(--muted); margin: 18px 0 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 15px/1 var(--font-body);
  padding: 14px 20px;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.88; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 10px 14px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar .inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 800 19px/1 var(--font-display); font-stretch: 110%; }
.brand .mark { width: 24px; height: 24px; color: var(--product); }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.links a:hover { color: var(--ink); }
@media (max-width: 860px) { .links { display: none; } .topbar .btn { margin-left: auto; } }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 88px) clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.cascade {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 22px 22px 18px;
}
.cascade-title { font: 700 15px/1.3 var(--font-body); margin: 0 0 14px; }
.cascade ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cascade li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px dashed var(--line);
  position: relative;
}
.cascade li:first-child { border-top: 0; }
.cascade .temp { font: 600 19px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.cascade li.hot .temp { color: var(--hot); }
.cascade li.warm .temp { color: var(--warm); }
.cascade li.cold .temp { color: var(--cold); }
.cascade-note { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }

/* Problems */
.problems { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
@media (max-width: 1000px) { .problems { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .problems { grid-template-columns: minmax(0, 1fr); } }
.problems article { border-top: 3px solid var(--ink); padding-top: 14px; }
.problems h3 { margin-bottom: 6px; }
.problems p { margin: 0; color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.network-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 860px) { .network-intro { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Hub explainer */
.explainer { display: grid; gap: 16px; }
.streams { display: flex; flex-wrap: wrap; gap: 8px; }
.streams button {
  font: 600 14px/1 var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}
.streams button:hover { border-color: var(--ink); }
.streams button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .stage { grid-template-columns: minmax(0, 1fr); } }
.sheet {
  background-color: var(--surface);
  background-image: linear-gradient(var(--sunk) 1px, transparent 1px), linear-gradient(90deg, var(--sunk) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  min-width: 0;
  max-height: 76vh;
}
.sheet svg { display: block; margin: 0 auto; max-width: none; }
.loading { padding: 40px; color: var(--muted); margin: 0; }

.node { cursor: pointer; transition: opacity 0.35s ease; }
.node rect.box { stroke-width: 1.5; }
.node text { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: var(--ink); dominant-baseline: central; text-anchor: middle; pointer-events: none; }
.k-input rect.box { fill: var(--sunk); stroke: var(--ink); stroke-width: 2; }
.k-input text { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-size: 13.5px; }
.k-process rect.box { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.k-process text { font-weight: 700; }
.k-stream rect.box { fill: var(--surface); stroke: var(--edge); stroke-dasharray: 4 3; }
.k-stream text { font-weight: 500; fill: var(--muted); }
.k-product rect.box { fill: var(--product-tint); stroke: var(--product); }
.k-product text { fill: var(--product); }
.k-water rect.box, .k-power rect.box { fill: var(--surface); stroke-width: 2; }
.k-water text, .k-power text { font-family: var(--font-mono); font-size: 12.5px; }
.t-hot rect.box { stroke: var(--hot); } .t-hot text { fill: var(--hot); }
.t-warm rect.box { stroke: var(--warm); } .t-warm text { fill: var(--warm); }
.t-cold rect.box { stroke: var(--cold); } .t-cold text { fill: var(--cold); }
.k-power rect.box { stroke: var(--power); } .k-power text { fill: var(--power); }
.node rect.ring { fill: none; stroke: var(--focus); stroke-width: 2.5; opacity: 0; }
.node[data-state="current"] rect.ring { opacity: 1; }
.node[data-state="future"] { opacity: 0.14; }
.node[data-state="dim"] { opacity: 0.28; }
.node:focus-visible { outline: none; }
.node:focus-visible rect.ring { opacity: 1; stroke: var(--cold); }

.edge { transition: opacity 0.35s ease; }
.edge path.line { fill: none; stroke-width: 1.6; }
.c-ink path.line { stroke: var(--edge); } .c-ink .tip { fill: var(--edge); }
.c-hot path.line { stroke: var(--hot); } .c-hot .tip { fill: var(--hot); }
.c-warm path.line { stroke: var(--warm); } .c-warm .tip { fill: var(--warm); }
.c-cold path.line { stroke: var(--cold); } .c-cold .tip { fill: var(--cold); }
.c-power path.line { stroke: var(--power); } .c-power .tip { fill: var(--power); }
.edge[data-state="future"] { opacity: 0.07; }
.edge[data-state="dim"] { opacity: 0.16; }
.edge[data-state="past"] { opacity: 0.6; }
.edge[data-state="active"] path.line { stroke-width: 2.6; stroke-dasharray: 7 5; animation: flow 0.9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }

.panel {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 18px 18px 20px;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.panel h3 { font-family: var(--font-display); font-stretch: 90%; font-weight: 750; font-size: 22px; line-height: 1.15; }
.panel p { margin: 0; }
.stepcount { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots button {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface);
  font: 600 12px/1 var(--font-mono); color: var(--muted); cursor: pointer; padding: 0;
  font-variant-numeric: tabular-nums;
}
.dots button.done { border-color: var(--ink); color: var(--ink); }
.dots button[aria-current="step"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.controls { display: flex; gap: 8px; }
.controls button {
  flex: 1;
  font: 600 14px/1 var(--font-body);
  padding: 12px;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.controls button.primary { background: var(--ink); color: var(--paper); }
.controls button:disabled { opacity: 0.35; cursor: default; }
.hint { font-size: 13px; color: var(--muted); }

.picked { border-top: 1.5px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.picked h4 { margin: 0; font: 700 16px/1.3 var(--font-body); }
.picked .kind { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.flowlist { display: grid; gap: 6px; }
.flowlist .label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  font: 500 13px/1.2 var(--font-body);
  color: var(--ink);
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  text-align: left;
}
.chips button:hover { border-color: var(--ink); }
.chips .none { font-size: 13px; color: var(--muted); }
.chips .out { color: var(--product); font-weight: 600; font-size: 13px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 18px; height: 12px; border-radius: 2px; border: 1.5px solid; display: inline-block; }
.sw.input { background: var(--sunk); border-color: var(--ink); border-width: 2px; }
.sw.process { background: var(--surface); border-color: var(--ink); border-width: 2px; }
.sw.stream { background: var(--surface); border-color: var(--edge); border-style: dashed; }
.sw.product { background: var(--product-tint); border-color: var(--product); }
.sw.line { height: 0; border-width: 1.5px 0 0; width: 22px; border-radius: 0; }
.sw.hot { border-color: var(--hot); } .sw.warm { border-color: var(--warm); } .sw.cold { border-color: var(--cold); } .sw.power { border-color: var(--power); }

/* Network map */
.network { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .network { grid-template-columns: minmax(0, 1fr); } }
.map-wrap { background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 8px; }
#net-map { display: block; width: 100%; height: auto; }
#net-map .land { fill: var(--sunk); stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
#net-map .hub circle.core { stroke: var(--surface); stroke-width: 2; transition: fill 0.3s ease; }
#net-map .hub[data-state="normal"] circle.core { fill: var(--ink); }
#net-map .hub[data-state="back"] circle.core { fill: var(--hot); }
#net-map .hub[data-state="take"] circle.core { fill: var(--cold); }
#net-map .hub circle.halo { fill: none; stroke-width: 2; opacity: 0; }
#net-map .hub[data-state="back"] circle.halo { stroke: var(--hot); opacity: 0.6; animation: halo 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { from { transform: scale(1); opacity: 0.7; } to { transform: scale(2.1); opacity: 0; } }
#net-map .hub text { font: 600 15px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
#net-map .hub text.count { font: 600 12px var(--font-mono); fill: var(--muted); }
#net-map .flow { fill: none; stroke: var(--cold); stroke-width: 2.4; stroke-dasharray: 8 6; animation: flow 0.9s linear infinite; opacity: 0.6; }
#net-map .flow-tip { fill: var(--cold); }

.net-panel { display: grid; gap: 16px; min-width: 0; }
.clock { background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; }
.clock label { font-size: 13px; color: var(--muted); font-weight: 600; }
.clock output { font: 600 24px/1 var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.clock input { grid-column: 1 / -1; width: 100%; accent-color: var(--ink); }
.clock .btn { grid-column: 1 / -1; justify-self: start; }
.zones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; }
@media (max-width: 520px) { .zones { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.zones div { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; }
.zones dt { font-size: 11.5px; color: var(--muted); }
.zones dd { margin: 0; font: 600 14px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; }
.zones div.peak { border-color: var(--hot); }
.zones div.peak dd { color: var(--hot); }
.net-status { display: grid; gap: 10px; font-size: 15px; }
.net-status p { margin: 0; }
.net-status .tag { font: 600 11.5px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.net-status .back .tag { color: var(--hot); }
.net-status .take .tag { color: var(--cold); }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.normal { background: var(--ink); } .dot.back { background: var(--hot); } .dot.take { background: var(--cold); }

/* Status tiers */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .tiers { grid-template-columns: minmax(0, 1fr); } }
.tier { background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 20px; }
.tier h3 { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.pill { font: 600 11.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; border: 1.5px solid; }
.proven .pill { color: var(--proven); }
.pilot .pill { color: var(--pilot); }
.vision .pill { color: var(--vision); }
.tier ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 15px; }
.proven li::marker { color: var(--proven); }
.pilot li::marker { color: var(--pilot); }
.vision li::marker { color: var(--vision); }

/* Path */
.path { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .path { grid-template-columns: minmax(0, 1fr); } }
.path li { background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.path li.now { border-color: var(--ink); border-width: 2px; }
.step-n { font: 600 13px/1 var(--font-mono); width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-grid; place-items: center; }
.path li.now .step-n { background: var(--ink); color: var(--paper); }
.path p { margin: 0; color: var(--muted); font-size: 15px; }
.path .state { font: 600 12px/1.3 var(--font-mono); color: var(--product); letter-spacing: 0.04em; }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 22px; }
@media (max-width: 560px) { .contact { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field.wide, .form-foot.wide { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 400 15px/1.4 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; }
.field [aria-invalid="true"] { border-color: var(--hot); }
.hp { position: absolute; left: -9999px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-status { margin: 0; font-size: 14.5px; }
.form-status.ok { color: var(--proven); font-weight: 600; }
.form-status.err { color: var(--hot); font-weight: 600; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px; }
.foot-grid { display: grid; gap: 6px; }
.foot p { margin: 0; max-width: 72ch; }

@media (prefers-reduced-motion: reduce) {
  .edge[data-state="active"] path.line, #net-map .flow { animation: none; }
  #net-map .hub[data-state="back"] circle.halo { animation: none; opacity: 0.6; transform: scale(1.5); }
  .node, .edge { transition: none; }
}
