/* Editorial visual layer. No changes to chart traces, data, or calculation rules.
   The previous index.html restores the original design without reverting daily data. */
:root {
  --ink:#20354d;
  --muted:#5c6f84;
  --line:#dce5ef;
  --bg:#f4f7fb;
  --ui-accent:#355f8b;
  --ui-accent-soft:#eaf2fb;
  --ui-surface:#ffffff;
  --ui-field:#eef4fa;
  --ui-radius:14px;
  --ui-focus:#355f8b;
  color-scheme:light;
}
html { scroll-padding-top:150px; }
main.wrap>section h2 { scroll-margin-top:150px; }
body {
  background:var(--bg);
  color:var(--ink);
  font-family:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
  line-height:1.65;
}
::selection { color:var(--ink);background:#d9e8f8; }
.wrap { max-width:1460px;padding:24px 32px 32px; }
.wrap:focus { outline:none; }
.site-skip-link {
  position:fixed;left:20px;top:10px;z-index:100;
  padding:10px 16px;border-radius:8px;background:var(--ui-accent);color:#fff;
  transform:translateY(-160%);text-decoration:none;
}
.site-skip-link:focus { transform:translateY(0); }
:where(button,select,input,summary,a) { -webkit-tap-highlight-color:transparent; }
:where(button,select,input,summary,a):focus-visible {
  outline:2px solid var(--ui-focus);outline-offset:3px;
}
:where(button,select,input) { font-family:inherit; }
a { color:var(--ui-accent);text-underline-offset:4px;text-decoration-thickness:1px; }
button:disabled { opacity:.55;cursor:not-allowed; }
.dashboard-header {
  position:sticky;top:0;z-index:30;
  align-items:center;gap:20px 28px;
  padding:18px 0 20px;margin:-6px 0 24px;
  border-bottom:1px solid var(--line);
  background:rgba(244,247,251,.98);
}
.dashboard-header-copy { min-width:0;flex:1 1 510px; }
.site-edition {
  display:block;font-size:10px;font-weight:600;color:var(--ui-accent);
  letter-spacing:.16em;line-height:1.6;margin-bottom:6px;
}
.site-edition span { color:#90a3ba;margin:0 6px; }
.dashboard-header h1 {
  font-size:clamp(23px,2.2vw,31px);font-weight:650;
  line-height:1.3;letter-spacing:-.045em;margin:0 0 8px;
}
.dashboard-header .meta { font-size:11px;line-height:1.7;max-width:810px;color:var(--muted); }
.dashboard-header-actions { flex:0 1 auto;min-width:0; }
.dashboard-nav {
  gap:3px;padding:4px;margin:0;
  border:1px solid var(--line);background:#e7eef7;border-radius:10px;
  justify-content:flex-start;flex-wrap:nowrap;
}
.dashboard-nav button {
  min-height:42px;padding:9px 14px;border:1px solid transparent;
  background:transparent;color:#4c6581;border-radius:7px;
  font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap;
}
.dashboard-nav button[aria-pressed="true"] {
  background:#fff;border-color:#d4e1ee;color:var(--ui-accent);
  box-shadow:0 1px 3px #203a5810;
}
.dashboard-nav button:hover { background:#f3f7fc;border-color:transparent;color:var(--ui-accent); }
.dashboard-nav button[aria-pressed="true"]:hover { background:#fff;border-color:#b9cde4;color:var(--ui-accent); }
.dashboard-nav button:focus-visible { outline:2px solid var(--ui-focus);outline-offset:2px; }
.dashboard-nav-note { display:none; }
.wrap>.card {
  padding:28px 30px;margin:20px 0;
  border:1px solid var(--line);border-radius:var(--ui-radius);
  box-shadow:0 3px 16px #24385804;background:var(--ui-surface);
}
.wrap>section:not([hidden]) { animation:ui-enter .18s ease-out; }
h2 { font-size:23px;font-weight:650;line-height:1.4;letter-spacing:-.025em; }
h3 { font-weight:600;letter-spacing:-.015em; }
.hero { border-left:3px solid var(--ui-accent)!important; }
.hero .brief { font-size:clamp(19px,1.6vw,24px);font-weight:600;line-height:1.65;max-width:1140px; }
.hero h3 { margin:24px 0 10px;font-size:13px;color:var(--muted);font-weight:600; }
.hero .bullet {
  padding:11px 0;margin:0;font-size:14px;line-height:1.9;
  border-bottom:1px solid #edf2f8;
}
.hero .subtle { margin-top:18px;font-size:12px;line-height:1.8; }
.snapshot-alert {
  border:1px solid #d7e5f3;border-left:2px solid #7c9fc5;
  background:#f0f6fc;color:#456587;border-radius:8px;
  font-size:12px;font-weight:400;padding:11px 14px;margin-bottom:22px;
}
.warning { background:#fff8e8;color:#80591e;border-color:#eedbb5;font-size:13px; }
.kpis { gap:10px;margin:20px 0;grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.kpi { padding:18px 16px;border-color:var(--line);border-radius:10px;min-height:124px; }
.kpi span { font-size:11px;color:var(--muted); }
.kpi strong { font-size:clamp(23px,2.1vw,29px);font-weight:600;line-height:1.35;letter-spacing:-.035em;font-variant-numeric:tabular-nums;margin:9px 0 6px; }
.kpi small { font-size:11px; }
.reading,.climate-load-status,.climate-auto-reading {
  background:#f2f7fc;border-color:#91b0d1;color:#4a6889;
  border-left-width:2px;border-radius:0 7px 7px 0;line-height:1.8;
}
.slider-tip { color:var(--muted);line-height:1.75;margin-bottom:16px; }
.plot-card { padding:4px 0; }
.climate-gallery-chart,.tb-trend-chart,.tb-chart-wrap,.forecast-chart { min-width:0;overflow:hidden; }
.grid2,.official-grid { gap:20px; }
.official-card,.noaa-section,.noaa-viewer,.climate-chart-card,.climate-gallery-card {
  border-color:var(--line);border-radius:11px;box-shadow:none;
}
.official-card { padding:20px;background:#fff; }
.official-card h3 { font-size:17px;min-height:0;line-height:1.65;margin-bottom:10px; }
.official-card a,.sources a,.noaa-links a { color:var(--ui-accent); }
.official-card .subtle { font-size:12px;line-height:1.8; }
.media-view { border-radius:7px;border-color:#e2eaf3;background:#f7faff; }
.noaa-gallery>h3 { font-size:20px; }
.noaa-section { background:#f8faff;padding:22px;margin:24px 0; }
.noaa-section h4 { font-size:20px;color:var(--ink);font-weight:600; }
.noaa-section-note,.noaa-gallery-intro,.noaa-status { color:var(--muted);line-height:1.8; }
.noaa-options { border-color:var(--line);border-radius:9px;padding:12px; }
.noaa-viewer { padding:18px;background:#fff; }
.noaa-viewer h5 { font-size:17px;font-weight:600;line-height:1.6; }
.noaa-tabs button,.noaa-options button,.noaa-refresh,.official-refresh-button {
  border-color:#cbdced;color:var(--ui-accent);border-radius:7px;min-height:40px;
}
.noaa-tabs button[aria-pressed="true"],.noaa-options button[aria-pressed="true"] {
  background:var(--ui-accent);border-color:var(--ui-accent);color:#fff;
}
.noaa-tabs button:hover,.noaa-options button:hover,.noaa-refresh:hover {
  background:var(--ui-accent-soft);border-color:#8eafd2;color:var(--ui-accent);
}
.noaa-tabs button[aria-pressed="true"]:hover,.noaa-options button[aria-pressed="true"]:hover { background:#274c74;color:#fff; }
.climate-intro { padding:0 0 22px;border-color:var(--line); }
.climate-intro h2,.tb-heading h2 { font-size:28px;font-weight:600;letter-spacing:-.035em;color:var(--ink); }
.climate-intro p { color:var(--muted);font-size:13px;line-height:1.85; }
.climate-eyebrow,.tb-eyebrow { color:#52769b;font-size:10px;letter-spacing:.13em; }
.climate-stamp { border-color:#d3e2f2;background:#f0f6fd;color:#4b6e93;border-radius:7px;max-width:300px;text-align:left; }
.climate-summary-strip { gap:12px;margin:22px 0; }
.climate-summary-strip>div { padding:16px 18px;background:#f7faff;border-color:var(--line);border-radius:9px; }
.climate-summary-strip span { font-size:11px;color:var(--muted); }
.climate-summary-strip strong { margin-top:7px;font-size:23px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.03em; }
.climate-filter-panel,.tb-controls { background:var(--ui-field);border-color:var(--line);border-radius:10px; }
.climate-filter-panel { padding:18px;gap:16px; }
.climate-field label { color:var(--muted);font-size:12px;font-weight:500; }
.climate-field select,.climate-field input,
.tb-controls select,.tb-controls input,.tb-window select,.tb-date-control select,
.forecast-heading select,.noaa-map-controls select {
  border:1px solid #c8d8e9;border-radius:7px;background:#fff;color:var(--ink);
  min-height:44px;padding:10px 12px;font-size:13px;
}
.climate-field select:focus-visible,.climate-field input:focus-visible {
  border-color:var(--ui-focus);box-shadow:0 0 0 3px #355f8b12;
}
.climate-region-head h3,.climate-chart-heading h3,.climate-gallery-heading h3,
.climate-gallery-name,.climate-time-gallery-card h4 { color:var(--ink); }
.climate-gallery-name { font-size:17px;font-weight:600; }
.climate-region-head { margin-top:26px; }
.climate-quality-badge { font-weight:500; }
.climate-signal { padding:16px;border-color:var(--line);border-radius:9px;min-height:120px; }
.climate-signal strong { color:var(--ink);font-size:24px;font-weight:600;letter-spacing:-.03em; }
.climate-signal small { color:var(--muted);line-height:1.6; }
.climate-signal .climate-signal-percentile { color:var(--ui-accent);font-weight:600; }
.climate-auto-reading { padding:16px 18px; }
.climate-auto-reading h3 { color:var(--ui-accent);font-weight:600; }
.climate-gallery-legend { background:#f8faff;border-color:var(--line);padding:12px 14px; }
.climate-gallery { gap:20px; }
.climate-gallery-card { padding:18px 18px 12px; }
.climate-gallery-production,.climate-gallery-reading,.climate-chart-caption { color:var(--muted);line-height:1.8; }
.climate-detail-grid article { background:#f7faff;border-color:var(--line); }
.climate-detail-grid h3 { color:var(--ui-accent); }
.climate-footnote { font-size:12px;color:var(--muted);line-height:1.85;border-color:var(--line); }
#tapping-board { --tb-ink:var(--ink);--tb-soft:var(--muted);--tb-line:var(--line);--tb-green:var(--ui-accent); }
.tb-heading { margin:0 0 26px; }
.tb-heading .tb-note { font-size:13px; }
.tb-source-stamp { border-left-color:#91afce;font-size:11px; }
#tapping-board>.tb-controls { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;padding:18px; }
#tapping-board>.tb-controls select,#tapping-board>.tb-controls input { width:100%;min-width:0; }
.tb-controls label { font-size:12px;gap:8px;min-width:0; }
.tb-assessment { padding:8px 0;gap:22px; }
.tb-segment { border-color:var(--line);background:#f3f7fc;border-radius:9px; }
.tb-segment button { min-height:42px;font-size:13px;color:var(--ui-accent); }
.tb-segment button.is-active { background:var(--ui-accent); }
.tb-badge { color:var(--ui-accent);background:var(--ui-accent-soft); }
.tb-note { line-height:1.85; }
.tb-cards { gap:12px;margin:22px 0 28px; }
.tb-card { padding:20px;border-radius:10px;border-color:var(--line); }
.tb-card:before { width:18px;height:2px;margin-bottom:15px; }
.tb-card small { font-size:11px;line-height:1.8; }
.tb-card>small:first-child { display:block;font-size:15px;font-weight:600;line-height:1.5;color:var(--ink); }
.tb-card strong { font-size:32px;line-height:1.3;font-weight:600;letter-spacing:-.04em;margin:12px 0; }
.tb-card.is-country { background:#eef5fd;border-color:#b6cde5; }
.tb-card .tb-card-period { margin-top:8px;line-height:1.6; }
.tb-panel { padding:24px;margin:22px 0;border-color:var(--line);border-radius:11px; }
.tb-panel h3 { font-size:19px;font-weight:600; }
.tb-local-controls .tb-controls { background:#f7faff;border-color:#dde6f1;padding:16px;gap:14px; }
.tb-scope-row,.tb-time-row { gap:14px; }
.tb-sync { color:var(--muted);line-height:1.65; }
.tb-sync button { min-height:34px;color:var(--ui-accent);border-color:#cbdced; }
.tb-sync label { color:var(--ui-accent); }
.tb-sync input { accent-color:var(--ui-accent); }
.tb-data-fold>summary { min-height:32px;align-items:center;font-size:17px;font-weight:600; }
.tb-data-fold>summary small { color:var(--muted); }
.tb-region-row { border-color:#dfe8f3;background:#fafcff;border-radius:8px;padding:16px; }
.tb-region-top strong { font-weight:600; }
.tb-region-top span { color:var(--muted); }
.tb-window-values b { color:#466789; }
.tb-reason { color:var(--muted);border-color:var(--line); }
.tb-background { border-color:var(--line); }
.tb-background summary { color:var(--muted); }
.tb-data-fold>summary:before { color:#7696b9; }
.tb-year-picker { border-color:var(--line);background:#f8faff;padding:16px; }
.tb-year-actions button { min-height:36px;padding:7px 11px;color:var(--ui-accent);border-color:#d2dfed; }
.tb-years span { min-height:36px;min-width:52px;display:flex;align-items:center;justify-content:center;color:var(--muted); }
.tb-years span { border-color:var(--line); }
.tb-years input:checked+span { background:#eaf2fc;border-color:#89aace;color:var(--ui-accent); }
.tb-table th { background:#eef4fb;color:#3e5d7f;font-weight:600; }
.tb-table td { padding-top:11px;padding-bottom:11px; }
.tb-table-wrap,.table-scroll { border-color:var(--line);border-radius:8px;overscroll-behavior-x:contain; }
.tb-aggregate-row { background:#eff5fc; }
.tb-comparison-key { background:#f7faff;border-color:var(--line); }
.tb-table tr:hover td { box-shadow:inset 0 0 0 999px #d8e6f522; }
.tb-fold summary { color:var(--ui-accent); }
.tb-fallback-date { color:var(--ui-accent);border-color:#cbdced; }
.data-table th { background:#edf4fc;color:#3c5c7e; }
.data-table tr:nth-child(even) { background:#f7faff; }
.forecast-panel,.tb-forecast-panel { border-radius:11px; }
.forecast-panel { background:#f8fbff;border-color:#d5e2f1; }
.forecast-heading h3 { font-size:20px;font-weight:600; }
.forecast-status { font-size:13px;line-height:1.85; }
.forecast-tag { color:var(--ui-accent); }
.forecast-status,.forecast-note { color:var(--muted); }
.forecast-panel th { background:#eef4fb;color:#3e5d7f; }
.forecast-panel th,.forecast-panel td { border-color:var(--line); }
.site-footer {
  display:flex;align-items:center;gap:20px;flex-wrap:wrap;
  border-top:1px solid var(--line);padding:24px 0 4px;margin-top:32px;
  color:var(--muted);font-size:11px;line-height:1.8;
}
.site-footer>span { font-weight:600;color:#466789;white-space:nowrap; }
.site-footer>span span { color:#90a3ba;margin:0 4px; }
.site-footer p { flex:1;margin:0; }
.site-footer a { text-decoration:none;white-space:nowrap;padding:6px 0; }
.site-footer a:hover { text-decoration:underline; }
@media (hover:hover) {
  .dashboard-nav button,.noaa-tabs button,.noaa-options button,.noaa-refresh,
  .tb-segment button,.tb-year-actions button,.tb-years span,.tb-sync button,
  select,input,a { transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease; }
  .tb-segment button:not(.is-active):hover,.tb-year-actions button:hover,.tb-sync button:hover { background:var(--ui-accent-soft);border-color:#8eafd2; }
  select:not(:disabled):hover,input:not(:disabled):hover { border-color:#8ca8c7; }
}
@keyframes ui-enter { from { opacity:.6; } to { opacity:1; } }
@media (max-width:1200px) {
  .wrap { padding:20px 24px; }
  .dashboard-header-copy { flex-basis:470px; }
  .dashboard-header-actions { flex:1 1 100%; }
  .dashboard-nav { width:max-content;max-width:100%; }
  .kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:1000px) {
  #tapping-board>.tb-controls { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .tb-scope-row,.tb-time-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .climate-intro h2,.tb-heading h2 { font-size:26px; }
}
@media (max-width:750px) {
  html { scroll-padding-top:16px; }
  main.wrap>section h2 { scroll-margin-top:16px; }
  .wrap { padding:14px 16px 22px; }
  .wrap>.card { padding:22px 18px;margin:16px 0;border-radius:12px; }
  .dashboard-header { position:static;padding:12px 0 18px;margin:0 0 18px;gap:18px; }
  .dashboard-header .meta { font-size:10px; }
  .dashboard-nav { width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr)); }
  .dashboard-nav button { padding:10px 6px;font-size:12px;white-space:normal;min-width:0; }
  .kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .hero .brief { font-size:20px; }
  .hero .bullet { font-size:13px; }
  .climate-intro h2,.tb-heading h2 { font-size:24px; }
  .climate-stamp { margin-top:15px; }
  .climate-summary-strip>div { padding:14px; }
  .climate-summary-strip strong { font-size:21px; }
  .climate-filter-panel { padding:14px;gap:12px; }
  .climate-signal { padding:13px; }
  .climate-signal strong { font-size:21px; }
  .climate-gallery-card { padding:15px 10px 10px; }
  .noaa-section { padding:16px 12px; }
  .official-card { padding:16px; }
  #tapping-board>.tb-controls { grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:12px; }
  .tb-scope-row,.tb-time-row { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
  .tb-controls select,.tb-controls input { min-width:0; }
  .tb-local-controls .tb-controls { padding:12px; }
  .tb-panel { padding:18px 14px; }
  .tb-trend-chart { height:390px; }
  .tb-chart-wrap { height:420px; }
  .tb-card { padding:16px 14px; }
  .tb-card strong { font-size:29px; }
  .tb-card.is-country { grid-column:1/-1; }
  .tb-heading { gap:16px;margin-bottom:20px; }
  .site-footer { gap:8px 16px; }
  .site-footer p { flex-basis:100%;order:3; }
}
@media (max-width:470px) {
  .wrap { padding:12px 10px 18px; }
  .dashboard-header h1 { font-size:22px; }
  .dashboard-nav button { font-size:11px; }
  .wrap>.card { padding:18px 14px; }
  .kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .kpi { min-height:108px;padding:14px; }
  .climate-filter-panel { grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 10px; }
  .climate-search,.climate-region-field { grid-column:1/-1; }
  .climate-field select,.climate-field input { font-size:12px;padding:10px 8px; }
  .climate-signal-row { gap:8px; }
  .climate-signal strong { font-size:19px; }
  .climate-summary-strip { gap:8px; }
  .climate-summary-strip strong { font-size:19px; }
  .climate-summary-strip span { font-size:10px; }
  .climate-intro h2,.tb-heading h2 { font-size:23px; }
  .tb-card { padding:15px 12px; }
  .tb-card strong { font-size:27px; }
  .tb-card small { font-size:10px; }
  .tb-card>small:first-child { font-size:14px; }
  .tb-assessment { gap:16px; }
  .tb-assessment>div { max-width:100%; }
  .tb-assessment .tb-note { min-width:0;flex-basis:100%; }
  .tb-section-heading,.forecast-heading { min-width:0; }
  .tb-panel h3 { font-size:17px; }
  .tb-data-fold>summary { font-size:15px; }
  .tb-sync>span { flex-basis:100%; }
  .tb-window-values span { flex-wrap:wrap; }
  .noaa-tabs button { min-height:44px; }
  .tmd-map-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce) {
  .wrap>section:not([hidden]) { animation:none; }
  :where(button,select,input,a,.tb-years span) { transition:none!important; }
  html { scroll-behavior:auto; }
}
@media print {
  .dashboard-header { position:static;background:white; }
  .dashboard-nav,.site-skip-link,.site-footer a { display:none; }
  body { background:white; }
  .wrap>.card { box-shadow:none;break-inside:avoid; }
  .wrap>section:not([hidden]) { animation:none; }
}
