/* SGVMWD Water Supply Update — styles
   Brand: Main Blue #3a5e86 · Navy #1c4e87 · Accent Teal #56b7d3 · Darker Teal #4dabb4
          Dark #212326 · Darker #141617 · Gray #f2f3f5 · Light Gray #f9f9fb
   Every selector is prefixed with .sgv-wsu.wsu-root so theme heading/paragraph styles can't leak in. */

.sgv-wsu.wsu-root {
  --navy: #1c4e87;
  --blue: #3a5e86;
  --teal: #56b7d3;
  --teal-dk: #4dabb4;
  --dark: #212326;
  --darker: #141617;
  --gray3: #f2f3f5;
  --gray2: #f9f9fb;
  --tint-navy: #edf1f6;     /* ~8% Navy on white */
  --tint-teal: #eef8fb;     /* ~10% Accent Teal */
  --tint-teal-dk: #eef7f8;  /* ~10% Darker Teal */
  --muted: #4a5560;
  --line: #c9d5e2;
  --head: "Lato", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;

  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0;
  text-align: left;
  color: var(--darker);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .015em;
}
.sgv-wsu.wsu-root *, .sgv-wsu.wsu-root *::before, .sgv-wsu.wsu-root *::after { box-sizing: border-box; }
.sgv-wsu.wsu-root :is(h3, h4, h5, p, ul, li) {
  margin: 0; padding: 0; border: 0; background: none; list-style: none;
  color: inherit; font-family: inherit; font-size: inherit; font-weight: inherit;
  line-height: inherit; letter-spacing: inherit; text-transform: none; text-align: inherit;
}
.sgv-wsu.wsu-root :is(h3, h4, h5)::before, .sgv-wsu.wsu-root :is(h3, h4, h5)::after { content: none; }

.sgv-wsu.wsu-root .wsu {
  padding: 22px 22px 18px;
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
}

/* ---------- Header ---------- */
.sgv-wsu.wsu-root .wsu-title {
  color: var(--navy);
  font-family: var(--head);
  font-size: 40px; font-weight: 900; line-height: 1;
  letter-spacing: -.015em; text-transform: uppercase;
}
.sgv-wsu.wsu-root .wsu-subrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.sgv-wsu.wsu-root .wsu-kicker {
  color: var(--blue);
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; line-height: 1.3;
}
.sgv-wsu.wsu-root .wsu-month {
  padding: 4px 14px;
  background: var(--teal); color: var(--darker);
  border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3;
}

/* ---------- Allocation strip ---------- */
.sgv-wsu.wsu-root .wsu-alloc {
  display: grid; grid-template-columns: auto auto minmax(80px, 1fr); align-items: center; gap: 6px 18px;
  margin-top: 14px; padding: 9px 16px;
  background: var(--navy); color: #fff;
  border-radius: 10px;
}
.sgv-wsu.wsu-root .wsu-alloc-label {
  max-width: 7em;
  color: #fff;
  font-family: var(--head); font-size: 13px; font-weight: 900; line-height: 1.15;
  letter-spacing: .1em; text-transform: uppercase;
}
.sgv-wsu.wsu-root .wsu-alloc-num { color: #fff; font-family: var(--head); font-size: 34px; font-weight: 900; line-height: 1; }
.sgv-wsu.wsu-root .wsu-alloc-af { margin-left: 8px; color: #fff; font-family: var(--body); font-size: 15px; font-weight: 500; letter-spacing: .015em; }
.sgv-wsu.wsu-root .wsu-alloc-bar {
  height: 12px; overflow: hidden;
  background: #12355e;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.sgv-wsu.wsu-root .wsu-alloc-bar span { display: block; height: 100%; background: var(--teal); border-radius: inherit; transform-origin: left center; }

/* ---------- Map + callouts + drought ---------- */
.sgv-wsu.wsu-root .wsu-mid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-top: 14px; }
.sgv-wsu.wsu-root .wsu-mid:has(.has-map) { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.15fr); }
.sgv-wsu.wsu-root .wsu-mapwrap { position: relative; aspect-ratio: 600 / 360; }
.sgv-wsu.wsu-root .wsu-map { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.sgv-wsu.wsu-root .wsu-land { fill: var(--gray3); stroke: var(--blue); stroke-width: 1.5; stroke-linejoin: round; }
.sgv-wsu.wsu-root .wsu-island { fill: var(--gray3); stroke: var(--blue); stroke-width: 1; }
.sgv-wsu.wsu-root .wsu-river { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sgv-wsu.wsu-root .wsu-route-case { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.sgv-wsu.wsu-root .wsu-route { fill: none; stroke: var(--navy); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.sgv-wsu.wsu-root .wsu-leader { fill: none; stroke: var(--blue); stroke-width: 1.5; }
.sgv-wsu.wsu-root .wsu-pt { fill: var(--darker); stroke: #fff; stroke-width: 2.5; }
.sgv-wsu.wsu-root .wsu-pt-home { fill: var(--teal); stroke: var(--darker); stroke-width: 2; }
.sgv-wsu.wsu-root .wsu-lbl {
  fill: var(--darker); font-family: var(--head); font-size: 13px; font-weight: 700; letter-spacing: 0;
  paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round;
}

.sgv-wsu.wsu-root .wsu-callout {
  position: absolute; left: 53.5%; width: 46.5%;
  padding: 8px 12px 9px 20px;
  background: var(--tint-navy);
  border-radius: 8px;
  overflow: hidden;
}
.sgv-wsu.wsu-root .wsu-co1 { top: 0; }
.sgv-wsu.wsu-root .wsu-co2 { top: 44%; }
/* Left meter: fills from the bottom to the reservoir's % of capacity */
.sgv-wsu.wsu-root .wsu-co-meter { position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: #c9d5e2; }
.sgv-wsu.wsu-root .wsu-co-meter span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--navy); transform-origin: bottom center; }
.sgv-wsu.wsu-root .wsu-co-name {
  color: var(--darker); font-family: var(--head); font-size: 14px; font-weight: 900;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.2;
}
.sgv-wsu.wsu-root .wsu-co-main { margin-top: 2px; color: var(--darker); font-family: var(--head); font-size: 16px; font-weight: 700; line-height: 1.05; letter-spacing: 0; }
.sgv-wsu.wsu-root .wsu-co-main b { color: var(--navy); font-size: 34px; font-weight: 900; letter-spacing: -.015em; }
.sgv-wsu.wsu-root .wsu-co-sub {
  margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line);
  color: var(--darker); font-size: 15px; font-weight: 500; line-height: 1.3;
}
.sgv-wsu.wsu-root .wsu-co-sub b { color: var(--navy); font-family: var(--head); font-weight: 900; }
.sgv-wsu.wsu-root .wsu-mapnote { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.sgv-wsu.wsu-root .wsu-drought { padding-left: 18px; border-left: 2px solid var(--line); }
.sgv-wsu.wsu-root .wsu-d-title {
  color: var(--darker); font-family: var(--head); font-size: 16px; font-weight: 900;
  letter-spacing: .02em; text-transform: uppercase; line-height: 1.2;
}
.sgv-wsu.wsu-root .wsu-d-list { display: grid; gap: 8px; margin-top: 10px; }
.sgv-wsu.wsu-root .wsu-d-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; }
.sgv-wsu.wsu-root .wsu-dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(20, 22, 23, .6); }
.sgv-wsu.wsu-root .wsu-d-pct { display: block; color: var(--navy); font-family: var(--head); font-size: 24px; font-weight: 900; line-height: 1; letter-spacing: -.01em; }
.sgv-wsu.wsu-root .wsu-d-lbl { display: block; margin-top: 2px; color: var(--darker); font-size: 14px; font-weight: 500; line-height: 1.2; }
.sgv-wsu.wsu-root .wsu-d-total { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.4; }
.sgv-wsu.wsu-root .wsu-d-total strong { color: var(--navy); font-weight: 700; }
.sgv-wsu.wsu-root .wsu-d0 { background: #ffff00; }
.sgv-wsu.wsu-root .wsu-d1 { background: #fcd37f; }
.sgv-wsu.wsu-root .wsu-d2 { background: #ffaa00; }
.sgv-wsu.wsu-root .wsu-d3 { background: #e60000; }
.sgv-wsu.wsu-root .wsu-d4 { background: #730000; }

/* Drought map + compact legend.
   The USDM "No Text" PNG has wide white margins; the frame trims them so the state fills the space. */
.sgv-wsu.wsu-root .has-map .wsu-d-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 8px; }
.sgv-wsu.wsu-root .wsu-d-map { margin: 0; padding: 0; }
.sgv-wsu.wsu-root .wsu-d-frame { position: relative; width: 100%; aspect-ratio: 640 / 735; overflow: hidden; }
.sgv-wsu.wsu-root .wsu-d-img { position: absolute; top: -6%; left: -13.5%; display: block; width: 128% !important; max-width: none !important; height: auto !important; margin: 0; border: 0; }
.sgv-wsu.wsu-root .wsu-d-cap { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.sgv-wsu.wsu-root .has-map .wsu-d-list { grid-template-columns: 1fr; gap: 7px; margin-top: 0; }
.sgv-wsu.wsu-root .has-map .wsu-d-item { grid-template-columns: 16px 1fr; gap: 7px; align-items: start; }
.sgv-wsu.wsu-root .has-map .wsu-dot { width: 16px; height: 16px; margin-top: 2px; border-radius: 3px; }
.sgv-wsu.wsu-root .has-map .wsu-d-pct { font-size: 18px; }
.sgv-wsu.wsu-root .has-map .wsu-d-lbl { font-size: 13px; margin-top: 1px; }
.sgv-wsu.wsu-root .has-map .wsu-d-total { margin-top: 10px; }

/* ---------- Stat tiles ---------- */
.sgv-wsu.wsu-root .wsu-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.sgv-wsu.wsu-root .wsu-tile { padding: 12px 14px; border-radius: 10px; text-align: center; }
.sgv-wsu.wsu-root .wsu-t-rain { background: var(--tint-navy); }
.sgv-wsu.wsu-root .wsu-t-snow { background: var(--tint-teal); }
.sgv-wsu.wsu-root .wsu-t-res  { background: var(--tint-navy); }
.sgv-wsu.wsu-root .wsu-t-name {
  color: var(--darker); font-family: var(--head); font-size: 14px; font-weight: 900;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
}
.sgv-wsu.wsu-root .wsu-t-num {
  margin-top: 4px;
  color: var(--navy); font-family: var(--head); font-size: 46px; font-weight: 900; line-height: 1;
  letter-spacing: -.015em; font-variant-numeric: tabular-nums;
}
.sgv-wsu.wsu-root .wsu-unit { margin-left: .08em; font-size: .5em; letter-spacing: 0; }
.sgv-wsu.wsu-root .wsu-t-sub {
  margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line);
  color: var(--darker); font-size: 15px; font-weight: 500; line-height: 1.35;
}
.sgv-wsu.wsu-root .wsu-t-sub b, .sgv-wsu.wsu-root .wsu-t-note b { color: var(--navy); font-family: var(--head); font-weight: 900; }
.sgv-wsu.wsu-root .wsu-t-note { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.35; }

/* ---------- Groundwater ---------- */
.sgv-wsu.wsu-root .wsu-gw {
  display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; align-items: center;
  margin-top: 12px; padding: 14px 18px;
  background: var(--tint-teal-dk);
  border-radius: 10px;
}
.sgv-wsu.wsu-root .wsu-gw-title {
  max-width: 7em;
  color: var(--darker); font-family: var(--head); font-size: 26px; font-weight: 900; line-height: 1;
  letter-spacing: -.01em; text-transform: uppercase;
}
.sgv-wsu.wsu-root .wsu-gw-item { padding-left: 16px; border-left: 2px solid #b5dde1; text-align: center; }
.sgv-wsu.wsu-root .wsu-gw-name { color: var(--darker); font-family: var(--head); font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.sgv-wsu.wsu-root .wsu-gw-well {
  margin-top: 1px; color: var(--muted);
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}
.sgv-wsu.wsu-root .wsu-gw-num { margin-top: 2px; color: var(--navy); font-family: var(--head); font-size: 32px; font-weight: 900; line-height: 1.05; letter-spacing: -.015em; }
.sgv-wsu.wsu-root .wsu-gw-sub { color: var(--darker); font-size: 13px; line-height: 1.35; }
/* Operating-range meter (replaces the pill): band = range, triangle = current level */
.sgv-wsu.wsu-root .wsu-range { position: relative; width: 140px; max-width: 100%; height: 8px; margin: 14px auto 0; background: #fff; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--blue); }
.sgv-wsu.wsu-root .wsu-range-band { position: absolute; top: 0; bottom: 0; background: var(--blue); }
.sgv-wsu.wsu-root .wsu-range-mark { position: absolute; top: -9px; width: 0; height: 0; margin-left: -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--darker); }
.sgv-wsu.wsu-root .wsu-gw-meta { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.sgv-wsu.wsu-root .wsu-gw-meta strong { color: var(--darker); font-weight: 700; }

.sgv-wsu.wsu-root .wsu-na { color: var(--muted); font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: .015em; }

/* ---------- Responsive (classes set from the column width by wsu.js) ---------- */
.sgv-wsu.wsu-root.wsu-m .wsu-mid { grid-template-columns: 1fr; }
.sgv-wsu.wsu-root.wsu-m .wsu-drought { padding: 14px 0 0; border-left: 0; border-top: 2px solid var(--line); }
.sgv-wsu.wsu-root.wsu-m .wsu-d-list { grid-template-columns: 1fr 1fr; }
.sgv-wsu.wsu-root.wsu-m .has-map .wsu-d-body { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.sgv-wsu.wsu-root.wsu-m .has-map .wsu-d-list { grid-template-columns: 1fr; }
.sgv-wsu.wsu-root.wsu-m .wsu-title { font-size: 34px; }
.sgv-wsu.wsu-root.wsu-m .wsu-t-num { font-size: 38px; }
.sgv-wsu.wsu-root.wsu-m .wsu-gw { grid-template-columns: 1fr 1fr; gap: 12px 0; }
.sgv-wsu.wsu-root.wsu-m .wsu-gw-title { grid-column: 1 / -1; max-width: none; font-size: 22px; }
.sgv-wsu.wsu-root.wsu-m .wsu-gw-item:first-of-type { padding-left: 0; border-left: 0; }

.sgv-wsu.wsu-root.wsu-s .wsu { padding: 16px 14px 14px; }
.sgv-wsu.wsu-root.wsu-s .wsu-title { font-size: 28px; }
.sgv-wsu.wsu-root.wsu-s .wsu-alloc { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
.sgv-wsu.wsu-root.wsu-s .wsu-alloc-label { max-width: none; }
.sgv-wsu.wsu-root.wsu-s .wsu-alloc-af { display: inline-block; }
.sgv-wsu.wsu-root.wsu-s .wsu-mapwrap { aspect-ratio: auto; overflow: hidden; }
.sgv-wsu.wsu-root.wsu-s .wsu-map { position: static; width: 185%; max-width: none; height: auto; margin-bottom: -2px; }
.sgv-wsu.wsu-root.wsu-s .wsu-leader { display: none; }
.sgv-wsu.wsu-root.wsu-s .wsu-callout { position: relative; left: auto; top: auto; width: auto; margin-top: 8px; }
.sgv-wsu.wsu-root.wsu-s .wsu-tiles { grid-template-columns: 1fr; }
.sgv-wsu.wsu-root.wsu-s .has-map .wsu-d-body { grid-template-columns: 1fr; }
.sgv-wsu.wsu-root.wsu-s .wsu-d-map { max-width: 300px; }
.sgv-wsu.wsu-root.wsu-s .has-map .wsu-d-list { grid-template-columns: 1fr 1fr; margin-top: 6px; }
.sgv-wsu.wsu-root.wsu-s .wsu-gw { grid-template-columns: 1fr; }
.sgv-wsu.wsu-root.wsu-s .wsu-gw-item { padding: 12px 0 0; border-left: 0; border-top: 2px solid #b5dde1; }

/* ---------- Motion (off for people who prefer reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sgv-wsu.wsu-root .wsu-alloc-bar span { animation: wsuGrowX 1s cubic-bezier(.2, .7, .2, 1) both; }
  .sgv-wsu.wsu-root .wsu-co-meter span { animation: wsuGrowY 1s cubic-bezier(.2, .7, .2, 1) both; }
  .sgv-wsu.wsu-root .wsu-route { stroke-dasharray: 1000; animation: wsuDraw 1.6s ease-out both; }
  @keyframes wsuGrowX { from { transform: scaleX(0); } }
  @keyframes wsuGrowY { from { transform: scaleY(0); } }
  @keyframes wsuDraw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
}

/* ---------- Windows High Contrast / forced colors ---------- */
@media (forced-colors: active) {
  .sgv-wsu.wsu-root .wsu { border-color: CanvasText; }
  .sgv-wsu.wsu-root :is(.wsu-land, .wsu-island) { fill: Canvas; stroke: CanvasText; }
  .sgv-wsu.wsu-root :is(.wsu-route, .wsu-river, .wsu-leader) { stroke: CanvasText; }
  .sgv-wsu.wsu-root .wsu-route-case { stroke: Canvas; }
  .sgv-wsu.wsu-root :is(.wsu-pt, .wsu-pt-home) { fill: CanvasText; stroke: Canvas; }
  .sgv-wsu.wsu-root .wsu-lbl { fill: CanvasText; stroke: Canvas; }
  .sgv-wsu.wsu-root :is(.wsu-dot, .wsu-alloc-bar, .wsu-co-meter, .wsu-range) { forced-color-adjust: none; }
}
