/* ============================================================================
   Nitreum — Stylesheet · "Annual Report"
   A printed sustainability/annual report translated to the screen:
   earth-beige stock, field-green ink, a serif that carries text and figures,
   ruled tables with tabular numerals, chapter numbers and footnotes.
   Values come from tokens.css. Shared by every page of the site.
   ========================================================================== */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--nav-h) + var(--space-6)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
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: 500;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); line-height: 1.08; font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.14; font-weight: 400; letter-spacing: -0.018em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; font-weight: 600; }
h4 { font-family: var(--font-sans); font-size: var(--fs-h4); line-height: 1.35; font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 var(--space-4); max-width: var(--measure); }
ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
li { margin-bottom: var(--space-2); }
strong { color: var(--text-primary); font-weight: 600; }
a { color: var(--field); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

code, pre { font-family: var(--font-mono); }
code { font-size: 0.88em; background: var(--surface-2); padding: 1px 5px; }
pre code { background: none; padding: 0; font-size: inherit; }
/* .mono is used across the site for values, tags and table cells. In the
   report it means "a figure": Archivo with tabular numerals, not a typewriter. */
.mono { font-family: var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.metric, .ts, .num, td.num, .price__amount { font-variant-numeric: tabular-nums lining-nums; }

/* The eyebrow becomes a report's running label: italic serif, green, sentence case. */
.eyebrow {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--field);
  margin-bottom: var(--space-3);
}
.lead { font-size: var(--fs-lead); color: var(--text-secondary); max-width: 60ch; line-height: 1.5; }
.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(--field-deep); color: var(--text-on-accent);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans); font-weight: 600; text-decoration: none;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus, .skip-link:hover { 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 separated the way a report separates articles: a full rule. */
.section { padding-block: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid var(--rule); }
.section--lg { padding-block: var(--section-y-lg); }
.section--alt { background: var(--paper-band); }
.section--alt + .section, .section + .section--alt { border-top-color: transparent; }
.section--deep { background: var(--field-deep); color: var(--text-on-deep); }
.section--canvas { background: var(--canvas); }

.section__head { max-width: 62ch; margin-bottom: var(--space-12); }
.section__head h2 { margin-bottom: var(--space-4); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .lead, .section__head--center p { 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--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; }
.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); }
.split  { display: grid; gap: clamp(28px, 5vw, 72px); 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: minmax(0, 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-2) var(--space-3); align-items: center; }

/* ---------- Panels: bound-in sheets, not floating cards ---------- */
.panel {
  background: var(--paper-sheet);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  padding: var(--panel-pad);
  position: relative;
}
.panel--raised { background: var(--surface-2); }
.panel--flush { padding: 0; overflow: hidden; }
.panel--hover { transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
.panel--hover:hover { border-color: var(--border-strong); border-top-color: var(--ink); background: var(--canvas); }
.panel__title { margin: 0 0 var(--space-2); font-size: var(--fs-h3); }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule);
}
.panel__head h3 { margin: 0; font-size: var(--fs-small); font-family: var(--font-sans); }
.panel__body { padding: var(--panel-pad); }

/* Consoles render as printed exhibits: a framed sheet with a caption bar. */
.console {
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.console > * { position: relative; }

/* ---------- Buttons: square, typeset, decisive ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.005em;
  line-height: 1.1; min-height: 46px;
  padding: var(--space-3) var(--space-6);
  border-radius: 0; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--field); color: var(--text-on-accent); border-color: var(--field); }
.btn-primary:hover { background: var(--field-deep); border-color: var(--field-deep); color: var(--text-on-accent); text-decoration: none; }
.btn-primary:active { background: var(--ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-sm { min-height: 38px; padding: var(--space-2) var(--space-4); font-size: 0.875rem; }

/* ---------- Status chip: an outlined stamp (glyph + label, never colour alone) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.04em; line-height: 1;
  padding: 4px 8px 4px 7px;
  border: 1px solid currentColor; border-radius: var(--radius-pill);
  color: var(--text-secondary); background: transparent;
  white-space: nowrap; vertical-align: middle;
}
.chip .dot { display: none; }
.chip .glyph { font-size: 0.75rem; line-height: 1; }
.chip--queued  { color: var(--st-queued);  background: var(--st-queued-soft); }
.chip--running { color: var(--st-running); background: var(--st-running-soft); }
.chip--waiting { color: var(--st-waiting); background: var(--st-waiting-soft); }
.chip--approve { color: var(--st-approve); background: var(--st-approve-soft); }
.chip--success { color: var(--st-success); background: var(--st-success-soft); }
.chip--failed  { color: var(--st-failed);  background: var(--st-failed-soft); }
.chip--blocked { color: var(--st-blocked); background: var(--st-blocked-soft); }

.tag {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-sans); font-size: 0.8125rem; font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  background: transparent; border-bottom: 1px solid var(--rule);
  padding: 2px 0;
}
.row .tag + .tag::before { content: ""; width: 1px; height: 12px; background: var(--rule); margin-right: var(--space-2); margin-left: -6px; }

/* ---------- Header: the report's running head ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--ink); }
.nav { display: flex; align-items: center; gap: var(--space-5); 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: 26px; height: 26px; flex: none; display: block; }
.brand > span { line-height: 1; }
.brand__logo { display: block; height: 30px; width: auto; max-width: none; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary); text-decoration: none;
  font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500;
  padding: var(--space-2) var(--space-3);
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
}
.nav__link:hover { color: var(--ink); border-bottom-color: var(--rule); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--field); }
.nav__caret { width: 10px; height: 10px; transition: transform var(--dur-fast) var(--ease-out); }
.nav__link[aria-expanded="true"] { color: var(--ink); border-bottom-color: var(--field); }
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }
.nav__spacer { flex: 1; }
.nav__actions { display: flex; align-items: center; gap: var(--space-2); }

.has-menu { position: relative; }
.megamenu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 110;
  min-width: 560px; padding: var(--space-6);
  background: var(--paper-sheet); border: 1px solid var(--rule); border-top: 2px solid var(--ink);
  box-shadow: var(--shadow-3);
  display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6);
}
.megamenu.is-open { display: grid; }
.megamenu h4 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: var(--fs-small);
  color: var(--field); margin-bottom: var(--space-2); padding-bottom: var(--space-2); border-bottom: 1px solid var(--rule); }
.megamenu ul { list-style: none; margin: 0; padding: 0; }
.megamenu li { margin: 0; }
.megamenu a {
  display: block; padding: var(--space-2) 0;
  color: var(--ink); text-decoration: none; font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600;
}
.megamenu a:hover { color: var(--field); }
.megamenu a span { display: block; color: var(--text-muted); font-size: 0.8125rem; font-weight: 400; margin-top: 1px; }

.kbd {
  font-family: var(--font-sans); font-size: 0.75rem;
  border: 1px solid var(--rule); padding: 1px 6px; color: var(--text-secondary);
}
.nav__hamburger { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 120; background: var(--paper);
  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: 2px solid var(--ink); }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { margin: 0; border-bottom: 1px solid var(--rule); }
.mobile-menu a {
  display: block; padding: var(--space-3) 0; color: var(--ink);
  text-decoration: none; font-family: var(--font-serif); font-size: 1.25rem;
}
.mobile-menu a:hover { color: var(--field); }
.mobile-menu a.btn { display: inline-flex; font-family: var(--font-sans); font-size: 0.9375rem; }
.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-serif); font-style: italic; font-weight: 400; font-size: var(--fs-small);
  color: var(--field); 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-sans); font-size: 0.8125rem; color: var(--text-muted); }
.breadcrumb li { margin: 0; display: flex; gap: var(--space-2); align-items: center; }
.breadcrumb li + li::before { content: "/"; color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Hero (sub-pages) ---------- */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(48px, 6vw, 88px); position: relative; }
.hero__grid > * { min-width: 0; }
.hero__grid { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
.hero h1 { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.025em; font-weight: 400; }
.hero .lead { font-size: var(--fs-lead); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-8); align-items: center;
  font-family: var(--font-sans); font-size: 0.8125rem; color: var(--text-muted);
  padding-top: var(--space-4); border-top: 1px solid var(--rule); max-width: none; }
.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, sub-pages) ---------- */
.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: 5 4; }
.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 4; }
.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(--paper-sheet); }
.graph .node .node-box { transition: stroke var(--dur-base) var(--ease-out), fill var(--dur-base) var(--ease-out); }
.graph .node:hover .node-box { stroke: var(--ink); fill: var(--field-tint); }
.graph .node[aria-pressed="true"] .node-box { stroke: var(--field); stroke-width: 2; fill: var(--field-tint); }
.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-sans); font-size: 13px; fill: var(--ink); font-weight: 600; }
.graph .node-sub { font-family: var(--font-sans); font-size: 10.5px; fill: var(--text-muted); }
.graph .node-status { font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: 0.03em; }
.graph .lane-label { font-family: var(--font-serif); font-style: italic; font-size: 11px; fill: var(--text-muted); }
.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: 11px; top: 22px; bottom: 2px;
  width: 1px; background: var(--rule);
}
.run > li:last-child::before { display: none; }
.run > li.is-done::before { background: var(--run-done); }
.run__dot {
  position: absolute; left: 5px; top: 7px; width: 13px; height: 13px;
  border: 1.5px solid var(--border-strong); background: var(--paper-sheet); 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(--paper-sheet); box-shadow: inset 0 0 0 2px var(--st-running); }
.run > li.is-approve .run__dot { border-color: var(--st-approve); background: var(--granule); }
.run__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.run__idx { font-family: var(--font-serif); font-size: var(--fs-small); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.run__name { font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink); font-weight: 500; word-break: break-word; }
.run__dur { font-family: var(--font-sans); font-size: 0.8125rem; 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-secondary); max-width: 62ch; }
.run__agent { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--field); font-weight: 600; }

/* ---------- Tool-call stream / log: a printed exhibit ---------- */
.log {
  font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.55;
  padding: var(--space-4) var(--space-5); margin: 0; max-height: 360px; 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); flex: none; padding-top: 1px; min-width: 68px; }
.log .arrow { color: var(--border-strong); flex: none; }
.log .call { color: var(--ink); }
.log .fn { color: var(--field); font-weight: 500; }
.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-5);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-serif); font-style: italic; font-size: var(--fs-small); color: var(--text-muted);
}
.console__bar .dots { display: none; }
.console__bar .spacer { flex: 1; }

/* ---------- Reasoning trace ---------- */
.trace { font-family: var(--font-sans); font-size: var(--fs-small); }
.trace details { border-bottom: 1px solid var(--rule); }
.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(--ink);
  list-style: none;
}
.trace summary::-webkit-details-marker { display: none; }
.trace summary::before { content: "+"; color: var(--field); font-weight: 600; width: 10px; }
.trace details[open] summary::before { content: "−"; }
.trace__kind { color: var(--field); font-family: var(--font-serif); font-style: italic; min-width: 84px; }
.trace__body { padding: 0 var(--space-2) var(--space-4) var(--space-8); color: var(--text-secondary);
  font-family: var(--font-serif); font-size: var(--fs-small); 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: var(--space-4) 0 0; font-family: var(--font-sans); font-size: var(--fs-small); }
.inspector dt { color: var(--text-muted); }
.inspector dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.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-family: var(--font-sans); font-size: var(--fs-small); }
.panel > dl > dd { margin: 0; color: var(--ink); 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(--rule);
  color: var(--text-muted); padding: var(--space-2) var(--space-3); min-height: 38px; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.8125rem;
}
.cmdk-trigger:hover { color: var(--ink); border-color: var(--ink); }
.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(--paper-sheet);
  border-top: 2px solid var(--ink); overflow: hidden; box-shadow: var(--shadow-3);
}
.cmdk__input {
  width: 100%; border: 0; background: var(--paper-sheet); color: var(--ink);
  font-family: var(--font-serif); font-size: 1.25rem; padding: var(--space-5);
  border-bottom: 1px solid var(--ink); outline: none; min-height: 0;
}
.cmdk__list { list-style: none; margin: 0; padding: var(--space-2) var(--space-3); max-height: 44vh; overflow-y: auto; }
.cmdk__group { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-small);
  color: var(--field); padding: var(--space-3) var(--space-2) var(--space-1); margin: 0; }
.cmdk__opt {
  display: flex; align-items: center; gap: var(--space-3); min-height: 44px;
  padding: var(--space-2); border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary); cursor: pointer; font-family: var(--font-sans); font-size: 0.9375rem; margin: 0;
}
.cmdk__opt .mono { color: var(--text-faint); font-size: 0.8125rem; margin-left: auto; }
.cmdk__opt.is-active, .cmdk__opt:hover { background: var(--field-tint); color: var(--ink); }
.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(--rule); font-family: var(--font-sans); font-size: 0.8125rem; color: var(--text-muted); }

/* ---------- Metrics: report figures in the serif ---------- */
.metric { display: block; font-family: var(--font-serif); font-size: var(--fs-metric);
  font-weight: 300; color: var(--field); line-height: 1; letter-spacing: -0.03em; }
.metric__label { display: block; margin-top: var(--space-3); font-size: var(--fs-small); color: var(--text-secondary); }
.stat { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-5);
  min-height: 176px; padding: var(--space-6); }
.stat .metric__label { margin-top: 0; text-wrap: balance; }

/* ---------- Tables: the report's backbone ---------- */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper-sheet); }
table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: var(--space-3) var(--space-4); color: var(--text-muted);
  font-family: var(--font-serif); font-style: italic; font-size: var(--fs-small); caption-side: top; }
th, td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
thead th { color: var(--ink); font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 600;
  border-bottom: 1px solid var(--ink); vertical-align: bottom; }
tbody th { color: var(--ink); font-weight: 600; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody td { color: var(--text-secondary); }
td .mono, th .mono { font-family: var(--font-sans); }
.panel table { background: transparent; }
.panel > table { border-top: 1px solid var(--ink); }

/* ---------- Cards (sub-pages) ---------- */
.card__icon { width: 32px; height: 32px; margin-bottom: var(--space-4); color: var(--field); }
.card__meta { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-small); color: var(--field); margin-bottom: var(--space-2); }
.card h3 { font-size: 1.3125rem; }
.card p:last-child { margin-bottom: 0; }
.card { display: flex; flex-direction: column; }
.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: var(--field-tint); }
@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.62em; width: 9px; height: 9px;
  background: var(--field); transform: rotate(45deg) scale(0.8);
}
.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: -0.1em;
  font-family: var(--font-serif); font-size: 1.75rem; font-weight: 300; color: var(--field); line-height: 1;
  font-variant-numeric: lining-nums;
}

/* ---------- Bento (sub-pages) ---------- */
.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 strip ---------- */
.logos { display: flex; flex-wrap: wrap; gap: var(--space-3) clamp(20px, 3vw, 44px); align-items: baseline; justify-content: center; }
.section--strip { padding-block: clamp(28px, 3.4vw, 52px); }
.logos span { font-family: var(--font-serif); font-size: 1.25rem; color: var(--text-secondary); }

/* ---------- Testimonials / quotes ---------- */
blockquote { margin: 0; }
blockquote p { color: var(--ink); font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.5; font-style: italic; }
cite { display: block; font-style: normal; font-family: var(--font-sans); font-size: 0.8125rem;
  color: var(--text-muted); margin-top: var(--space-4); }

/* ---------- Pricing tiers (pricing page) ---------- */
.price__amount { font-family: var(--font-serif); font-size: var(--fs-price); font-weight: 300; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1; display: block; margin-top: var(--space-2); }
.price__unit { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--text-muted);
  display: block; margin-top: var(--space-2); }
.tier { position: relative; display: flex; flex-direction: column; }
.tier--featured { background: var(--field-tint); border-color: var(--field); border-top: 2px solid var(--ink); }
.tier__badge {
  position: absolute; top: -14px; right: var(--panel-pad);
  padding: 3px var(--space-3);
  background: var(--field); color: var(--text-on-accent);
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.tier .btn { width: 100%; margin-top: auto; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: var(--container-md); border-top: 2px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__item + .faq__item { margin-top: 0; }
.faq__q {
  width: 100%; text-align: left; display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4); min-height: 52px; cursor: pointer;
  background: transparent; border: 0; color: var(--ink);
  font-family: var(--font-serif); font-size: 1.1875rem; font-weight: 500;
  padding: var(--space-4) 0;
}
.faq__q:hover { color: var(--field); }
.faq__q .sign { font-family: var(--font-sans); color: var(--field); flex: none; font-size: 1.25rem; line-height: 1; }
.faq__a { padding: 0 0 var(--space-5); }
.faq__a[hidden] { display: none; }

/* ---------- Code ---------- */
pre {
  margin: 0; padding: var(--space-5); overflow-x: auto;
  font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.65;
  color: var(--ink); background: var(--canvas);
}
.tok-key { color: var(--field); font-weight: 500; }
.tok-str { color: var(--soil); }
.tok-com { color: var(--text-faint); font-style: italic; }
.tok-fn  { color: var(--st-waiting); }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: var(--space-5); }
.field > span { display: block; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600;
  color: var(--ink); 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(--paper-sheet); color: var(--ink);
  border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
  font-family: var(--font-sans); font-size: 1rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 0; }
textarea { min-height: 132px; resize: vertical; border: 1px solid var(--rule); border-bottom: 1.5px solid var(--ink); }

/* ---------- Footer: the colophon ---------- */
.site-footer { background: var(--paper-band); border-top: 2px solid var(--ink); padding-block: var(--space-16) var(--space-10); }
.footer__grid { display: grid; gap: var(--space-8); grid-template-columns: 1.5fr repeat(4, 1fr); }
.footer__grid h4 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: var(--fs-small);
  color: var(--field); margin-bottom: var(--space-3); }
.footer__grid ul { list-style: none; margin: 0; padding: 0; }
.footer__grid li { margin-bottom: var(--space-2); }
.footer__grid a { color: var(--ink); text-decoration: none; font-family: var(--font-sans); font-size: 0.9375rem; }
.footer__grid a:hover { color: var(--field); text-decoration: underline; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: center;
  justify-content: space-between; margin-top: var(--space-12); padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans); font-size: 0.8125rem; color: var(--text-muted);
}
.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); } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Motion helpers ---------- */
/* Reveals never hide content: a short settle only. */
.js [data-reveal] { transform: translateY(8px); transition: transform var(--dur-slow) var(--ease-out); }
.js [data-reveal].in { transform: none; }

@keyframes logIn { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.log.is-playing > li { animation: logIn 220ms 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; }

/* ---------- Product marks ---------- */
.product__logo { width: 56px; height: 56px; margin-bottom: var(--space-4);
  background: var(--paper-sheet); border: 1px solid var(--rule); }
.product__logo--inline { width: 40px; height: 40px; margin: 0; }
form.panel .btn { margin-top: var(--space-2); }

/* ==========================================================================
   HOMEPAGE — "Annual Report" components
   ========================================================================== */

/* Report cover */
.cover { padding-block: clamp(32px, 5vw, 72px) clamp(56px, 7vw, 104px); }
.cover__masthead {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6);
  padding-bottom: var(--space-3); border-bottom: 2px solid var(--ink);
  font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-secondary);
}
.cover__masthead b { color: var(--ink); font-weight: 600; }
.cover__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px);
  padding-top: clamp(32px, 4vw, 56px); align-items: start; }
.cover__grid > * { min-width: 0; }
.cover h1 { font-size: clamp(2.4rem, 1.5rem + 3vw, 4rem); line-height: 1.04; letter-spacing: -0.035em;
  font-weight: 300; margin-bottom: var(--space-6); font-variation-settings: "opsz" 60; }
.cover .lead { margin-bottom: var(--space-8); }
.cover__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cover__byline { margin-top: var(--space-10); font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-muted); max-width: 52ch; }

/* Key figures page */
.keyfig { background: var(--paper-sheet); border-top: 2px solid var(--ink); padding: var(--space-6) var(--space-6) var(--space-5); }
.keyfig__title { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 500; margin: 0 0 var(--space-1); }
.keyfig__sub { font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-muted); margin-bottom: var(--space-5); }
.keyfig__pair { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.keyfig__unit { padding: var(--space-4) var(--space-4) var(--space-5) 0; }
.keyfig__unit + .keyfig__unit { border-left: 1px solid var(--rule); padding-left: var(--space-5); }
.keyfig__big { display: block; font-family: var(--font-serif); font-weight: 300; font-size: clamp(3rem, 2rem + 3.6vw, 5rem);
  line-height: 0.95; letter-spacing: -0.04em; color: var(--field); font-variation-settings: "opsz" 60; }
.keyfig__big sub { font-size: 0.4em; letter-spacing: 0; vertical-align: baseline; margin-left: 2px; }
.keyfig__what { display: block; margin-top: var(--space-3); font-family: var(--font-sans); font-size: 0.875rem; color: var(--ink); font-weight: 600; }
.keyfig__how { display: block; margin-top: 2px; font-family: var(--font-sans); font-size: 0.8125rem; color: var(--text-muted); }
.keyfig__blank {
  display: block; margin-top: var(--space-3); height: 10px; max-width: 160px;
  background: repeating-linear-gradient(135deg, var(--rule) 0 2px, transparent 2px 6px);
}
.keyfig table { font-size: 0.875rem; margin-top: var(--space-2); }
.keyfig table th, .keyfig table td { padding: 9px 0; }
.keyfig table td:last-child { text-align: right; font-family: var(--font-serif); font-size: 1.0625rem; color: var(--ink); white-space: nowrap; padding-left: var(--space-4); }
.keyfig table th { font-weight: 400; color: var(--text-secondary); }

/* Footnote references and notes */
.fn { font-family: var(--font-sans); font-size: 0.7em; font-weight: 600; vertical-align: super; line-height: 0; margin-left: 1px; }
.fn a { text-decoration: none; color: var(--field); padding: 0 1px; }
.fn a:hover { text-decoration: underline; }
.notes { list-style: none; margin: var(--space-6) 0 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--rule);
  font-family: var(--font-sans); font-size: 0.8125rem; color: var(--text-muted); max-width: 90ch; }
.notes li { display: grid; grid-template-columns: 1.5em 1fr; margin-bottom: var(--space-1); }
.notes li > b { color: var(--field); font-weight: 600; }
.notes li:target { background: var(--field-tint); }

/* Chapters */
.chapter { padding-block: clamp(64px, 7vw, 112px); }
.chapter + .chapter { border-top: 0; }
.chapter__head {
  display: grid; grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr); gap: var(--space-4) clamp(24px, 4vw, 64px);
  border-top: 2px solid var(--ink); padding-top: var(--space-5); margin-bottom: clamp(36px, 5vw, 64px);
}
.chapter__no { font-family: var(--font-serif); font-weight: 300; font-size: clamp(4rem, 2.6rem + 5vw, 8rem); line-height: 0.82;
  color: var(--field); letter-spacing: -0.05em; font-variant-numeric: lining-nums; font-variation-settings: "opsz" 60; }
.chapter__no small { display: block; font-size: 0.875rem; font-family: var(--font-sans); letter-spacing: 0; color: var(--text-muted); margin-bottom: var(--space-3); font-weight: 400; }
.chapter__head h2 { font-size: var(--fs-h2); margin-bottom: var(--space-4); max-width: 22ch; }
.chapter__head .lead { margin-bottom: 0; }
.chapter--band { background: var(--paper-band); }
.chapter--band .table-wrap, .chapter--band .keyfig { background: var(--paper-sheet); }

/* Ch.1 synthesis-loop diagram */
.loopfig { margin: 0; }
.loopfig__frame { background: var(--paper-sheet); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding: clamp(12px, 2vw, 28px); overflow-x: auto; }
.loopfig svg { display: block; width: 100%; min-width: 760px; height: auto; }
.loopfig figcaption { margin-top: var(--space-3); font-family: var(--font-serif); font-style: italic; font-size: var(--fs-small); color: var(--text-muted); max-width: 90ch; }
.loopfig .u-box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.25; }
.loopfig .u-box--hot { fill: var(--field-tint); stroke: var(--field); stroke-width: 1.5; }
.loopfig .u-name { font-family: var(--font-serif); font-size: 17px; fill: var(--ink); font-weight: 600; }
.loopfig .u-sub { font-family: var(--font-sans); font-size: 12.5px; fill: var(--text-muted); }
.loopfig .u-own { font-family: var(--font-serif); font-style: italic; font-size: 13px; fill: var(--field); }
.loopfig .stream { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.loopfig .stream--main { stroke: var(--field); stroke-width: 2.5; }
.loopfig .stream--recycle { stroke: var(--soil); stroke-dasharray: 6 4; }
.loopfig .s-label { font-family: var(--font-sans); font-size: 12.5px; fill: var(--text-secondary); }
.loopfig .sense { fill: var(--granule); stroke: var(--ink); stroke-width: 1; }
.loopfig .twin { fill: none; stroke: var(--field); stroke-width: 1; stroke-dasharray: 2 4; }
.loopfig .twin-label { font-family: var(--font-serif); font-style: italic; font-size: 13px; fill: var(--field); }
.loopfig .flow { stroke-dasharray: 1.5 10.5; stroke-linecap: round; stroke: var(--paper-sheet); stroke-width: 1.5; fill: none; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }

.stages { list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: st; }
.stages li { counter-increment: st; margin: 0; padding: var(--space-4) var(--space-5) 0 0; border-top: 1px solid var(--ink); }
.stages li + li { padding-left: var(--space-5); border-left: 1px solid var(--rule); }
.stages li::before { content: counter(st, upper-roman) "."; display: block; font-family: var(--font-serif); font-size: 1.25rem; color: var(--field); margin-bottom: var(--space-2); }
.stages h3 { font-size: 1.1875rem; margin-bottom: var(--space-2); }
.stages p { font-size: var(--fs-small); margin-bottom: var(--space-2); }
.stages .by { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--field); font-weight: 600; }

/* Ch.2 safety envelope */
.envelope { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.envelope > * { min-width: 0; }
.envfig { margin: 0; background: var(--paper-sheet); border-top: 2px solid var(--ink); padding: var(--space-5); }
.envfig svg { display: block; width: 100%; height: auto; }
.envfig figcaption { margin-top: var(--space-3); font-family: var(--font-serif); font-style: italic; font-size: var(--fs-small); color: var(--text-muted); }
.envfig .z-trip { fill: var(--st-failed-soft); stroke: var(--st-failed); stroke-width: 1.25; }
.envfig .z-env { fill: var(--paper); stroke: var(--ink); stroke-width: 1.25; stroke-dasharray: 6 4; }
.envfig .z-opt { fill: var(--field-tint); stroke: var(--field); stroke-width: 1.5; }
.envfig .z-label { font-family: var(--font-sans); font-size: 12.5px; fill: var(--ink); font-weight: 600; }
.envfig .z-note { font-family: var(--font-sans); font-size: 12px; fill: var(--text-muted); }
.envfig .axis { stroke: var(--ink); stroke-width: 1; }
.envfig .ax-label { font-family: var(--font-serif); font-style: italic; font-size: 13px; fill: var(--text-secondary); }
.envfig .path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.envfig .pt { fill: var(--ink); }
.envfig .pt--ask { fill: var(--paper-sheet); stroke: var(--st-approve); stroke-width: 2; }
.envfig .pt--ok { fill: var(--field); }
.envfig .pt-label { font-family: var(--font-sans); font-size: 12.5px; fill: var(--ink); }

.minutes { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.minutes li { display: grid; grid-template-columns: 3.25rem 1fr; gap: var(--space-4); margin: 0; padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); }
.minutes .t { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--text-muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.minutes h4 { font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600; margin: 0 0 var(--space-1); }
.minutes p { font-size: var(--fs-small); margin: 0; }
.minutes li.is-held h4 { color: var(--st-approve); }

.signoff { margin-top: clamp(40px, 5vw, 64px); }
.signoff td:first-child, .signoff th[scope="row"] { white-space: nowrap; }

/* Ch.3 emissions report table */
.report td.num, .report th.num { text-align: right; }
.report .unit { font-family: var(--font-serif); font-style: italic; color: var(--ink); white-space: nowrap; }
.report .grp th { background: var(--surface-2); font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--field); font-size: var(--fs-small); padding-block: var(--space-2); }
.report .pending { display: inline-block; min-width: 88px; height: 10px; vertical-align: middle;
  background: repeating-linear-gradient(135deg, var(--rule) 0 2px, transparent 2px 6px); }
.report tbody th { font-weight: 600; }
.report-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); }
.report-wrap > * { min-width: 0; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2) clamp(20px, 3vw, 44px); border-top: 1px solid var(--ink); padding-top: var(--space-4); }
.principles h3 { grid-column: 1 / -1; }
.principles > p:last-child { grid-column: 1 / -1; margin: 0; }
.report td.num { white-space: nowrap; }
.report td.unit sub { font-size: 0.72em; }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr; } }
.principles h3 { font-size: 1.1875rem; }
.principles p { font-size: var(--fs-small); }

/* Ch.4 seasonal planning */
.seasonfig { margin: 0; background: var(--paper-sheet); border-top: 2px solid var(--ink); padding: clamp(14px, 2vw, 28px); overflow-x: auto; }
.seasonfig svg { display: block; width: 100%; min-width: 720px; height: auto; }
.seasonfig figcaption { margin-top: var(--space-3); font-family: var(--font-serif); font-style: italic; font-size: var(--fs-small); color: var(--text-muted); }
.seasonfig .m-label { font-family: var(--font-sans); font-size: 12.5px; fill: var(--text-muted); }
.seasonfig .gridl { stroke: var(--grid-line); stroke-width: 1; }
.seasonfig .lane { font-family: var(--font-serif); font-style: italic; font-size: 13px; fill: var(--ink); }
.seasonfig .c-urea { fill: var(--field); }
.seasonfig .c-npk  { fill: var(--soil); }
.seasonfig .c-an   { fill: #4e7d5c; }
.seasonfig .c-chg  { fill: var(--granule); stroke: var(--ink); stroke-width: 1; }
.seasonfig .c-text { font-family: var(--font-sans); font-size: 12.5px; fill: #ffffff; font-weight: 600; }
.seasonfig .risk { fill: none; stroke: var(--ink); stroke-width: 1.75; }
.seasonfig .risk-area { fill: var(--granule); opacity: 0.22; }
.seasonfig .stock { fill: none; stroke: var(--field); stroke-width: 1.75; stroke-dasharray: 5 4; }
.seasonfig .k-label { font-family: var(--font-sans); font-size: 12.5px; fill: var(--ink); }
.season-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); margin-top: clamp(32px, 4vw, 48px); }
.season-notes > div { border-top: 1px solid var(--ink); padding-top: var(--space-4); }
.season-notes h3 { font-size: 1.1875rem; margin-bottom: var(--space-2); }
.season-notes p { font-size: var(--fs-small); margin: 0; }

/* Ch.5 products as a segment table */
.segments td { vertical-align: top; }
.segments .seg-name { display: flex; align-items: center; gap: var(--space-3); min-width: 170px; }
.segments .seg-name img { width: 36px; height: 36px; border: 1px solid var(--rule); background: var(--paper); flex: none; }
.segments .seg-name a { font-family: var(--font-serif); font-size: 1.1875rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.segments .seg-name a:hover { color: var(--field); text-decoration: underline; }
.segments .tagline { font-family: var(--font-serif); font-style: italic; color: var(--ink); }
.segments td:nth-child(3) { min-width: 200px; }

/* Ch.6 schedule of fees */
.fees { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.fees > article { padding: var(--space-6) var(--space-6) var(--space-6) 0; display: flex; flex-direction: column; }
.fees > article + article { border-left: 1px solid var(--rule); padding-left: var(--space-6); }
.fees > article.is-whole { background: var(--field-tint); padding-left: var(--space-6); border-left: 0; }
.fees h3 { font-size: 1.375rem; margin-bottom: var(--space-1); }
.fees .fee { font-family: var(--font-serif); font-weight: 300; font-size: clamp(2.5rem, 1.9rem + 2.2vw, 3.5rem); color: var(--ink); line-height: 1; letter-spacing: -0.035em; margin: var(--space-4) 0 var(--space-1); display: block; font-variant-numeric: lining-nums tabular-nums; }
.fees .per { font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-muted); display: block; margin-bottom: var(--space-5); }
.fees p { font-size: var(--fs-small); }
.fees .checklist li { font-size: var(--fs-small); }
.fees .btn { margin-top: auto; align-self: flex-start; }
.fee-terms { margin-top: var(--space-8); }
.fee-terms td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* Back cover CTA */
.backcover { background: var(--field-deep); color: var(--text-on-deep); padding-block: clamp(72px, 9vw, 136px); }
.backcover__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.backcover h2 { color: #ffffff; font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.04; margin-bottom: var(--space-5); }
.backcover p { color: var(--text-on-deep); }
.backcover .lead { color: var(--text-on-deep); }
.backcover ol { margin: 0; padding: 0; list-style: none; counter-reset: b; border-top: 1px solid rgba(238, 241, 230, 0.4); }
.backcover ol li { counter-increment: b; display: grid; grid-template-columns: 2rem 1fr; padding: var(--space-3) 0; margin: 0;
  border-bottom: 1px solid rgba(238, 241, 230, 0.25); font-family: var(--font-sans); font-size: 0.9375rem; color: var(--text-on-deep); }
.backcover ol li::before { content: counter(b); font-family: var(--font-serif); color: var(--granule); font-size: 1.125rem; line-height: 1.3; }
.backcover .btn-primary { background: var(--granule); border-color: var(--granule); color: var(--ink); }
.backcover .btn-primary:hover { background: #ffffff; border-color: #ffffff; color: var(--ink); }
.backcover .btn-secondary { color: #ffffff; border-color: rgba(255, 255, 255, 0.7); }
.backcover .btn-secondary:hover { background: #ffffff; color: var(--field-deep); }
.backcover :focus-visible { outline-color: var(--granule); }
.backcover__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

/* ---------- 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; }
  .cover__grid, .envelope, .report-wrap, .backcover__grid { grid-template-columns: 1fr; }
  .stages { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-6); }
  .stages li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 900px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .fees { grid-template-columns: 1fr; }
  .fees > article, .fees > article + article { border-left: 0; padding-left: 0; padding-right: 0; }
  .fees > article + article { border-top: 1px solid var(--rule); }
  .fees > article.is-whole { padding-inline: var(--space-5); }
  .season-notes { grid-template-columns: 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: 0.75rem; min-height: 280px; }
  .stat { min-height: 132px; }
  .chapter__head { grid-template-columns: 1fr; }
  .chapter__no { font-size: 4.5rem; }
  .stages { grid-template-columns: 1fr; }
  .stages li + li { border-left: 0; padding-left: 0; }
}
@media (max-width: 520px) {
  .hero__cta .btn, .cover__cta .btn, .backcover__cta .btn { width: 100%; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .keyfig { padding-inline: var(--space-4); }
  .keyfig__pair { grid-template-columns: 1fr; }
  .keyfig__unit + .keyfig__unit { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .minutes li { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* Grid children never force horizontal overflow */
.cols-2 > *, .cols-3 > *, .cols-4 > *, .split > *, .workspace > *, .bento > * { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { transform: none; }
  .log.is-playing > li { animation: none; }
  .loopfig .flow { animation: none; display: none; }
}

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

/* Homepage report tables restack as labelled entries on narrow screens */
@media (max-width: 640px) {
  table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm th, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--rule); }
  table.stack-sm tbody tr:last-child { border-bottom: 0; }
  table.stack-sm tbody th, table.stack-sm td { border: 0; padding: 2px 0; text-align: left; }
  table.stack-sm tbody th[scope="row"] { font-size: 1.0625rem; padding-bottom: var(--space-2); }
  table.stack-sm td[data-label] { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-3); }
  table.stack-sm td[data-label]::before { content: attr(data-label); color: var(--text-muted); font-size: 0.8125rem; font-family: var(--font-sans); font-style: normal; padding-top: 2px; }
  table.stack-sm caption { display: block; }
  table.stack-sm tr.grp { padding: 0; }
  table.stack-sm tr.grp th { padding: var(--space-2) var(--space-4); }
  .report td.num { white-space: normal; }
}
.chapter__head--appendix { margin-bottom: 0; }
.chapter__head--appendix .faq { margin-top: var(--space-10); }
