/* ─────────────────────────────────────────────────────────────────
   watts.bar — chart paper instrument cluster
   Mobile-first. Light theme by day, dark theme at dusk.
   ───────────────────────────────────────────────────────────────── */

:root {
  /* CHART PAPER — light, default */
  --paper:        #efe6cc;
  --paper-deep:   #e0d3a8;
  --paper-inset:  #f6efd9;
  --paper-shadow: rgba(60, 40, 20, 0.10);

  /* INK */
  --ink:          #1a2733;
  --ink-soft:     #4a5a68;
  --ink-faint:    #6e6857;
  --ink-ghost:    rgba(26, 39, 51, 0.4);

  /* HAIRLINES */
  --rule:         #8a7556;
  --rule-faint:   rgba(138, 117, 86, 0.35);
  --rule-ghost:   rgba(138, 117, 86, 0.18);

  /* ACCENTS */
  --water:        #2d6c8a;
  --water-deep:   #1a4a64;
  --water-soft:   rgba(45, 108, 138, 0.16);
  --warn:         #b8431f;
  --warn-soft:    rgba(184, 67, 31, 0.16);
  --beacon:       #c8841c;
  --moss:         #4a6c3c;

  /* TYPE */
  --display:      'Fraunces', 'Iowan Old Style', 'Charter', Georgia, serif;
  --body:         'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:         'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* SPACING */
  --gutter:       max(1rem, env(safe-area-inset-left));
  --section-gap:  clamp(1.4rem, 3.5vw, 2.75rem);
  --max-width:    1280px;

  /* MOON */
  --moon-light:   #f3ead0;
  --moon-dark:    #2a2418;
}

@media (min-width: 600px) {
  :root {
    --gutter: max(2rem, env(safe-area-inset-left));
  }
}
@media (min-width: 1000px) {
  :root {
    --gutter: 3rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #0c1820;
    --paper-deep:   #050d12;
    --paper-inset:  #14242e;
    --paper-shadow: rgba(0, 0, 0, 0.45);
    --ink:          #f3ead0;
    --ink-soft:     #b6a98c;
    --ink-faint:    #8e886e;
    --ink-ghost:    rgba(243, 234, 208, 0.5);
    --rule:         #5a4a30;
    --rule-faint:   rgba(115, 95, 60, 0.35);
    --rule-ghost:   rgba(115, 95, 60, 0.18);
    --water:        #6cb8d8;
    --water-deep:   #4084a0;
    --water-soft:   rgba(108, 184, 216, 0.15);
    --warn:         #e26840;
    --warn-soft:    rgba(226, 104, 64, 0.18);
    --beacon:       #f0b850;
    --moss:         #88ad60;
    --moon-dark:    #1a1a18;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  /* avoid the iOS pull-to-refresh white flash on a dark page */
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* ─────────────────────────────────────────────
   Atmospheric backdrop
   ───────────────────────────────────────────── */

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  color: var(--rule);
  overflow: hidden;
}

.topo-grid {
  position: absolute;
  inset: -50px;
  background-image:
    linear-gradient(to right, var(--rule-ghost) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-ghost) 1px, transparent 1px),
    linear-gradient(to right, var(--rule-ghost) 0.5px, transparent 0.5px),
    linear-gradient(to bottom, var(--rule-ghost) 0.5px, transparent 0.5px);
  background-size: 240px 240px, 240px 240px, 48px 48px, 48px 48px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 30%, transparent 100%);
}

.paper-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  opacity: 0.32;
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  .paper-noise { mix-blend-mode: overlay; opacity: 0.22; }
}

.atmosphere-rose {
  position: absolute;
  width: clamp(220px, 40vw, 360px);
  height: auto;
  right: -8vw;
  bottom: 12vh;
  opacity: 0.06;
  color: var(--ink);
  display: none;
}

@media (min-width: 900px) {
  .atmosphere-rose { display: block; }
}

/* ─────────────────────────────────────────────
   Layout shell
   ───────────────────────────────────────────── */

.logbook {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ─────────────────────────────────────────────
   Masthead
   ───────────────────────────────────────────── */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 0 0.85rem;
  border-bottom: 1px solid var(--rule-faint);
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.masthead-coords {
  display: flex;
  gap: 0.6em;
  align-items: center;
  white-space: nowrap;
}
.masthead-coords .dot {
  color: var(--ink-faint);
}

.masthead-id {
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
}

.masthead-status {
  display: inline-flex;
  gap: 0.5em;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex-shrink: 0;
}

/* State machine: connecting (neutral, slow pulse) → live (red, sharp pulse) → offline (red, no pulse) */
.masthead-status[data-state="connecting"] .status-pulse {
  background: var(--ink-soft);
  animation: pulse-soft 1.6s infinite;
}
.masthead-status[data-state="live"] .status-pulse {
  background: var(--warn);
  animation: pulse 2.4s infinite;
}
.masthead-status[data-state="offline"] .status-pulse {
  background: var(--warn);
  opacity: 0.5;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 67, 31, 0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(184, 67, 31, 0); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (prefers-color-scheme: dark) {
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(226, 104, 64, 0.55); }
    50%      { box-shadow: 0 0 0 6px rgba(226, 104, 64, 0); }
  }
}

@media (min-width: 600px) {
  .masthead { font-size: 0.96rem; padding: 1.25rem 0 1rem; }
}

/* Offline badge */
.offline-badge {
  display: none;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.96rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--paper);
  background: var(--warn);
  padding: 0.55rem 0.85rem;
  margin: 0.65rem calc(-1 * var(--gutter)) 0;
  text-align: center;
  justify-content: center;
}
.offline-badge[data-shown="1"] { display: flex; }
.offline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper);
  animation: blink 1.4s infinite;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   Hero (mobile-first stacked)
   ───────────────────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.4rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.hero-mark { text-align: center; }
.hero-reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.5rem 1rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--rule-faint);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule-faint);
}

.hero-temp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding-left: 0.25rem;
}

.hero-compass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(3.75rem, 18vw, 7.5rem);
  letter-spacing: -0.045em;
  line-height: 0.86;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
}
.wordmark-dot {
  color: var(--warn);
  font-style: normal;
  display: inline-block;
  transform: translateY(-0.05em);
}

.wordmark-frame {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 4.4vw, 1.35rem);
  line-height: 1.3;
  color: var(--ink-soft);
  margin-top: 0.55rem;
  letter-spacing: -0.005em;
  font-variation-settings: 'opsz' 36;
}

.wordmark-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.75rem;
  font-weight: 500;
  flex-wrap: wrap;
}
.wordmark-sub .dot { color: var(--rule); }

.wordmark-sub .rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule-faint);
  min-width: 24px;
  max-width: 80px;
}

@media (max-width: 460px) {
  .wordmark-sub .rule { display: none; }
  .wordmark-sub {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    gap: 0.4em;
  }
}

.temp-display {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.05em;
  line-height: 0.82;
}

.temp-value {
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(3rem, 13vw, 4.75rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.temp-unit {
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1rem, 3.5vw, 1.5rem);
  margin-top: 0.5em;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

.temp-condition-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(0.95rem, 3.8vw, 1.2rem);
  color: var(--ink);
  line-height: 1.15;
}
.temp-condition-row .wi {
  font-size: 1.45em;
  font-style: normal;
  color: var(--ink);
  flex-shrink: 0;
}
.temp-condition {
  text-transform: capitalize;
  letter-spacing: 0;
}

.temp-meta {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}
.temp-divider {
  width: 1px;
  height: 11px;
  background: var(--rule-faint);
}

/* Compass */
.compass-wrap {
  flex-shrink: 0;
}

.compass {
  width: clamp(86px, 24vw, 150px);
  height: auto;
  display: block;
}

.compass-cardinal {
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  fill: var(--ink);
}
.compass-n { fill: var(--warn); }
.compass-intercardinal {
  font-family: var(--mono);
  font-size: 7px;
  fill: var(--ink-faint);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.compass-needle {
  transform-box: view-box;
  transform-origin: 100px 100px;
  transition: transform 1.2s cubic-bezier(0.34, 1.2, 0.4, 1);
}

.compass-readout {
  text-align: center;
  line-height: 1.05;
}

.compass-speed {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 4vw, 1.5rem);
  font-weight: 500;
  color: var(--ink);
  margin-top: 0.05em;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.compass-speed-unit {
  font-size: 0.5em;
  color: var(--ink-faint);
  margin-left: 0.4em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.compass-direction {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.1em;
  letter-spacing: 0;
  line-height: 1.15;
}

.compass-label {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

@media (min-width: 760px) {
  .hero {
    padding: clamp(2.25rem, 5vw, 3.75rem) 0 clamp(1.75rem, 4vw, 2.5rem);
    gap: 1.6rem;
  }
  .hero-mark { text-align: center; }
  .hero-reading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: end;
    padding-top: 0.85rem;
  }
  .hero-temp { padding: 0; align-items: flex-start; }
  .hero-compass {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }
  .temp-display { line-height: 0.85; }
  .temp-value { font-size: clamp(4.5rem, 11vw, 7rem); }
}

@media (min-width: 1000px) {
  .compass { width: 180px; }
  .temp-value { font-size: clamp(5.5rem, 9vw, 7.5rem); }
}

/* ─────────────────────────────────────────────
   Live cam strip
   ───────────────────────────────────────────── */

/* Lake promo — the differentiator. Promoted right under the hero.
   Water temperature, UV index (sunburn risk), discharge — what fishermen,
   swimmers, and boaters actually need to know. */
.lake-promo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.85rem 0 0;
}
.lake-promo-card {
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "label glyph"
    "value value"
    "note  note";
  gap: 0.15rem 0.75rem;
  align-items: center;
}
.lake-promo-top {
  grid-area: label;
  display: contents;
}
.lake-promo-label {
  grid-area: label;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.lake-promo-glyph {
  grid-area: glyph;
  font-style: normal;
  font-size: 1.4rem;
  color: var(--ink-faint);
  line-height: 1;
  align-self: center;
  justify-self: end;
}
.lake-promo-card[data-hidden="1"] { display: none; }
.lake-promo-water .lake-promo-glyph { color: var(--water); }
.lake-promo-uv    .lake-promo-glyph { color: var(--beacon); }
.lake-promo-flow  .lake-promo-glyph { color: var(--water-deep); }

.lake-promo-value-row {
  grid-area: value;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  margin-top: 0.15em;
}
.lake-promo-value {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(2.5rem, 12vw, 3.75rem);
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
}
.lake-promo-water .lake-promo-value { color: var(--water-deep); }
.lake-promo-unit {
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}
.lake-promo-uv-tag {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--beacon);
  text-transform: lowercase;
  letter-spacing: 0;
}
.lake-promo-note {
  grid-area: note;
  font-family: var(--body);
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-top: 0.15rem;
}

@media (min-width: 600px) {
  .lake-promo {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

/* Quick stats — dense above-the-fold strip just under the hero */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--rule-faint);
  background: var(--paper-inset);
  margin: 0 calc(-1 * var(--gutter));
}
.quick-stat {
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  border-right: 1px dashed var(--rule-ghost);
  border-top: 1px dashed var(--rule-ghost);
  align-items: flex-start;
  min-width: 0;
}
.quick-stat:nth-child(3n) { border-right: none; }
.quick-stat:nth-child(-n+3) { border-top: none; }
.quick-stat-label {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  white-space: nowrap;
}
.quick-stat-value {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.25rem, 5.5vw, 1.75rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.quick-stat-unit {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  margin-left: 0.15em;
}
@media (min-width: 600px) {
  .quick-stats {
    grid-template-columns: repeat(6, 1fr);
  }
  .quick-stat:nth-child(3n) { border-right: 1px dashed var(--rule-ghost); }
  .quick-stat:nth-child(-n+3) { border-top: none; }
  .quick-stat:nth-child(6n) { border-right: none; }
  .quick-stat:nth-child(-n+6) { border-top: none; }
  .quick-stat { padding: 0.7rem 0.95rem; }
}

.cam-strip {
  margin: clamp(0.85rem, 2.5vw, 1.5rem) calc(-1 * var(--gutter)) 0;
  background: var(--paper-deep);
  position: relative;
}

/* Cabin ad — inline, image-led, sits right after the cam */
.cabin-ad {
  display: block;
  position: relative;
  margin: 0 calc(-1 * var(--gutter));
  text-decoration: none;
  color: inherit;
  background: #0a1820;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(280px, 50vw, 380px);
  border-bottom: 1px solid var(--rule);
}
.cabin-ad-image {
  position: absolute;
  inset: 0;
  background-image: var(--cabin-image, none);
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cabin-ad:hover .cabin-ad-image,
.cabin-ad:focus-visible .cabin-ad-image {
  transform: scale(1.03);
}
.cabin-ad-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(10, 24, 32, 0.05) 0%,
    rgba(10, 24, 32, 0.4) 45%,
    rgba(10, 24, 32, 0.92) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem var(--gutter);
}
.cabin-ad-content {
  color: rgba(255, 255, 255, 0.96);
  max-width: 580px;
}
.cabin-ad-eyebrow {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  display: inline-block;
  margin-bottom: 0.6rem;
}
.cabin-ad-rating {
  color: var(--beacon);
  letter-spacing: 0.1em;
}
.cabin-ad-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 5.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.98);
  font-variation-settings: 'opsz' 72;
  margin-bottom: 0.5rem;
}
.cabin-ad-body {
  font-family: var(--body);
  font-size: clamp(0.85rem, 3.5vw, 0.95rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  margin-bottom: 0.85rem;
  max-width: 50ch;
}
.cabin-ad-cta {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 1px;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  transition: border-color 0.2s, gap 0.2s;
}
.cabin-ad:hover .cabin-ad-cta,
.cabin-ad:focus-visible .cabin-ad-cta {
  border-color: rgba(255, 255, 255, 1);
}
.cabin-ad:hover .cabin-ad-arrow,
.cabin-ad:focus-visible .cabin-ad-arrow {
  transform: translateX(3px);
}
.cabin-ad-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

@media (min-width: 600px) {
  .cabin-ad {
    min-height: 320px;
  }
}

.cam-frame {
  position: relative;
  aspect-ratio: 21 / 9;
  max-height: 60vh;
  overflow: hidden;
  background: #0a0a0a;
}

@media (min-width: 760px) {
  .cam-frame { aspect-ratio: 16 / 9; max-height: 65vh; }
}

#cam-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cam-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 255, 255, 0.92);
  border-style: solid;
  border-width: 0;
  z-index: 2;
}
.cam-corner--tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.cam-corner--tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; }
.cam-corner--bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; }
.cam-corner--br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }

@media (min-width: 600px) {
  .cam-corner { width: 24px; height: 24px; top: auto; }
  .cam-corner--tl, .cam-corner--tr { top: 14px; }
  .cam-corner--bl, .cam-corner--br { bottom: 14px; }
  .cam-corner--tl, .cam-corner--bl { left: 14px; }
  .cam-corner--tr, .cam-corner--br { right: 14px; }
}

.cam-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 2;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cam-overlay-left { display: flex; align-items: center; gap: 0.6em; }

.cam-rec {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d63a3a;
  animation: blink 1.6s infinite ease-in-out;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.cam-overlay-right { font-size: 0.92rem; opacity: 0.85; }

/* Pause overlay (idle / "tap to resume") */
.cam-pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 16, 22, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.cam-pause-overlay[data-shown="1"] {
  opacity: 1;
  pointer-events: auto;
}
.cam-pause-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(243, 234, 208, 0.4);
  background: rgba(12, 24, 32, 0.6);
}
.cam-pause-eyebrow {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  font-weight: 600;
}
.cam-pause-text {
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 600px) {
  .cam-overlay { padding: 1rem 1.25rem; font-size: 0.92rem; }
  .cam-overlay-right { font-size: 0.96rem; }
}

/* ─────────────────────────────────────────────
   Section titles
   ───────────────────────────────────────────── */

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1rem, 3.8vw, 1.25rem);
  letter-spacing: -0.01em;
  margin-top: var(--section-gap);
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.section-mark {
  font-family: var(--mono);
  font-size: 0.7em;
  color: var(--warn);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.section-name { flex-shrink: 0; }

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--rule-faint);
  margin-left: 0.25rem;
  position: relative;
  top: -0.2em;
}

.section-rule::before {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--rule);
}

/* ─────────────────────────────────────────────
   Instrument cluster
   ───────────────────────────────────────────── */

.instrument-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.inst {
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.25rem 1.1rem 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 175px;
  box-shadow: 0 1px 0 var(--paper-shadow);
}

.inst::before, .inst::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.inst::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}
.inst::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.inst-label {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.inst-readout {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}
.inst-readout--lg { margin-top: 1rem; }
.inst-readout--centered { justify-content: center; }

.inst-value {
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(2rem, 8vw, 2.85rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.inst-value--mono { font-family: var(--mono); font-weight: 500; font-size: clamp(1.85rem, 7vw, 2.5rem); }
.inst-value--italic { /* legacy */ }

.inst-unit {
  font-family: var(--mono);
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inst-context {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

/* Humidity tube */
.inst--humidity {
  display: grid;
  grid-template-areas:
    "label tube"
    "readout tube";
  grid-template-columns: 1fr 28px;
  align-items: stretch;
  gap: 0 1rem;
}
.inst--humidity > .inst-label { grid-area: label; }
.inst--humidity > .inst-readout { grid-area: readout; align-self: end; }
.inst-tube {
  grid-area: tube;
  position: relative;
  height: 100%;
  min-height: 120px;
  width: 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 11px;
  margin: auto 4px;
  align-self: stretch;
  overflow: hidden;
}

.inst-tube-fill {
  position: absolute;
  bottom: 0;
  left: 1px;
  right: 1px;
  background: linear-gradient(to top, var(--water-deep), var(--water));
  transition: height 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  height: 0;
}

.inst-tube-mark {
  position: absolute;
  right: -24px;
  font-family: var(--mono);
  font-size: 0.5rem;
  color: var(--ink-faint);
  transform: translateY(50%);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* Barometer */
.inst--pressure { padding-top: 1.25rem; }
.inst-baro {
  width: 100%;
  height: auto;
  margin-top: 0.85rem;
  margin-bottom: 0.5rem;
}
#baro-pointer {
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

/* UV */
.inst--uv { text-align: center; }
.uv-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
}
.inst-uv {
  width: 100%;
  max-width: 220px;
  height: auto;
}
#uv-pointer {
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.uv-tick-label {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--ink-faint);
  font-weight: 500;
}
.uv-label {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-transform: lowercase;
  margin-left: 0.4em;
  align-self: center;
}

/* Rain */
.rain-state {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 0.65rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.55em;
}

.rain-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
  display: inline-block;
  flex-shrink: 0;
}

.rain-state.is-raining {
  color: var(--warn);
}
.rain-state.is-raining .rain-state-dot {
  background: var(--warn);
  animation: blink 1.4s infinite;
}

.rain-rate-row {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 0.85rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--rule-faint);
}

.rain-rate-value {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rain-rate-unit {
  margin-left: -0.3em;
}

@media (min-width: 600px) {
  .instrument-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1000px) {
  .instrument-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }
  .inst--humidity { grid-column: span 2; }
  .inst--pressure { grid-column: span 4; }
  .inst--uv       { grid-column: span 2; }
  .inst--gust     { grid-column: span 2; }
  .inst--rain     { grid-column: span 2; }
}

/* ─────────────────────────────────────────────
   Lake panel
   ───────────────────────────────────────────── */

.lake-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.lake-water {
  text-align: center;
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.lake-water::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--water), transparent);
  opacity: 0.4;
}

.lake-water-glyph {
  width: 52px;
  height: 52px;
  margin-bottom: 0.35rem;
  color: var(--water);
  opacity: 0.85;
}
@media (min-width: 600px) {
  .lake-water-glyph { width: 64px; height: 64px; }
}

.lake-water-label {
  font-family: var(--mono);
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.lake-water-value {
  display: inline-flex;
  align-items: flex-start;
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(2.75rem, 11vw, 5rem);
  line-height: 0.92;
  color: var(--water-deep);
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  .lake-water-value { color: var(--water); }
}

.lake-water-unit {
  font-size: 0.3em;
  margin-top: 0.6em;
  margin-left: 0.05em;
  color: var(--water);
  letter-spacing: 0.05em;
  font-style: italic;
  font-weight: 300;
}

.lake-water-note {
  margin-top: 0.85rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 32ch;
  line-height: 1.4;
}

.lake-water-source {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lake-elevation-summary {
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.25rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lake-elevation-label {
  font-family: var(--mono);
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.elev-value-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15em;
}

.elev-value {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(2.25rem, 7.5vw, 3.25rem);
  color: var(--ink);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.elev-unit {
  font-family: var(--mono);
  font-size: 0.94rem;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.elev-delta {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--warn);
  font-weight: 600;
  margin-top: 0.3rem;
}

.elev-context {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0.65rem;
  line-height: 1.45;
}
.elev-context strong { color: var(--ink); font-weight: 600; }

@media (min-width: 760px) {
  .lake-top-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 1.5rem;
    align-items: stretch;
  }
}

.elev-predicted {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 0.4rem;
  font-variant-numeric: tabular-nums;
}

/* Lake flow tile */
.lake-flow {
  margin-top: 1rem;
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.25rem 1rem;
  position: relative;
}
.lake-flow::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--water-deep), transparent);
  opacity: 0.55;
}

.lake-flow-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 1rem;
}

.lake-flow-eyebrow {
  font-family: var(--mono);
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.lake-flow-sub {
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.96rem;
  color: var(--ink-faint);
}

.lake-flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.flow-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0.5rem;
  border-top: 1px dashed var(--rule-faint);
}
.flow-item:first-child { border-top: 0; padding-top: 0.25rem; }

.flow-label {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.flow-value-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  margin-top: 0.15rem;
}

.flow-value {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.85rem, 6.5vw, 2.4rem);
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.flow-value-mono {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 4.5vw, 1.55rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.flow-unit {
  font-family: var(--mono);
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.flow-context {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

@media (min-width: 600px) {
  .lake-flow-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .flow-item {
    border-top: 0;
    border-left: 1px dashed var(--rule-faint);
    padding-top: 0.25rem;
    padding-left: 1rem;
  }
  .flow-item:first-child {
    border-left: 0;
    padding-left: 0.25rem;
  }
}

@media (min-width: 760px) {
  .lake-flow { padding: 1.5rem 1.5rem; }
  .lake-flow-header { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 1.5rem; }
}

/* 48-hour discharge sparkline */
.lake-flow-spark {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--rule-faint);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.lake-flow-spark-label {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
#wb-spark, #fl-spark {
  width: 100%;
  height: 40px;
  display: block;
}

/* Upstream Fort Loudoun panel */
.upstream {
  margin-top: 1rem;
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.25rem 1rem;
  position: relative;
}
.upstream::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--water), var(--water-deep));
  opacity: 0.55;
}
.upstream-header { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.85rem; }
.upstream-eyebrow {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.upstream-sub {
  font-family: var(--body);
  font-size: 0.96rem;
  color: var(--ink-faint);
}
.upstream-body { display: flex; flex-direction: column; gap: 0.65rem; }
.upstream-stat-label {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  display: block;
  margin-bottom: 0.15rem;
}
.upstream-stat-value-line {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
  flex-wrap: wrap;
}
.upstream-stat-value {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.65rem, 6vw, 2.1rem);
  letter-spacing: -0.025em;
  color: var(--water-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.upstream-stat-unit {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.upstream-trend {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 500;
  text-transform: lowercase;
}
.upstream-spark { width: 100%; height: 40px; }

@media (prefers-color-scheme: dark) {
  .upstream-stat-value { color: var(--water); }
}

/* TVA 3-day forecast */
.lake-pred {
  margin-top: 1rem;
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.25rem 1rem;
}
.lake-pred-header { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.85rem; }
.lake-pred-eyebrow {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.lake-pred-sub {
  font-family: var(--body);
  font-size: 0.96rem;
  color: var(--ink-faint);
}
.lake-pred-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.pred-day {
  background: var(--paper);
  border: 1px solid var(--rule-faint);
  padding: 0.7rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.pred-day-label {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.pred-day-elev {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.pred-day-unit {
  font-family: var(--mono);
  font-size: 0.7em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-left: 0.05em;
}
.pred-day-flow {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-family: var(--mono);
  font-size: 0.96rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}
.pred-flow-in  { color: var(--moss); }
.pred-flow-out { color: var(--warn); }
.pred-day--placeholder {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}

/* Lake operating chart */
.lake-chart {
  margin-top: 1rem;
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.25rem 1rem;
}

.lake-chart-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  align-items: flex-start;
}

.lake-chart-eyebrow {
  font-family: var(--mono);
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  display: block;
}

.lake-chart-sub {
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.96rem;
  color: var(--ink-faint);
  display: block;
  margin-top: 0.15rem;
}

.lake-chart-legend {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  flex-wrap: wrap;
}
.legend-current { color: var(--warn); }
.legend-thisyr  { color: var(--ink); }
.legend-target  { color: var(--water-deep); }
.legend-prevyr  { color: var(--ink-faint); }
.legend-zone    { color: var(--water); }
@media (prefers-color-scheme: dark) {
  .legend-target { color: var(--water); }
}

.lake-chart-svg-wrap {
  width: 100%;
  position: relative;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, var(--rule-ghost) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 59px, var(--rule-ghost) 59px 60px);
  border: 1px solid var(--rule-faint);
  padding: 1rem 0.75rem 1.25rem;
}

#elev-chart {
  width: 100%;
  height: clamp(180px, 35vw, 260px);
  display: block;
}

@media (min-width: 760px) {
  .lake-chart { padding: 1.5rem 1.25rem; }
  .lake-chart-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .lake-chart-legend { font-size: 0.96rem; }
}

/* ─────────────────────────────────────────────
   Forecast
   ───────────────────────────────────────────── */

.forecast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.forecast-card {
  background: var(--paper-inset);
  border: 1px solid var(--rule-faint);
  padding: 1.1rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.forecast-card header {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.forecast-icon {
  font-size: 1.65rem;
  font-style: normal;
  color: var(--ink);
  line-height: 1;
}

.forecast-mark { color: var(--warn); }

.forecast-temps {
  display: flex;
  align-items: baseline;
  gap: 0.3em;
  font-family: var(--body);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.forecast-hi {
  font-size: clamp(2rem, 8vw, 2.85rem);
  color: var(--ink);
  font-weight: 700;
  line-height: 0.95;
}

.forecast-divider {
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  color: var(--ink-faint);
  font-weight: 300;
}

.forecast-lo {
  font-size: clamp(1.4rem, 6vw, 2rem);
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 0.95;
}

.forecast-rain-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.96rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-transform: uppercase;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rule-faint);
}

.forecast-rain-value {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 600px) {
  .forecast-grid { gap: 1.25rem; }
  .forecast-card { padding: 1.5rem 1.25rem; }
}

/* ─────────────────────────────────────────────
   Radar
   ───────────────────────────────────────────── */

.radar-frame {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 8px;
}

.radar-frame::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--rule-faint);
  pointer-events: none;
  z-index: 1;
}

#map {
  width: 100%;
  height: clamp(280px, 50vh, 480px);
  background: var(--paper-deep);
  position: relative;
  z-index: 0;
}

.leaflet-container { background: var(--paper-deep); }

.radar-overlay {
  position: absolute;
  bottom: 18px;
  right: 18px;
  background: rgba(0, 0, 0, 0.78);
  color: rgba(255, 255, 255, 0.92);
  padding: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: right;
}

.radar-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.radar-attribution { opacity: 0.55; font-size: 0.92rem; }

.radar-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--rule);
  border-style: solid;
  border-width: 0;
  z-index: 2;
}
.radar-corner--tl { top: 4px; left: 4px; border-top-width: 2px; border-left-width: 2px; }
.radar-corner--tr { top: 4px; right: 4px; border-top-width: 2px; border-right-width: 2px; }
.radar-corner--bl { bottom: 4px; left: 4px; border-bottom-width: 2px; border-left-width: 2px; }
.radar-corner--br { bottom: 4px; right: 4px; border-bottom-width: 2px; border-right-width: 2px; }

@media (min-width: 600px) {
  .radar-frame { padding: 12px; }
}

/* Leaflet override to match aesthetic */
.leaflet-control-attribution {
  background: rgba(239, 230, 204, 0.85) !important;
  font-family: var(--mono) !important;
  font-size: 9px !important;
  letter-spacing: 0.05em !important;
  color: var(--ink-soft) !important;
}
@media (prefers-color-scheme: dark) {
  .leaflet-control-attribution {
    background: rgba(12, 24, 32, 0.85) !important;
    color: var(--ink-soft) !important;
  }
}
.leaflet-control-attribution a { color: var(--ink) !important; }

.station-marker { background: none !important; border: none !important; }

/* ─────────────────────────────────────────────
   Sun / moon
   ───────────────────────────────────────────── */

.celestial {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  padding: 1.1rem 0;
  margin-top: var(--section-gap);
  border-top: 1px solid var(--rule-faint);
  border-bottom: 1px solid var(--rule-faint);
}

.celestial-sun, .celestial-moon {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.celestial-label {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.celestial-times {
  display: flex;
  gap: 1rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.celestial-rise, .celestial-set {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.celestial-rise .wi, .celestial-set .wi {
  font-size: 1.2em;
  font-style: normal;
  line-height: 1;
}
.celestial-rise { color: var(--beacon); }
.celestial-set  { color: var(--water-deep); }
@media (prefers-color-scheme: dark) {
  .celestial-set  { color: var(--water); }
}

.celestial-divider {
  width: 36px;
  height: 1px;
  background: var(--rule-faint);
}

#moon-svg {
  width: 28px;
  height: 28px;
}

.celestial-moon-name {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}

@media (min-width: 600px) {
  .celestial {
    flex-direction: row;
    gap: 3rem;
    padding: 2.25rem 0;
  }
  .celestial-divider { width: 1px; height: 38px; }
  .celestial-times { font-size: 1.15rem; gap: 1.25rem; }
  #moon-svg { width: 32px; height: 32px; }
}

/* ─────────────────────────────────────────────
   Stay tile
   ───────────────────────────────────────────── */

.stay-tile {
  margin-top: var(--section-gap);
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.stay-rule { display: none; }

.stay-eyebrow {
  font-family: var(--mono);
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.stay-body {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.05rem, 4.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink);
  font-variation-settings: 'opsz' 36;
}

.stay-link { margin-top: 1.1rem; }

.stay-link a {
  color: var(--warn);
  text-decoration: none;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--warn);
  padding-bottom: 1px;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.stay-link a:hover, .stay-link a:focus {
  opacity: 0.7;
}

.stay-arrow {
  transition: transform 0.2s;
  display: inline-block;
}
.stay-link a:hover .stay-arrow {
  transform: translateX(3px);
}

@media (min-width: 600px) {
  .stay-tile {
    grid-template-columns: 60px 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
  }
  .stay-rule {
    display: block;
    position: relative;
    align-self: stretch;
    min-height: 80px;
  }
  .stay-rule::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 1.25rem;
    bottom: 0;
    width: 1px;
    background: var(--rule);
  }
  .stay-rule-mark {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    color: var(--rule);
    font-size: 0.95rem;
  }
  .stay-content {
    max-width: 60ch;
  }
}

/* ─────────────────────────────────────────────
   Colophon
   ───────────────────────────────────────────── */

.colophon {
  margin-top: var(--section-gap);
  padding: 1.5rem 0 2.25rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.colophon h4 {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 0.7rem;
}

.colophon-block strong { color: var(--ink); font-weight: 600; }

.colophon-time, .colophon-fineprint {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  line-height: 1.45;
}
.colophon-fineprint {
  margin-top: 0.6rem;
  color: var(--ink-faint);
}

@media (min-width: 760px) {
  .colophon {
    grid-template-columns: 1.6fr 1fr;
    gap: 2.5rem;
  }
}

/* ─────────────────────────────────────────────
   Initial-load animation
   ───────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .logbook > * {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  .logbook > .masthead       { animation-delay: 0s; }
  .logbook > .hero           { animation-delay: 0.08s; }
  .logbook > .cam-strip      { animation-delay: 0.18s; }
  .logbook > .instruments    { animation-delay: 0.26s; }
  .logbook > .lake-panel     { animation-delay: 0.34s; }
  .logbook > .forecast-section { animation-delay: 0.4s; }
  .logbook > .radar-section  { animation-delay: 0.46s; }
  .logbook > .celestial      { animation-delay: 0.52s; }
  .logbook > .stay-tile      { animation-delay: 0.58s; }
  .logbook > .colophon       { animation-delay: 0.64s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Print: please do not */
@media print {
  .atmosphere, .cam-strip, .radar-section, .compass, .stay-tile { display: none; }
}
