/* Executive overview prototype. Tokens follow the Optamize brand system v2.1 (brand-system.html).
   Two colour modes: Day (paper ground, the default) and Night (ink ground). Each token below is set
   once per mode; components read tokens only. */
@font-face {
  font-family: 'Baloo 2';
  src: url('../assets/fonts/baloo2-variable-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face { font-family: 'Poppins'; src: url('../assets/fonts/poppins-400-latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../assets/fonts/poppins-600-latin.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../assets/fonts/poppins-700-latin.woff2') format('woff2'); font-weight: 700; font-display: swap; }

/* Brand palette (fixed values) */
:root {
  --opt-ink: #071216; --opt-ink-2: #0b1b20; --opt-ink-card: #101b20;
  --opt-lime: #d6ff38; --opt-blue: #3d6bff; --opt-blue-chart: #4a8cff;
  --opt-paper: #f4f6ef; --opt-paper-2: #edf1e9; --opt-white: #ffffff;
  --opt-tint-100: #b7c1c3; --opt-tint-200: #afbabd; --opt-tint-300: #94a3a6; --opt-tint-400: #75858a; --opt-tint-500: #6e7f83;
  --opt-paper-text-2: #617277; --opt-paper-text-3: #5c6965; --opt-paper-line: #d7dcda;
  --opt-negative: #ff7f6d;
}

/* Day mode (default). Paper ground, white cards, ink type; blue is the accent and the comparison. */
:root {
  --paper: var(--opt-paper);          /* page ground */
  --surface: var(--opt-white);        /* card ground */
  --ink: var(--opt-ink);              /* primary text and strong marks */
  --grey: var(--opt-paper-2);         /* quiet fills, tracks, hovers */
  --red: var(--opt-blue);             /* brand accent (not a negative) */
  --deep-red: var(--opt-negative);    /* a leak or a shortfall: marks */
  --warn-text: var(--opt-ink);        /* a leak or a shortfall: words (coral is not text on paper) */
  --muted: var(--opt-paper-text-3);
  --kicker: var(--opt-paper-text-2);
  --line: var(--opt-paper-line);
  --sage: var(--opt-paper-2);
  --sage-track: var(--opt-tint-400);  /* grey-green third data colour */
  --s1: var(--opt-ink);               /* chart series one */
  --s2: var(--opt-blue);              /* chart comparison series */
  --focus: var(--opt-blue);
  --card-line: var(--opt-paper-line);
  --tt-bg: rgba(7, 18, 22, .94);
  --backdrop: rgba(7, 18, 22, .42);
  --gutter: 44px;
  --gap: 2px;
  --radius: 18px;
  --sans: 'Poppins', system-ui, sans-serif;
  --display: 'Baloo 2', 'Poppins', system-ui, sans-serif;
  --mono: 'Baloo 2', 'Poppins', system-ui, sans-serif;  /* labels: Baloo 2 700 uppercase (the brand has no mono face) */
  --head-h: 76px;
  --hatch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M-1 1l2-2M0 6l6-6M5 7l2-2' stroke='%23071216' stroke-width='1'/%3E%3C/svg%3E");
  --hatch-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M-1 1l2-2M0 6l6-6M5 7l2-2' stroke='%23ff7f6d' stroke-width='1.4'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23071216' stroke-width='1.5'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* Night mode. Ink ground, ink-card panels, white type; lime is the signal and series one, chart blue the comparison. */
:root[data-theme='night'] {
  --paper: var(--opt-ink);
  --surface: var(--opt-ink-card);
  --ink: var(--opt-white);
  --grey: rgba(255, 255, 255, .07);
  --red: var(--opt-lime);
  --deep-red: var(--opt-negative);
  --warn-text: var(--opt-negative);
  --muted: var(--opt-tint-300);
  --kicker: var(--opt-lime);
  --line: rgba(255, 255, 255, .13);
  --sage: rgba(214, 255, 56, .08);
  --sage-track: var(--opt-tint-400);
  --s1: var(--opt-lime);
  --s2: var(--opt-blue-chart);
  --focus: var(--opt-lime);
  --card-line: rgba(255, 255, 255, .11);
  --tt-bg: rgba(16, 27, 32, .96);
  --backdrop: rgba(0, 0, 0, .55);
  --hatch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M-1 1l2-2M0 6l6-6M5 7l2-2' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E");
  color-scheme: dark;
}
@media (max-width: 1150px) { :root { --gutter: 32px; } }
@media (max-width: 850px)  { :root { --gutter: 25px; } }
@media (max-width: 620px)  { :root { --gutter: 20px; --head-h: auto; } }
@media (max-width: 360px)  { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .025em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--ink); }
.masthead__inner {
  max-width: 1512px; margin: 0 auto; padding: 14px var(--gutter);
  min-height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.masthead__brand { display: flex; align-items: center; gap: 28px; }
.logo { display: block; width: 150px; height: auto; }
.title { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1; padding-left: 28px; border-left: 1px solid var(--line); }
.masthead__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.masthead__meta > div { display: flex; align-items: center; gap: 8px; }
.masthead__meta dd { font-weight: 550; }
.compare dt { font-family: var(--mono); font-size: 11px; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); }
select {
  appearance: none; border: 1px solid var(--ink); border-radius: 0; background: var(--paper);
  padding: 6px 30px 6px 10px; font-weight: 550; font-size: 14px; min-height: 36px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right 10px center;
}
.badge {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .025em; text-transform: uppercase;
  border: 1px solid var(--ink); padding: 4px 8px; line-height: 1.2; font-weight: 500;
}
.badge::before { content: '['; color: var(--red); margin-right: 3px; }
.badge::after { content: ']'; color: var(--red); margin-left: 3px; }

/* Page */
.page { max-width: 1512px; margin: 0 auto; padding: 28px var(--gutter) 40px; display: grid; gap: 28px; }
.row { display: grid; gap: 28px; }
.row--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 1150px) { .row--7-5 { grid-template-columns: minmax(0, 1fr); } }

.panel { border-top: 1px solid var(--ink); padding-top: 14px; min-width: 0; scroll-margin-top: 110px; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel__head h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.panel__meta { color: var(--muted); }
.panel:target, .panel.is-flash { animation: flash 1.2s ease-out 1; }
@keyframes flash { 0% { background: var(--sage); } 100% { background: transparent; } }
.hint { color: var(--muted); margin-top: 12px; }
.note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.note::before { content: 'Note '; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .025em; color: var(--ink); }

/* Info control */
.info {
  display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; margin-left: 6px; flex: none;
  border: 1px solid var(--sage-track); background: transparent; border-radius: 0;
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1; color: var(--muted); vertical-align: middle;
  position: relative;
}
.info::after { content: ''; position: absolute; inset: -11px; }
.info:hover, .info[aria-expanded='true'] { border-color: var(--ink); color: var(--ink); background: var(--grey); }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
@media (max-width: 1199px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .kpi-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .kpi { padding: 12px 12px 14px; } .kpi__value { font-size: 27px; } .kpi__label { font-size: 13px; } .kpi__support, .kpi__delta { font-size: 12px; } }
.kpi { padding: 14px 16px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi__label { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; }
.kpi__value { font-size: clamp(30px, 2.6vw, 40px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.05; margin-top: 4px; }
.kpi__value small { font-size: .55em; font-weight: 600; letter-spacing: -0.01em; margin-left: 2px; }
.kpi__support { font-size: 14px; }
.kpi__support strong { font-weight: 600; }
.kpi__extra { font-size: 13px; color: var(--muted); }
.kpi__delta { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--grey); font-size: 13px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.delta { font-weight: 650; white-space: nowrap; }
.delta__vs { color: var(--muted); }
.flag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .025em; }
.flag--ok::before { content: ''; width: 9px; height: 9px; border: 1.5px solid var(--ink); background: var(--ink); }
.flag--watch::before { content: ''; width: 9px; height: 9px; border: 1.5px solid var(--deep-red); background: var(--hatch-red); }
.flag--watch { color: var(--deep-red); }

.kpi__more { margin-top: 2px; }
.kpi__more summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); padding: 4px 0; min-height: 24px; }
.kpi__more summary::-webkit-details-marker { display: none; }
.kpi__more summary::before { content: '+'; display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1px solid var(--sage-track); font-size: 10px; }
.kpi__more[open] summary::before { content: '\2212'; }
.kpi__more summary:hover { color: var(--ink); }
.kpi__more .kv { margin-top: 2px; font-size: 12px; }
.kpi__more .kv th { color: var(--muted); }
.kpi__more .kpi__extra { margin-top: 6px; font-size: 12px; }

/* Waterfall */
.waterfall { display: grid; gap: 0; }
.wf-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr) 104px 58px; align-items: center; gap: 0 12px;
  padding: 6px 0; border: 0; border-bottom: 1px solid var(--grey); background: transparent; text-align: left; width: 100%;
}
.wf-row:hover, .wf-row[aria-pressed='true'] { background: var(--grey); }
.wf-row__label { font-size: 14px; font-weight: 500; display: flex; align-items: baseline; }
.wf-row__label .op { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; margin-right: 6px; display: inline-block; width: 48px; flex: none; }
.wf-row--subtotal .wf-row__label, .wf-row--total .wf-row__label { font-weight: 650; }
.wf-row--subtotal { background: transparent; }
.wf-row__track { position: relative; height: 22px; }
.wf-bar { position: absolute; top: 0; bottom: 0; }
.wf-bar--total { background: var(--ink); }
.wf-bar--cost { background: var(--sage-track); }
.wf-bar--subtotal { background: var(--paper) var(--hatch); border: 1px solid var(--ink); }
.wf-bar--result { background: var(--red); }
.wf-row__value { text-align: right; font-weight: 600; font-size: 15px; white-space: nowrap; }
.wf-row__pct { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.wf-row--total .wf-row__value, .wf-row--result .wf-row__value { font-weight: 700; }
.wf-row__sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); padding-left: 40px; }
.wf-head { display: grid; grid-template-columns: 190px minmax(0, 1fr) 104px 58px; gap: 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--muted); }
.wf-head span:nth-child(3), .wf-head span:nth-child(4) { text-align: right; }
@media (max-width: 620px) {
  .wf-row, .wf-head { grid-template-columns: minmax(0, 1fr) auto 48px; }
  .wf-row__label { grid-column: 1; grid-row: 1; }
  .wf-row__value { grid-column: 2; grid-row: 1; }
  .wf-row__pct { grid-column: 3; grid-row: 1; }
  .wf-row__track { grid-column: 1 / -1; grid-row: 2; height: 14px; margin-top: 4px; }
  .wf-head span:nth-child(2) { display: none; }
}

/* Legend and charts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; margin-bottom: 10px; }
.legend__item { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--ink); }
.key--dash { border-top: 2px dashed var(--muted); }
.key--bar { width: 12px; height: 12px; border: 0; background: var(--sage-track); }
.key--reserve { border-top: 2px dashed var(--deep-red); }
.key--hatch { width: 14px; height: 12px; border: 1px solid var(--deep-red); background: var(--hatch-red); }
.key--inbound { width: 0; height: 0; border: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--ink); }
.multiples { display: grid; gap: 18px; }
.multiple figcaption { font-size: 14px; font-weight: 600; margin-bottom: 2px; display: flex; justify-content: space-between; gap: 8px; }
.chart { position: relative; width: 100%; touch-action: pan-y; }
.chart:focus-visible { outline-offset: 4px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.chart .axis-label { font-family: var(--mono); font-size: 10px; letter-spacing: .025em; }
.chart .grid { stroke: var(--grey); stroke-width: 1; }
.chart .baseline { stroke: var(--line); stroke-width: 1; }
.chart .cur { fill: none; stroke: var(--ink); stroke-width: 2; }
.chart .prior { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.chart .dot-cur { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
.chart .dot-prior { fill: var(--paper); stroke: var(--muted); stroke-width: 2; }
.chart .label-strong { fill: var(--ink); font-weight: 650; font-size: 13px; }
.chart .crosshair { stroke: var(--ink); stroke-width: 1; }
.chart .reserve { stroke: var(--deep-red); stroke-width: 1.5; stroke-dasharray: 6 4; }
.chart .reserve-label { fill: var(--deep-red); font-size: 12px; font-weight: 600; }
.chart .low-ring { fill: var(--paper); stroke: var(--red); stroke-width: 2.5; }
.chart .bar { fill: var(--sage-track); }
.chart .bar.is-active { fill: var(--ink); }
.chart .headroom { stroke: var(--ink); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart--short { margin-top: 6px; }

.tooltip {
  position: fixed; z-index: 40; pointer-events: none; max-width: 280px;
  background: var(--ink); color: var(--paper); padding: 10px 12px; font-size: 13px; line-height: 1.4;
}
.tooltip h4 { margin: 0 0 4px; font-size: 13px; font-weight: 650; }
.tooltip table { border-collapse: collapse; width: 100%; }
.tooltip td { padding: 1px 0; vertical-align: top; }
.tooltip td + td { text-align: right; padding-left: 14px; font-weight: 600; white-space: nowrap; }
.tooltip .tt-note { margin-top: 6px; color: var(--opt-tint-100); font-size: 12px; }
.tooltip .tt-k { color: var(--opt-tint-100); }

/* Popover */
.popover {
  position: fixed; z-index: 45; width: min(340px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--ink); padding: 14px 16px 12px; font-size: 14px;
}
.popover h3 { font-size: 15px; font-weight: 650; margin-bottom: 2px; }
.popover .full { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .025em; color: var(--muted); margin-bottom: 8px; }
.popover .formula { margin-top: 8px; padding: 6px 8px; background: var(--grey); font-size: 13px; }
.popover .incl { margin-top: 8px; font-size: 13px; color: var(--muted); }
.popover .pop-actions { margin-top: 10px; display: flex; justify-content: space-between; }

/* Figures strip */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.figure { padding: 10px 12px 10px 0; min-width: 0; }
.figure + .figure { padding-left: 12px; border-left: 1px solid var(--grey); }
.figure__label { display: flex; align-items: center; font-size: 13px; font-weight: 550; color: var(--muted); }
.figure__value { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; margin-top: 2px; }
.figure__sub { font-size: 13px; color: var(--muted); }
@media (max-width: 480px) { .figures { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .figure:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--grey); } }

/* Customer economics */
.ce-block { padding: 0 0 18px; }
.ce-block + .ce-block { border-top: 1px solid var(--line); padding-top: 14px; }
.ce-block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ce-block__head h3 { font-size: 15px; font-weight: 650; }
.allowance { margin: 34px 0 6px; position: relative; }
.allowance__bar { display: flex; height: 26px; gap: var(--gap); }
.allowance__seg { position: relative; min-width: 2px; }
.seg--cac { background: var(--sage-track); }
.seg--overhead { background: var(--grey); border: 1px solid var(--line); }
.seg--profit { background: var(--paper) var(--hatch); border: 1px solid var(--ink); }
.allowance__marker { position: absolute; top: -30px; bottom: 20px; width: 0; border-left: 2px solid var(--ink); }
.allowance__marker span { position: absolute; top: 0; left: 6px; white-space: nowrap; font-size: 13px; font-weight: 650; }
.allowance__marker.is-right span { left: auto; right: 6px; }
.allowance__axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.allowance__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin-top: 10px; }
.allowance__legend .sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.ce-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--grey); margin-top: 14px; }
.ce-figs .figure { padding-top: 8px; padding-bottom: 0; }
.ce-figs .figure__value { font-size: 22px; }
@media (max-width: 480px) { .ce-figs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ce-figs .figure:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; } }
.ce-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .ce-split { grid-template-columns: minmax(0, 1fr); } }
.mix__bar { display: flex; height: 26px; gap: var(--gap); margin: 8px 0; }
.mix__seg--new { background: var(--ink); }
.mix__seg--returning { background: var(--sage-track); }
.mix__rows { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px 14px; font-size: 13px; align-items: center; }
.mix__rows .num { text-align: right; font-weight: 600; }
.mix__rows .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; }

details.more { margin-top: 12px; border-top: 1px solid var(--grey); }
details.more summary { cursor: pointer; padding: 8px 0; font-family: var(--mono); font-size: 11px; letter-spacing: .025em; text-transform: uppercase; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--ink); font-size: 12px; }
details.more[open] summary::before { content: '−'; }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv th, .kv td { padding: 5px 0; border-bottom: 1px solid var(--grey); text-align: left; font-weight: 400; vertical-align: top; }
.kv td { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.kv thead th { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .025em; color: var(--muted); }

/* Tables */
.table-wrap { width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); padding: 0 10px 8px 0; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
table.data td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data .num { text-align: right; white-space: nowrap; }
table.data .strong { font-weight: 650; }
table.data tr.detail td { background: var(--grey); padding: 14px 16px; }
table.data tfoot td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 600; font-size: 13px; }
.rowtoggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; font-weight: 650; text-align: left; }
.rowtoggle::before { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--ink); font-size: 13px; font-weight: 500; flex: none; }
.rowtoggle[aria-expanded='true']::before { content: '−'; }
.sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.tag { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .025em; text-transform: uppercase; border: 1px solid var(--line); padding: 1px 5px; margin-left: 6px; color: var(--muted); vertical-align: 1px; }
.na { color: var(--muted); font-weight: 400; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; font-size: 13px; }
.detail-grid h4 { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
.detail-grid p + p { margin-top: 4px; }
@media (max-width: 760px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }

/* Channel table responsive */
@media (max-width: 760px) {
  .channel-table thead { display: none; }
  .channel-table tr.main { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .channel-table tr.main td { border: 0; padding: 0; }
  .channel-table tr.main td[data-label]::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .025em; color: var(--muted); }
  .channel-table tr.main td:first-child { grid-column: 1 / -1; }
  .channel-table tr.main td.obs { grid-column: 1 / -1; }
  .channel-table tr.main td.num { text-align: left; }
  .channel-table tr.detail, .channel-table tr.detail td { display: block; }
  .channel-table tfoot tr { display: grid; grid-template-columns: 1fr auto; }
  .channel-table tfoot td { border: 0; padding: 8px 0 0; }
  .channel-table tfoot td.hide-sm { display: none; }
}

/* Stock */
.stock-table td.timeline { width: 28%; min-width: 160px; }
.stock-table td.interp { width: 24%; }
.stock-table td:first-child { white-space: nowrap; }
.tl { position: relative; height: 34px; margin-top: 2px; }
.tl__axis { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; border-top: 1px solid var(--line); }
.tl__tick { position: absolute; top: 0; height: 4px; border-left: 1px solid var(--line); }
.tl__ticklabel { position: absolute; top: 3px; transform: translateX(-50%); font-size: 9.5px; color: var(--muted); font-family: var(--mono); }
.tl__cover { position: absolute; left: 0; top: 8px; height: 12px; background: var(--ink); }
.tl__gap { position: absolute; top: 8px; height: 12px; background: var(--hatch-red); border: 1px solid var(--deep-red); }
.tl__inbound { position: absolute; top: -1px; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--ink); }
.tl__more { position: absolute; right: 0; top: 7px; font-size: 11px; font-weight: 650; background: var(--paper); padding-left: 4px; }
.stock-table tr.is-exception td:first-child { box-shadow: inset 3px 0 0 var(--red); padding-left: 10px; }
.stock-legend { margin-top: 10px; }
@media (max-width: 760px) {
  .stock-table thead { display: none; }
  .stock-table tr.main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .stock-table tr.main td { border: 0; padding: 0; }
  .stock-table tr.main td:first-child, .stock-table tr.main td.timeline, .stock-table tr.main td.interp { grid-column: 1 / -1; }
  .stock-table tr.main td[data-label]::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .025em; color: var(--muted); }
  .stock-table tr.main td.num { text-align: left; }
  .stock-table td.timeline, .stock-table td.interp { width: auto; }
  .stock-table tr.detail, .stock-table tr.detail td { display: block; }
  .stock-table tr.is-exception td:first-child { box-shadow: none; padding-left: 0; }
  .stock-table tr.main.is-exception { box-shadow: inset 3px 0 0 var(--red); padding-left: 10px; }
}

/* Funnel */
.funnel-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 20px; }
@media (max-width: 560px) { .funnel-wrap { grid-template-columns: minmax(0, 1fr); } }
.fn-stage { padding: 7px 0; }
.fn-stage__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.fn-stage__label { font-weight: 600; }
.fn-stage__count { font-weight: 650; }
.fn-stage__bar { height: 14px; background: var(--grey); margin-top: 4px; position: relative; }
.fn-stage__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); min-width: 2px; }
.fn-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 3px 0 3px 14px; border-left: 1px solid var(--line); margin-left: 6px; }
.fn-step strong { color: var(--ink); font-weight: 650; }
.fn-side { border-left: 1px solid var(--line); padding-left: 16px; display: grid; gap: 14px; align-content: start; }
@media (max-width: 560px) { .fn-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; grid-template-columns: 1fr 1fr; } }
.fn-side .figure { padding: 0; border: 0; }
.fn-side .figure + .figure { padding-left: 0; border-left: 0; }

/* Attention (v1.1: compact strip beneath the headline metrics) */
.attention-strip { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 0 16px; background: var(--grey); padding: 12px 16px; margin-top: -12px; scroll-margin-top: 110px; }
.attention-strip h2 { padding-top: 2px; color: var(--ink); }
.attention-strip h2::before { content: '['; color: var(--red); margin-right: 3px; }
.attention-strip h2::after { content: ']'; color: var(--red); margin-left: 3px; }
.attention { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.attention li { padding: 0 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attention li:first-child { padding-left: 0; }
.attention li + li { border-left: 1px solid var(--line); }
.att__title { font-size: 15px; font-weight: 650; line-height: 1.25; }
.att__body { font-size: 13px; line-height: 1.4; }
.att__foot { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.att__foot .mono { font-size: 10px; }
.att__foot a { color: var(--ink); font-size: 13px; font-weight: 600; text-underline-offset: 3px; }
.att__foot a::after { content: ' \2193'; }
@media (max-width: 1000px) {
  .attention-strip { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .attention { grid-template-columns: minmax(0, 1fr); }
  .attention li, .attention li:first-child { padding: 8px 0; }
  .attention li + li { border-left: 0; border-top: 1px solid var(--line); }
}

/* Footer */
.footer { border-top: 1px solid var(--ink); }
.footer__inner { max-width: 1512px; margin: 0 auto; padding: 18px var(--gutter) 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.footer nav { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.link { border: 0; background: none; padding: 4px 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link--small { font-size: 13px; }

/* Drawers */
dialog.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(560px, 100vw); max-width: 100vw;
  border: 0; border-left: 1px solid var(--ink); padding: 0 24px 32px; background: var(--paper); color: var(--ink); overflow-y: auto;
}
dialog.drawer::backdrop { background: var(--backdrop); }
.drawer__head { position: sticky; top: 0; background: var(--paper); display: flex; justify-content: space-between; align-items: center; padding: 20px 0 14px; border-bottom: 1px solid var(--ink); z-index: 1; }
.drawer__head h2 { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.close { border: 1px solid var(--ink); background: var(--paper); padding: 6px 12px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .025em; }
.close:hover { background: var(--ink); color: var(--paper); }
.search { display: grid; gap: 6px; margin: 16px 0 6px; }
.search input { border: 1px solid var(--ink); border-radius: 0; padding: 10px 12px; background: var(--paper); font-size: 15px; }
.glossary { margin-top: 6px; }
.gl-entry { padding: 14px 0; border-bottom: 1px solid var(--line); }
.gl-entry dt { font-size: 16px; font-weight: 650; }
.gl-entry dt .full { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-top: 2px; }
.gl-entry dd { font-size: 14px; margin-top: 6px; }
.gl-entry .formula { background: var(--grey); padding: 6px 8px; font-size: 13px; }
.gl-entry .incl { color: var(--muted); font-size: 13px; }
.gl-entry.is-target { background: var(--sage); margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
#notes-list section { padding: 16px 0; border-bottom: 1px solid var(--line); }
#notes-list h3 { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
#notes-list li { font-size: 14px; padding: 3px 0 3px 16px; position: relative; }
#notes-list li::before { content: ''; position: absolute; left: 0; top: .7em; width: 7px; height: 1px; background: var(--ink); }

@media (max-width: 620px) {
  .masthead { position: static; }
  .masthead__inner { padding-top: 12px; padding-bottom: 12px; }
  .masthead__brand { gap: 16px; flex-wrap: wrap; }
  .title { font-size: 22px; padding-left: 16px; }
  .masthead__meta { gap: 8px 14px; font-size: 13px; }
  .panel { scroll-margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .wf-bar, .fn-stage__fill, .tl__cover, .allowance__seg, .mix__bar > * { forced-color-adjust: none; } }

tr.detail[hidden] { display: none !important; }


/* Page navigation (combined review prototype). */
.pagenav { border-top: 1px solid var(--line); }
.pagenav__inner { max-width: 1512px; margin: 0 auto; padding: 0 var(--gutter); display: flex; gap: 4px 28px; flex-wrap: wrap; }
.pagenav a { display: inline-block; padding: 9px 0 7px; font-size: 14px; font-weight: 550; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.pagenav a:hover { color: var(--ink); }
.pagenav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.panel, .attention-strip { scroll-margin-top: 150px; }
@media (max-width: 620px) { .panel, .attention-strip { scroll-margin-top: 56px; } }

/* v0.2 contextual links: small, labelled with their destination. */
.xlink { margin-top: 10px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.xlink a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.xlink a::after { content: ' \2192'; }
.xlink .mono { font-size: 10px; }

/* v0.3 mobile correction: no fixed strip over content. The header keeps a short in-flow
   "Illustrative data" label on small screens; the full version text stays in the footer and data notes. */
@media (max-width: 620px) { .badge__ver { display: none; } }
.footer__inner { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
/* The overview channel table overflowed at 320 px because its secondary lines could not wrap. */
@media (max-width: 760px) { .channel-table, .channel-table tbody, .channel-table tfoot { display: block; width: 100%; } .channel-table tr.main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .channel-table tr.main td.num .sub { white-space: normal; } .channel-table tr.main td.num { white-space: normal; } .channel-table tfoot td.num, .channel-table tfoot td.num .sub { white-space: normal; } }

/* ==========================================================================
   Optamize brand layer and Day / Night mode (Optamize build v1.0).
   Rounded cards and pills, Baloo 2 display and labels, Poppins text, lime as the
   signal on ink, blue as the accent on paper. Overrides the shared layout above.
   ========================================================================== */
:root {
  --tab-bg: var(--opt-ink); --tab-fg: var(--opt-white);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23071216' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --shadow-pop: 0 20px 50px rgba(7, 18, 22, .14);
}
:root[data-theme='night'] {
  --tab-bg: var(--opt-lime); --tab-fg: var(--opt-ink);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --shadow-pop: 0 40px 100px rgba(0, 0, 0, .48);
}
/* Inside a card, "paper" means the card ground, so rings, knock-outs and hatched fills match it. */
.panel, .kpi, .attention-strip, .popover, dialog.drawer { --paper: var(--surface); }

body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14.5px; transition: background-color .2s, color .2s; }
.mono { font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .1em; }
h1, h2, h3, .title, .kpi__value, .figure__value, .drawer__head h2, .gl-entry dt, .att__title { font-family: var(--display); }
.title, .panel__head h2, .drawer__head h2 { font-weight: 700; letter-spacing: -0.03em; }
.kpi__value, .figure__value { font-weight: 700; letter-spacing: -0.04em; }
.kpi__label, .ce-block__head h3, .multiple figcaption, .fn-stage__label { font-weight: 600; }
.skip { background: var(--tab-bg); color: var(--tab-fg); border-radius: 999px; font-weight: 700; }

/* Masthead */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.logo { width: 132px; }
.logo--night { display: none; }
:root[data-theme='night'] .logo--day { display: none; }
:root[data-theme='night'] .logo--night { display: block; }
.title { font-size: 28px; line-height: .95; padding-top: 3px; border-left-color: var(--line); }
.masthead__meta dd { font-weight: 600; }
.compare dt { font-family: var(--mono); font-weight: 700; letter-spacing: .1em; color: var(--kicker); }
select { border: 1px solid var(--line); border-radius: 14px; background-color: var(--surface); color: var(--ink); padding: 6px 32px 6px 14px; font-weight: 600; }
select:hover { border-color: var(--focus); }
.badge { font-family: var(--mono); font-weight: 800; font-size: 10px; letter-spacing: .12em; border: 1px solid var(--ink); border-radius: 999px; padding: 5px 11px 4px; }
.badge::before, .badge::after { content: none; }
:root[data-theme='night'] .badge { border-color: rgba(214, 255, 56, .32); color: var(--opt-lime); }

/* Page navigation as brand tabs: the active tab is the solid pill. */
.pagenav { border-top: 1px solid var(--line); }
.pagenav__inner { gap: 6px 6px; padding-top: 8px; padding-bottom: 8px; }
.pagenav a { padding: 7px 16px; border: 0; border-radius: 999px; font-family: var(--display); font-weight: 500; font-size: 14.5px; color: var(--muted); min-height: 36px; display: inline-flex; align-items: center; }
.pagenav a:hover { color: var(--ink); }
.pagenav a[aria-current='page'] { background: var(--tab-bg); color: var(--tab-fg); font-weight: 600; border: 0; }

/* Cards */
.page { gap: 22px; padding-top: 24px; }
.row { gap: 22px; }
.panel { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 20px 22px 22px; }
@media (max-width: 620px) { .panel { padding: 16px 14px 18px; border-radius: 16px; } }
.panel__head h2 { font-size: 23px; }
.panel__meta, .hint { color: var(--muted); }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--focus); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Headline metrics: one card, cells divided by 1px lines */
.kpi-grid { border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; gap: 1px; background: var(--card-line); }
.kpi { background: var(--surface); border: 0; }
.kpi__delta { border-top-color: var(--line); }

/* Attention strip */
.attention-strip { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 14px 18px; margin-top: 0; }
.attention-strip h2 { color: var(--kicker); font-size: 12px; letter-spacing: .18em; font-weight: 800; }
.attention-strip h2::before, .attention-strip h2::after { content: none; }
.att__foot a { color: var(--ink); }

/* Info control, disclosure controls (a ring with a chevron; the brand draws no plus or minus glyph) */
.info { border-radius: 999px; border-color: var(--line); font-family: var(--display); font-weight: 700; color: var(--muted); }
.info:hover, .info[aria-expanded='true'] { border-color: var(--focus); color: var(--ink); background: var(--grey); }
.kpi__more summary::before, details.more summary::before, .rowtoggle::before, details.q summary::after {
  content: ''; border-radius: 999px; border: 1px solid var(--line);
  background: var(--chev) center / 9px 6px no-repeat; transition: transform .2s;
}
.kpi__more summary::before { width: 16px; height: 16px; }
.kpi__more[open] summary::before, details.more[open] summary::before, .rowtoggle[aria-expanded='true']::before, details.q[open] summary::after { content: ''; transform: rotate(180deg); }
.kpi__more summary { font-family: var(--mono); font-weight: 700; letter-spacing: .1em; }

/* Data marks */
.flag { font-family: var(--mono); font-weight: 700; letter-spacing: .1em; }
.flag--ok::before { border-radius: 50%; width: 10px; height: 10px; border: 0; background: var(--s1); }
.flag--watch::before { border-radius: 50%; width: 10px; height: 10px; border: 1.5px solid var(--deep-red); background: var(--hatch-red); }
.flag--watch { color: var(--warn-text); }
.wf-row { border-bottom-color: var(--line); border-radius: 8px; }
.wf-row:hover, .wf-row[aria-pressed='true'] { background: var(--grey); }
.wf-bar, .allowance__seg, .fn-stage__bar, .fn-stage__fill, .mix__bar > *, .tl__cover, .tl__gap { border-radius: 3px; }
.key { border-top-color: var(--s1); }
.key--dash { border-top: 2px dashed var(--s2); }
.chart .cur { stroke: var(--s1); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme='night'] .chart .cur { stroke-width: 3; filter: drop-shadow(0 0 5px rgba(214, 255, 56, .45)); }
.chart .prior { stroke: var(--s2); }
.chart .dot-cur { fill: var(--s1); stroke: var(--surface); }
.chart .dot-prior { fill: var(--surface); stroke: var(--s2); }
.chart .crosshair { stroke: var(--muted); }
.chart .reserve { stroke-width: 2; }
.chart .reserve-label { fill: var(--warn-text); }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .baseline { stroke: var(--sage-track); }
.key--reserve { border-top-color: var(--deep-red); }
.stock-table tr.is-exception td:first-child { box-shadow: inset 3px 0 0 var(--deep-red); }
@media (max-width: 760px) { .stock-table tr.main.is-exception { box-shadow: inset 3px 0 0 var(--deep-red); } }
.tl__axis, .tl__tick { border-color: var(--line); }

/* Tables */
table.data th { font-family: var(--mono); font-weight: 700; letter-spacing: .1em; border-bottom-color: var(--sage-track); }
table.data td { border-bottom-color: var(--line); }
table.data tr.detail td { background: var(--grey); }
table.data tfoot td { border-top-color: var(--sage-track); }
.kv th, .kv td { border-bottom-color: var(--line); }
.kv thead th, .detail-grid h4, .gl-entry dt .full, .popover .full, .tag, .tl__ticklabel { font-family: var(--mono); font-weight: 700; letter-spacing: .1em; }
.tag { border-radius: 999px; padding: 1px 7px; }
.rowtoggle { font-weight: 600; }

/* Tooltip, popover, drawers */
.tooltip { background: var(--tt-bg); color: var(--opt-white); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.popover { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.popover .formula, .gl-entry .formula { background: var(--grey); border-radius: 8px; }
dialog.drawer { background: var(--surface); color: var(--ink); border-left: 1px solid var(--card-line); }
.drawer__head { background: var(--surface); border-bottom-color: var(--line); }
.close { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); padding: 7px 14px; font-family: var(--mono); font-weight: 700; letter-spacing: .1em; }
.close:hover { background: var(--tab-bg); color: var(--tab-fg); border-color: var(--tab-bg); }
.search input { border: 1px solid var(--line); border-radius: 14px; background: var(--grey); color: var(--ink); padding: 12px 16px; }
.search input:hover { border-color: rgba(214, 255, 56, .32); }
.search input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px rgba(61, 107, 255, .12); }
:root[data-theme='night'] .search input:focus { box-shadow: 0 0 0 4px rgba(214, 255, 56, .08); }
.gl-entry { border-bottom-color: var(--line); }
.gl-entry.is-target { background: var(--sage); border-radius: 12px; }
#notes-list section { border-bottom-color: var(--line); }
#notes-list li::before { width: 7px; height: 7px; border-radius: 50%; top: .55em; background: var(--s1); }

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer__inner { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

/* Day / Night control: a dark inset capsule (lime belongs on paper only inside a dark object), fixed bottom left. */
.mode {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 35;
  display: flex; align-items: center; gap: 4px; padding: 4px;
  background: rgba(7, 18, 22, .9); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 30px rgba(7, 18, 22, .18);
  font-family: var(--display); color: var(--opt-white);
}
.mode button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--opt-tint-200); font-family: var(--display); font-size: 14px; font-weight: 600;
}
.mode button:hover { color: var(--opt-lime); }
.mode button[aria-pressed='true'] { background: var(--opt-lime); color: var(--opt-ink); }
.mode button:focus-visible { outline: 2px solid var(--opt-lime); outline-offset: 2px; }
.mode svg { width: 15px; height: 15px; flex: none; }
.mode__label { display: none; padding: 0 12px 0 8px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--opt-lime); white-space: nowrap; }
/* On phones the header scrolls away, so the capsule also carries the illustrative-data label. */
@media (max-width: 620px) {
  .mode { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .mode button { padding: 0 11px; font-size: 13px; }
  .mode__label { display: inline; }
}
@media (max-width: 340px) { .mode button span { display: none; } .mode button { padding: 0 10px; } }
@media print { .mode { display: none; } }

/* Tables inside cards scroll sideways in their wrapper rather than spill past the card edge (brand 06.9). */
.panel .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stock-table td:first-child { white-space: normal; }
.stock-table td.timeline { min-width: 140px; }
.stock-table th, .stock-table td { padding-right: 8px; }
.stock-table .tag { margin-left: 0; }
@media (max-width: 620px) { .title { border-left: 0; padding-left: 0; } }
