/* ==========================================================================
   Market Weather · Daily Forecast (v3) — Trader Desktop Layout
   Three-column modular page. Dark theme. Density tolerated.
   Each card is a tile the eye can scan independently. Clicks open modals.
   Sticky CTA bar at bottom drives the only conversion event.
   ========================================================================== */

:root {
  --display: "JetBrains Mono", "SF Mono", "Menlo", ui-monospace, monospace;
  --ui: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;

  --bg: #0a0a0a;
  --bg-panel: #131316;
  --ink: #ffffff;
  --ink-90: rgba(255, 255, 255, 0.92);
  --ink-70: rgba(255, 255, 255, 0.72);
  --ink-55: rgba(255, 255, 255, 0.55);
  --ink-40: rgba(255, 255, 255, 0.40);
  --ink-25: rgba(255, 255, 255, 0.25);
  --ink-12: rgba(255, 255, 255, 0.12);
  --ink-06: rgba(255, 255, 255, 0.06);

  --accent: #FFF056;    /* yellow CTA */
  --accent-dim: rgba(255, 240, 86, 0.18);
  --up: #6FCB7C;
  --up-dim: rgba(111, 203, 124, 0.18);
  --down: #E89E6A;
  --down-dim: rgba(232, 158, 106, 0.18);

  --radius: 18px;
  --radius-sm: 12px;
  --cta-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

img, svg { display: block; }

/* ==========================================================================
   FORECAST LAYOUT — three columns at desktop, stacked at mobile.
   Bottom-padded so the sticky CTA never overlaps content.
   ========================================================================== */
.forecast {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.85fr;
  gap: 48px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 56px 56px calc(var(--cta-h) + 56px);
}

/* At wide viewports (≥1400px), lock LEFT and MID column widths to
   the values they have at the layout's max-width (424px and 487px
   respectively). The RIGHT column then absorbs the freed gutter
   space — it extends closer to the page edge while LEFT and MID
   stay visually unchanged. Right padding shrinks from 56px to
   24px to match. Below 1400px the original fluid grid takes over. */
@media (min-width: 1400px) {
  .forecast {
    grid-template-columns: 424px 487px 1fr;
    padding-right: 24px;
  }
}

.forecast-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* CLIMATE SECTION — wraps kicker + headline + summary, with a soft
   storm-cloud layer behind for the Stormy scenario. Isolated stacking
   context contains the cloud blur to this section only (chart card
   below stays unaffected). */
.climate-section {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.climate-section > .forecast-kicker,
.climate-section > .climate-headline,
.climate-section > .climate-summary {
  position: relative;
  z-index: 1;
}

/* Storm layer: bounded box behind the text, clips its own clouds */
.climate-storm {
  position: absolute;
  inset: -24px -16px -16px -16px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 22px;
}
.climate-storm__cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
}
/* Cloud A — top-left area, larger, drifts to the right + down.
   Drift and lightning flash run on independent timelines so they
   don't sync up. */
.climate-storm__cloud--a {
  width: 340px; height: 340px;
  top: -60px;
  left: 8%;
  background: radial-gradient(circle at 50% 50%,
    rgba(190, 190, 210, 0.55), transparent 70%);
  opacity: 0.18;
  animation:
    storm-drift-a 80s ease-in-out infinite alternate,
    lightning-a   11s linear           infinite;
}
/* Cloud B — right side, smaller, drifts the other way */
.climate-storm__cloud--b {
  width: 280px; height: 280px;
  top: 60px;
  right: -30px;
  background: radial-gradient(circle at 50% 50%,
    rgba(205, 205, 220, 0.45), transparent 70%);
  opacity: 0.14;
  animation:
    storm-drift-b 100s ease-in-out infinite alternate-reverse,
    lightning-b   17s linear           infinite;
}

@keyframes storm-drift-a {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(40px, 20px); }
}
@keyframes storm-drift-b {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-32px, 16px); }
}

/* Lightning A: two-stroke flash at 29-31% of cycle (~3-3.3s into 11s),
   second flash burst at 68-70%. Most of the cycle stays at base
   opacity (0.18) so the cloud is always faintly visible. */
@keyframes lightning-a {
  0%, 28%, 32%, 67%, 71%, 100% { opacity: 0.18; }
  29% { opacity: 0.85; }
  30% { opacity: 0.30; }
  31% { opacity: 0.72; }
  68% { opacity: 0.50; }
  70% { opacity: 0.62; }
}
/* Lightning B: offset from A's rhythm — single-stroke at 45%, double-
   stroke at 85%. Together with A's pattern, the storm reads as
   irregular real lightning, not metronome flashes. */
@keyframes lightning-b {
  0%, 44%, 48%, 84%, 86%, 100% { opacity: 0.14; }
  45% { opacity: 0.75; }
  46% { opacity: 0.25; }
  47% { opacity: 0.55; }
  85% { opacity: 0.60; }
}

@media (prefers-reduced-motion: reduce) {
  .climate-storm__cloud--a,
  .climate-storm__cloud--b {
    animation: none;
    opacity: 0.10;
  }
}

/* Card pattern shared by chart, map, market story, etc. */
.forecast-card {
  background: var(--bg-panel);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  transition: border-color 200ms, transform 200ms;
}
.forecast-card[tabindex]:hover,
.forecast-card[tabindex]:focus-visible {
  border-color: var(--ink-25);
  cursor: pointer;
  outline: none;
}

/* ==========================================================================
   LEFT COLUMN — the read
   ========================================================================== */

.forecast-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-55);
}

.climate-headline {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
}
.climate-headline__title {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.climate-confidence {
  background: var(--bg-panel);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 130px;
  cursor: pointer;
  transition: border-color 200ms;
  font-family: inherit;
  color: var(--ink);
}
.climate-confidence:hover,
.climate-confidence:focus-visible {
  border-color: var(--ink-25);
  outline: none;
}
.climate-confidence__value {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
}
.climate-confidence__label {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-55);
}
.climate-confidence__bar {
  display: block;
  width: 80px;
  height: 1px;
  background: var(--ink-25);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.climate-confidence__bar span {
  position: absolute;
  inset: 0;
  width: var(--c, 0%);
  background: var(--ink);
}

.climate-summary {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0;
  max-width: 38em;
}

/* CHART CARD — landscape (360:240). Padding is ZERO so the SVG
   visualization runs edge to edge. Only the text overlays
   (ELEVATED / TYPICAL DAY labels and timestamps) carry inset
   margin from the card edges. */
.forecast-card--chart {
  padding: 0;
  aspect-ratio: 360 / 240;
  min-height: 280px;
  overflow: hidden;
}
.chart {
  width: 100%;
  height: 100%;
  display: block;
}

/* Pen group: nervous step-jitter. CSS transforms work on SVG groups
   in modern browsers. Values are in CSS pixels and apply to the
   visible rendered position regardless of viewBox. */
.chart__pen-group {
  animation: chart-pen-nervous 160ms steps(6, end) infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes chart-pen-nervous {
  0%   { transform: translate(0px, 0px); }
  20%  { transform: translate(1px, -0.7px); }
  40%  { transform: translate(-0.7px, 0.9px); }
  60%  { transform: translate(0.8px, 0.6px); }
  80%  { transform: translate(-0.8px, -0.5px); }
  100% { transform: translate(0px, 0px); }
}

/* Pen halo: slow opacity + scale breath, independent of the jitter */
.chart__pen-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: chart-halo-breath 2.6s ease-in-out infinite;
}
@keyframes chart-halo-breath {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
  .chart__pen-group,
  .chart__pen-halo { animation: none; }
}

/* Labels sit at right-aligned, key vertical positions inside the
   chart card. Matches the mobile barograph: "↑ ELEVATED" near the
   top edge, "TYPICAL DAY" at the horizon line (≈61% from top). */
.chart__label {
  position: absolute;
  right: 22px;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-55);
  pointer-events: none;
}
.chart__labels {
  position: static;
  display: contents;
}
.chart__label--elevated {
  top: 18px;
  color: var(--ink-70);
}
.chart__label--typical {
  /* Horizon dashes sit at viewBox y=155 of 280, which is 55% of the
     SVG. Card uses preserveAspectRatio="none" so viewBox stretches
     to fill, meaning 55% of viewBox = 55% of card height. */
  top: 55%;
  transform: translateY(-50%);
  color: var(--ink-55);
}
.chart__times {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-55);
  pointer-events: none;
}

/* READINGS row */
.readings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.reading {
  background: var(--bg-panel);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 200ms;
}
.reading:hover,
.reading:focus-visible {
  border-color: var(--ink-25);
  cursor: pointer;
  outline: none;
}
.reading__icon {
  color: var(--ink-55);
}
.reading__label {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-55);
}
.reading__value {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

/* ==========================================================================
   MIDDLE COLUMN — the story
   ========================================================================== */

.story-heading,
.ahead-heading {
  font-family: var(--display);
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.story-lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0;
}

/* MARKET STORY card */
.forecast-card--story {
  padding: 18px 20px;
}
.market-story__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-55);
  margin-bottom: 10px;
}
.market-story__confidence {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--up);
}
.market-story__dots {
  display: inline-flex;
  gap: 3px;
}
.market-story__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
}
.market-story__claim {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-90);
  margin: 0 0 14px;
}
.market-story__tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--ink-12);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.tag strong {
  font-weight: 600;
  color: var(--ink);
}
.tag span {
  font-weight: 400;
}
.tag--up {
  border-color: rgba(111, 203, 124, 0.4);
  background: var(--up-dim);
}
.tag--up span { color: var(--up); }
.tag--down {
  border-color: rgba(232, 158, 106, 0.4);
  background: var(--down-dim);
}
.tag--down span { color: var(--down); }

/* MAP CARD — atmospheric, animated. Three layers of motion on top
   of the static field/chip composition: drifting warm + cool gradient
   atmospheres (CSS pseudo-elements), flowing wind streaks (SVG
   dashoffset), and a slow pulse + drift on the active front.
   Same animation vocabulary as the mobile prototype's mapviz--v2. */
.forecast-card--map {
  padding: 0;
  aspect-ratio: 600 / 460;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  isolation: isolate;  /* contain pseudo-element blend modes */
}
.forecast-card--map::before,
.forecast-card--map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  filter: blur(50px);
  mix-blend-mode: screen;
  opacity: 0.32;
}
/* Warm pole — golden/amber, drifts slowly around the upper portion */
.forecast-card--map::before {
  background: radial-gradient(50% 40% at 65% 22%,
    rgba(217, 168, 106, 0.55), transparent 70%);
  animation: map-atmos-warm 240s ease-in-out infinite;
}
/* Cool pole — slate blue, drifts around the lower portion */
.forecast-card--map::after {
  background: radial-gradient(55% 45% at 32% 80%,
    rgba(140, 165, 195, 0.45), transparent 70%);
  animation: map-atmos-cool 300s ease-in-out infinite;
}
@keyframes map-atmos-warm {
  0%   { transform: translate(0, 0)        scale(1);    opacity: 0.32; }
  25%  { transform: translate(4%, 2%)      scale(1.08); opacity: 0.40; }
  50%  { transform: translate(-2%, -3%)    scale(0.96); opacity: 0.26; }
  75%  { transform: translate(-4%, 2%)     scale(1.04); opacity: 0.34; }
  100% { transform: translate(0, 0)        scale(1);    opacity: 0.32; }
}
@keyframes map-atmos-cool {
  0%   { transform: translate(0, 0)        scale(1);    opacity: 0.32; }
  30%  { transform: translate(-4%, -2%)    scale(1.06); opacity: 0.38; }
  55%  { transform: translate(2%, 3%)      scale(0.94); opacity: 0.28; }
  80%  { transform: translate(-2%, -2%)    scale(1.03); opacity: 0.34; }
  100% { transform: translate(0, 0)        scale(1);    opacity: 0.32; }
}

/* Wind streaks: each path has a large dasharray (one visible stroke
   segment + a big gap), and dashoffset animates so the visible
   segment slides along the path. Different speeds + start offsets
   per streak so they never sync up — coherent atmospheric motion
   without looking patterned. */
.map__wind { opacity: 0.22; }
.map__wind-streak {
  stroke-dasharray: 60 340;
}
.map__wind-streak--1 { animation: wind-flow 9s  linear infinite; }
.map__wind-streak--2 { animation: wind-flow 13s linear infinite; animation-delay: -2s; }
.map__wind-streak--3 { animation: wind-flow 11s linear infinite; animation-delay: -5s; }
.map__wind-streak--4 { animation: wind-flow 15s linear infinite; animation-delay: -7s; }
.map__wind-streak--5 { animation: wind-flow 12s linear infinite; animation-delay: -3s; }
.map__wind-streak--6 { animation: wind-flow 17s linear infinite; animation-delay: -9s; }
@keyframes wind-flow {
  0%   { stroke-dashoffset: 400; }
  100% { stroke-dashoffset: 0; }
}

/* Active front: subtle long-cycle drift + opacity pulse on the line */
.map__front-group {
  animation: map-front-drift 60s ease-in-out infinite alternate;
}
.map__front-line {
  animation: map-front-pulse 9s ease-in-out infinite;
}
@keyframes map-front-drift {
  0%   { transform: translate(-3px, -2px); }
  100% { transform: translate(3px,  2px);  }
}
@keyframes map-front-pulse {
  0%, 100% { stroke-opacity: 0.42; }
  50%      { stroke-opacity: 0.62; }
}

@media (prefers-reduced-motion: reduce) {
  .forecast-card--map::before,
  .forecast-card--map::after,
  .map__wind-streak,
  .map__front-group,
  .map__front-line { animation: none; }
}
.map__svg {
  width: 100%;
  height: 100%;
  display: block;
}
.map__add {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--ink-25);
  color: var(--ink);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}
/* Chips: sectors + futures positioned on the field. Each chip uses
   --x / --y CSS custom props (set inline as percentages) to place
   itself on the map. Transform centers the chip on that coordinate. */
.map__chip {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--ink-25);
  background: rgba(0, 0, 0, 0.55);
  color: var(--ink-70);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2;
  white-space: nowrap;
  pointer-events: none;  /* Whole card is clickable */
  user-select: none;
}
.map__chip[data-kind="future"] {
  border-color: var(--ink-40);
  color: var(--ink);
}
.map__chip--active {
  background: rgba(0, 0, 0, 0.75);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow:
    0 0 0 3px var(--accent-dim),
    0 6px 18px rgba(0, 0, 0, 0.4);
}
.map__chip--active .map__chip-star { color: var(--accent); }

/* Star icon (futures + featured) — sits before the dot */
.map__chip-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 11px;
  font-style: normal;
  color: var(--ink-55);
  margin-right: -2px;
}

/* Status dot — colored by category (gold/blue/cool/neutral) */
.map__chip-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-25);
  flex-shrink: 0;
}
.map__chip-dot--gold     { background: #D9B68C; }
.map__chip-dot--blue     { background: #7BA4E8; }
.map__chip-dot--cool     { background: #9FB3C7; }
.map__chip-dot--neutral  { background: #C8C0B4; }

/* "Active front" floating pill — labels the curve in the field */
.map__front {
  position: absolute;
  top: 60%;
  left: 38%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #0a0a0a;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  z-index: 3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.map__front svg { color: #0a0a0a; }

/* X-axis labels at the bottom of the map */
.map__xlabel {
  position: absolute;
  bottom: 10px;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-40);
  pointer-events: none;
}
.map__xlabel--left  { left: 14px; }
.map__xlabel--right { right: 14px; }

.story-subhead,
.ahead-subhead {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 8px 0 0;
  color: var(--ink);
}
.story-tail {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0;
}

/* ==========================================================================
   RIGHT COLUMN — what's ahead
   ========================================================================== */
.ahead-heading {
  font-size: clamp(24px, 2.2vw, 36px);
}
.ahead-radar {
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--ink-12);
  padding: 16px;
  overflow: hidden;
}
.ahead-radar svg {
  width: 100%;
  height: auto;
}

/* Radar sweep: rotates from -90deg to +90deg (left to right) on a 4s
   loop, then snaps back. Trail wedge fades behind it so the sweep
   feels like a real radar paint. */
.radar-sweep {
  transform-origin: 0 0;
  animation: radar-sweep 4s linear infinite;
}
@keyframes radar-sweep {
  0%   { transform: rotate(-85deg); opacity: 0.85; }
  90%  { transform: rotate(85deg);  opacity: 0.85; }
  95%  { opacity: 0; }
  100% { transform: rotate(-85deg); opacity: 0; }
}

/* Blip pulse: each blip breathes at a different phase so they
   don't sync up. Matches the staggered "events visible at varying
   distance" feel of the mobile radar. */
.radar-blip {
  animation: radar-pulse 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.radar-blip--1 { animation-delay: 0s;   }
.radar-blip--2 { animation-delay: 0.7s; }
.radar-blip--3 { animation-delay: 1.4s; }
@keyframes radar-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.6); }
}

@media (prefers-reduced-motion: reduce) {
  .radar-sweep,
  .radar-blip { animation: none; }
}

/* Active map chip: gentle accent breath so it reads as "this is the
   live focus" — same pattern as the prototype's pen halo. */
.map__chip--active {
  animation: map-active-pulse 2.8s ease-in-out infinite;
}
@keyframes map-active-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px var(--accent-dim),
      0 6px 18px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(255, 240, 86, 0.08),
      0 6px 18px rgba(0, 0, 0, 0.4);
  }
}
@media (prefers-reduced-motion: reduce) {
  .map__chip--active { animation: none; }
}

/* Event cards */
.events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-card {
  background: var(--bg-panel);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  transition: border-color 200ms;
}
.event-card:hover,
.event-card:focus-visible {
  border-color: var(--ink-25);
  outline: none;
  cursor: pointer;
}
.event-card__time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--ink-12);
  padding-right: 12px;
}
.event-card__when {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.event-card__sub {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-55);
  text-transform: uppercase;
  line-height: 1.3;
}
.event-card__body { display: flex; flex-direction: column; gap: 6px; }
.event-card__title {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.event-card__body p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-70);
  margin: 0;
}
.event-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.severity {
  display: inline-flex;
  gap: 4px;
}
.severity i {
  width: 14px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}
.severity i.dim { background: var(--ink-25); }
.event-card__impact {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-55);
}

.ahead-quote {
  margin: 0;
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-70);
  font-style: italic;
}
.ahead-quote::before { content: "" }

/* ==========================================================================
   STICKY BOTTOM CTA BAR
   ========================================================================== */
.forecast-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--cta-h);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid var(--ink-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 50;
}
.forecast-cta__label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-55);
}
.forecast-cta__btn {
  padding: 12px 22px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: transform 140ms, box-shadow 140ms, background-color 140ms;
  box-shadow: 0 0 0 1px rgba(255, 240, 86, 0.4) inset, 0 6px 14px rgba(0,0,0,0.35);
}
.forecast-cta__btn:hover { transform: translateY(-1px); background: #FFE633; }
.forecast-cta__btn:active { transform: translateY(0); }

/* ==========================================================================
   MODALS — subscribe + detail
   ========================================================================== */
.subscribe-modal,
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.subscribe-modal[hidden],
.detail-modal[hidden] { display: none; }
.subscribe-modal__backdrop,
.detail-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 220ms;
}
.subscribe-modal.is-open .subscribe-modal__backdrop,
.detail-modal.is-open .detail-modal__backdrop { opacity: 1; }

.subscribe-modal__panel,
.detail-modal__panel {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--ink-12);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 8px 22px rgba(0,0,0,0.4);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 200ms;
}
.detail-modal__panel { max-width: 640px; }
.subscribe-modal.is-open .subscribe-modal__panel,
.detail-modal.is-open .detail-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.subscribe-modal__close,
.detail-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink-55);
  border-radius: 999px;
  transition: color 140ms, background-color 140ms;
}
.subscribe-modal__close:hover,
.detail-modal__close:hover {
  color: var(--ink);
  background: var(--ink-06);
}

.subscribe-modal__title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--ink);
}
.subscribe-modal__lede {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0 0 22px;
}

/* Subscribe form */
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.subscribe-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.subscribe-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.subscribe-form__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.subscribe-form input[type="email"] {
  padding: 14px 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--ink-06);
  border: 1px solid var(--ink-12);
  border-radius: 999px;
  outline: none;
  transition: border-color 160ms, background-color 160ms;
}
.subscribe-form input[type="email"]:focus {
  border-color: var(--ink-40);
  background: var(--ink-12);
}
.subscribe-form input[type="email"]::placeholder { color: var(--ink-40); }
.subscribe-form__submit {
  margin-top: 4px;
  padding: 14px 22px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  transition: transform 140ms, background-color 140ms;
}
.subscribe-form__submit:hover {
  transform: translateY(-1px);
  background: #FFE633;
}
.subscribe-form__thanks {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--ink-06);
  border: 1px solid var(--ink-12);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.subscribe-form__thanks strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.subscribe-form.is-submitted .subscribe-form__field,
.subscribe-form.is-submitted .subscribe-form__submit { display: none; }
.subscribe-form.is-submitted .subscribe-form__thanks { display: block !important; }

/* Detail modal content (populated by JS) */
.detail-modal__content {
  color: var(--ink);
}
.detail-modal__content h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ink);
}
.detail-modal__content p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-70);
  margin: 0 0 12px;
}
.detail-modal__content .meta-row {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-12);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-55);
}
.detail-modal__content .meta-row strong { color: var(--ink); font-weight: 500; }

.detail-modal__content .detail-evidence {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-modal__content .detail-evidence li {
  position: relative;
  padding: 10px 14px 10px 30px;
  background: var(--ink-06);
  border-left: 2px solid var(--ink-25);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-70);
}
.detail-modal__content .detail-evidence li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-40);
}

/* ==========================================================================
   RESPONSIVE — stack columns vertically on tablet/mobile.
   ========================================================================== */
@media (max-width: 1100px) {
  .forecast {
    grid-template-columns: 1fr;
    padding: 32px 24px calc(var(--cta-h) + 64px);
    gap: 56px;
    max-width: 720px;
  }
  .climate-headline__title { font-size: clamp(40px, 10vw, 64px); }
  .story-heading,
  .ahead-heading { font-size: clamp(26px, 6vw, 36px); }
}

@media (max-width: 600px) {
  .forecast {
    padding: 24px 18px calc(var(--cta-h) + 56px);
    gap: 44px;
  }
  .climate-headline {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .climate-confidence {
    align-self: start;
    min-width: 110px;
    padding: 14px 18px;
  }
  .forecast-cta {
    padding: 0 16px;
    gap: 12px;
  }
  .forecast-cta__label {
    font-size: 10px;
    letter-spacing: 0.14em;
    flex: 1;
    line-height: 1.3;
  }
  .forecast-cta__btn {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
  }
  .market-story__tags { grid-template-columns: 1fr; }
  .readings { grid-template-columns: 1fr 1fr 1fr; }
  .reading { padding: 12px 10px; }
  .reading__value { font-size: 15px; }
  .forecast-card--map { min-height: 320px; }
  .subscribe-modal__panel,
  .detail-modal__panel { padding: 24px 20px; }
  .subscribe-modal__title { font-size: 22px; }

  /* ---- Mobile storm reduction ----
     The full-strength page-storm (four 600px+ blurred clouds, four
     blurred flash zones, and a mix-blend-mode rain layer animating
     at 0.22s) is a known way to make mobile Safari fail to paint —
     a blank page. Here we keep the mood but drastically cut the
     GPU cost: smaller/fewer blurs, drop the most expensive flashes,
     and remove the blend-mode + fast animation from the rain. */
  .page-storm__cloud {
    filter: blur(40px);   /* was 70px — large blur radii are the heaviest op */
  }
  .page-storm__cloud--3,
  .page-storm__cloud--4 { display: none; }  /* keep two clouds, drop two */

  .page-storm__flash {
    filter: blur(50px);   /* was 80px */
  }
  .page-storm__flash--3 { display: none; }  /* keep two flash zones */

  /* Rain: keep it falling but remove the screen blend mode (the
     expensive part on mobile) and slow it slightly so it isn't
     repainting the whole viewport 5x/second. */
  .page-storm__rain {
    mix-blend-mode: normal;
    opacity: 0.30;
    animation-duration: 0.5s;
  }
}

/* ==========================================================================
   PAGE-WIDE STORMY ATMOSPHERE
   Fixed layer behind all content. Three components:
     1. Cloud blobs drifting across the viewport
     2. Lightning flash zones (three positional + one sky-wide)
     3. Rain texture scrolling diagonally downward
   Pointer-events: none so it never intercepts clicks/taps.
   Honors prefers-reduced-motion: all animation paused, lighter opacity.
   ========================================================================== */
.page-storm {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
/* Content above the storm */
.forecast {
  position: relative;
  z-index: 1;
}
.forecast-cta {
  z-index: 50;  /* already set, keeping for clarity — CTA stays above storm */
}

/* ----- Clouds — four blurred blobs, drift on long out-of-phase cycles -- */
.page-storm__cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  background: radial-gradient(circle at 50% 50%,
    rgba(195, 200, 220, 0.55), transparent 70%);
  will-change: transform;
}
.page-storm__cloud--1 {
  top: -12%; left: -8%;
  width: 620px; height: 620px;
  opacity: 0.18;
  animation: page-cloud-drift-1 130s ease-in-out infinite alternate;
}
.page-storm__cloud--2 {
  top: 18%; right: -10%;
  width: 540px; height: 540px;
  opacity: 0.14;
  background: radial-gradient(circle at 50% 50%,
    rgba(200, 200, 215, 0.50), transparent 70%);
  animation: page-cloud-drift-2 160s ease-in-out infinite alternate-reverse;
}
.page-storm__cloud--3 {
  top: 50%; left: 12%;
  width: 700px; height: 700px;
  opacity: 0.16;
  background: radial-gradient(circle at 50% 50%,
    rgba(185, 195, 215, 0.50), transparent 70%);
  animation: page-cloud-drift-3 180s ease-in-out infinite alternate;
}
.page-storm__cloud--4 {
  bottom: -14%; right: 18%;
  width: 580px; height: 580px;
  opacity: 0.13;
  background: radial-gradient(circle at 50% 50%,
    rgba(210, 215, 230, 0.45), transparent 70%);
  animation: page-cloud-drift-4 150s ease-in-out infinite alternate-reverse;
}
@keyframes page-cloud-drift-1 {
  0%   { transform: translate(0, 0)        scale(1); }
  100% { transform: translate(80px, 40px)  scale(1.08); }
}
@keyframes page-cloud-drift-2 {
  0%   { transform: translate(0, 0)        scale(1); }
  100% { transform: translate(-70px, 50px) scale(1.05); }
}
@keyframes page-cloud-drift-3 {
  0%   { transform: translate(0, 0)        scale(1); }
  100% { transform: translate(60px, -40px) scale(1.06); }
}
@keyframes page-cloud-drift-4 {
  0%   { transform: translate(0, 0)         scale(1); }
  100% { transform: translate(-50px, -60px) scale(1.04); }
}

/* ----- Lightning — three positional flash zones at out-of-sync cadences -- */
.page-storm__flash {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  background: radial-gradient(circle at 50% 50%,
    rgba(220, 220, 235, 0.7), transparent 70%);
  opacity: 0;
  will-change: opacity;
}
.page-storm__flash--1 {
  top: 5%; left: 8%;
  width: 480px; height: 480px;
  animation: page-flash-1 13s linear infinite;
}
.page-storm__flash--2 {
  top: 12%; right: 6%;
  width: 420px; height: 420px;
  animation: page-flash-2 19s linear infinite;
}
.page-storm__flash--3 {
  top: 40%; left: 32%;
  width: 540px; height: 540px;
  animation: page-flash-3 23s linear infinite;
}

/* Flash patterns — irregular double-strokes, mostly off, brief spikes.
   Different cycle lengths (13s, 19s, 23s) ensure no metronome rhythm. */
@keyframes page-flash-1 {
  0%, 100%, 22%, 26%, 64%, 68% { opacity: 0; }
  23% { opacity: 0.55; }
  24% { opacity: 0.15; }
  25% { opacity: 0.45; }
  65% { opacity: 0.35; }
  67% { opacity: 0.40; }
}
@keyframes page-flash-2 {
  0%, 100%, 38%, 42%, 80%, 82% { opacity: 0; }
  39% { opacity: 0.50; }
  40% { opacity: 0.18; }
  41% { opacity: 0.42; }
  81% { opacity: 0.38; }
}
@keyframes page-flash-3 {
  0%, 100%, 14%, 18%, 56%, 60%, 88%, 90% { opacity: 0; }
  15% { opacity: 0.40; }
  17% { opacity: 0.30; }
  57% { opacity: 0.48; }
  59% { opacity: 0.22; }
  89% { opacity: 0.35; }
}

/* Sky-wide flash: very rare full-viewport brightness pulse (near strike). */
.page-storm__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(230, 230, 245, 0.12) 0%,
    rgba(230, 230, 245, 0.04) 40%,
    transparent 80%);
  opacity: 0;
  animation: page-sky-flash 41s linear infinite;
}
@keyframes page-sky-flash {
  0%, 100%, 47%, 51%, 89%, 91% { opacity: 0; }
  48% { opacity: 0.65; }
  49% { opacity: 0.12; }
  50% { opacity: 0.55; }
  90% { opacity: 0.40; }
}

/* ----- Rain — three layers of discrete radial-gradient drops tiled
        across an oversized box, rotated 8deg for diagonal fall, and
        animated by background-position-y so each layer's drops scroll
        downward at a different speed. Each "drop" is a thin tall
        ellipse — short vertical streak — not a continuous line.

        Three layers with different drop sizes, opacities, and tile
        sizes give parallax depth: bigger/brighter drops fall faster
        ("closer"), smaller/dimmer ones fall slower ("further away").
        All animations sync to 0.9s but each layer covers a different
        distance per cycle, so the visual speeds differ. */
.page-storm__rain {
  position: absolute;
  inset: -120px -80px;
  background-image:
    /* Closer drops — brighter, larger ellipse */
    radial-gradient(ellipse 0.9px 14px at 50% 50%, rgba(235, 240, 255, 0.32), transparent 70%),
    /* Mid drops */
    radial-gradient(ellipse 0.7px 11px at 50% 50%, rgba(235, 240, 255, 0.22), transparent 70%),
    /* Far drops — dimmer, smaller ellipse */
    radial-gradient(ellipse 0.5px 8px  at 50% 50%, rgba(235, 240, 255, 0.14), transparent 70%);
  background-size: 90px 130px, 70px 90px, 130px 160px;
  background-position: 0 0, 35px 40px, 60px 70px;
  background-repeat: repeat;
  transform: rotate(12deg);
  transform-origin: center;
  animation: page-rain-fall 0.22s linear infinite;
  opacity: 0.45;
  mix-blend-mode: screen;
}
@keyframes page-rain-fall {
  0% {
    background-position:
      0    0,
      35px 40px,
      60px 70px;
  }
  100% {
    background-position:
      0    130px,
      35px 130px,
      60px 230px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-storm__cloud,
  .page-storm__flash,
  .page-storm__sky,
  .page-storm__rain { animation: none; }
  .page-storm__rain { opacity: 0.25; }
}
