:root {
  color-scheme: light only;
  --paper: #f5f4ef;
  --surface: #fff;
  --ink: #151817;
  --muted: #686c68;
  --line: rgba(21, 24, 23, .13);
  --blue: #176b87;
  --soft-blue: #e8f3f5;
  --red: #da4b43;
  --shadow: 0 10px 35px rgba(27, 36, 34, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 5vw;
  background: rgba(245, 244, 239, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: white;
  background: var(--blue);
  border-radius: 50%;
  font-size: 22px;
}
nav { display: flex; gap: 22px; }
nav a, .source-link, .card-title a, .camera-meta a { color: var(--blue); font-size: .88rem; font-weight: 650; text-decoration: none; }
nav a:hover, .source-link:hover, .card-title a:hover, .camera-meta a:hover { text-decoration: underline; }
main { width: min(1180px, 90vw); margin: 0 auto; }
.intro { max-width: 760px; margin-bottom: 0; padding: clamp(70px, 11vw, 140px) 0 clamp(60px, 8vw, 100px); }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: .74rem; font-weight: 750; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.06em; }
.intro > p:last-child { margin: 24px 0 0; max-width: 630px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
section { scroll-margin-top: 84px; margin-bottom: clamp(76px, 11vw, 140px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.045em; }
.frame-card, .camera-card, .forecast-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.map-card { height: min(66vh, 620px); min-height: 460px; }
.jellyfish-map { width: 100%; height: 100%; background: #dfe9e8; }
.jellyfish-map .leaflet-tile-pane { filter: grayscale(1) saturate(0) contrast(.9) brightness(1.05); }
.jelly-popup { min-width: 180px; color: var(--ink); font: 14px/1.35 ui-sans-serif, system-ui, sans-serif; }
.jelly-popup strong, .jelly-popup span { display: block; }
.jelly-popup small { display: block; margin: 5px 0; color: var(--muted); }
.jelly-popup span { font-weight: 700; }
.leaflet-control-attribution { font-size: 10px; }
.note { margin: 12px 3px 0; color: var(--muted); font-size: .82rem; }
.model-label, .status-meta { color: var(--muted); font-size: .78rem; }
.ai-summary { margin: -4px 0 20px; color: var(--muted); font-size: 1rem; }
.signal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.signal-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); transition: opacity .2s ease, border-color .2s ease; }
.signal-image { position: relative; display: grid; place-items: center; min-height: 155px; color: #9b9e9b; background: #ecece8; }
.signal-image svg { width: 130px; height: 98px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.signal-mark { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: white; background: #a5a8a5; font-size: 1.25rem; font-weight: 800; }
.signal-copy { padding: 16px 18px 18px; }
.signal-copy h3 { display: inline; margin: 0 10px 0 0; font-size: 1.2rem; }
.signal-label { color: var(--muted); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.signal-reason { min-height: 42px; margin: 9px 0 0; color: var(--muted); font-size: .84rem; }
.signal-card.is-checked { border-color: rgba(29, 135, 94, .32); }
.signal-card.is-checked .signal-image { color: #18764f; background: #e8f4ed; }
.signal-card.is-checked .signal-mark { background: #1d875e; }
.signal-card.is-checked .signal-label { color: #18764f; }
.signal-card.is-off { opacity: .58; filter: grayscale(1); }
.signal-card.is-loading { opacity: .72; }
.status-meta { display: flex; justify-content: space-between; gap: 18px; margin: 13px 3px 0; }
.safety-note { margin: 8px 3px 0; color: #7c5547; font-size: .78rem; }
.camera-grid, .forecast-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.camera-card video, .camera-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #dce4e4; object-fit: cover; }
.camera-meta, .card-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; }
.camera-meta > div, .card-title > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.live-dot, .place-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(218,75,67,.12); }
.place-dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(23,107,135,.12); }
.card-title small { color: var(--muted); }
.refresh-note { color: var(--muted); font-size: .82rem; }
.forecast-links { display: flex; gap: 18px; }
.forecast-summary { max-width: 780px; margin: -4px 0 20px; color: var(--muted); font-size: 1rem; }
.water-temperature {
  display: flex;
  align-items: center;
  gap: 18px;
  width: fit-content;
  margin: -4px 0 18px;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--soft-blue);
  border: 1px solid rgba(23, 107, 135, .16);
  border-radius: 12px;
  font-size: .84rem;
}
.water-temperature-label { color: var(--ink); font-weight: 750; }
.water-temperature strong { color: var(--ink); }
.water-temperature a { color: var(--blue); font-size: .78rem; font-weight: 650; text-decoration: none; }
.water-temperature a:hover { text-decoration: underline; }
.forecast-chart-card { position: relative; overflow: hidden; padding: 18px 18px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.chart-legend { display: flex; align-items: center; gap: 20px; padding: 0 6px 10px; color: var(--muted); font-size: .78rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-line { display: inline-block; width: 24px; height: 3px; border-radius: 2px; }
.legend-line.akko { background: #176b87; }
.legend-line.haifa { background: #d2704f; }
.legend-hint { margin-left: auto; }
.forecast-chart { display: block; width: 100%; min-width: 720px; height: auto; overflow: visible; touch-action: pan-y; }
.forecast-chart text { fill: var(--muted); font-family: inherit; font-size: 13px; }
.forecast-chart .axis-title { fill: var(--ink); font-size: 14px; font-weight: 700; }
.forecast-chart .day-band { fill: rgba(23,107,135,.035); }
.forecast-chart .day-band.alt { fill: rgba(210,112,79,.045); }
.forecast-chart .grid-line { stroke: rgba(21,24,23,.11); stroke-width: 1; }
.forecast-chart .day-line { stroke: rgba(21,24,23,.18); stroke-width: 1; stroke-dasharray: 4 5; }
.forecast-chart .wave-akko { fill: none; stroke: #176b87; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.forecast-chart .wave-haifa { fill: none; stroke: #d2704f; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.forecast-chart .point-akko { fill: #176b87; }
.forecast-chart .point-haifa { fill: #d2704f; }
.forecast-chart .wind-akko { fill: rgba(23,107,135,.65); }
.forecast-chart .wind-haifa { fill: rgba(210,112,79,.65); }
.forecast-chart .time-hour { font-size: 11px; }
.forecast-chart .time-hour.rain-hour { fill: #1878b8; font-weight: 800; }
.forecast-chart .day-label { fill: var(--ink); font-size: 15px; font-weight: 750; }
.forecast-chart .line-label { font-size: 14px; font-weight: 800; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.forecast-chart .line-label.akko { fill: #176b87; }
.forecast-chart .line-label.haifa { fill: #d2704f; }
.forecast-chart .chart-cursor { stroke: #151817; stroke-width: 2; stroke-dasharray: 5 5; pointer-events: none; }
.forecast-chart .cursor-dot { fill: #fff; stroke-width: 4; pointer-events: none; }
.forecast-chart .cursor-dot.akko { stroke: #176b87; }
.forecast-chart .cursor-dot.haifa { stroke: #d2704f; }
.forecast-scrubber { padding: 0 8px 12px; }
#forecast-slider { width: 100%; height: 32px; margin: 0; accent-color: var(--blue); cursor: ew-resize; touch-action: pan-x; }
#forecast-slider::-webkit-slider-thumb { width: 28px; height: 28px; }
#forecast-slider::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--blue); }
.scrubber-values { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; align-items: center; margin-top: 10px; color: var(--muted); font-size: .82rem; }
.scrubber-values strong { color: var(--ink); }
.scrubber-values > span { text-align: right; }
.akko-key { color: #176b87; }
.haifa-key { color: #d2704f; }
.chart-empty { padding: 60px 20px; color: var(--muted); text-align: center; }
footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 30px 0 45px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .82rem;
}
@media (max-width: 760px) {
  .topbar { padding: 0 5vw; }
  nav { gap: 12px; }
  nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .78rem; }
  .brand span:last-child { display: none; }
  .intro { padding-top: 52px; padding-bottom: 58px; }
  section { margin-bottom: 82px; }
  .camera-grid, .forecast-grid { grid-template-columns: 1fr; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal-card { display: grid; grid-template-columns: 128px 1fr; }
  .signal-image { min-height: 128px; }
  .signal-image svg { width: 102px; height: 82px; }
  .signal-reason { min-height: 0; }
  .map-card { min-height: 0; height: 500px; }
  .section-head { align-items: start; }
  .forecast-chart-card { overflow: hidden; padding: 14px 10px 8px; }
  .forecast-chart { width: 100%; min-width: 0; }
  .chart-legend { flex-wrap: wrap; background: var(--surface); }
  .legend-hint { margin-left: 0; }
  .water-temperature { flex-wrap: wrap; gap: 6px 14px; width: 100%; }
  .water-temperature-label { flex-basis: 100%; }
  .scrubber-values { grid-template-columns: 1fr; gap: 4px; }
  .scrubber-values > span { text-align: left; }
}
@media (max-width: 430px) {
  nav { gap: 9px; }
  nav a { font-size: .72rem; }
  .section-head { display: block; }
  .section-head .source-link, .refresh-note { display: inline-block; margin-top: 12px; }
  .forecast-links { display: flex; flex-wrap: wrap; gap: 0 14px; }
  .camera-meta, .card-title { align-items: flex-start; }
  .card-title > div { flex-wrap: wrap; }
  footer { display: block; }
  .status-meta { display: block; }
  .status-meta span { display: block; }
  footer span { display: block; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
