:root {
  color-scheme: light;
  --ink: #191919;
  --muted: #526174;
  --line: #dce2e8;
  --blue: #016085;
  --gold: #a87330;
  font: 16px/1.45 Inter, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f3f4f6;
}
* { box-sizing: border-box; }
body { margin: 0; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #087d9f; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 4; top: 8px; left: 8px; padding: 8px; background: white; clip-path: inset(50%); }
.skip-link:focus { clip-path: none; }
.app-header {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 24px;
  min-height: 64px; padding: 12px 32px; background: white; border-bottom: 1px solid #e5e7eb;
}
.app-brand { display: flex; align-items: center; gap: 10px; color: var(--blue); font-weight: 700; white-space: nowrap; }
.app-brand img { object-fit: contain; border-radius: 8px; }
.app-brand small { display: block; color: #64748b; font-size: 10px; font-weight: 500; }
.app-header nav { display: flex; gap: 8px; margin: auto; }
.app-header a, .excel {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px;
  padding: 0 14px; border-radius: 8px; color: #475569; text-decoration: none; font-size: 14px; font-weight: 600;
}
.app-header a:hover, .excel:hover { background: #f3f4f6; }
.app-header nav :is(a,button)[aria-current] { background: var(--blue); color: white; }
.home, .excel { border: 1px solid #cbd5e1; color: var(--blue); }
.page {
  display: grid; gap: 24px; width: calc(100% - 48px); max-width: 1600px; margin: 24px auto;
  padding: 38px clamp(24px, 4vw, 68px); background: white; border: 1px solid #e5e7eb; border-radius: 8px;
}
.masthead { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 24px; align-items: start; }
.eyebrow {
  width: fit-content; margin: 0 0 16px; padding: 8px 12px; border-radius: 6px; background: #b3925e; color: #fff;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
}
h1 { margin: 0; font: 700 clamp(28px, 3.8vw, 48px)/1.1 Georgia, serif; }
.subtitle { margin: 8px 0 0; color: var(--muted); }
.summary, .details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.details { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.summary-card, .panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.summary-card { background: #f8fafc; }
.summary-card.volume { color: white; background: #191919; border-color: #191919; }
h2 { margin: 0; font-size: 17px; line-height: 1.3; }
.metrics { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 2px; }
.metric { display: inline-flex; align-items: center; flex-wrap: wrap; column-gap: 5px; font-size: 12px; }
.metric i, .legend i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--series, var(--blue)); }
.metric strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.chart { display: block; width: 100%; height: 320px; overflow: visible; }
.chart.trend { height: 157px; }
.chart text { fill: currentColor; font: 12px/1 Inter, "Segoe UI", sans-serif; pointer-events: none; }
.chart .tick { opacity: .84; font-size: 11px; }
.chart .grid { stroke: currentColor; opacity: .13; }
.chart .axis { stroke: currentColor; opacity: .5; }
.chart .series-line, .chart .fit { fill: none; stroke: var(--series, var(--gold)); stroke-width: 2; }
.chart .fit { stroke-dasharray: 6 5; }
.chart .point { fill: var(--series, var(--blue)); cursor: pointer; }
.chart .point:focus { stroke: currentColor; stroke-width: 2; }
.chart .date-label { font-size: 11px; paint-order: stroke; stroke: white; stroke-width: 3px; stroke-linejoin: round; }
.scatter { text-align: center; }
.scatter p, .data-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.scatter .chart { max-width: 900px; margin: 8px auto 0; }
.legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: 12px; }
.legend li:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; }
.legend i.dash { width: 18px; height: 0; border: 0; border-top: 2px dashed var(--gold); border-radius: 0; background: none; }
.chart-tooltip {
  position: fixed; z-index: 3; width: max-content; max-width: min(300px, calc(100vw - 16px)); padding: 8px 12px;
  border-radius: 8px; background: #0f172a; color: white; box-shadow: 0 8px 24px #0f172a26;
  font-size: 12px; white-space: pre-line; pointer-events: none;
}
.section-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.excel { font-size: 13px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.daily-table { min-width: 720px; }
.daily-table tr > :first-child { white-space: nowrap; }
th, td { padding: 8px; text-align: right; }
tr > :first-child { text-align: left; }
thead { background: #f4bd00; }
thead th { border-right: 1px solid white; }
thead th:last-child { border-right: 0; }
tbody tr:nth-child(odd) { background: #f3f4f6; }
tbody tr.total { background: #eaf4f8; border-top: 2px solid var(--blue); color: #014b68; font-weight: 700; }
#period-volume { display: grid; gap: 12px; margin-top: 16px; }
.volume-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.volume-track { height: 9px; border-radius: 4px; background: #e5e7eb; overflow: hidden; }
.volume-bar { height: 100%; border-radius: inherit; background: var(--series, var(--blue)); }
@media (max-width: 1050px) { .masthead { grid-template-columns: minmax(0, 1fr) 150px; } }
@media (max-width: 850px) {
  .app-header { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .app-brand { flex: 1; }
  .app-header nav { order: 3; width: 100%; margin: 0; }
  .app-header nav :is(a,button) { flex: 1; padding: 0 8px; font-size: 12px; }
  .page { width: calc(100% - 24px); margin: 12px auto; }
  .summary, .details { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .page { padding: 22px 16px; gap: 16px; }
  .masthead { grid-template-columns: 1fr; gap: 12px; }
  .scatter .chart { height: 270px; }
}
@media print {
  .app-header, .skip-link, .excel, .chart-tooltip { display: none !important; }
  .page { width: 100%; margin: 0; padding: 0; border: 0; print-color-adjust: exact; }
  .panel, .summary-card { break-inside: avoid; }
  .daily-table { min-width: 0; }
}

.scatter .scatter-slope {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eaf4f8;
  color: #014b68;
  font-size: 15px;
  font-weight: 700;
}
