/* =========================================================================
   Slow-Travel Atlas — "Field Atlas" cartographic theme
   Deep-ink masthead · warm paper workspace · vivid teal/coral · ink linework
   ========================================================================= */

:root {
  color-scheme: light;

  /* Paper canvas */
  --paper: #f0e9da;
  --paper-2: #e9e0cd;
  --surface: #fbf7ee;
  --surface-2: #efe7d6;

  /* Ink */
  --ink: #16201d;
  --ink-soft: #2c3a35;
  --muted: #5d6b63;
  --soft: #8a958c;

  /* Lines */
  --line: #d8cdb6;
  --line-strong: #c2b89f;
  --hair: rgba(22, 32, 29, 0.1);

  /* Brand — vivid teal + coral, no gold, no black-luxury */
  --teal: #0c7d6e;
  --teal-2: #18a08c;
  --teal-ink: #0a3b35;
  --blue: #2b6087;
  --coral: #df5a37;
  --rust: #d5532f;
  --gold: #c97c3a;        /* repurposed: warm clay for mid-tier scores (JS dependency) */
  --danger: #b23a29;

  /* Deep-ink masthead */
  --night: #0e1c1a;
  --night-2: #122724;

  --shadow: 0 22px 60px -28px rgba(16, 32, 28, 0.55);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 14px 34px -26px rgba(16, 32, 28, 0.5);

  --radius: 5px;
  --radius-card: 9px;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Spline Sans Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    /* faint contour rings, bottom-left + top-right */
    repeating-radial-gradient(circle at 6% 88%, rgba(12, 125, 110, 0.05) 0 1px, transparent 1px 26px),
    repeating-radial-gradient(circle at 98% 6%, rgba(223, 90, 55, 0.045) 0 1px, transparent 1px 30px),
    var(--paper);
}

button, input, select { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; }

/* ------------------------------------------------------------------ Hero */

.hero {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  background: var(--night);
}

.hero__image {
  position: absolute;
  inset: 0;
  background-image: url("../assets/atlas-hero.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  filter: saturate(0.7) contrast(1.05);
}

/* ink duotone + graticule + contour, layered over the photo */
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(96deg, rgba(10, 24, 22, 0.94) 0%, rgba(10, 24, 22, 0.72) 46%, rgba(10, 24, 22, 0.34) 100%),
    linear-gradient(180deg, rgba(12, 125, 110, 0.18), rgba(10, 24, 22, 0.86));
}

.hero::before {
  /* graticule: latitude/longitude grid */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(245, 240, 228, 0.07) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(90deg, rgba(245, 240, 228, 0.07) 0 1px, transparent 1px 76px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15));
}

.hero::after {
  /* contour rings, top-right */
  content: "";
  position: absolute;
  top: -160px;
  right: -120px;
  width: 540px;
  height: 540px;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(24, 160, 140, 0.16) 0 1.5px, transparent 1.5px 30px);
  -webkit-mask-image: radial-gradient(circle, #000 60%, transparent 72%);
  mask-image: radial-gradient(circle, #000 60%, transparent 72%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 96px;
  color: #f4efe2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 0;
  color: #9fd9cb;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "◇ 00°N / 00°E";
  color: var(--coral);
  letter-spacing: 0.1em;
  opacity: 0.95;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 16ch;
  margin: 0 0 18px;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: clamp(3rem, 7vw, 5.6rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.018em;
}

h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--teal-2);
}

.hero__copy {
  max-width: 60ch;
  margin-bottom: 30px;
  color: #d9e3dc;
  font-size: 1.12rem;
  line-height: 1.55;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid rgba(245, 240, 228, 0.18);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  background: rgba(10, 24, 22, 0.32);
  backdrop-filter: blur(10px);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 56px;
  padding: 11px 18px;
  border-right: 1px solid rgba(245, 240, 228, 0.14);
}

.hero-stat:last-child { border-right: 0; }

.hero-stat b {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.hero-stat span {
  color: #a7c2b8;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------- Workspace */

.workspace {
  display: grid;
  grid-template-columns: minmax(290px, 344px) minmax(0, 1fr);
  gap: 28px;
  width: min(1320px, calc(100% - 48px));
  margin: -60px auto 0;
  align-items: start;
}

/* shared mono micro-label treatment */
.panel-kicker, .metric-label, .mini-label, .field-label,
.control-label-row h3, .control-label-row span, .result-meta,
.empty-state, .app-footer, .status-pill,
.compare-table th, .compare-table td:first-child,
.results-topline p, .saved-pill, .year-col span {
  font-family: var(--mono);
}

/* ------------------------------------------------------------ Control panel */

.control-panel {
  position: sticky;
  top: 16px;
  z-index: 5;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--ink);
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.status-pill {
  flex: none;
  padding: 5px 9px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--teal);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "●";
  margin-right: 5px;
  font-size: 0.7em;
  vertical-align: middle;
}

.status-pill.is-offline {
  border-color: var(--danger);
  background: #f6e2dc;
  color: var(--danger);
}

.control-group { margin-top: 22px; }
.control-group.compact { display: grid; gap: 6px; margin-top: 20px; }

.control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
}

.control-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.control-label-row h3, .field-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.control-label-row span {
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.month-btn, .chip, .text-btn, .icon-btn, .primary-btn, .secondary-btn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.month-btn {
  min-height: 40px;
  padding: 8px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
}

.month-btn:hover, .chip:hover, .text-btn:hover, .secondary-btn:hover, .icon-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.month-btn.is-active, .chip.is-active {
  border-color: var(--teal-ink);
  background: var(--teal-ink);
  color: #f4efe2;
}

.month-btn.is-active { box-shadow: inset 0 0 0 1px rgba(244, 239, 226, 0.12); }

.search-input, select, input[type="range"] { width: 100%; }

.search-input, select {
  height: 44px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
}

.search-input { padding: 0 13px; }
.search-input::placeholder { color: var(--soft); }
.search-input:focus, select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(12, 125, 110, 0.15);
}

select { padding: 0 11px; }

input[type="range"] {
  margin-top: 12px;
  accent-color: var(--coral);
}

output {
  float: right;
  color: var(--coral);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.chip-grid { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  min-height: 32px;
  padding: 6px 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.switch-row {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 11px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.switch-row input { width: 18px; height: 18px; accent-color: var(--teal); }

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.primary-btn, .secondary-btn {
  min-height: 44px;
  padding: 10px 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.primary-btn {
  border-color: var(--teal);
  background: var(--teal);
  color: #f6fffb;
}

.primary-btn:hover { background: var(--teal-2); border-color: var(--teal-2); transform: translateY(-1px); }

.secondary-btn, .text-btn {
  background: transparent;
  color: var(--teal);
}

.text-btn {
  min-height: 26px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------- Results area */

.results-area { min-width: 0; padding-bottom: 40px; }

.results-topline {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 0 2px;
  color: #f0ebde;
}

.results-topline p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.saved-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.saved-pill {
  max-width: 160px;
  overflow: hidden;
  padding: 5px 10px;
  border: 1px solid rgba(244, 239, 226, 0.32);
  border-radius: 999px;
  color: #f4efe2;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------- Insights */

.insight-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.insight {
  position: relative;
  min-height: 122px;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.insight::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal);
}

.insight:nth-child(2)::before { background: var(--coral); }
.insight:nth-child(3)::before { background: var(--blue); }
.insight:nth-child(4)::before { background: var(--teal-2); }
.insight:nth-child(5)::before { background: var(--gold); }

.metric-label {
  margin-bottom: 12px;
  color: var(--soft);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.insight button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.insight strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.insight:hover strong { color: var(--teal); }

.insight span { color: var(--muted); font-size: 0.86rem; }

/* ---------------------------------------------------------------- Compare */

.compare-panel {
  margin-bottom: 22px;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.compare-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-table th, .compare-table td {
  padding: 10px 11px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th { border-top: 0; border-bottom: 1.5px solid var(--ink); }

.compare-table th, .compare-table td:first-child {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compare-table th:not(:first-child) { color: var(--ink); }

/* ----------------------------------------------------------- City cards */

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(322px, 1fr));
  gap: 16px;
}

.city-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.city-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 22px 40px -28px rgba(16, 32, 28, 0.55);
}

/* cartographic corner tick */
.city-card::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid var(--line-strong);
  border-right: 1.5px solid var(--line-strong);
  opacity: 0.7;
  pointer-events: none;
}

.city-card.is-open { border-color: var(--teal); }

.city-card__main { padding: 18px; }

.city-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.city-title { min-width: 0; }

.city-region {
  color: var(--teal);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.city-title h3 {
  margin: 6px 0 5px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.card-actions { display: flex; flex: none; gap: 6px; }

.icon-btn {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  background: var(--surface-2);
  color: var(--muted);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-btn.is-active {
  border-color: var(--coral);
  background: #f8e5dd;
  color: var(--coral);
}

.icon-btn.is-active svg { fill: currentColor; }

/* Header */
.cc-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.cc-rank {
  margin-top: 4px;
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.cc-titles { min-width: 0; }

.cc-region {
  margin: 0 0 5px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cc-titles h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.018em;
}

.cc-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* Scoreboard — the two headline figures */
.cc-scoreboard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  align-items: end;
}

.cc-score, .cc-cost { display: grid; gap: 6px; }

.cc-cost {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.cc-klabel {
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cc-score b {
  font-family: var(--display);
  font-size: 3.1rem;
  font-weight: 600;
  line-height: 0.78;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cc-cost b {
  color: var(--coral);
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.012em;
  font-variant-numeric: tabular-nums;
}

.cc-sub {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

/* Signal strip — four compact scores */
.cc-signals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.cc-signal { display: grid; gap: 6px; }

.cc-signal b {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.cc-signal span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cc-bar {
  height: 3px;
  border-radius: 999px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--hair);
  overflow: hidden;
}

.cc-bar i { display: block; height: 100%; border-radius: 999px; }

/* Conditions */
.cc-conditions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
  margin-top: 18px;
}

.cc-climate {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.cc-climate b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.cc-climate i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* Notes */
.cc-notes {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cc-note {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.cc-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cc-note--event .cc-tag { color: var(--blue); }
.cc-note--safety .cc-tag { color: var(--teal); }
.cc-note--risk .cc-tag { color: var(--danger); }
.cc-note--risk { color: var(--danger); }

/* ------------------------------------------------------- Disclosure / details */

.card-disclosure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.card-disclosure:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.card-disclosure svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}

.city-card.is-open .card-disclosure {
  border-color: var(--teal);
  color: var(--teal);
}

.city-card.is-open .card-disclosure svg { transform: rotate(180deg); }

.details { display: none; padding: 0 18px 18px; }
.city-card.is-open .details { display: block; }

.details-inner { padding-top: 16px; border-top: 1px dashed var(--line-strong); }

.mini-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.year-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
  margin-bottom: 14px;
}

.year-col {
  display: grid;
  grid-template-rows: 72px auto;
  min-width: 0;
  gap: 5px;
  align-items: stretch;
  justify-items: center;
}

.year-plot {
  display: flex;
  width: 100%;
  height: 72px;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}

.year-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 0 0 1px rgba(22, 32, 29, 0.08);
}

.year-col.is-current .year-bar { outline: 2px solid var(--ink); outline-offset: 1px; }

.year-col span { color: var(--muted); font-size: 0.6rem; }

.sparkline { width: 100%; height: 54px; margin: 2px 0 14px; }

.detail-copy { display: grid; gap: 9px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.detail-copy p { margin: 0; }
.detail-copy b { color: var(--ink); }

/* --------------------------------------------------------- Empty / footer */

.empty-state {
  padding: 52px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-card);
  background: rgba(251, 247, 238, 0.6);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.app-footer {
  width: min(1320px, calc(100% - 48px));
  margin: 14px auto 0;
  padding: 22px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.app-footer p { margin: 0; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 16px;
  border-radius: var(--radius);
  background: var(--night);
  color: #f4efe2;
  box-shadow: var(--shadow);
  font-weight: 600;
}

[hidden] { display: none !important; }

/* ---------------------------------------------------------- Responsive */

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; margin-top: -42px; }
  .control-panel { position: relative; top: auto; }
  .control-grid { grid-template-columns: 1fr 1fr; }
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-topline { color: var(--ink); }
  .saved-pill { border-color: var(--line); color: var(--teal); }
}

@media (max-width: 720px) {
  .hero { min-height: 320px; }
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(10, 24, 22, 0.8), rgba(10, 24, 22, 0.6)),
      linear-gradient(96deg, rgba(10, 24, 22, 0.7), rgba(10, 24, 22, 0.3));
  }
  .hero__content, .workspace, .app-footer { width: min(100% - 28px, 1320px); }
  .hero__content { padding: 38px 0 76px; }
  .hero__stats { width: 100%; }
  .hero-stat { flex: 1 1 40%; }
  .hero__copy { font-size: 1rem; }
  .workspace { gap: 18px; }
  .control-panel { padding: 16px; }
  .panel-head { align-items: center; }
  .control-grid, .insight-grid, .city-grid { grid-template-columns: 1fr; }
  .month-grid { grid-template-columns: repeat(6, 1fr); }
  .month-btn { min-height: 36px; font-size: 0.7rem; }
  .results-topline { display: grid; min-height: 0; }
  .saved-strip { justify-content: flex-start; }
  .cc-signals { gap: 10px; }
  .cc-scoreboard { gap: 16px; }
  .cc-cost { padding-left: 16px; }
  .toast { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
