:root {
  --ink: #18202c;
  --paper: #f6f1e8;
  --paper-deep: #e9e1d2;
  --night: #1d2e42;
  --muted: #5d6671;
  --line: rgba(24, 32, 44, 0.15);
  --accent: #e56d3c;
  --aqua: #36a6a1;
  --yellow: #e8b94e;
  --lilac: #7566b6;
  --font-display: Georgia, Cambria, "Times New Roman", serif;
  --font-body: Inter, "Segoe UI", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}
a { color: inherit; text-underline-offset: 0.18em; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 5; padding: .65rem 1rem; background: #fff; }

.site-header, .hero, .compare-shell, .method-section, .editorial-section, footer {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
}
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 0; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -.03em; }
.brand-mark { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); color: white; font-family: var(--font-display); font-size: 1rem; }
nav { display: flex; gap: 1.25rem; font-size: .88rem; font-weight: 700; }
nav a { text-decoration: none; }
nav a:hover { color: var(--accent); }

.hero { padding: clamp(4rem, 9vw, 8.2rem) 0 clamp(3.25rem, 6vw, 5.5rem); max-width: 1180px; }
.eyebrow, .panel-kicker { margin: 0 0 .65rem; color: var(--accent); font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.04em; line-height: 1.08; }
h1 { max-width: 840px; margin-bottom: 1.25rem; font-family: var(--font-display); font-size: clamp(3.7rem, 9vw, 7.4rem); font-weight: 600; }
h2 { margin-bottom: .8rem; font-family: var(--font-display); font-size: clamp(2.2rem, 4.2vw, 3.9rem); }
h3 { font-family: var(--font-display); font-size: 1.55rem; }
.hero-copy { width: min(690px, 100%); margin-bottom: 1.6rem; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.24rem); }
.hero-note { display: inline-flex; align-items: center; gap: .5rem; padding: .62rem .8rem; border: 1px solid var(--line); border-radius: 100px; background: rgba(255,255,255,.45); font-size: .82rem; font-weight: 600; }

.compare-shell { padding: clamp(2.2rem, 5vw, 4.4rem); border-radius: 28px; background: var(--night); color: #f8f6f0; }
.section-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2.2rem; }
.section-heading h2 { margin: 0; }
.section-heading > p { max-width: 420px; margin: 0; color: #c4ced6; font-size: .92rem; }
.compare-shell .eyebrow, .compare-shell .panel-kicker { color: #8edbd8; }

.controls { display: grid; grid-template-columns: minmax(190px, 260px) 1fr; gap: 1.3rem; margin-bottom: 2rem; }
.month-control, .city-control { min-width: 0; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.06); }
.month-control span, legend { display: block; margin-bottom: .45rem; color: #c4ced6; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.month-control select { width: 100%; padding: .2rem 0; border: 0; outline: 0; background: transparent; color: white; font: inherit; font-weight: 700; }
.month-control option { color: var(--ink); }
.city-control { margin: 0; }
.city-control legend span { color: #92a1af; text-transform: none; }
.city-options { display: flex; flex-wrap: wrap; gap: .55rem; }
.city-option input { position: absolute; opacity: 0; }
.city-option span { display: block; padding: .28rem .67rem; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; color: #dfe7ea; cursor: pointer; font-size: .82rem; font-weight: 700; transition: .2s; }
.city-option input:checked + span { border-color: var(--city-color); background: var(--city-color); color: white; }
.city-option input:focus-visible + span { outline: 2px solid white; outline-offset: 2px; }

.dashboard { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 1.2rem; }
.chart-panel, .insight-panel { min-width: 0; padding: 1.4rem; border-radius: 20px; background: #f7f3ea; color: var(--ink); }
.panel-title-row { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.panel-title-row h3, .insight-panel h3 { margin-bottom: 0; font-size: 1.35rem; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: end; gap: .65rem; font-family: var(--font-mono); font-size: .65rem; }
.legend-item { display: inline-flex; align-items: center; gap: .32rem; }
.legend-dot { width: .62rem; height: .62rem; border-radius: 50%; }
.chart-wrap { min-height: 290px; margin-top: 1.2rem; overflow-x: auto; }
#temperature-chart { display: block; width: 100%; min-width: 560px; height: 280px; }
.axis-label { fill: #68717a; font: 11px var(--font-mono); }
.grid-line { stroke: #d8d1c7; stroke-width: 1; }
.month-line { stroke: #e3ddd3; stroke-width: 1; }
.data-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.data-point { stroke: #f7f3ea; stroke-width: 2; }
.selected-point { stroke: var(--ink); stroke-width: 1.5; }
.insight-panel { background: var(--aqua); color: #0f3435; }
.insight-panel .panel-kicker { color: #0f5658; }
.insight-panel h3 { margin-bottom: 1rem; }
.insight-panel p:not(.fine-print) { font-size: .95rem; }
.insight-panel strong { font-weight: 800; }
.fine-print { margin: 1.3rem 0 0; padding-top: .9rem; border-top: 1px solid rgba(15,52,53,.2); font-size: .73rem; line-height: 1.45; }

.climate-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
.climate-card { padding: 1.2rem; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.04); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: 1rem; }
.city-name { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.city-swatch { width: .7rem; height: .7rem; border-radius: 50%; }
.card-month { color: #bdcad3; font-family: var(--font-mono); font-size: .67rem; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.metric { padding-top: .6rem; border-top: 1px solid rgba(255,255,255,.14); }
.metric:nth-child(1) { grid-column: span 2; }
.metric b { display: block; color: #fff; font-family: var(--font-display); font-size: 1.75rem; line-height: 1; }
.metric small { display: block; margin-top: .3rem; color: #bdcad3; font-size: .69rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }

.method-section { display: grid; grid-template-columns: minmax(250px, .85fr) 1.5fr; gap: 4rem; padding: clamp(5rem, 10vw, 9rem) 0; }
.method-section h2 { margin-bottom: 0; }
.method-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.method-grid article { padding: 1.35rem; background: var(--paper); }
.method-number { color: var(--accent); font-family: var(--font-mono); font-size: .72rem; }
.method-grid h3 { margin: .4rem 0 .55rem; font-size: 1.35rem; }
.method-grid p { margin-bottom: 0; color: var(--muted); font-size: .9rem; }

.editorial-section { padding-bottom: clamp(5rem, 9vw, 8rem); }
.section-heading.compact { align-items: end; }
.editorial-section .section-heading > p { color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.guide-grid article, .guide-grid a { display: block; min-height: 190px; padding: 1.3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.guide-grid a { color: inherit; text-decoration: none; }
.guide-grid a:hover { background: rgba(229,109,60,.06); }
.guide-grid span { color: var(--accent); font-family: var(--font-mono); font-size: .72rem; }
.guide-grid h3 { margin: .65rem 0 .5rem; font-size: 1.22rem; }
.guide-grid p { margin-bottom: 0; color: var(--muted); font-size: .86rem; }
.guides-more { margin: 1.25rem 0 0; font-weight: 800; }

footer { display: flex; justify-content: space-between; gap: 2rem; align-items: start; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
footer > div { display: flex; align-items: center; gap: .55rem; color: var(--ink); white-space: nowrap; }
footer p { max-width: 670px; margin: 0; }

.document-page { width: min(820px, calc(100% - 3rem)); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.document-page h1 { max-width: 760px; font-size: clamp(3rem, 7vw, 5.5rem); }
.document-lead { max-width: 700px; color: var(--muted); font-size: 1.16rem; }
.document-page section { margin-top: 2.8rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.document-page h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.document-page p, .document-page li { max-width: 710px; color: var(--muted); }
.document-page li + li { margin-top: .5rem; }

.guide-page { width: min(820px, calc(100% - 3rem)); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.guide-page h1 { max-width: 800px; font-size: clamp(2.8rem, 6.4vw, 5.2rem); }
.guide-page .lede { max-width: 740px; color: var(--muted); font-size: 1.15rem; }
.guide-page h2 { margin-top: 2.8rem; font-size: clamp(1.85rem, 4vw, 2.7rem); }
.guide-page p, .guide-page li { max-width: 740px; color: var(--muted); }
.guide-page table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .9rem; }
.guide-page th, .guide-page td { padding: .65rem .55rem; border-bottom: 1px solid var(--line); text-align: right; }
.guide-page th:first-child, .guide-page td:first-child { text-align: left; }
.guide-page th { color: var(--ink); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.source-note { margin-top: 2.8rem; padding: 1rem 1.2rem; border-left: 4px solid var(--aqua); background: rgba(54,166,161,.1); font-size: .88rem; }
.guide-nav { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; margin: 2.5rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); font-weight: 700; }

@media (max-width: 780px) {
  .site-header, .hero, .compare-shell, .method-section, .editorial-section, footer, .document-page { width: min(100% - 2rem, 1180px); }
  .site-header { padding: 1rem 0; }
  nav { gap: .8rem; font-size: .76rem; }
  .section-heading, .method-section, footer { display: block; }
  .section-heading > p { margin-top: 1rem; }
  .controls, .dashboard { grid-template-columns: 1fr; }
  .climate-cards, .guide-grid { grid-template-columns: 1fr; }
  .method-grid { margin-top: 1.7rem; }
  footer > div { margin-bottom: 1rem; }
}

@media (max-width: 440px) {
  .site-header { align-items: flex-start; }
  .brand { font-size: .9rem; }
  nav { display: none; }
  .compare-shell { padding: 1.25rem; border-radius: 18px; }
  .chart-panel, .insight-panel { padding: 1rem; }
  .metric-grid { gap: .5rem; }
}
