@font-face {
  font-family: "System Sans";
  src: local("Inter"), local("Aptos"), local("Segoe UI");
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Current Spot storefront palette; see BRAND.md for the original assets. */
  --brand-burgundy: #600a24;
  --brand-coral: #f47957;
  --ink: #33272c;
  --ink-strong: #2a1c22;
  --muted: #75666d;
  --subtle: #968890;
  --accent: var(--brand-burgundy);
  --accent-hover: #47071b;
  --accent-soft: #fff1ec;
  --accent-line: #edc2b5;
  --focus: #ad4c39;
  --positive: #176b50;
  --positive-soft: #edf7f1;
  --positive-line: #b8d9c7;
  --blue: #557caa;
  --purple: #8670b5;
  --amber: #b5873c;
  --red: #b4233e;
  --red-soft: #fcf0ef;
  --border: #e9e1e4;
  --border-soft: #f1ebee;
  --canvas: #faf8f9;
  --white: #fff;
  --radius: 12px;
  font-family: "System Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

/* Shared foundations and account-page components. */
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, select, input { font: inherit; }
button { appearance: none; cursor: pointer; }
button, select, a, summary { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button svg { flex-shrink: 0; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
strong { font-weight: 650; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 16px; border-radius: 6px; background: var(--accent); color: white; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.site-header { height: 76px; background: var(--white); border-bottom: 2px solid var(--brand-coral); }
.header-inner { max-width: 1440px; height: 100%; padding: 0 32px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { display: block; width: 128px; height: auto; }
.brand-divider { height: 20px; width: 1px; margin: 0 8px; background: var(--border); }
.brand-descriptor, .header-label { color: var(--muted); font-size: .875rem; }
.header-label { display: flex; align-items: center; gap: 7px; }
h1 { color: var(--ink-strong); font-size: 1.9rem; letter-spacing: -.04em; font-weight: 700; line-height: 1.2; }
h2 { color: var(--ink-strong); font-size: 1.0625rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.4; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 22px; }
.page-subtitle { margin-top: 7px; color: var(--muted); font-size: .9375rem; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: 7px; font-size: .875rem; line-height: 1.35; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.button-primary { background: var(--accent); color: white; border-color: var(--accent); }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-secondary { background: white; color: var(--ink); border-color: var(--border); }
.button-secondary:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.text-button { background: none; border: 0; padding: 4px 0; color: var(--accent); font-size: .875rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--accent-hover); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 6px; border: 1px solid transparent; border-radius: 7px; background: #f5eff2; color: var(--muted); }
.icon-button:hover { background: #ede4e8; }
.eyebrow { display: block; color: var(--accent); font-size: .8125rem; font-weight: 600; margin-bottom: 4px; }
.positive { color: var(--positive) !important; }
.negative { color: var(--red) !important; }
.muted { color: var(--muted) !important; }
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; background: #f4eef1; color: var(--muted); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.badge.warning, .badge.partial { background: #fff3db; color: #8e6c2c; }

/* Dashboard controls and summary. */
.dashboard { max-width: 1440px; padding: 28px 32px 36px; margin: 0 auto; }
.range-summary { color: var(--ink); font-size: .875rem; font-weight: 500; margin-top: 8px; line-height: 1.65; }
.range-summary span { color: var(--muted); font-weight: 400; }
.range-summary .range-status { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 7px; border: 1px solid #e4d5ad; border-radius: 5px; background: #fff9ec; color: #82682f; font-size: .8125rem; font-weight: 500; line-height: 1.6; vertical-align: middle; }
.controls-panel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 15px 22px; padding: 15px 18px; margin-bottom: 16px; background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.control-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.control-group--store { grid-column: span 4; }
.control-group--frequency { grid-column: span 5; }
.control-group--preset { grid-column: span 3; }
.control-group--date { grid-column: span 6; }
.control-label { color: var(--muted); font-size: .875rem; font-weight: 500; line-height: 1.3; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; min-height: 40px; border: 1px solid transparent; border-radius: 7px; background: #f5eff2; }
.segmented button { flex: 1 1 auto; padding: 6px 11px; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--muted); font-size: .875rem; line-height: 1.3; font-weight: 500; white-space: nowrap; transition: color .15s, background .15s; }
.segmented button:hover:not(:disabled) { color: var(--ink); background: var(--border-soft); }
.segmented button.is-active, .segmented button.active, .segmented button[aria-pressed="true"] { color: var(--accent); background: white; border-color: var(--accent-line); box-shadow: 0 1px 2px #600a240a; font-weight: 650; }
.frequency-selector button { padding-right: 6px; padding-left: 6px; font-size: .875rem; }
select { width: 100%; height: 40px; min-width: 0; padding: 8px 34px 8px 12px; border: 1px solid var(--border); border-radius: 7px; appearance: none; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2361717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center; color: var(--ink); font-size: .875rem; cursor: pointer; text-overflow: ellipsis; }
select:hover { border-color: var(--accent-line); }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px 13px; text-align: left; border: 1px solid var(--border); border-radius: 10px; background: white; color: var(--ink); transition: border-color .15s, background .15s; }
.metric-card:hover { border-color: var(--accent-line); background: #fffaf8; }
.metric-card.is-active, .metric-card.active, .metric-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.metric-top { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 7px; }
.metric-label { color: var(--muted); font-size: .875rem; font-weight: 500; line-height: 1.3; }
.metric-icon { display: none; }
.metric-card.is-active .metric-label, .metric-card.active .metric-label { color: var(--accent); }
.metric-value { color: var(--ink-strong); font-size: clamp(1.35rem, 2.05vw, 1.75rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-subtitle { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.4; margin-top: 6px; }
.metric-subtitle strong { font-weight: 600; }
.metric-note { display: block; color: var(--muted); font-size: .75rem; line-height: 1.4; margin-top: 2px; }

/* The chart is the main working area. */
.panel { min-width: 0; background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-subtitle { margin-top: 5px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.chart-panel { padding: 20px 22px 16px; margin-bottom: 18px; }
.chart-heading { align-items: center; flex-wrap: wrap; gap: 16px 22px; }
.chart-heading > div:first-child { flex: 1 1 250px; }
.chart-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.chart-control { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.chart-mode { min-height: 37px; }
.chart-mode button { padding: 6px 10px; }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 17px; margin-top: 18px; min-height: 20px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .875rem; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.legend-line { width: 19px; height: 3px; border-radius: 2px; }
.legend-swatch { flex-shrink: 0; overflow: visible; }
.legend-store-group { display: inline-flex; flex-wrap: wrap; gap: 12px; padding: 4px 9px; border: 1px solid var(--border-soft); border-radius: 5px; background: var(--canvas); }
.legend-unit { margin-left: auto; color: var(--muted); font-size: .8125rem; }
.chart-wrap { position: relative; margin-top: 7px; }
.chart-area { width: 100%; min-height: 295px; }
.chart-area > svg, .svg-chart { display: block; width: 100%; overflow: visible; }
.chart-grid { stroke: var(--border-soft); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-zero { stroke: #c5b8be; stroke-width: 1; }
.axis-label, .chart-label { fill: var(--muted); font-family: inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { transition: r .15s; }
.chart-hit:focus { outline: none; stroke: var(--focus); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart-empty { min-height: 295px; padding: 85px 16px; color: var(--muted); font-size: .9375rem; text-align: center; }
.chart-empty strong { display: block; margin-bottom: 6px; color: var(--ink); }
.chart-tooltip { position: absolute; z-index: 5; top: 12px; left: 50%; min-width: 180px; max-width: min(310px, 90%); padding: 12px 15px; border: 1px solid var(--border); border-radius: 9px; background: white; box-shadow: 0 7px 22px #600a2412; font-size: .8125rem; line-height: 1.5; pointer-events: none; }
.chart-tooltip strong, .tooltip-title { display: block; margin-bottom: 6px; color: var(--ink); font-size: .875rem; font-weight: 650; }
.tooltip-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 4px; }
.tooltip-row span { display: inline-flex; align-items: center; gap: 7px; }
.tooltip-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip-note { color: var(--muted); font-size: .75rem; margin-top: 7px; }
.chart-tooltip.is-comparison { width: min(380px, calc(100% - 8px)); max-width: calc(100% - 8px); min-width: 0; }
.tooltip-comparison-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.tooltip-comparison-table th, .tooltip-comparison-table td { padding: 5px 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tooltip-comparison-table th:first-child { text-align: left; }
.tooltip-comparison-table thead th { color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.tooltip-comparison-table tbody th { color: var(--ink); font-weight: 500; }
.tooltip-comparison-table tbody th span { display: inline-flex; align-items: center; gap: 6px; }
.tooltip-comparison-table td { padding-left: 10px; font-weight: 600; }
.chart-tooltip.is-comparison .tooltip-business-note { max-width: none; }

/* Optional detail stays close at hand without crowding the chart. */
.disclosure { margin-top: 10px; overflow: hidden; }
.disclosure > summary { display: flex; align-items: center; gap: 14px; min-height: 57px; padding: 16px 21px; cursor: pointer; list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { background: #fffaf8; }
.disclosure[open] > summary { border-bottom: 1px solid var(--border-soft); }
.disclosure-title { color: var(--ink); font-size: .9375rem; font-weight: 600; }
.disclosure-meta { margin-left: auto; color: var(--muted); font-size: .8125rem; text-align: right; }
.disclosure-chevron { flex-shrink: 0; width: 7px; height: 7px; margin: -3px 2px 0 auto; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.disclosure-meta + .disclosure-chevron { margin-left: 1px; }
.disclosure[open] > summary .disclosure-chevron { margin-top: 3px; transform: rotate(225deg); }
.secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.spending-panel, .store-panel { min-width: 0; padding: 23px; }
.store-panel { border-left: 1px solid var(--border-soft); }
.expense-breakdown { margin-top: 21px; }
.cost-row + .cost-row { margin-top: 19px; }
.cost-header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.cost-name { color: var(--ink); font-size: .875rem; font-weight: 500; }
.cost-value { color: var(--ink); font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cost-value small { color: var(--muted); font-size: .8125rem; font-weight: 400; margin-left: 8px; }
.cost-track { width: 100%; height: 6px; border-radius: 4px; background: #f3ecef; overflow: hidden; }
.cost-fill { height: 100%; min-width: 0; max-width: 100%; border-radius: 4px; background: var(--accent); }
.cost-note { color: var(--muted); font-size: .8125rem; margin-top: 7px; }
.cost-total { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: .875rem; }
.cost-total strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cost-footnote { color: var(--muted); font-size: .8125rem; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--border-soft); }
.cost-divider { margin: 0 6px; }
.breakdown-link { display: block; margin-top: 8px; }
.store-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.store-comparison.single-store { grid-template-columns: 1fr; }
.store-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: #fffdfc; }
.store-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.store-name { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; }
.store-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.store-value { font-size: 1.5rem; line-height: 1.35; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin-top: 13px; }
.store-meta { color: var(--muted); font-size: .8125rem; margin-top: 3px; }
.store-stats { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft); font-size: .8125rem; }
.store-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--muted); }
.store-stats strong, .store-stats b { color: var(--ink); font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.store-card.selected { border-color: var(--accent-line); background: var(--accent-soft); }
.store-no-data { margin-top: 15px; color: var(--muted); font-size: .875rem; }
.store-note { grid-column: 1 / -1; color: var(--muted); font-size: .8125rem; }
.details-heading { padding: 14px 22px; align-items: center; }
.details-heading .panel-subtitle { margin-top: 0; }
.table-unit { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.table-scroll { width: 100%; overflow: auto; overscroll-behavior-x: contain; }
.details-table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.5; white-space: nowrap; }
.details-table thead { background: var(--canvas); }
.details-table th { padding: 12px 17px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border); color: var(--muted); font-size: .8125rem; font-weight: 500; text-align: right; }
.details-table td { padding: 13px 17px; border-bottom: 1px solid var(--border-soft); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.details-table th:first-child, .details-table td:first-child { text-align: left; padding-left: 22px; }
.details-table td:first-child { color: var(--ink); font-weight: 500; }
.details-table th:last-child, .details-table td:last-child { padding-right: 22px; }
.details-table tbody tr:hover { background: #fffaf8; }
.details-table tbody tr:last-child td { border-bottom: 0; }
.details-table .total-row td, .details-table tfoot td { border-top: 1px solid var(--border); background: #faf3f1; font-weight: 650; color: var(--ink); }
.details-table .period-note { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; font-weight: 400; }
.details-table .badge { margin-left: 7px; }
.details-table .empty-row td { padding: 30px 22px; text-align: center; color: var(--muted); }
.period-button { border: 0; background: transparent; padding: 2px 0; color: var(--ink); font-size: .875rem; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 4px; text-align: left; }
.period-button:hover { color: var(--accent); text-decoration-color: var(--accent); }
.table-footnote td { white-space: normal; font-size: .8125rem; font-weight: 400 !important; color: var(--muted) !important; background: #fffdfc; }

/* Reporting context and business-date annotations. */
.notes-content { padding: 20px 22px 17px; }
.reporting-cutoff { color: var(--muted); font-size: .875rem; line-height: 1.65; margin-bottom: 16px; }
.reporting-cutoff strong { color: var(--ink); }
.data-alert { border: 1px solid #e8d9b0; border-left: 3px solid #bc964d; border-radius: 7px; padding: 11px 14px; margin-bottom: 17px; background: #fffaf0; color: #715a2e; font-size: .875rem; line-height: 1.6; }
.data-alert p + p { margin-top: 5px; }
.data-alert button, .data-alert a { color: inherit; }
.data-alert.informational { border-color: var(--accent-line); border-left-color: var(--brand-coral); background: var(--accent-soft); color: #774b52; }
.data-alert .text-button { margin-left: 6px; }
.business-dates { display: flex; align-items: flex-start; gap: 14px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.business-dates-label { flex: 0 0 auto; padding-top: 5px; font-weight: 600; }
.business-date-list { display: flex; flex-wrap: wrap; gap: 7px 10px; min-width: 0; }
.business-date { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; padding: 4px 9px; border: 1px solid #dddcd1; border-radius: 6px; background: #fbfbf7; color: #5e665f; }
.business-date time { color: #786740; font-weight: 600; white-space: nowrap; }
.business-date-scope { color: var(--muted); font-size: .75rem; }
.summer-date { background: #fff8e5; border-color: #e8d6a3; text-align: left; font: inherit; }
.summer-date:hover { background: #fff0ca; border-color: #c8a95a; }
.summer-date-label { color: #805e19; font-weight: 600; white-space: nowrap; }
.summer-note-key { display: inline-block; width: 13px; height: 12px; background: #fff0c4; border-top: 2px solid #ca9c36; border-radius: 2px; }
.chart-summer-note, .chart-business-note { pointer-events: none; }
.chart-summer-note-band { fill: #f3c653; fill-opacity: .13; }
.chart-summer-note-line { stroke: #ca9c36; stroke-width: 2; stroke-opacity: .7; }
.chart-summer-note-label { fill: #8a681f; font-family: inherit; font-size: 12px; }
.business-note-key { display: inline-block; width: 11px; height: 11px; background: #eee5d2; border-top: 2px solid #b19663; border-radius: 2px; }
.chart-business-note-band { fill: #b89952; fill-opacity: .09; }
.chart-business-note-line { stroke: #b19663; stroke-width: 1.1; stroke-dasharray: 3 4; opacity: .8; }
.chart-business-note-marker { fill: #ad8e54; }
.chart-business-note-month { stroke: #b19663; stroke-width: 2; opacity: .85; }
.tooltip-business-note { max-width: 260px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); color: #786740; font-size: .8125rem; line-height: 1.45; white-space: normal; }
.business-note-precision { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; }
.period-business-note { display: block; width: fit-content; max-width: 215px; margin-top: 5px; color: #806d44; font-size: .75rem; line-height: 1.35; white-space: normal; }
.period-business-notes { padding: 12px 14px; margin: 0 0 17px; border: 1px solid #e4ddcc; border-radius: 8px; background: #fbfaf5; color: #74623c; font-size: .875rem; }
.period-business-notes p { margin-top: 5px; }
.notes-actions { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 17px; }
.dashboard-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: .8125rem; }

/* Financial detail dialogs. */
.data-dialog { width: min(700px, calc(100% - 32px)); max-height: min(85vh, 850px); margin: auto; padding: 24px 28px 28px; border: 1px solid var(--border); border-radius: 13px; background: white; color: var(--ink); box-shadow: 0 20px 90px #2a1c2240; }
.data-dialog::backdrop { background: #2a1c2259; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.dialog-heading h2 { font-size: 1.35rem; }
.source-details { margin-top: 19px; color: var(--muted); font-size: .9375rem; line-height: 1.65; overflow-wrap: anywhere; }
.source-details h3 { color: var(--ink); margin-top: 22px; margin-bottom: 7px; font-size: 1rem; font-weight: 650; }
.source-details h3:first-child { margin-top: 0; }
.source-details p + p { margin-top: 12px; }
.source-details ul { padding-left: 20px; margin: 10px 0; }
.source-details li + li { margin-top: 7px; }
.source-details a { color: var(--accent); text-underline-offset: 3px; }
.source-details dl { margin: 12px 0; }
.source-details dt { font-weight: 600; color: var(--ink); }
.source-details dd { margin: 0 0 11px; }
.source-details table { width: 100%; border-collapse: collapse; font-size: .8125rem; margin-top: 12px; }
.source-details th, .source-details td { text-align: left; padding: 9px; border-bottom: 1px solid var(--border); vertical-align: top; }
.source-details th { color: var(--ink); background: var(--canvas); font-weight: 600; }
.source-details .source-file { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-top: 9px; }
.source-details .data-note { margin-top: 18px; padding: 13px 15px; border-radius: 8px; background: var(--canvas); }
.dialog-table-scroll { overflow-x: auto; }
.source-details .bridge-table th, .source-details .bridge-table td { white-space: nowrap; }
.source-details .bridge-table th:not(:first-child), .source-details .bridge-table td, .source-details .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.source-details .bridge-table tbody th { background: white; font-weight: 400; }
.source-details .bridge-total td, .source-details .bridge-total th { background: #faf3f1 !important; font-weight: 650 !important; }
.toast { position: fixed; z-index: 100; bottom: 25px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 9px; background: var(--accent); color: white; box-shadow: 0 6px 20px #600a2426; font-size: .875rem; text-align: center; }
.noscript-message { position: fixed; inset: auto 16px 16px; padding: 15px; border: 1px solid #dfc78f; border-radius: 9px; background: #fff5de; color: #6f5229; text-align: center; }

@media (max-width: 1100px) {
  .metric-grid { gap: 10px; }
  .metric-card { padding: 13px; }
  .metric-value { font-size: 1.4rem; }
  .cost-value small { display: block; margin-left: 0; margin-top: 2px; }
  .store-card { padding: 14px; }
  .store-value { font-size: 1.35rem; }
  .store-stats > div { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .control-group--store, .control-group--frequency { grid-column: span 6; }
  .control-group--preset { grid-column: span 12; }
  .controls-panel { gap: 13px 18px; }
  .chart-heading > div:first-child { flex-basis: 100%; }
  .chart-controls { width: 100%; }
  .chart-control { flex: 1; }
  .secondary-grid { grid-template-columns: 1fr; }
  .store-panel { border-left: 0; border-top: 1px solid var(--border-soft); }
  .cost-value small { display: inline; margin-left: 8px; }
  .store-card { padding: 17px; }
  .store-value { font-size: 1.5rem; }
}

@media (max-width: 699px) {
  .site-header { height: 68px; }
  .header-inner { padding: 0 20px; gap: 16px; }
  .brand-logo { width: 112px; }
  .brand-descriptor { font-size: .8125rem; }
  .header-label { display: none; }
  .dashboard { padding: 23px 20px 28px; }
  h1 { font-size: 1.65rem; }
  .page-heading { align-items: flex-start; gap: 16px; margin-bottom: 19px; }
  .heading-actions { padding-top: 1px; }
  .heading-actions .button { padding: 9px 12px; }
  .heading-actions svg { display: none; }
  .range-summary { font-size: .875rem; margin-top: 7px; }
  .range-summary .range-status { margin-left: 0; margin-top: 5px; }
  .controls-panel { padding: 14px; gap: 12px; }
  .control-group--store, .control-group--frequency, .control-group--preset { grid-column: span 12; }
  .segmented button { min-height: 33px; padding: 6px 9px; }
  select { height: 41px; padding-left: 10px; padding-right: 29px; background-position: right 8px center; }
  .metric-grid { grid-template-columns: repeat(5, minmax(165px, 1fr)); gap: 10px; overflow-x: auto; padding: 2px 2px 7px; margin: -2px -2px 13px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #d9c6ce transparent; }
  .metric-card { padding: 13px 14px; scroll-snap-align: start; }
  .metric-value { font-size: 1.5rem; }
  .metric-subtitle { font-size: .8125rem; }
  .chart-panel { padding: 18px 16px 13px; margin-bottom: 15px; }
  .chart-heading { gap: 15px; }
  .chart-controls { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .chart-control { display: flex; flex-direction: row; align-items: center; gap: 11px; }
  .chart-control > .control-label { flex: 0 0 47px; }
  .chart-mode { flex: 1; min-width: 0; }
  .chart-mode button { min-width: 0; padding: 6px 8px; font-size: .875rem; }
  .chart-legend { gap: 8px 13px; margin-top: 16px; }
  .legend-store-group { padding: 4px 7px; }
  .legend-unit { margin-left: 0; }
  .chart-area, .chart-empty { min-height: 240px; }
  .chart-wrap { margin-left: -4px; margin-right: -4px; }
  .axis-label, .chart-label { font-size: 14px; }
  .chart-tooltip { padding: 10px 12px; }
  .tooltip-comparison-table { font-size: .75rem; }
  .tooltip-comparison-table td { padding-left: 6px; }
  .disclosure > summary { min-height: 55px; padding: 15px 17px; gap: 11px; }
  .disclosure-meta { max-width: 50%; line-height: 1.45; font-size: .75rem; }
  .disclosure-title { font-size: .875rem; }
  .spending-panel, .store-panel { padding: 19px 17px; }
  .cost-header { gap: 10px; }
  .cost-value small { display: block; margin-left: 0; }
  .store-comparison { gap: 10px; margin-top: 17px; }
  .store-card { padding: 14px 12px; }
  .store-value { font-size: 1.3rem; }
  .store-stats > div { flex-direction: column; gap: 2px; }
  .details-heading { padding: 13px 17px; }
  .table-unit { display: none; }
  .details-table th, .details-table td { padding-right: 14px; padding-left: 14px; }
  .details-table th:first-child, .details-table td:first-child { padding-left: 17px; }
  .notes-content { padding: 17px; }
  .business-dates { flex-direction: column; gap: 7px; }
  .business-dates-label { padding-top: 0; }
  .business-date-list { gap: 6px; }
  .business-date { font-size: .8125rem; }
  .dashboard-footer { font-size: .75rem; }
  .data-dialog { padding: 21px 20px; }
  .dialog-heading h2 { font-size: 1.25rem; }
  .source-details { font-size: .875rem; }
}

@media (max-width: 480px) {
  .frequency-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frequency-selector button { min-height: 36px; }
}

@media (max-width: 374px) {
  .header-inner { padding-right: 15px; padding-left: 15px; }
  .dashboard { padding-right: 14px; padding-left: 14px; }
  .heading-actions .button { font-size: .8125rem; padding: 9px 10px; }
  .chart-control > .control-label { flex-basis: 43px; font-size: .8125rem; }
  .chart-mode button { font-size: .8125rem; padding-right: 6px; padding-left: 6px; }
  .store-value { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: white; }
  .site-header { height: 64px; }
  .brand-logo { width: 112px; }
  .header-inner, .dashboard { padding-left: 0; padding-right: 0; }
  .dashboard { padding-top: 18px; }
  .heading-actions, .controls-panel, .chart-controls, .notes-actions, .toast, .data-dialog { display: none !important; }
  .panel, .metric-card { break-inside: avoid; }
  .metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; overflow: visible; }
  .metric-value { font-size: 1.2rem; }
  .metric-card { padding: 12px 9px; }
  .disclosure > summary { padding-left: 0; }
  .disclosure-chevron { display: none; }
  .secondary-grid { grid-template-columns: 1fr 1fr; }
  .table-scroll { overflow: visible; }
  .details-table { font-size: .7rem; }
  .details-table th, .details-table td { padding: 9px; }
  .details-table thead { display: table-header-group; }
  .details-table tr { break-inside: avoid; }
}
