:root {
  color-scheme: light;
  --canvas: #f3f3f1;
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #333333;
  --muted: #767674;
  --muted-light: #a7a7a3;
  --line: #e2e2de;
  --line-strong: #c8c8c2;
  --accent: #e74725;
  --accent-soft: #fff0ec;
  --dark: #0c0c0c;
  --font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Futura Condensed ExtraBold", "Helvetica Neue Condensed Black", "Arial Narrow", "Arial Black", sans-serif;
  --font-condensed: "Helvetica Neue Condensed Bold", "Avenir Next Condensed", "Arial Narrow", "Arial Black", sans-serif;
  --radius-control: 5px;
  --radius-panel: 8px;
  --sidebar-width: 196px;
  --topbar-height: 54px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-fast: cubic-bezier(.22, 1, .36, 1);
  --duration-fast: 180ms;
  --duration-standard: 420ms;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-height: 100%; margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-ui); }
button, input { font: inherit; }
button { cursor: pointer; }
button, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-width: 900px; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; border-right: 1px solid #242424; background: var(--dark); color: var(--paper); }
.brand { display: grid; grid-template-columns: 58px minmax(0, 1fr); min-height: 92px; align-items: center; gap: var(--space-3); padding: 0 var(--space-4); border-bottom: 1px solid #242424; }
.brand-mark { display: block; width: 58px; height: 38px; object-fit: contain; filter: invert(1); }
.brand > span:last-child, .manager div { display: grid; gap: 2px; }
.brand strong { font-family: var(--font-condensed); font-size: 12px; font-weight: 900; letter-spacing: .035em; line-height: 1; text-transform: uppercase; }
.manager strong { font-size: 10px; font-weight: 650; }
.brand small, .manager small { color: #777; font-size: 8px; }
.sidebar nav { display: grid; gap: 0; padding: var(--space-4) 0; }
.sidebar nav p { margin: var(--space-4) var(--space-5) var(--space-2); color: #5d5d5d; font-family: var(--font-condensed); font-size: 7px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.sidebar nav button { display: grid; grid-template-columns: 27px minmax(0, 1fr); min-height: 42px; align-items: center; padding: 0 var(--space-4); border: 0; border-left: 3px solid transparent; border-radius: 0; background: transparent; color: #8d8d8d; font-family: var(--font-condensed); font-size: 10px; font-weight: 800; letter-spacing: .025em; line-height: 1.08; text-align: left; text-transform: uppercase; transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease, color var(--duration-fast) ease; }
.sidebar nav button:hover { background: #181818; color: var(--paper); }
.sidebar nav button.active { border-left-color: var(--accent); background: #1b1b1b; color: var(--paper); font-weight: 900; }
.nav-index { color: #5f5f5f; font-family: var(--font-ui); font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.sidebar nav button.active .nav-index { color: var(--accent); }
.manager { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); margin-top: auto; padding: var(--space-4); border-top: 1px solid #242424; }
.manager > span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #3b3b3b; border-radius: 50%; color: #c9c9c9; font-size: 8px; font-weight: 650; }
.manager i { color: #5c5c5c; font-size: 8px; font-style: normal; }

.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; height: var(--topbar-height); align-items: center; justify-content: space-between; gap: var(--space-4); padding: 0 var(--space-6); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-condensed); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.topbar-mark { display: none; width: 36px; height: 22px; object-fit: contain; }
.breadcrumb span, .breadcrumb i { color: var(--muted-light); font-style: normal; }
.breadcrumb strong { color: var(--ink-soft); font-weight: 650; }
.top-actions { display: flex; gap: var(--space-2); }
.ghost-action, .solid-action, .primary-action { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; gap: var(--space-2); padding: 0 var(--space-3); border-radius: var(--radius-control); font-family: var(--font-condensed); font-size: 9px; font-weight: 900; letter-spacing: .025em; text-transform: uppercase; transition: transform var(--duration-fast) var(--ease-fast), background var(--duration-fast) ease, color var(--duration-fast) ease; }
.ghost-action { border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); }
.solid-action, .primary-action { border: 1px solid var(--dark); background: var(--dark); color: var(--paper); }
.ghost-action:hover, .solid-action:hover, .primary-action:hover:not(:disabled) { transform: translateY(-1px); }
.solid-action:hover, .primary-action:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.primary-action:disabled { cursor: not-allowed; opacity: .35; }

.page { display: grid; gap: var(--space-4); padding: var(--space-5); }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--paper); }
.eyebrow { display: block; margin-bottom: 6px; color: var(--muted); font-family: var(--font-condensed); font-size: 7px; font-weight: 900; letter-spacing: .13em; }
h2 { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0; }
p { letter-spacing: 0; }

.task-banner { display: grid; grid-template-columns: 106px minmax(0, 1fr); min-height: 118px; overflow: hidden; border-radius: var(--radius-panel); background: var(--dark); color: var(--paper); animation: rise var(--duration-standard) var(--ease-out) both; }
.task-label { display: flex; flex-direction: column; justify-content: space-between; padding: var(--space-5); border-right: 1px solid #292929; }
.task-label span { color: #777; font-family: var(--font-condensed); font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.task-label i { color: var(--accent); font-size: 9px; font-style: normal; font-weight: 700; }
.task-copy { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding: var(--space-5) var(--space-6); }
.task-copy strong { display: block; max-width: 640px; font-family: var(--font-display); font-size: clamp(18px, 2vw, 28px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.task-copy p { margin: var(--space-2) 0 0; color: #9d9d9d; font-size: 9px; line-height: 1.5; }
.task-progress { display: flex; flex: none; gap: 5px; }
.task-progress i { width: 30px; height: 3px; background: #333; }
.task-progress i.complete { background: var(--accent); animation: progressIn var(--duration-standard) var(--ease-out) both; }

.flow-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--paper); }
.flow-nav button { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; min-height: 64px; align-content: center; padding: 0 var(--space-4); border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; transition: background var(--duration-fast) ease, color var(--duration-fast) ease; }
.flow-nav button:last-child { border-right: 0; }
.flow-nav button:hover { background: #f8f8f6; }
.flow-nav button.selected { background: var(--ink); color: var(--paper); }
.flow-nav button.selected::before { position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); content: ""; }
.flow-nav span { grid-row: 1 / 3; align-self: center; color: var(--muted-light); font-size: 8px; font-weight: 700; }
.flow-nav button.selected span { color: var(--accent); }
.flow-nav strong { font-family: var(--font-condensed); font-size: 10px; font-weight: 900; letter-spacing: .02em; line-height: 1.05; text-transform: uppercase; }
.flow-nav small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.kpi-strip article { display: grid; min-height: 120px; align-content: center; padding: var(--space-5); border-right: 1px solid var(--line); opacity: 0; transform: translateY(8px); animation: rise var(--duration-standard) var(--ease-out) var(--delay) forwards; }
.kpi-strip article:last-child { border-right: 0; }
.kpi-strip article > span { color: var(--muted); font-size: 8px; }
.kpi-strip article > strong { margin-top: var(--space-2); font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 36px); font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.delta { display: flex; align-items: center; gap: 6px; margin-top: var(--space-2); font-size: 8px; font-weight: 700; }
.delta small { color: var(--muted); font-size: 7px; font-weight: 400; }
.negative { color: var(--accent) !important; }
.positive { color: var(--ink-soft) !important; }

.insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: var(--space-4); }
.performance-panel { padding: var(--space-5); }
.panel-head, .analysis-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); }
.period-note { padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--muted); font-size: 8px; }
.product-list-head, .product-row { display: grid; grid-template-columns: 34px minmax(95px, .65fr) minmax(120px, 1.2fr) 86px 52px; gap: var(--space-3); align-items: center; }
.product-list-head { margin-top: var(--space-5); padding: 0 var(--space-2) var(--space-2); color: var(--muted-light); font-family: var(--font-condensed); font-size: 7px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.product-list { border-top: 1px solid var(--line); }
.product-row { position: relative; width: 100%; min-height: 56px; padding: 0 var(--space-2); border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; opacity: 0; transform: translateY(6px); animation: rise var(--duration-standard) var(--ease-out) var(--delay) forwards; transition: background var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.product-row:last-child { border-bottom: 0; }
.product-row:hover { background: #f7f7f5; }
.product-row.selected { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.product-row.anomaly:not(.selected)::after { position: absolute; right: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); content: ""; }
.rank { color: var(--muted-light); font-size: 8px; font-weight: 700; }
.product-name, .product-value { display: grid; gap: 3px; }
.product-name strong, .product-value strong { font-size: 9px; font-weight: 650; }
.product-name small, .product-value small { color: var(--muted); font-size: 7px; }
.product-bar { height: 5px; overflow: hidden; background: #ededeb; }
.product-bar i { display: block; width: var(--bar); height: 100%; background: var(--ink); transform-origin: left; animation: barIn 620ms var(--ease-out) both; }
.product-row.selected .product-bar i, .product-row.anomaly .product-bar i { background: var(--accent); }
.product-change { justify-self: end; font-size: 9px; font-weight: 700; }

.finding-panel { display: flex; flex-direction: column; min-height: 100%; padding: var(--space-5); border-radius: var(--radius-panel); background: var(--dark); color: var(--paper); }
.finding-panel .eyebrow { color: #6f6f6f; }
.finding-number { margin-top: auto; color: var(--accent); font-family: var(--font-display); font-size: clamp(44px, 6vw, 74px); font-weight: 800; letter-spacing: -.07em; }
.finding-panel p { margin: var(--space-3) 0 var(--space-5); color: #969696; font-size: 9px; line-height: 1.55; }
.finding-panel p b { color: var(--paper); font-weight: 550; }
.finding-panel .primary-action { width: 100%; justify-content: space-between; border-color: var(--paper); background: var(--paper); color: var(--ink); }
.finding-panel .primary-action:hover { border-color: var(--accent); background: var(--accent); color: var(--paper); }

.analysis-panel, .transaction-panel { scroll-margin-top: calc(var(--topbar-height) + var(--space-4)); }
.analysis-panel { padding: var(--space-5); }
.analysis-head p { margin: 6px 0 0; color: var(--muted); font-size: 8px; }
.range-control { display: flex; flex: none; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-control); background: #f6f6f4; }
.range-control button { min-height: 28px; min-width: 58px; padding: 0 var(--space-2); border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 8px; font-weight: 650; }
.range-control button.selected { background: var(--ink); color: var(--paper); }
.analysis-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(240px, .8fr); gap: var(--space-4); margin-top: var(--space-5); }
.trend-panel, .cause-panel { min-width: 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); }
.subhead { display: flex; align-items: end; justify-content: space-between; gap: var(--space-4); }
.subhead > div:first-child { display: grid; gap: 5px; }
.subhead span { color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .1em; }
.subhead strong { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.trend-delta { display: grid; gap: 2px; text-align: right; font-size: 10px; font-weight: 700; }
.trend-delta small { color: var(--muted); font-size: 7px; font-weight: 400; }
.trend-wrap { position: relative; margin-top: var(--space-3); }
.chart-legend { display: flex; justify-content: flex-end; gap: var(--space-4); color: var(--muted); font-size: 7px; }
.chart-legend span::before { display: inline-block; width: 10px; height: 2px; margin-right: 5px; background: #aaa; vertical-align: middle; content: ""; }
.chart-legend .current::before { background: var(--accent); }
.chart-plot { position: relative; height: 176px; margin-top: var(--space-2); }
.chart-grid { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(4, 1fr); }
.chart-grid i { border-top: 1px solid #eeeeeb; }
.chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trend-line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawLine 900ms var(--ease-out) forwards; }
.trend-line.previous { stroke: #b8b8b4; stroke-dasharray: 4 5; animation-delay: 80ms; }
.trend-line.current { stroke: var(--accent); stroke-width: 2; }
.chart-point { position: absolute; z-index: 3; left: var(--x); top: var(--y); width: 10px; height: 10px; padding: 0; border: 2px solid var(--paper); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); transform: translate(-50%, -50%); transition: width var(--duration-fast) ease, height var(--duration-fast) ease; }
.chart-point:hover, .chart-point:focus-visible { width: 14px; height: 14px; }
.chart-tooltip { position: absolute; z-index: 5; width: 160px; padding: 10px; border-radius: var(--radius-control); background: var(--dark); color: var(--paper); box-shadow: 0 12px 30px rgba(0,0,0,.18); transform: translate(-50%, -100%); pointer-events: none; }
.chart-tooltip span, .chart-tooltip small { display: block; color: #8f8f8f; font-size: 7px; }
.chart-tooltip strong { display: block; margin: 4px 0; font-size: 13px; }
.chart-days { display: flex; justify-content: space-between; padding-top: 4px; color: var(--muted-light); font-size: 6px; }
.cause-list { display: grid; gap: 0; margin-top: var(--space-3); border-top: 1px solid var(--line); }
.cause-list article { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr); gap: var(--space-2); align-items: center; min-height: 67px; border-bottom: 1px solid var(--line); opacity: 0; animation: rise var(--duration-standard) var(--ease-out) var(--delay) forwards; }
.cause-list article > span { color: var(--muted-light); font-size: 7px; font-weight: 700; }
.cause-list article > strong { color: var(--accent); font-family: var(--font-display); font-size: 14px; font-weight: 800; white-space: nowrap; }
.cause-list article div { display: grid; gap: 3px; }
.cause-list b { font-size: 8px; }
.cause-list p { margin: 0; color: var(--muted); font-size: 7px; line-height: 1.35; }
.linked-note { display: flex; min-height: 34px; align-items: center; gap: var(--space-2); margin-top: var(--space-3); padding: 0 var(--space-3); background: #f6f6f4; color: var(--muted); font-size: 7px; }
.linked-note i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: beacon 1.8s ease-in-out infinite; }
.linked-note span { color: var(--ink-soft); font-weight: 700; }
.linked-note p { margin: 0; }

.transaction-panel { padding: var(--space-5) var(--space-5) 0; }
.search-field { display: flex; height: 32px; align-items: center; gap: var(--space-2); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--muted); font-size: 7px; }
.search-field input { width: 112px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 8px; }
.search-field input::placeholder { color: var(--muted-light); }
.table-scroll { margin: var(--space-4) calc(var(--space-5) * -1) 0; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { height: 42px; padding: 0 var(--space-5); border-top: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 8px; }
th { color: var(--muted-light); font-size: 7px; font-weight: 650; text-transform: uppercase; }
td { color: var(--ink-soft); }
td strong, td small { display: block; }
td strong { font-weight: 650; }
td small { margin-top: 2px; color: var(--muted); font-size: 7px; }
tbody tr { transition: background var(--duration-fast) ease; }
tbody tr:hover { background: #f8f8f6; }
.status { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 7px; font-weight: 650; }
.status.complete { background: var(--ink); color: var(--paper); }
.status.warning { background: var(--accent-soft); color: var(--accent); }
.empty-row { height: 80px; color: var(--muted); text-align: center; }

.history-layout { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: var(--space-4); scroll-margin-top: calc(var(--topbar-height) + var(--space-4)); }
.history-chart-panel { padding: var(--space-5); }
.history-callout { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px var(--space-4); margin-top: var(--space-4); padding: var(--space-4); border-left: 3px solid var(--accent); background: var(--accent-soft); }
.history-callout span { grid-row: 1 / 3; color: var(--accent); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.history-callout strong { font-size: 10px; }
.history-callout p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.report-list { padding: var(--space-5); }
.report-list > button { display: flex; width: 100%; min-height: 74px; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3); border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; transition: background var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.report-list > button:first-of-type { margin-top: var(--space-4); }
.report-list > button:hover { background: #f7f7f5; }
.report-list > button.selected { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.report-list button > span { display: grid; gap: 4px; }
.report-list button > span:last-child { justify-items: end; }
.report-list strong, .report-list b { font-size: 8px; }
.report-list small, .report-list i { color: var(--muted); font-size: 7px; font-style: normal; }

.decision-panel { display: grid; grid-template-columns: 34% minmax(0, 1fr); overflow: hidden; border-radius: var(--radius-panel); background: var(--dark); color: var(--paper); scroll-margin-top: calc(var(--topbar-height) + var(--space-4)); }
.decision-summary { padding: var(--space-6); border-right: 1px solid #292929; }
.decision-summary .eyebrow { color: var(--accent); }
.decision-summary h2 { max-width: 280px; font-size: clamp(19px, 2.3vw, 30px); font-weight: 800; line-height: 1.02; }
.decision-summary p { margin: var(--space-4) 0; color: #929292; font-size: 8px; line-height: 1.55; }
.confidence { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; margin-top: var(--space-6); }
.confidence span { color: #777; font-size: 7px; }
.confidence strong { font-size: 8px; }
.confidence i { grid-column: 1 / 3; height: 3px; background: #2c2c2c; }
.confidence b { display: block; width: 86%; height: 100%; background: var(--accent); animation: barIn 700ms var(--ease-out) both; }
.action-list { padding: var(--space-3) var(--space-5); }
.action-list article { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; min-height: 68px; align-items: center; gap: var(--space-3); border-bottom: 1px solid #292929; opacity: 0; animation: rise var(--duration-standard) var(--ease-out) var(--delay) forwards; }
.action-index { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #383838; border-radius: 50%; color: #777; font-size: 7px; }
.action-list article.complete .action-index { border-color: var(--accent); background: var(--accent); color: var(--paper); }
.action-list article div { display: grid; gap: 4px; }
.action-list article strong { font-size: 9px; }
.action-list article p { margin: 0; color: #777; font-size: 7px; line-height: 1.4; }
.action-list article button { min-width: 68px; min-height: 28px; border: 1px solid #3b3b3b; border-radius: var(--radius-control); background: transparent; color: #c3c3c3; font-size: 7px; font-weight: 650; }
.action-list article button:hover { border-color: var(--accent); color: var(--paper); }
.action-list article.complete button { border-color: #303030; color: #666; }
.decision-state { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: var(--space-4); color: #656565; font-size: 7px; }
.decision-state.active { color: #bcbcbc; }
.decision-state .primary-action { min-height: 30px; border-color: #3b3b3b; }

.toast { position: fixed; z-index: 100; right: var(--space-4); bottom: var(--space-4); max-width: 300px; padding: 10px var(--space-3); border-radius: var(--radius-control); background: var(--accent); color: var(--paper); box-shadow: 0 16px 32px rgba(0,0,0,.18); font-size: 9px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity var(--duration-fast) ease, transform var(--duration-fast) var(--ease-fast); }
.toast.visible { opacity: 1; transform: none; }
[hidden] { display: none !important; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes progressIn { from { transform: scaleX(0); transform-origin: left; } }
@keyframes barIn { from { transform: scaleX(0); transform-origin: left; } }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes beacon { 50% { box-shadow: 0 0 0 5px rgba(231,71,37,.12); } }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 156px minmax(0, 1fr); min-width: 760px; }
  .sidebar { --sidebar-width: 156px; }
  .brand { grid-template-columns: 40px minmax(0, 1fr); padding-inline: var(--space-3); }
  .brand-mark { width: 40px; }
  .sidebar nav button { padding-inline: var(--space-3); font-size: 8px; }
  .insight-grid, .history-layout { grid-template-columns: minmax(0, 1fr) 200px; }
  .analysis-layout { grid-template-columns: 1fr; }
  .decision-panel { grid-template-columns: 30% minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 12px; }
  .app-shell { display: block; min-width: 0; }
  .sidebar { display: none; }
  .topbar { height: 48px; padding: 0 var(--space-3); }
  .topbar-mark { display: block; }
  .breadcrumb, .ghost-action, .solid-action, .primary-action { font-size: 10px; }
  .breadcrumb span, .breadcrumb i { display: none; }
  .page { gap: var(--space-3); padding: var(--space-3); }
  .task-banner { grid-template-columns: 78px minmax(0, 1fr); }
  .task-label { padding: var(--space-3); }
  .task-label span, .task-label i { font-size: 9px; }
  .task-copy { padding: var(--space-4); }
  .task-copy strong { font-size: 17px; }
  .task-copy p { font-size: 10px; }
  .task-progress { display: none; }
  .flow-nav { display: flex; overflow-x: auto; }
  .flow-nav button { min-width: 190px; border-right: 1px solid var(--line); }
  .flow-nav span { font-size: 9px; }
  .flow-nav strong { font-size: 11px; }
  .flow-nav small { font-size: 9px; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip article:nth-child(2) { border-right: 0; }
  .kpi-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .kpi-strip article > span, .delta { font-size: 10px; }
  .delta small { font-size: 9px; }
  .insight-grid, .history-layout, .decision-panel { grid-template-columns: 1fr; }
  .eyebrow { font-size: 9px; }
  h2 { font-size: 18px; }
  .period-note { font-size: 10px; }
  .finding-panel { min-height: 260px; }
  .finding-panel p { font-size: 11px; }
  .analysis-head, .panel-head { flex-direction: column; }
  .analysis-head p { font-size: 10px; }
  .range-control { width: 100%; }
  .range-control button { flex: 1; }
  .decision-summary { border-right: 0; border-bottom: 1px solid #292929; }
  .product-list-head, .product-row { grid-template-columns: 28px minmax(90px, 1fr) 78px 44px; }
  .product-list-head span:nth-child(3), .product-row .product-bar { display: none; }
  .product-name strong, .product-value strong { font-size: 11px; }
  .product-name small, .product-value small, .rank { font-size: 9px; }
  .product-change { font-size: 10px; }
  .search-field { width: 100%; }
  .search-field input { width: 100%; }
  .search-field, .search-field input { font-size: 10px; }
  .subhead span, .chart-legend, .chart-days { font-size: 8px; }
  .cause-list article > span, .cause-list p { font-size: 9px; }
  .cause-list b { font-size: 10px; }
  .linked-note { font-size: 9px; }
  th { font-size: 9px; }
  td { font-size: 10px; }
  td small, .status { font-size: 9px; }
  .history-callout { grid-template-columns: 1fr; }
  .history-callout span { grid-row: auto; }
  .history-callout span, .history-callout p, .report-list strong, .report-list b, .report-list small, .report-list i { font-size: 10px; }
  .decision-summary p { font-size: 10px; }
  .confidence span, .confidence strong { font-size: 9px; }
  .action-list article strong { font-size: 11px; }
  .action-index { font-size: 9px; }
  .action-list article p, .action-list article button, .decision-state { font-size: 9px; }
}

@media (max-width: 460px) {
  .top-actions .ghost-action { display: none; }
  .task-banner { display: block; }
  .task-label { flex-direction: row; border-right: 0; border-bottom: 1px solid #292929; }
  .kpi-strip article { min-height: 100px; padding: var(--space-3); }
  .kpi-strip article > strong { font-size: 22px; }
  .performance-panel, .analysis-panel, .transaction-panel, .history-chart-panel, .report-list { padding: var(--space-4); }
  .product-list-head { display: none; }
  .product-list { margin-top: var(--space-4); }
  .product-row { grid-template-columns: 24px minmax(82px, 1fr) 70px 40px; gap: 6px; }
  .analysis-layout { gap: var(--space-3); }
  .cause-list article { grid-template-columns: 20px 56px minmax(0, 1fr); }
  .action-list { padding-inline: var(--space-3); }
  .action-list article { grid-template-columns: 24px minmax(0, 1fr); padding: var(--space-2) 0; }
  .action-list article button { grid-column: 2; justify-self: start; }
  .decision-state { align-items: flex-start; flex-direction: column; padding: var(--space-3) 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
