:root {
  color-scheme: light;
  --ink: #102438;
  --muted: #5d6c79;
  --navy: #0b1f33;
  --navy-2: #153b55;
  --teal: #0b8f86;
  --teal-bright: #49d6c7;
  --cyan: #2f91b7;
  --amber: #b76a08;
  --paper: #f4f7f9;
  --surface: #ffffff;
  --line: #d8e1e7;
  --shadow: 0 18px 50px rgba(16, 36, 56, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
button, input, select { font: inherit; }
button, select, input { min-height: 44px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: white; padding: .75rem 1rem; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

.site-header { min-height: 86px; padding: 1rem clamp(1rem, 4vw, 4.5rem); display: flex; align-items: center; gap: 2rem; color: white; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-lockup { display: flex; align-items: center; gap: .9rem; margin-right: auto; }
.brand-lockup h1 { font-size: 1.22rem; margin: 0; letter-spacing: -.015em; }
.brand-mark { width: 42px; height: 42px; padding: 8px; display: flex; align-items: end; gap: 4px; border: 1px solid rgba(73,214,199,.5); border-radius: 11px; }
.brand-mark span { width: 7px; background: var(--teal-bright); border-radius: 2px 2px 0 0; }
.brand-mark span:nth-child(1) { height: 55%; }.brand-mark span:nth-child(2) { height: 95%; }.brand-mark span:nth-child(3) { height: 70%; }
.eyebrow { margin: 0 0 .2rem; color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.site-header .eyebrow { color: var(--teal-bright); }
nav { display: flex; gap: 1.5rem; }
nav a { color: #cbd7df; text-decoration: none; font-weight: 650; font-size: .92rem; }
nav a:hover, nav a:focus-visible { color: white; }
.synthetic-badge { display: flex; align-items: center; gap: .5rem; border: 1px solid rgba(73,214,199,.45); color: #d8fffa; padding: .48rem .72rem; border-radius: 999px; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.synthetic-badge span { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(73,214,199,.12); }

main { min-height: 80vh; }
.provenance-strip { background: #102b42; color: #d6e2e9; padding: .7rem clamp(1rem, 4vw, 4.5rem); display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; font-size: .79rem; font-weight: 650; }
.provenance-strip b { color: var(--teal-bright); }
.dashboard-shell, .orders-section, .methodology-section { padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 4.5rem); max-width: 1600px; margin: 0 auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.45rem); letter-spacing: -.035em; line-height: 1.1; }
.section-note { margin: .55rem 0 0; color: var(--muted); max-width: 70ch; }
.secondary-button { background: transparent; color: var(--navy-2); border: 1px solid #9fb1be; border-radius: .65rem; padding: .5rem .9rem; font-weight: 750; cursor: pointer; }
.secondary-button:hover { background: #e8eef2; }

.filter-panel { display: grid; grid-template-columns: 1.1fr repeat(5, minmax(130px, 1fr)); gap: .75rem; padding: 1rem; background: var(--navy); border-radius: 1rem; box-shadow: var(--shadow); }
.filter-panel label { color: #dbe6ec; font-size: .76rem; font-weight: 750; letter-spacing: .025em; }
select, input[type="search"] { width: 100%; margin-top: .36rem; padding: .62rem .72rem; color: var(--ink); background: white; border: 1px solid #c6d2da; border-radius: .55rem; }
select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(73,214,199,.55); outline-offset: 2px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; }
.metric-card { min-height: 145px; padding: 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 8px 24px rgba(16,36,56,.05); }
.metric-card.accent { color: white; background: linear-gradient(135deg, var(--navy-2), #0d5f67); border: 0; }
.metric-card.warning { border-top: 4px solid #d5963c; }
.metric-card p { margin: 0 0 .4rem; color: var(--muted); font-weight: 700; }
.metric-card.accent p, .metric-card.accent span { color: #d8f8f4; }
.metric-card strong { display: block; font-size: clamp(1.75rem, 3vw, 2.55rem); letter-spacing: -.045em; line-height: 1.1; }
.metric-card span { display: block; margin-top: .7rem; color: var(--muted); font-size: .8rem; }

.visual-grid { display: grid; grid-template-columns: 1.65fr 1fr 1fr; gap: 1rem; }
.panel { min-height: 390px; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 8px 24px rgba(16,36,56,.05); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.panel-heading h3 { margin: 0; font-size: 1.15rem; }
.panel-total { font-weight: 800; color: var(--teal); }
.chart { min-height: 295px; }
.chart svg { display: block; width: 100%; height: 295px; overflow: visible; }
.axis-label { fill: #6c7b87; font-size: 11px; }
.grid-line { stroke: #dce5ea; stroke-width: 1; }
.trend-line { fill: none; stroke: var(--teal); stroke-width: 3.25; stroke-linejoin: round; stroke-linecap: round; }
.trend-area { fill: url(#trendGradient); opacity: .33; }
.trend-dot { fill: white; stroke: var(--teal); stroke-width: 2; }
.bar-chart { display: grid; gap: 1rem; }
.bar-row { display: grid; gap: .4rem; }
.bar-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; }
.bar-label { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; background: #e5ecef; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--cyan)); border-radius: inherit; }

.orders-section { padding-top: 1rem; }
.search-label { width: min(360px, 100%); color: var(--muted); font-size: .8rem; font-weight: 750; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: .85rem; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th { padding: .82rem 1rem; text-align: left; color: #dfeaf0; background: var(--navy-2); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
td { padding: .84rem 1rem; border-bottom: 1px solid #e3e9ed; font-size: .9rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f1f8f7; }
.order-button { border: 0; background: transparent; color: var(--teal); padding: 0; min-height: 0; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.status-pill, .flag-pill { display: inline-block; border-radius: 999px; padding: .18rem .52rem; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.status-pill { background: #e6eef3; color: var(--navy-2); }
.status-pill.hold, .flag-pill { background: #fff1d8; color: #82510b; }
.status-pill.cancelled { background: #f8e5e5; color: #9a3333; }
.table-note { color: var(--muted); font-size: .84rem; }

.methodology-section { max-width: none; color: white; background: var(--navy); margin-top: 3rem; }
.methodology-section > * { max-width: 1456px; margin-left: auto; margin-right: auto; }
.methodology-section .eyebrow { color: var(--teal-bright); }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.method-grid article { padding: 1.5rem; border: 1px solid rgba(255,255,255,.14); border-radius: .85rem; background: rgba(255,255,255,.04); }
.step { color: var(--teal-bright); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 800; }
.method-grid h3 { margin: .9rem 0 .5rem; font-size: 1.08rem; }
.method-grid p { margin: 0; color: #c6d4dc; font-size: .92rem; }
.boundary-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; margin-top: 1rem; padding: 1.5rem; color: var(--ink); background: var(--teal-bright); border-radius: .85rem; }
.boundary-panel h3, .boundary-panel p { margin: 0; }
.boundary-panel .eyebrow { color: #075b55; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem clamp(1rem, 4vw, 4.5rem); color: #b8c7cf; background: #071624; font-size: .8rem; }

dialog { width: min(1000px, calc(100vw - 2rem)); max-height: 88vh; border: 0; border-radius: 1rem; padding: 1.5rem; color: var(--ink); box-shadow: 0 32px 90px rgba(0,0,0,.32); }
dialog::backdrop { background: rgba(5,18,30,.72); backdrop-filter: blur(5px); }
.dialog-close { float: right; width: 44px; border: 1px solid var(--line); background: white; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.dialog-summary { display: flex; flex-wrap: wrap; gap: .65rem 1.4rem; margin: 1rem 0; color: var(--muted); }
.dialog-summary strong { color: var(--ink); }
.dialog-table { max-height: 50vh; }

@media (max-width: 1100px) {
  nav { display: none; }
  .filter-panel { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .visual-grid { grid-template-columns: 1fr 1fr; }
  .trend-panel { grid-column: 1 / -1; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; gap: .8rem; }
  .synthetic-badge { margin-left: 3.6rem; }
  .provenance-strip { gap: .45rem; }
  .provenance-strip b { display: none; }
  .provenance-strip span { width: 100%; }
  .filter-panel, .metric-grid, .visual-grid, .method-grid, .boundary-panel { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
  .metric-card { min-height: 125px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


.local-preview-notice{padding:1rem;background:#fff1ce;color:#0b1f33;font-size:.9rem;overflow-wrap:anywhere}.local-preview-notice a{text-decoration:underline}.table-wrap:focus-visible{outline:3px solid #087b75;outline-offset:3px}caption{padding:.75rem;text-align:left}summary{cursor:pointer;min-height:44px}#monthly-totals th{background:white;color:#0b1f33}details .table-wrap{max-height:300px}details table{min-width:0}

