/* ============================================================================
   Hullira — Stylesheet · "Blueprint"
   The site is a drawing set. Navy sheet on grid paper, white/cyan line work,
   square corners, corner ticks instead of rounded cards, line weight instead
   of shadows, and the antifouling red used only as the redline.
   All values come from tokens.css.
   ========================================================================== */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg-base); }
[id] { scroll-margin-top: calc(var(--nav-h) + var(--space-6)); }
body {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-color: var(--bg-base);
  /* grid paper: a major line every five squares */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size:
    var(--grid-step-major) var(--grid-step-major),
    var(--grid-step-major) var(--grid-step-major),
    var(--grid-step) var(--grid-step),
    var(--grid-step) var(--grid-step);
  background-position: -1px -1px;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); line-height: 1; font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: 1.02; }
h3 { font-family: var(--font-sans); font-size: var(--fs-h3); line-height: 1.25; font-weight: 700; }
h4 { font-family: var(--font-sans); font-size: var(--fs-h4); line-height: 1.3; font-weight: 700; }
p  { margin: 0 0 var(--space-4); max-width: 68ch; }
ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
li { margin-bottom: var(--space-2); }
a { color: var(--line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text-primary); }
strong { color: var(--text-primary); font-weight: 700; }

code, pre, .mono { font-family: var(--font-mono); }
.metric, .ts, .num, td.num, .price__amount { font-variant-numeric: tabular-nums; }

/* Eyebrow: a drafting annotation, set small in the mono face with a leader tick */
.eyebrow {
  display: flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--line);
  margin-bottom: var(--space-3);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--line); flex: none; }
.section__head--center .eyebrow { justify-content: center; }
.lead { font-size: var(--fs-lead); color: var(--text-secondary); max-width: 62ch; line-height: 1.55; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-small); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -60px; z-index: 200;
  background: var(--accent); color: var(--text-on-accent);
  padding: var(--space-3) var(--space-5);
  font-weight: 700; text-decoration: none;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); color: var(--text-on-accent); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%; max-width: var(--container-xl);
  margin-inline: auto; padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-xl); }
.container--md { max-width: var(--container-md); }

/* Sections are zones on the sheet, divided by a drawing-border rule with
   tick marks every grid step. */
.section { padding-block: var(--section-y); position: relative; }
.section + .section::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px;
  border-top: 1px solid var(--border-default);
  background-image: linear-gradient(90deg, var(--border-default) 1px, transparent 1px);
  background-size: var(--grid-step) 7px;
  background-repeat: repeat-x;
  pointer-events: none;
}
.section--lg { padding-block: var(--section-y-lg); }
.section--alt { background-color: transparent; }
.section--deep, .section--canvas { background-color: var(--bg-900); background-image: none; }
.section--strip { padding-block: clamp(32px, 3.6vw, 56px); }

.section__head { max-width: 70ch; margin-bottom: var(--space-10); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .lead { margin-inline: auto; }

.grid { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(var(--grid-cols), 1fr); }
.cols-2 { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(2, 1fr); }
.cols-3 { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(3, 1fr); }
.cols-4 { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(4, 1fr); }
.cols--stretch { align-items: stretch; }
.cols--stretch > .stretch { display: flex; }
.cols--stretch > .stretch > .console { flex: 1; display: flex; flex-direction: column; }
.cols--stretch > .stretch .log { max-height: none; flex: 1; }
.split  { display: grid; gap: clamp(24px, 4vw, 64px); grid-template-columns: 1fr 1fr; align-items: center; }
.split--reverse > :first-child { order: 2; }
.split--top { align-items: start; }
.workspace { display: grid; gap: var(--panel-gap); grid-template-columns: 1fr 340px; align-items: start; }
.span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; } .span-12 { grid-column: span 12; }
.stack > * + * { margin-top: var(--stack); }
.flow > * + * { margin-top: var(--space-6); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---------- Panels: a framed detail on the sheet, with corner ticks ---------- */
.panel {
  position: relative;
  background-color: var(--surface-1);
  border: 1px solid var(--border-default);
  padding: var(--panel-pad);
  background-image:
    linear-gradient(var(--line), var(--line)), linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line)), linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line)), linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line)), linear-gradient(var(--line), var(--line));
  background-size:
    var(--tick) 1px, 1px var(--tick), var(--tick) 1px, 1px var(--tick),
    var(--tick) 1px, 1px var(--tick), var(--tick) 1px, 1px var(--tick);
  background-position:
    top left, top left, top right, top right,
    bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
}
.panel--raised { background-color: var(--surface-2); }
.panel--flush { padding: 0; overflow: hidden; }
.panel--hover { transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out); }
.panel--hover:hover { border-color: var(--line); background-color: var(--surface-2); }
.panel__title { margin: 0 0 var(--space-2); font-size: var(--fs-h4); }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-default);
}
.panel__head h3 { margin: 0; font-size: var(--fs-small); font-family: var(--font-mono); }
.panel__body { padding: var(--panel-pad); }

/* Console: a dark inset sheet with a title strip */
.console {
  background: var(--canvas);
  border: 1px solid var(--border-default);
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.console > * { position: relative; }

/* ---------- Buttons: square, condensed, with a drafted offset ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem;
  letter-spacing: 0.03em;
  line-height: 1; min-height: 46px;
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent; border-radius: 0;
  cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--offset-shadow); }
.btn-primary:hover { background: var(--accent-hover); color: var(--text-on-accent); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line-dim); }
.btn-primary:active { background: var(--accent-press); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line-faint); }
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text-primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--line); }
.btn-sm { min-height: 38px; padding: var(--space-2) var(--space-4); font-size: 1rem; }

/* ---------- Status chip (colour + glyph + label, never colour alone) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400;
  letter-spacing: 0.03em; line-height: 1;
  padding: 4px var(--space-2);
  border: 1px solid var(--border-default);
  color: var(--text-secondary); background: var(--surface-2);
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip .glyph { font-size: 0.75rem; line-height: 1; }
.chip--queued  { color: var(--st-queued);  background: var(--st-queued-soft);  border-color: var(--st-queued); }
.chip--running { color: var(--st-running); background: var(--st-running-soft); border-color: var(--st-running); }
.chip--waiting { color: var(--st-waiting); background: var(--st-waiting-soft); border-color: var(--st-waiting); }
.chip--approve { color: var(--st-approve); background: var(--st-approve-soft); border-color: var(--st-approve); }
.chip--success { color: var(--st-success); background: var(--st-success-soft); border-color: var(--st-success); }
.chip--failed  { color: var(--st-failed);  background: var(--st-failed-soft);  border-color: var(--st-failed); }
.chip--blocked { color: var(--st-blocked); background: var(--st-blocked-soft); border-color: var(--st-blocked); }
.chip--queued .dot { border-radius: 0; }
.chip--approve .dot { border-radius: 0; transform: rotate(45deg); }
.chip--failed .dot { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.chip--running .dot { animation: pulse var(--pulse) var(--ease-in-out) infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.55); } }

/* Tag: a boxed reference, like a part mark on a drawing */
.tag {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: transparent; border: 1px solid var(--border-strong);
  padding: 3px var(--space-2);
}

/* ---------- Header: the top band of the sheet ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-900);
  border-bottom: 1px solid var(--border-default);
}
.site-header.is-scrolled { border-bottom-color: var(--line-dim); }
.nav { display: flex; align-items: center; gap: var(--space-6); min-height: var(--nav-h); }
.brand {
  display: inline-flex; align-items: center; gap: var(--space-3);
  color: var(--text-primary); text-decoration: none; font-weight: 700; flex: none;
}
.brand__mark { width: 34px; height: 34px; flex: none; display: block; }
.brand__top { fill: var(--mark-top); }
.brand__anti { fill: var(--mark-anti); }
.brand__word { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1; }
.brand__logo { display: block; height: 30px; width: auto; max-width: none; }
.nav__list { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--text-secondary); text-decoration: none;
  font-family: var(--font-sans); font-size: var(--fs-small); font-weight: 600;
  padding: var(--space-2) var(--space-3);
  background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer;
}
.nav__link:hover { color: var(--text-primary); border-bottom-color: var(--line); }
.nav__link[aria-current="page"] { color: var(--text-primary); border-bottom-color: var(--accent); }
.nav__caret { width: 10px; height: 10px; transition: transform var(--dur-fast) var(--ease-out); }
.nav__link[aria-expanded="true"] { color: var(--text-primary); }
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }
.nav__spacer { flex: 1; }
.nav__actions { display: flex; align-items: center; gap: var(--space-3); }

.has-menu { position: relative; }
.megamenu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 110;
  min-width: 560px; padding: var(--space-5);
  background: var(--bg-900); border: 1px solid var(--line-dim);
  box-shadow: var(--offset-shadow);
  display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5);
}
.megamenu.is-open { display: grid; }
.megamenu h4 { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400;
  color: var(--line); margin-bottom: var(--space-3); padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-default); }
.megamenu ul { list-style: none; margin: 0; padding: 0; }
.megamenu li { margin: 0; }
.megamenu a {
  display: block; padding: var(--space-2) var(--space-3);
  color: var(--text-primary); text-decoration: none; font-size: var(--fs-small); font-weight: 600;
  border-left: 2px solid transparent;
}
.megamenu a:hover { background: var(--surface-1); border-left-color: var(--accent); color: var(--text-primary); }
.megamenu a span { display: block; color: var(--text-muted); font-size: var(--fs-micro); font-weight: 400; margin-top: 2px; }

.kbd {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  background: var(--surface-2); border: 1px solid var(--border-default);
  padding: 2px 6px; color: var(--text-secondary);
}
.nav__hamburger { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 120; background: var(--bg-900);
  padding: var(--space-5) 0 var(--space-16);
  overflow-y: auto; display: none;
}
.mobile-menu.is-open { display: block; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-8);
  padding-bottom: var(--space-4); border-bottom: 1px solid var(--border-default); }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-4); }
.mobile-menu li { margin: 0; }
.mobile-menu a {
  display: block; padding: var(--space-3) 0; color: var(--text-primary);
  text-decoration: none; font-family: var(--font-display); font-size: 1.35rem; font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-menu a:hover { color: var(--line); }
.mobile-menu a.btn { display: inline-flex; font-size: 1.125rem; border-bottom: 0; margin-top: var(--space-4); }
.mobile-menu a.btn-primary, .mobile-menu a.btn-primary:hover { color: var(--text-on-accent); }
.mobile-menu__group { margin-bottom: var(--space-8); }
.mobile-menu__group > h4 { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400;
  color: var(--line); margin-bottom: var(--space-1); }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { padding-top: var(--space-6); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0;
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.breadcrumb li { margin: 0; display: flex; gap: var(--space-2); align-items: center; }
.breadcrumb li + li::before { content: "/"; color: var(--text-faint); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-primary); }

/* ---------- Sub-page hero ---------- */
.hero { padding-block: clamp(48px, 6vw, 96px) clamp(48px, 6vw, 88px); position: relative; }
.hero__grid > * { min-width: 0; }
.hero__grid { display: grid; gap: clamp(32px, 4vw, 64px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
.hero h1 { font-size: var(--fs-h1); line-height: 0.98; }
.hero .lead { font-size: var(--fs-lead); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); margin-top: var(--space-8); align-items: center;
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.hero__meta span { display: inline-flex; align-items: center; gap: var(--space-2); }
@media (max-width: 1024px) { .hero__grid { grid-template-columns: 1fr; } }

/* ---------- Agent graph (inline SVG): drawn as a schematic ---------- */
.graph { width: 100%; height: auto; display: block; }
.graph__wrap { padding: var(--space-5) var(--space-5) var(--space-4); overflow-x: auto; min-width: 0; }
.graph .edge { stroke: var(--edge); stroke-width: 1.25; fill: none; }
.graph .edge--dashed { stroke-dasharray: 6 6; }
.graph .edge--active { stroke: var(--edge-active); stroke-width: 1.5; }
.graph .edge--wrap { stroke: var(--edge-wrap); stroke-width: 1.25; stroke-dasharray: 5 5; }
.graph .node-box { fill: var(--node-bg); stroke: var(--node-border); stroke-width: 1; rx: 0; }
.graph .node { cursor: pointer; }
.graph .node.is-active .node-box { stroke: var(--node-active); stroke-width: 2; }
.graph .node.is-done .node-box { fill: var(--surface-1); stroke: var(--line); }
.graph .node .node-box { transition: stroke var(--dur-base) var(--ease-out), fill var(--dur-base) var(--ease-out); }
.graph .node:hover .node-box { fill: var(--surface-2); }
.graph .node[aria-pressed="true"] .node-box { stroke: var(--accent); stroke-width: 2; }
.graph .node:focus { outline: none; }
.graph .node:focus-visible .node-box { stroke: var(--ring); stroke-width: 2.5; }
.graph .node-label { font-family: var(--font-mono); font-size: 12px; fill: var(--text-primary); }
.graph .node-sub { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); }
.graph .node-status { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; }
.graph .lane-label { font-family: var(--font-mono); font-size: 9px; fill: var(--text-faint); }
.graph .grid-line { stroke: var(--grid-line); stroke-width: 1; }
.st-queued  { fill: var(--st-queued); }
.st-running { fill: var(--st-running); }
.st-waiting { fill: var(--st-waiting); }
.st-approve { fill: var(--st-approve); }
.st-success { fill: var(--st-success); }
.st-failed  { fill: var(--st-failed); }

/* ---------- Run timeline (<ol>) ---------- */
.run { list-style: none; margin: 0; padding: 0; position: relative; }
.run > li { position: relative; margin: 0; padding: 0 0 var(--step-gap) var(--space-10); }
.run > li::before {
  content: ""; position: absolute; left: 15px; top: 22px; bottom: 0;
  width: 0; border-left: 1px dashed var(--border-strong);
}
.run > li:last-child::before { display: none; }
.run > li.is-done::before { border-left: 1px solid var(--run-done); }
.run__dot {
  position: absolute; left: 8px; top: 6px; width: 15px; height: 15px;
  border: 1px solid var(--border-strong); background: var(--bg-base); transform: rotate(45deg);
}
.run > li.is-done .run__dot { border-color: var(--st-success); background: var(--st-success); }
.run > li.is-active .run__dot { border-color: var(--st-running); background: var(--st-running); }
.run > li.is-approve .run__dot { border-color: var(--st-approve); background: var(--st-approve); }
.run__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.run__idx { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-faint); }
.run__name { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--text-primary); min-width: 0; overflow-wrap: anywhere; }
.run__dur { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
  font-variant-numeric: tabular-nums; margin-left: auto; }
.run__detail { margin: var(--space-2) 0 0; font-size: var(--fs-small); color: var(--text-muted); max-width: 62ch; }
.run__agent { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--redline); }

/* ---------- Tool-call stream / console log ---------- */
.log {
  font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.55;
  padding: var(--space-4); margin: 0; max-height: 340px; min-height: 340px; overflow-y: auto;
  scrollbar-width: thin;
  color: var(--text-secondary); list-style: none;
}
.log li { margin: 0; padding: var(--log-line-y) 0; display: flex; gap: var(--space-3); align-items: flex-start; }
.log .ts { color: var(--text-faint); font-size: var(--fs-micro); flex: none; padding-top: 2px; min-width: 68px; }
.log .arrow { color: var(--text-faint); flex: none; }
.log .call { color: var(--text-primary); }
.log .fn { color: var(--line); }
.log .ret { color: var(--text-muted); }
.log .ok { color: var(--st-success); }
.log .warnline { color: var(--st-approve); }
.log__body { min-width: 0; word-break: break-word; }
.console__bar {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); background: var(--bg-base);
  border-bottom: 1px solid var(--border-default);
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
}
.console__bar .dots { display: flex; gap: 6px; }
.console__bar .dots i { width: 9px; height: 9px; border: 1px solid var(--line-dim); display: block; }
.console__bar .spacer { flex: 1; }

/* ---------- Reasoning trace ---------- */
.trace { font-family: var(--font-mono); font-size: var(--fs-mono); }
.trace details { border-bottom: 1px dashed var(--border-default); }
.trace details:last-child { border-bottom: 0; }
.trace summary {
  cursor: pointer; padding: var(--space-3) var(--space-2); min-height: 44px;
  display: flex; align-items: center; gap: var(--space-3); color: var(--text-primary);
  list-style: none;
}
.trace summary::-webkit-details-marker { display: none; }
.trace summary::before { content: "▸"; color: var(--line); }
.trace details[open] summary::before { content: "▾"; }
.trace__kind { color: var(--text-muted); font-size: var(--fs-micro); min-width: 76px; }
.trace__body { padding: 0 var(--space-2) var(--space-4) var(--space-8); color: var(--text-muted);
  font-size: var(--fs-mono); line-height: 1.6; }

/* ---------- Inspector ---------- */
@media (min-width: 1025px) {
  .inspector { position: sticky; top: calc(var(--nav-h) + var(--space-6)); align-self: start; }
}
.inspector dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4);
  margin: 0; font-family: var(--font-mono); font-size: var(--fs-small); }
.inspector dt { color: var(--text-muted); font-size: var(--fs-micro); }
.inspector dd { margin: 0; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* Generic definition list inside panels */
.panel > dl { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: var(--space-3) var(--space-5); margin: var(--space-4) 0 0; align-items: baseline; }
.panel > dl > dt { color: var(--text-muted); font-size: var(--fs-small); }
.panel > dl > dd { margin: 0; color: var(--text-primary); font-size: var(--fs-small); overflow-wrap: anywhere; }
.panel > dl + p { margin-top: var(--space-5); }
@media (max-width: 480px) { .panel > dl { grid-template-columns: 1fr; gap: 2px var(--space-4); }
  .panel > dl > dd { margin-bottom: var(--space-3); } }

/* ---------- Command palette ---------- */
.cmdk-trigger {
  display: inline-flex; align-items: center; gap: var(--space-3);
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-muted); padding: var(--space-2) var(--space-3); min-height: 38px; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--fs-micro);
}
.cmdk-trigger:hover { color: var(--text-primary); border-color: var(--line); }
.cmdk {
  position: fixed; inset: 0; z-index: 150; display: none;
  align-items: flex-start; justify-content: center;
  padding: clamp(48px, 12vh, 140px) var(--space-4) var(--space-4);
  background: var(--scrim);
}
.cmdk.is-open { display: flex; }
.cmdk__panel {
  width: 100%; max-width: 620px; background: var(--bg-900);
  border: 1px solid var(--line); box-shadow: var(--offset-shadow); overflow: hidden;
}
.cmdk__input {
  width: 100%; border: 0; background: var(--bg-900); color: var(--text-primary);
  font-family: var(--font-mono); font-size: var(--fs-body); padding: var(--space-5);
  border-bottom: 1px solid var(--border-default); outline: none;
}
.cmdk__list { list-style: none; margin: 0; padding: var(--space-2); max-height: 44vh; overflow-y: auto; }
.cmdk__group { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--line); padding: var(--space-3) var(--space-3) var(--space-1); margin: 0; }
.cmdk__opt {
  display: flex; align-items: center; gap: var(--space-3); min-height: 44px;
  padding: var(--space-2) var(--space-3); border-left: 2px solid transparent;
  color: var(--text-secondary); cursor: pointer; font-size: var(--fs-small); margin: 0;
}
.cmdk__opt .mono { color: var(--text-faint); font-size: var(--fs-micro); margin-left: auto; }
.cmdk__opt.is-active, .cmdk__opt:hover { background: var(--surface-1); color: var(--text-primary); border-left-color: var(--accent); }
.cmdk__foot { display: flex; gap: var(--space-4); padding: var(--space-3) var(--space-5); margin: 0; max-width: none;
  border-top: 1px solid var(--border-default); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-faint); }

/* ---------- Metrics / stats ---------- */
.metric { display: block; font-family: var(--font-display); font-size: var(--fs-metric);
  font-weight: 700; color: var(--text-primary); line-height: 1; }
.metric__label { display: block; margin-top: var(--space-3); font-size: var(--fs-small); color: var(--text-muted); }
.stat { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4);
  min-height: 168px; padding: var(--space-6); }
.stat .metric__label { margin-top: 0; text-wrap: balance; }

/* ---------- Tables: ruled like a title block ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-strong); background: var(--surface-1); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
caption { text-align: left; padding: var(--space-4); color: var(--text-muted); font-size: var(--fs-small); }
th, td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-default); vertical-align: top; }
th + th, td + td { border-left: 1px solid var(--border-subtle); }
thead th { background: var(--bg-900); color: var(--line); font-family: var(--font-mono);
  font-size: var(--fs-micro); font-weight: 400; border-bottom: 1px solid var(--border-strong); }
tbody tr:last-child td { border-bottom: 0; }
tbody td { color: var(--text-secondary); }
tbody th { color: var(--text-primary); font-weight: 600; }
td .mono, th .mono { font-family: var(--font-mono); }

/* ---------- Cards ---------- */
.card { display: flex; flex-direction: column; }
.card__icon { width: 32px; height: 32px; margin-bottom: var(--space-4); color: var(--line); }
.card__meta { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--line); margin-bottom: var(--space-2); }
.card p:last-child { margin-bottom: 0; }
.card > .row { margin-top: auto; padding-top: var(--space-4); }
.card > .row + p { margin-top: var(--space-4) !important; }
.card--lead { grid-column: 1 / -1; background-color: var(--surface-2); }
@media (min-width: 861px) {
  .card--lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--space-10); align-items: start; }
  .card--lead > .card__meta, .card--lead > h3, .card--lead > .small.muted { grid-column: 1; }
  .card--lead > p:not(.card__meta):not(.small) { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .card--lead > .row { grid-column: 2; margin-top: var(--space-4); padding-top: 0; }
  .card--lead > .row + p { grid-column: 2; }
}
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: var(--space-6); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.6em; width: 9px; height: 5px;
  border-left: 1.5px solid var(--st-success); border-bottom: 1.5px solid var(--st-success);
  transform: rotate(-45deg);
}
.numlist { list-style: none; padding: 0; counter-reset: n; }
.numlist li { counter-increment: n; position: relative; padding-left: var(--space-12); margin-bottom: var(--space-5); }
.numlist li::before {
  content: counter(n); position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-primary);
  border: 1px solid var(--line); border-radius: 50%;
}

/* ---------- Bento ---------- */
.bento { display: grid; gap: var(--panel-gap); grid-template-columns: repeat(6, 1fr); }
.bento > * { grid-column: span 2; }
.bento .b-wide { grid-column: span 4; }
.bento .b-full { grid-column: span 6; }
.bento > .panel { display: flex; flex-direction: column; }
.bento .b-metric { justify-content: center; gap: var(--space-3); min-height: 156px; }
.bento .b-metric .metric__label { margin-top: 0; }
.bento .b-wide > .row, .bento .b-full > .row { margin-top: auto; padding-top: var(--space-5); }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > *, .bento .b-wide, .bento .b-full { grid-column: span 2; } }

/* ---------- Logos / lists of placeholders ---------- */
.logos { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: center; }
.logos span {
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
  border: 1px dashed var(--border-strong); padding: var(--space-2) var(--space-3);
}

/* ---------- Quotes ---------- */
blockquote { margin: 0; }
blockquote p { color: var(--text-primary); font-size: var(--fs-body-lg); line-height: 1.55; }
cite { display: block; font-style: normal; font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); margin-top: var(--space-4); }

/* ---------- Pricing (sub-pages) ---------- */
.price__amount { font-family: var(--font-display); font-size: var(--fs-price); font-weight: 700; color: var(--text-primary);
  line-height: 1; display: block; }
.price__unit { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
  display: block; margin-top: var(--space-2); }
.tier { position: relative; display: flex; flex-direction: column; }
.tier .btn { width: 100%; margin-top: auto; }
.tier .price__unit { min-height: 2.6em; }
.tier--featured { border-color: var(--accent); border-width: 2px; }
.tier__badge {
  position: absolute; top: -12px; left: var(--panel-pad);
  padding: 3px var(--space-3);
  background: var(--accent); color: var(--text-on-accent);
  font-family: var(--font-mono); font-size: var(--fs-micro);
  white-space: nowrap;
}
.toggle { display: inline-flex; background: var(--bg-900); border: 1px solid var(--border-strong);
  padding: 3px; gap: 3px; }
.toggle label { position: relative; }
.toggle input { position: absolute; inset: 0; margin: 0; appearance: none; -webkit-appearance: none;
  background: none; border: 0; cursor: pointer; }
.toggle span { display: block; padding: var(--space-2) var(--space-5);
  font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); cursor: pointer; min-height: 32px; line-height: 1.4; }
.toggle input:checked + span { background: var(--line); color: var(--text-on-accent); }
.toggle input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: var(--container-md); border-top: 1px solid var(--border-strong); }
.faq__item { border-bottom: 1px solid var(--border-default); }
.faq__q {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); min-height: 48px; cursor: pointer;
  background: transparent; border: 0; color: var(--text-primary);
  font-family: var(--font-sans); font-size: var(--fs-body-lg); font-weight: 700;
  padding: var(--space-5) var(--space-2);
}
.faq__q:hover { color: var(--line); }
.faq__q .sign { font-family: var(--font-mono); color: var(--line); flex: none;
  width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-dim); border-radius: 50%; }
.faq__a { padding: 0 var(--space-2) var(--space-4); }
.faq__a[hidden] { display: none; }

/* ---------- Code ---------- */
pre {
  margin: 0; padding: var(--space-5); overflow-x: auto;
  font-family: var(--font-mono); font-size: var(--fs-small); line-height: 1.6;
  color: var(--text-secondary); background: var(--canvas);
}
pre code { font-family: inherit; }
.tok-key { color: var(--redline); }
.tok-str { color: var(--st-success); }
.tok-com { color: var(--text-faint); }
.tok-fn  { color: var(--line); }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: var(--space-5); }
.field > span { display: block; font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--line); margin-bottom: var(--space-2); }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: var(--space-3) var(--space-4);
  background: var(--bg-900); color: var(--text-primary);
  border: 0; border-bottom: 1px solid var(--line-dim); border-radius: 0;
  font-family: var(--font-sans); font-size: var(--fs-body);
}
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus { border-bottom-color: var(--line); }
textarea { min-height: 132px; resize: vertical; }

/* ---------- Footer: the title block at the foot of the sheet ---------- */
.site-footer { background: var(--bg-900); padding-block: var(--section-y) var(--space-10);
  border-top: 2px solid var(--border-strong); position: relative; }
.footer__grid { display: grid; gap: 0; grid-template-columns: 1.4fr repeat(4, 1fr);
  border: 1px solid var(--border-strong); }
.footer__grid > * { padding: var(--space-6); }
.footer__grid > * + * { border-left: 1px solid var(--border-default); }
.footer__grid h4 { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400;
  color: var(--line); margin-bottom: var(--space-4); }
.footer__grid ul { list-style: none; margin: 0; padding: 0; }
.footer__grid li { margin-bottom: var(--space-2); }
.footer__grid a { color: var(--text-secondary); text-decoration: none; font-size: var(--fs-small); }
.footer__grid a:hover { color: var(--text-primary); text-decoration: underline; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center;
  justify-content: space-between; margin-top: 0;
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--border-strong); border-top: 0;
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-faint);
}
.footer__bottom a { color: var(--text-muted); }
.footer__status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid > * + * { border-left: 0; }
  .footer__grid > * { border-bottom: 1px solid var(--border-default); }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .footer__grid > :nth-child(odd):not(:first-child) { border-left: 1px solid var(--border-default); }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__grid > :nth-child(odd):not(:first-child) { border-left: 0; }
}

/* ---------- Motion helpers ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; }
@keyframes logIn { from { clip-path: inset(0 0 100% 0); transform: translateY(6px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.log.is-playing > li { animation: logIn 240ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 150ms); }
.log.is-paused > li { animation-play-state: paused; }
.offscreen-opt { content-visibility: auto; contain-intrinsic-size: 640px; }

/* ---------- Page-specific helpers ---------- */
.container--md.article, article .container--md { max-width: var(--container-md); }
article .container--md p { font-size: var(--fs-body-lg); line-height: 1.68; }
.hero .panel .numlist li { margin-bottom: var(--space-3); }
.cols-2 > *, .cols-3 > *, .cols-4 > *, .split > *, .bento > *, .workspace > * { min-width: 0; }
.panel table { display: block; overflow-x: auto; }

/* ==========================================================================
   HOMEPAGE — "Blueprint" components
   ========================================================================== */

/* Drawing caption: the title written under a figure on a real sheet */
.dwg-caption {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-5);
  margin-top: var(--space-3); padding-top: var(--space-2);
  border-top: 1px solid var(--line-dim);
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
  max-width: none;
}
.dwg-caption b { font-weight: 400; color: var(--text-primary); }

/* ---- Hero: the lines plan ---- */
.bp-hero { padding-block: clamp(40px, 5vw, 80px) clamp(56px, 6vw, 96px); }
.bp-hero__head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-6) clamp(32px, 5vw, 80px); align-items: end; }
.bp-hero h1 { font-size: var(--fs-display); line-height: 0.92; margin: 0; letter-spacing: -0.005em; }
.bp-hero__aside .lead { margin-bottom: var(--space-6); }
.bp-hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.bp-sheet {
  margin-top: clamp(32px, 4vw, 56px);
  border: 2px solid var(--line-dim);
  outline: 1px solid var(--border-default); outline-offset: 6px;
  background: var(--bg-base);
  position: relative;
}
.bp-sheet__drawing { display: block; width: 100%; height: auto; }
.bp-sheet__foot { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line-dim); }
.bp-sheet__note { margin: 0; padding: var(--space-3) var(--space-4); font-size: var(--fs-small); color: var(--text-muted); max-width: none; }
.title-block {
  display: grid; grid-template-columns: repeat(3, auto);
  border-left: 1px solid var(--line-dim);
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
  margin: 0;
}
.title-block > div { padding: var(--space-2) var(--space-4); border-left: 1px solid var(--border-default); }
.title-block > div:first-child { border-left: 0; }
.title-block dt { color: var(--text-faint); }
.title-block dd { margin: 0; color: var(--text-primary); white-space: nowrap; }

/* Line-work classes used inside the drawings */
.lw { fill: none; stroke: var(--line); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lw--heavy { stroke-width: 2.2; stroke: var(--text-primary); }
.lw--dim { stroke: var(--line-dim); stroke-width: 1; }
.lw--faint { stroke: var(--line-faint); stroke-width: 1; }
.lw--dash { stroke-dasharray: 6 5; }
.lw--chain { stroke-dasharray: 14 4 2 4; }
.lw--red { stroke: var(--accent); stroke-width: 1.6; }
.lw--fill { fill: var(--surface-1); }
.ann { font-family: var(--font-mono); font-size: 11px; fill: var(--text-muted); }
.ann--lg { font-size: 13px; fill: var(--text-primary); }
.ann--line { fill: var(--line); }
.ann--red { fill: var(--redline); }
.arrowhead { fill: var(--line-dim); }
.arrowhead--red { fill: var(--accent); }

/* One orchestrated moment: the lines plan draws itself once on load */
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes inkIn { from { opacity: 0; } to { opacity: 1; } }
.js .bp-sheet .draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw var(--dur-draw) var(--ease-in-out) both; }
.js .bp-sheet .draw--2 { animation-delay: 300ms; }
.js .bp-sheet .draw--3 { animation-delay: 700ms; }
.js .bp-sheet .ink { animation: inkIn 600ms ease-out 1900ms both; }

/* ---- Block-build Gantt ---- */
.gantt { border: 1px solid var(--border-strong); background: var(--surface-1); }
.gantt__scale, .gantt__row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); }
.gantt__scale { border-bottom: 1px solid var(--border-strong); background: var(--bg-900); }
.gantt__scale-label { padding: var(--space-3) var(--space-4); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--line); border-right: 1px solid var(--border-strong); }
.gantt__axis { position: relative; min-height: 40px; }
.gantt__ms {
  position: absolute; top: 0; bottom: 0; left: calc(var(--at) * 100%);
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-primary);
  padding: var(--space-3) 0 0 var(--space-2); border-left: 1px dashed var(--accent);
  white-space: nowrap;
}
.gantt__ms--end { padding-left: 0; padding-right: var(--space-2); transform: translateX(-100%); border-left: 0; border-right: 1px dashed var(--accent); }
.gantt__row { border-bottom: 1px solid var(--border-default); }
.gantt__row:last-child { border-bottom: 0; }
.gantt__label {
  display: flex; gap: var(--space-3); align-items: baseline;
  padding: var(--space-4); border-right: 1px solid var(--border-strong);
  color: var(--text-primary); text-decoration: none; font-weight: 700; line-height: 1.25;
}
.gantt__label:hover { background: var(--surface-2); color: var(--text-primary); }
.gantt__n { font-family: var(--font-mono); font-weight: 400; font-size: var(--fs-micro); color: var(--line);
  width: 22px; height: 22px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-dim); border-radius: 50%; }
.gantt__label small { display: block; font-weight: 400; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); margin-top: 2px; }
.gantt__track {
  position: relative; min-height: 64px;
  background-image: linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: calc(100% / 24) 100%;
}
.gantt__ms-line { position: absolute; top: 0; bottom: 0; left: calc(var(--at) * 100%); border-left: 1px dashed var(--accent); }
.gantt__bar {
  position: absolute; top: 50%; height: 22px; transform: translateY(-50%);
  left: calc(var(--s) / 24 * 100%); width: calc((var(--e) - var(--s)) / 24 * 100%);
  border: 1.5px solid var(--line);
  background-color: var(--bg-base);
  background-image: repeating-linear-gradient(135deg, var(--line-faint) 0 1px, transparent 1px 7px);
}
.gantt__bar--solid { background-image: none; background-color: var(--line-dim); }
.gantt__bar--alt { top: auto; bottom: 6px; transform: none; height: 12px; border-color: var(--st-approve);
  background-image: repeating-linear-gradient(45deg, var(--st-approve-soft) 0 2px, transparent 2px 6px); }
.gantt__leak {
  position: absolute; top: 6px; left: calc(var(--at) / 24 * 100%);
  width: 12px; height: 12px; margin-left: -6px;
  background: var(--accent); clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.gantt__key { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: var(--space-4) 0 0; padding: 0; list-style: none;
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.gantt__key li { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; }
.gantt__key i { display: inline-block; width: 22px; height: 10px; border: 1.5px solid var(--line);
  background-image: repeating-linear-gradient(135deg, var(--line-faint) 0 1px, transparent 1px 7px); }
.gantt__key i.k-leak { width: 12px; height: 12px; border: 0; background: var(--accent); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.gantt__key i.k-ms { width: 0; height: 14px; border: 0; border-left: 1px dashed var(--accent); background: none; }

.phase-notes { list-style: none; margin: var(--space-12) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--border-strong); }
.phase-notes > li { margin: 0; padding: var(--space-6) var(--space-6) var(--space-6) 0; border-bottom: 1px solid var(--border-default); display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-4); }
.phase-notes > li:nth-child(even) { padding-left: var(--space-6); border-left: 1px solid var(--border-default); }
.phase-notes > li:target { background: var(--surface-1); }
.phase-notes h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin-bottom: var(--space-2); }
.phase-notes .gantt__n { width: 32px; height: 32px; font-size: var(--fs-small); color: var(--text-primary); border-color: var(--line); }
.phase-notes dl { margin: 0; display: grid; gap: var(--space-2); }
.phase-notes dt { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--line); }
.phase-notes dt.dt-red { color: var(--redline); }
.phase-notes dd { margin: 0 0 var(--space-2); font-size: var(--fs-small); }
.phase-notes .tag { margin-top: var(--space-1); }

/* ---- B-214 redline story ---- */
.redline { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.redline__fig { border: 1px solid var(--line-dim); background: var(--bg-base); padding: var(--space-4); }
.redline__fig svg { display: block; width: 100%; height: auto; }
.rev-table th, .rev-table td { padding: var(--space-3); }
.rev-table td:first-child, .rev-table th:first-child { width: 3.2em; text-align: center; }
.rev-mark { display: inline-grid; place-items: center; width: 26px; height: 24px; font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-on-accent); background: var(--line); border: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 6px; }
.rev-table tr.is-red .rev-mark { border-color: var(--accent); background: var(--accent); color: var(--text-on-accent); }
.rev-table td.num { font-family: var(--font-mono); color: var(--text-primary); white-space: nowrap; }
.rev-table tr.is-red td.num { color: var(--redline); }
.deflect { margin: var(--space-8) 0 0; padding: 0; list-style: none; }
.deflect li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 5em; gap: var(--space-3); align-items: center; margin: 0 0 var(--space-3); font-size: var(--fs-small); }
.deflect__track { position: relative; height: 14px; border-left: 1px solid var(--line-dim);
  background-image: linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px); background-size: calc(100% / 5) 100%; }
.deflect__bar { position: absolute; left: 0; top: 2px; bottom: 2px; width: calc(var(--v) / 5 * 100%); background: var(--line); }
.deflect li.is-red .deflect__bar { background: var(--accent); }
.deflect__tol { position: absolute; top: -6px; bottom: -6px; left: 40%; border-left: 1.5px dashed var(--st-approve); }
.deflect__val { font-family: var(--font-mono); color: var(--text-primary); text-align: right; white-space: nowrap; }
.deflect__legend { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); margin-top: var(--space-2); }
.redline__trade { margin-top: var(--space-8); padding: var(--space-5) var(--space-6); border: 1.5px dashed var(--accent); background: var(--surface-1); }
.redline__trade p:last-child { margin-bottom: 0; }

/* ---- Dock scheduling ---- */
.dock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.dock__fig { border: 1px solid var(--line-dim); background: var(--bg-base); padding: var(--space-4); }
.dock__fig svg { display: block; width: 100%; height: auto; }
.replan { list-style: none; margin: var(--space-6) 0 0; padding: 0; border-left: 1px solid var(--line-dim); }
.replan li { position: relative; margin: 0; padding: 0 0 var(--space-6) var(--space-8); }
.replan li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; background: var(--bg-base); border: 1.5px solid var(--line); transform: rotate(45deg); }
.replan li.is-red::before { border-color: var(--accent); background: var(--accent); }
.replan li:last-child { padding-bottom: 0; }
.replan h3 { font-size: var(--fs-h4); margin-bottom: var(--space-1); }
.replan p { margin: 0; font-size: var(--fs-small); }
.dock__metric { margin-top: var(--space-8); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-5); align-items: center;
  padding: var(--space-5); border: 1px dashed var(--line-dim); }
.dock__metric .metric { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); color: var(--line); }
.dock__metric p { margin: 0; font-size: var(--fs-small); }

/* ---- Products: detail markers ---- */
.details { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--border-strong); }
.details > li { margin: 0; padding: var(--space-6) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.details > li + li { border-left: 1px solid var(--border-default); }
.detail-marker { width: 64px; height: 64px; flex: none; }
.detail-marker circle { fill: var(--bg-900); stroke: var(--line); stroke-width: 1.5; }
.detail-marker line { stroke: var(--line); stroke-width: 1; }
.detail-marker text { font-family: var(--font-mono); fill: var(--text-primary); text-anchor: middle; }
.details h3 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin: 0; }
.details p { font-size: var(--fs-small); margin: 0; }
.details .acts { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.details a.more { margin-top: auto; padding-top: var(--space-2); font-size: var(--fs-small); font-weight: 600; }
.details-foot { margin-top: var(--space-5); font-size: var(--fs-small); color: var(--text-muted); }

/* ---- Pricing title block ---- */
.price-block { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--line-dim); background: var(--bg-900); }
.price-block__col { position: relative; padding: var(--space-8) var(--space-6) var(--space-6); display: flex; flex-direction: column; }
.price-block__col + .price-block__col { border-left: 1px solid var(--border-strong); }
.price-block__col.is-rec { background: var(--surface-1); outline: 2px solid var(--accent); outline-offset: -2px; }
.price-block__rec { position: absolute; top: 0; right: 0; padding: 3px var(--space-3); background: var(--accent); color: var(--text-on-accent); font-family: var(--font-mono); font-size: var(--fs-micro); }
.price-block h3 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; margin-bottom: var(--space-1); }
.price-block__for { font-size: var(--fs-small); color: var(--text-muted); min-height: 3.2em; }
.price-block .price__amount { margin-top: var(--space-4); }
.price-block .price__unit { min-height: 2.6em; }
.price-block .checklist { margin: var(--space-5) 0 var(--space-6); font-size: var(--fs-small); }
.price-block .btn { margin-top: auto; align-self: flex-start; }
.price-block__terms { grid-column: 1 / -1; border-top: 1px solid var(--border-strong); padding: var(--space-4) var(--space-6); margin: 0; max-width: none;
  font-size: var(--fs-small); color: var(--text-muted); }
.price-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-6); margin-bottom: var(--space-8); }
.price-head .section__head { margin-bottom: 0; }

/* ---- General notes ---- */
.gen-notes { list-style: none; counter-reset: gn; margin: 0; padding: 0; columns: 2; column-gap: clamp(32px, 5vw, 72px); column-rule: 1px solid var(--border-default); }
.gen-notes li { counter-increment: gn; break-inside: avoid; position: relative; padding-left: var(--space-10); margin: 0 0 var(--space-8); font-size: var(--fs-small); }
.gen-notes li::before { content: counter(gn) "."; position: absolute; left: 0; top: 0; font-family: var(--font-mono); color: var(--line); font-size: var(--fs-body); }
.gen-notes h3 { font-size: var(--fs-body-lg); margin-bottom: var(--space-2); }
.gen-notes p { margin: 0; }

/* ---- CTA ---- */
.bp-cta { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.bp-cta h2 { font-size: clamp(2.6rem, 1.6rem + 4vw, 5rem); line-height: 1.02; margin-bottom: var(--space-6); }
.bp-cta__yards { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border-strong); }
.bp-cta__yards li { margin: 0; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-default); font-size: var(--fs-small); color: var(--text-primary);
  display: flex; gap: var(--space-3); }
.bp-cta__yards li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.45em; border: 1px solid var(--line); }
.bp-cta__yards li:last-child { border-bottom: 0; }
.bp-cta__yards-head { padding: var(--space-3) var(--space-4); background: var(--bg-base); border-bottom: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--line); margin: 0; max-width: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__list, .nav__actions .btn-primary, .cmdk-trigger { display: none; }
  .nav__hamburger { display: inline-flex; }
}
@media (max-width: 1024px) {
  .workspace { grid-template-columns: 1fr; }
  .span-8, .span-4, .span-5, .span-7, .span-6 { grid-column: span 12; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details > li + li { border-left: 0; }
  .details > li { border-bottom: 1px solid var(--border-default); }
  .details > li:nth-child(even) { border-left: 1px solid var(--border-default); }
}
@media (max-width: 960px) {
  .bp-hero__head, .redline, .dock, .bp-cta { grid-template-columns: 1fr; }
  .price-block { grid-template-columns: 1fr; }
  .price-block__col + .price-block__col { border-left: 0; border-top: 1px solid var(--border-strong); }
  .bp-sheet__foot { grid-template-columns: 1fr; }
  .title-block { border-left: 0; border-top: 1px solid var(--line-dim); }
}
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .split, .cols-2 { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .megamenu { min-width: 0; }
  .graph { width: 720px; max-width: none; }
  .graph__wrap { padding-inline: var(--space-4); }
  .log { font-size: var(--fs-micro); min-height: 280px; }
  .stat { min-height: 132px; }
  .hero__meta { gap: var(--space-2) var(--space-4); }
  .phase-notes { grid-template-columns: 1fr; }
  .phase-notes > li, .phase-notes > li:nth-child(even) { padding: var(--space-5) 0; border-left: 0; }
  .gen-notes { columns: 1; }
  .gantt__scale, .gantt__row { grid-template-columns: 1fr; }
  .gantt__label, .gantt__scale-label { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .gantt__label { padding: var(--space-3) var(--space-4); }
  .gantt__track { min-height: 44px; }
  .gantt__scale-label { display: none; }
  .gantt__ms { font-size: 0.6875rem; }
  .gantt__axis { min-height: 56px; }
  .gantt__ms--end { padding-top: 30px; }
  .bp-sheet { outline: 0; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border-default); }
  .bp-sheet__drawing--wide { display: none; }
  .deflect li { grid-template-columns: minmax(0, 1fr) 5em; }
  .deflect li > span:first-child { grid-column: 1 / -1; }
}
@media (min-width: 761px) { .bp-sheet__drawing--narrow { display: none; } }
@media (max-width: 560px) {
  .details { grid-template-columns: 1fr; }
  .details > li:nth-child(even) { border-left: 0; }
  .mobile-menu ul { grid-template-columns: 1fr; }
  .hero__cta .btn, .bp-hero__cta .btn { width: 100%; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .dock__metric { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .log.is-playing > li { animation: none; }
  .chip--running .dot { animation: none; }
  .js .bp-sheet .draw, .js .bp-sheet .ink { animation: none; stroke-dasharray: none; }
}

@media print {
  .site-header, .cmdk, .mobile-menu { display: none !important; }
  body { background: #fff; color: #000; }
}
