/* Delivery Forecast Studio — design system */
:root {
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #faf9f6; --surface-3: #f1eee8;
  --line: #e6e2d9; --line-2: #d3cec3; --ink: #1b1f24; --ink-2: #3c4550; --ink-3: #5b6470; --ink-4: #a0a6ae;
  --brand: #fdfcfa; --brand-line: #e6e2d9; --brand-ink: #1b1f24; --brand-ink-2: #5b6470; --brand-btn: #ffffff; --brand-btn-line: #ddd6c8; --brand-btn-hover: #f8f3ea;
  --accent: #86683b; --accent-ink: #73582f; --accent-soft: #f6efe2; --on-accent: #ffffff; --champagne: #d9b679;
  --ice: #edf4f9; --ice-line: #d2e2ee; --ice-ink: #3d6a8a;
  --good: #436d4f; --good-bg: #eef4ef; --good-line: #c8dccd;
  --warn: #a15c07; --warn-bg: #fdf6e7; --warn-line: #f1dca9;
  --bad: #b3261e; --bad-bg: #fcf1ef; --bad-line: #f2cdc8;
  --s-current: #3566c9; --s-delay: #d97706; --s-contractor: #7c4ddb; --s-phased: #0a8aa6;
  --ws-dm: #3e63c8; --ws-vi: #b5651d; --ws-test: #6d4fc2; --ws-train: #137a8a;
  --c-standby: #e3a56b; --c-overhead: #b3b6ba; --c-contractor: #a98af0; --c-dual: #d77aa6;
  --crit: #c8322a; --target: #c8322a;
  --sim: #7a4b00; --sim-bg: #fbf3df; --sim-line: #ecd6a3;
  --shadow-sm: 0 1px 2px rgba(27, 31, 36, .04);
  --shadow: 0 1px 2px rgba(27, 31, 36, .03), 0 6px 18px rgba(27, 31, 36, .045);
  --shadow-lg: 0 24px 56px rgba(27, 31, 36, .16);
  --r: 12px; --r-sm: 8px;
  --chrome-h: 113px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", Inter, ui-sans-serif, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0b0d11; --surface: #12151b; --surface-2: #161a21; --surface-3: #1c2129;
    --line: #252b35; --line-2: #343c48; --ink: #f5f2eb; --ink-2: #d4d1ca; --ink-3: #a9b0bd; --ink-4: #6f7684;
    --brand: #0e1116; --brand-line: #252b35; --brand-ink: #f5f2eb; --brand-ink-2: #a9b0bd; --brand-btn: #151920; --brand-btn-line: #343c48; --brand-btn-hover: #1c2129;
    --accent: #d9b679; --accent-ink: #e4c690; --accent-soft: #2a2418; --on-accent: #0b0d11; --champagne: #d9b679;
    --ice: #162230; --ice-line: #2a3f52; --ice-ink: #a3c8e2;
    --good: #9cc7a8; --good-bg: #15221a; --good-line: #2c4a35; --warn: #f0b860; --warn-bg: #2a210f; --warn-line: #574117;
    --bad: #ff9389; --bad-bg: #2f1716; --bad-line: #66302b;
    --s-current: #6f9bf5; --s-delay: #f0a646; --s-contractor: #a98af6; --s-phased: #3cc0dc;
    --ws-dm: #4f74d6; --ws-vi: #b97632; --ws-test: #7c62d0; --ws-train: #1d8a9a;
    --c-standby: #b7814f; --c-overhead: #59606b; --c-contractor: #8a6fd4; --c-dual: #b8628c;
    --crit: #ff6b5f; --target: #ff6b5f; --sim: #f1cf85; --sim-bg: #241d0e; --sim-line: #514018;
    --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 24px 56px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--chrome-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, .kpi-val, table.cmp td { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 12px; }

/* ---------- simulated-data labeling ---------- */
.sim-banner { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; padding: 7px 16px; background: var(--sim-bg); color: var(--sim); border-bottom: 1px solid var(--sim-line); font-size: 12.5px; text-align: center; }
.sim-banner a { color: var(--sim); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sim-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sim); background: var(--sim-bg); border: 1px solid var(--sim-line); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.sim-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sim-chip.sm { font-size: 12px; padding: 1px 7px; }

/* ---------- app chrome ---------- */
.chrome { position: sticky; top: 0; z-index: 20; }
.appbar { height: 60px; background: var(--brand); color: var(--brand-ink); border-bottom: 1px solid var(--brand-line); display: flex; align-items: center; gap: 20px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mark { width: 32px; height: 32px; border-radius: 8px; flex: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7 22 L13 15 L18 18 L25 9' stroke='%2386683b' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='25' cy='9' r='2.3' fill='%23d9b679'/%3E%3C/svg%3E") center/cover; box-shadow: inset 0 0 0 1px var(--brand-btn-line); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.product { font: 600 15px/1.2 var(--display); letter-spacing: -.01em; }
.crumbs { font-size: 12px; color: var(--brand-ink-2); display: flex; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs em { font-style: normal; color: var(--sim); font-weight: 600; }
.crumbs .sep { opacity: .5; }
.appbar-meta { margin-left: auto; font-size: 12px; color: var(--brand-ink-2); display: flex; gap: 14px; white-space: nowrap; }
.appbar-meta b { color: var(--brand-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.appbar-actions { display: flex; gap: 8px; }
.appbar .btn { background: var(--brand-btn); border-color: var(--brand-btn-line); color: var(--brand-ink); }
.appbar .btn:hover { background: var(--brand-btn-hover); color: var(--brand-ink); border-color: var(--accent); }
.toolbar { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.toolbar-inner { display: flex; align-items: center; gap: 14px; padding: 8px 24px; min-height: 53px; }
.tb-label { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.toolbar .segmented { flex: 1; max-width: 760px; }
#drawerBtn { margin-left: auto; }

/* buttons & controls */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { border-color: var(--ink-4); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.btn .count[hidden] { display: none; }
.btn .count { background: var(--on-accent); color: var(--accent); font-size: 12px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 99px; display: inline-grid; place-items: center; padding: 0 5px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.icon-btn svg { width: 16px; height: 16px; }
.segmented { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); }
.segmented button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-selected="true"], .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(27,31,36,.08), 0 0 0 1px var(--line); }
.segmented button i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.segmented.sm button { padding: 5px 12px; font-size: 12.5px; flex: none; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 30px; height: 18px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(12px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); max-width: 1480px; margin: 0 auto; transition: padding-right .2s; }
.sidenav { position: sticky; top: var(--chrome-h); align-self: start; height: calc(100vh - var(--chrome-h)); padding: 24px 12px 24px 24px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 14px 10px 6px; }
.nav-title:first-child { margin-top: 0; }
.sidenav a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none; border-left: 2px solid transparent; }
.sidenav a:hover { background: var(--surface-3); color: var(--ink); }
.sidenav a.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.nav-foot { margin-top: auto; padding: 14px 10px 0; font-size: 12px; color: var(--ink-3); display: grid; gap: 6px; justify-items: start; }
main { padding: 28px 32px 48px 20px; min-width: 0; }
.sec { margin-bottom: 56px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h2 { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.sec-desc { font-size: 13px; color: var(--ink-3); max-width: 560px; }
.sec-tools { display: flex; align-items: center; gap: 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-title { font: 600 14.5px/1.3 var(--font); letter-spacing: -.005em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col > .card { margin-bottom: 16px; }
.source { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.foot { margin-top: 24px; padding: 20px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; font-size: 12.5px; color: var(--ink-3); }

/* ---------- executive summary ---------- */
.verdict { font: 700 30px/1.18 var(--display); letter-spacing: -.025em; max-width: 920px; }
.verdict .hl { color: var(--bad); }
.verdict .hl-good { color: var(--good); }
.lede { margin-top: 10px; font-size: 15px; color: var(--ink-2); max-width: 860px; }
.summary-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-top: 22px; }
.findings ol { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: f; display: grid; gap: 12px; }
.findings li { counter-increment: f; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.findings li::before { content: counter(f); width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.findings li b { color: var(--ink); font-weight: 600; }
.response { position: relative; }
.response::before { content: ""; display: block; width: 40px; height: 3px; border-radius: 2px; background: var(--c); margin-bottom: 14px; }
.response .label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.response h3, .response .resp-title { font: 700 19px/1.25 var(--display); margin: 6px 0 2px; letter-spacing: -.01em; }
.response .big { font: 700 44px/1 var(--display); letter-spacing: -.03em; margin: 14px 0 2px; font-variant-numeric: tabular-nums; }
.response .big small { font: 500 13px var(--font); color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin: 14px 0; }
.mini-stats div { background: var(--surface-2); padding: 8px 10px; font-size: 12px; color: var(--ink-3); }
.mini-stats b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 1px; }
.response .caveat { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.kpi-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 12px; flex-wrap: wrap; }
.h-sub { font: 600 15px/1.3 var(--font); }
.h-sub span { color: var(--c, var(--ink)); }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.kpi.feature { background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.kpi-lbl { font-size: 12px; font-weight: 600; color: var(--ink-3); line-height: 1.3; min-height: 30px; }
.kpi-val { font: 700 24px/1.1 var(--display); letter-spacing: -.02em; margin: 6px 0 6px; white-space: nowrap; }
.kpi-val small { font: 600 13px var(--font); color: var(--ink-3); margin-left: 2px; }
.kpi-sub { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.kpi-foot { margin-top: auto; padding-top: 10px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.delta.good { color: var(--good); background: var(--good-bg); border-color: var(--good-line); }
.delta.bad { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.delta.flat { color: var(--ink-3); background: var(--surface-3); border-color: var(--line); }
.meter { position: relative; height: 6px; border-radius: 99px; background: var(--surface-3); margin-top: 8px; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--fill, var(--accent)); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.good { color: var(--good); } .status.warn { color: var(--warn); } .status.bad { color: var(--bad); }

/* ---------- comparison ---------- */
.range-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.legend-inline { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { display: inline-block; }
.lg-band { width: 18px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink-3) 30%, transparent); }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.lg-target { width: 0; height: 12px; border-left: 2px dashed var(--target); }
.table-card { padding: 0; overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
table.cmp th { text-align: right; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 12px 10px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; vertical-align: bottom; }
table.cmp th:first-child, table.cmp td:first-child { text-align: left; }
table.cmp th .sub { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }
table.cmp td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; color: var(--ink); white-space: nowrap; }
table.cmp tbody tr { cursor: pointer; transition: background .12s; }
table.cmp tbody tr:hover { background: var(--surface-2); }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp tbody tr.sel { background: color-mix(in srgb, var(--c) 6%, var(--surface)); }
table.cmp tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--c); }
.scn-cell { display: flex; align-items: center; gap: 10px; }
.scn-cell i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.scn-cell b { font-weight: 600; display: block; }
.scn-cell span { font-size: 12px; color: var(--ink-3); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }
.tag.best { color: var(--good); background: var(--good-bg); border: 1px solid var(--good-line); }
.tag.base { color: var(--ink-3); background: var(--surface-3); border: 1px solid var(--line); }
td .d { display: block; font-size: 12px; font-weight: 500; margin-top: 1px; }
td .d.good { color: var(--good); } td .d.bad { color: var(--bad); } td .d.flat { color: var(--ink-3); }
.pcell { display: inline-grid; grid-template-columns: 38px 64px; gap: 8px; align-items: center; justify-content: end; }
.pcell .bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pcell .bar span { display: block; height: 100%; border-radius: 99px; background: var(--fill); }
.pcell b { font-weight: 600; text-align: right; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 14px 0; }
.stat-row div { background: var(--surface-2); padding: 10px 12px; font-size: 12px; color: var(--ink-3); }
.stat-row b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.card-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.card-kicker i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.card h3.big-title { font: 700 17px/1.3 var(--display); letter-spacing: -.01em; }
.ship { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ship h4 { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.ship ul, .checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
.ship li, .checks li { position: relative; padding-left: 18px; line-height: 1.45; }
.ship li::before, .checks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--ink-4)); }
.ship .later li::before { background: transparent; border: 1.5px solid var(--ink-4); }
.checks li::before { width: 10px; height: 6px; border-radius: 0; background: none; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); top: 5px; }
.callout { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* ---------- schedule ---------- */
.bar-g { cursor: pointer; outline: none; }
.bar-g:hover .row-bg, .bar-g.on .row-bg { fill: var(--accent-soft); opacity: 1; }
.bar-g:focus-visible .row-bg { stroke: var(--accent); stroke-width: 2; }
#taskDetail { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
#taskDetail h4 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
#taskDetail .t-title { font: 700 17px/1.3 var(--display); margin-bottom: 2px; }
#taskDetail dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
#taskDetail dt { color: var(--ink-3); } #taskDetail dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.crit-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--crit); background: var(--bad-bg); border: 1px solid var(--bad-line); padding: 1px 7px; border-radius: 99px; margin-left: 8px; vertical-align: 2px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.chart-legend svg { width: 24px; height: 12px; display: inline-block; }

/* chart text */
svg text { font-family: var(--font); fill: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
svg .tx-strong { fill: var(--ink); font-weight: 600; }
svg .tx-ink2 { fill: var(--ink-2); }
svg .grid { stroke: var(--line); stroke-width: 1; }
svg .axis { stroke: var(--line-2); stroke-width: 1; }
svg .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
circle.q-both { fill: var(--good); } circle.q-time { fill: var(--s-delay); } circle.q-bud { fill: var(--s-current); } circle.q-none { fill: var(--bad); }
.dot-sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------- brief ---------- */
.doc { padding: 36px 44px; max-width: 900px; }
.doc .doc-meta { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 14px; border-bottom: 2px solid var(--ink); margin-bottom: 20px; flex-wrap: wrap; }
.doc .doc-meta span { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.doc h3 { font: 700 22px/1.25 var(--display); letter-spacing: -.015em; margin-bottom: 6px; }
.doc .doc-sub { color: var(--ink-3); font-size: 13px; margin-bottom: 18px; }
.doc h4 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 22px 0 8px; }
.doc p, .doc li { font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.doc ul, .doc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- assumptions ---------- */
.assump-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.assump-grid > .card { margin-bottom: 16px; }
table.at { width: 100%; border-collapse: collapse; font-size: 13px; }
table.at th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
table.at th small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; }
table.at td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.at tr:last-child td { border-bottom: 0; }
table.at td:first-child { font-weight: 600; white-space: nowrap; }
.fgrid { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; font-size: 13px; }
.fgrid > label { color: var(--ink-2); }
.tri { display: inline-flex; gap: 4px; }
input[type=number], input[type=date], select { font: inherit; font-size: 13px; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; min-width: 0; }
input[type=number]:hover, input[type=date]:hover, select:hover { border-color: var(--ink-4); }
input[type=number]:focus, input[type=date]:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.tri input { width: 64px; } .fgrid input[type=number], .fgrid select, .fgrid input[type=date] { width: 140px; }
table.at input[type=number] { width: 72px; }
.mod { box-shadow: inset 0 0 0 1px var(--accent) !important; background: var(--accent-soft) !important; }
.method ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- drawer ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw; z-index: 40; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(102%); transition: transform .22s ease; visibility: hidden; }
body.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 700 18px/1.25 var(--display); }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 22px 22px; }
.drawer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }
.lv-group { padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.lv-group:last-child { border-bottom: 0; }
.lv-group h3 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.lv-group h3 i { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--ink-4)); }
.lv-group > p { font-size: 12px; color: var(--ink-3); margin: 4px 0 2px; }
.lever { padding: 12px 0 6px; }
.lever-top { display: flex; align-items: center; gap: 8px; }
.lever-top label { flex: 1; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.lever-top .moddot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); visibility: hidden; }
.lever.is-mod .moddot { visibility: visible; }
.lever-top .val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; color: var(--ink); }
.lever-top .undo { border: 0; background: none; color: var(--accent-ink); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; visibility: hidden; }
.lever.is-mod .undo { visibility: visible; }
.lever .hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.lever .row { display: flex; align-items: center; gap: 10px; }
.lever input[type=date], .lever select { width: 100%; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 4px 0 0; cursor: pointer; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(to right, var(--accent) 0 var(--p), var(--line-2) var(--p) 100%); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 99px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); margin-top: -6px; box-shadow: 0 1px 3px rgba(27,31,36,.2); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.scrim { position: fixed; inset: 0; background: rgba(27, 31, 36, .18); z-index: 35; }

/* tooltip */
.tip { position: fixed; z-index: 60; pointer-events: none; max-width: 300px; background: #1b1f24; color: #f5f2eb; font-size: 12px; line-height: 1.45; padding: 9px 11px; border-radius: 8px; box-shadow: var(--shadow-lg); }
.tip b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.tip .tr { display: flex; justify-content: space-between; gap: 16px; } .tip .tr span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- responsive ---------- */
@media (min-width: 1500px) { body.drawer-open .shell { padding-right: 400px; } body.drawer-open .scrim { display: none; } }
@media (max-width: 1320px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .appbar-meta { display: none; } }
@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidenav { display: none; }
  main { padding: 24px 24px 40px; }
  .summary-grid, .two-col, .range-grid, .assump-grid { grid-template-columns: 1fr; }
  #taskDetail { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --chrome-h: 160px; }
  .appbar { padding: 0 16px; gap: 12px; }
  .appbar-actions .btn { padding: 0 9px; font-size: 0; gap: 0; }
  .appbar-actions .btn svg { width: 16px; height: 16px; }
  .crumbs { display: none; }
  .toolbar-inner { flex-wrap: wrap; padding: 8px 16px; gap: 8px; }
  .tb-label { display: none; }
  .toolbar .segmented { order: 2; flex-basis: 100%; max-width: none; overflow-x: auto; }
  .segmented button { flex: none; }
  #drawerBtn { margin-left: 0; }
  main { padding: 20px 16px 32px; }
  .verdict { font-size: 23px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-val { font-size: 20px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .ship, #taskDetail { grid-template-columns: 1fr; }
  .doc { padding: 22px 18px; }
  .card { padding: 16px; }
  .sim-banner { font-size: 12px; gap: 8px; padding: 6px 12px; }
  .sim-banner > span:nth-child(2) { display: none; }
  .fgrid { grid-template-columns: 1fr; gap: 4px 0; }
  .fgrid > label { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .drawer, .shell, .switch span, .switch span::after { transition: none; } }

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; }
  .chrome, .sidenav, .drawer, .scrim, .tip, .skip, .sec-tools, .switch, #copyBtn { display: none !important; }
  .shell { display: block; max-width: none; }
  main { padding: 0; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .sec { break-before: auto; margin-bottom: 28px; }
  .sim-banner { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table-card { overflow: visible; }
  table.cmp { min-width: 0; }
}
table.cmp td:first-child { white-space: normal; min-width: 210px; padding-left: 16px; }
table.cmp th:first-child { padding-left: 16px; }
table.cmp td:last-child, table.cmp th:last-child { padding-right: 16px; }
.pcell { grid-template-columns: 34px 48px; }

/* ---------- theme toggle ---------- */
#themeBtn .ic-sun { display: none; }
:root[data-theme="dark"] #themeBtn .ic-sun { display: block; }
:root[data-theme="dark"] #themeBtn .ic-moon { display: none; }

/* ---------- hero KPI: joint odds drop ---------- */
.hero-kpi { display: flex; flex-direction: column; gap: 14px; }
.hero-kpi .label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.hero-kpi .q { font: 600 15px/1.35 var(--font); color: var(--ink); margin-top: 4px; }
.hero-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-num { display: flex; flex-direction: column; }
.hero-num b { font: 700 56px/1 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.hero-num span { font-size: 12px; color: var(--ink-3); margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }
.hero-num span i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.hero-num.from b { color: var(--good); }
.hero-num.to b { color: var(--bad); }
.hero-arrow { width: 40px; height: 20px; color: var(--ink-4); flex: none; margin-bottom: 18px; }
.hero-delta { margin-left: auto; align-self: flex-start; font-size: 13px; padding: 3px 10px; }
.hero-bars { display: grid; gap: 7px; }
.hero-bar { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.hero-bar .track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hero-bar .track span { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.hero-bar b { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.hero-context { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hero-context div { background: var(--surface-2); padding: 10px 12px; font-size: 12px; color: var(--ink-3); }
.hero-context b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; margin: 2px 0 1px; }
.hero-context small { font-size: 12px; color: var(--ink-3); }
.hero-note { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.findings { margin-top: 16px; }
.findings ol { grid-template-columns: 1fr 1fr; column-gap: 28px; }
@media (max-width: 1100px) { .findings ol { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .hero-num b { font-size: 42px; }
  .hero-context { grid-template-columns: 1fr; }
  .hero-delta { margin-left: 0; }
  .hero-bar { grid-template-columns: 92px 1fr 40px; }
  #themeBtn span { display: none; }
}

/* ---------- Porcelain, Champagne & Slate: typography and accents ---------- */
.verdict { font: 400 42px/1.08 var(--serif); letter-spacing: -.018em; max-width: 900px; }
.sec-head h2 { font: 400 32px/1.1 var(--serif); letter-spacing: -.015em; }
.product { font: 400 20px/1.1 var(--serif); letter-spacing: -.005em; }
.card h3.big-title, .response h3, .response .resp-title, .doc h3, .drawer-head h2, #taskDetail .t-title { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.card h3.big-title, .response h3, .response .resp-title, #taskDetail .t-title { font-size: 23px; }
.doc h3 { font-size: 30px; } .drawer-head h2 { font-size: 24px; }
.eyebrow, .nav-title, .card-kicker, .response .label, .hero-kpi .label, #taskDetail h4, .doc .doc-meta span, .doc h4, .lv-group h3, .sim-chip, .tb-label {
  font-family: var(--mono); font-weight: 500; letter-spacing: .11em; text-transform: uppercase; font-size: 12px; }
.tb-label { text-transform: none; letter-spacing: .04em; font-size: 12px; }
.eyebrow { color: var(--accent-ink); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--champagne); flex: none; }
.doc h4 { color: var(--accent-ink); }
.sim-chip { letter-spacing: .08em; font-size: 12px; }
/* icy-blue highlights */
.kpi.feature { background: linear-gradient(180deg, var(--ice), var(--surface) 72%); border-color: var(--ice-line); }
.hero-kpi { background: linear-gradient(180deg, var(--ice), var(--surface) 46%); border-color: var(--ice-line); }
.sidenav a.active { background: var(--ice); box-shadow: inset 2px 0 0 var(--ice-ink); color: var(--ink); }
.callout { background: var(--ice); border-color: var(--ice-line); }
.findings li::before { background: var(--accent-soft); color: var(--accent-ink); }
.mini-stats div, .stat-row div, .hero-context div { background: var(--surface-2); }
/* hairline champagne under the light header */
.appbar { box-shadow: inset 0 -1px 0 var(--brand-line); border-bottom: 0; }
.toolbar { border-bottom-color: var(--line); }
.chrome::after { content: ""; display: block; height: 1px; background: linear-gradient(90deg, transparent, var(--champagne) 30%, var(--champagne) 70%, transparent); opacity: .55; }
@media (max-width: 720px) { .verdict { font-size: 32px; } .sec-head h2 { font-size: 27px; } .product { font-size: 18px; } }
table.at th small, small { font-size: 12px; }
table.cmp th { letter-spacing: .02em; }
