/* Coactive Science design tokens — same values as giant_salvinia_v2/public/app.css
   (temp/coactive_design_system/tokens/colors.css, dark scope). Kept identical
   so the two apps read as one product family. */
:root {
  color-scheme: dark;
  --ink: #FFFFFF;
  --muted: #A0B2C8;
  --muted-faint: #7E93AE;
  --panel: #050A12;
  --panel-soft: #0D2946;
  --panel-raised: #12314F;
  --line: rgba(158, 190, 224, .14);
  --line-strong: #1F3C5C;
  --lime: #58DCFF;
  --lime-bright: #9AEBFF;
  --lime-press: #2FC8F0;
  --text-on-accent: #050A12;
  --blue: #1BA3C9;
  --amber: #FFB33D;
  --green: #4BB06E;
  --danger: #FF6F4E;
  --iris: #8978FF;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--panel);
  color: var(--ink);
  font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
}

h1, h2, h3, .brand-copy strong, .panel-title { font-family: "Space Grotesk", "DM Sans", -apple-system, "Segoe UI", sans-serif; }

/* ---------------------------------------------------------------------- */
/* Public landing / sign-in                                               */
/* ---------------------------------------------------------------------- */

.public-landing {
  min-height: 100%;
  overflow: auto;
  background:
    radial-gradient(circle at 81% 13%, rgba(88, 220, 255, .15), transparent 24%),
    radial-gradient(circle at 58% 68%, rgba(86, 171, 166, .12), transparent 28%),
    linear-gradient(121deg, #071311 0%, #0d211e 54%, #0a1716 100%);
}

.landing-header { display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 18px clamp(24px, 5vw, 78px); border-bottom: 1px solid rgba(219, 239, 229, .13); }
.landing-brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.landing-header-status { display: flex; align-items: center; gap: 16px; }
.landing-header-note { display: inline-flex; align-items: center; gap: 8px; color: #b4c3bd; font-size: 12px; font-weight: 700; }
.landing-header-note i, .visual-card-signal i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(88, 220, 255, .12); }
.landing-user-identity { display: grid; gap: 2px; padding-right: 16px; border-right: 1px solid rgba(219, 239, 229, .13); font-size: 12px; line-height: 1.15; text-align: right; }
.landing-user-identity strong { font-weight: 800; }
.landing-user-identity span { color: var(--muted); font-size: 10px; text-transform: capitalize; }

.landing-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr); align-items: center; gap: clamp(38px, 7vw, 120px); width: min(1380px, 100%); min-height: min(650px, calc(100vh - 88px)); margin: 0 auto; padding: clamp(54px, 8vh, 112px) clamp(24px, 5vw, 78px) clamp(44px, 6vh, 78px); }
.landing-copy { max-width: 690px; }
.landing-kicker { margin: 0 0 18px; color: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.landing-copy h1 { max-width: 660px; margin: 0; font-size: clamp(42px, 5vw, 76px); line-height: .98; letter-spacing: -.065em; }
.landing-lede { max-width: 585px; margin: 28px 0 0; color: #bdcdc6; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.55; }
.landing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 22px; margin-top: 34px; }
.landing-sign-in { display: inline-flex; align-items: center; gap: 24px; border: 0; padding: 14px 17px 14px 19px; border-radius: 8px; background: var(--lime); color: #050A12; cursor: pointer; font-size: 14px; font-weight: 900; text-decoration: none; box-shadow: 0 14px 30px rgba(0, 0, 0, .2); transition: transform .16s ease, background .16s ease; }
.landing-sign-in[hidden] { display: none; }
.landing-sign-in:hover { background: var(--lime-bright); transform: translateY(-2px); }
.landing-sign-in:focus-visible { outline: 2px solid var(--lime-bright); outline-offset: 4px; }
.landing-sign-in span { font-size: 20px; line-height: .7; }
.landing-status { margin: 0; color: #c5d1cb; font-size: 13px; font-weight: 650; }
.landing-access-note { margin: 16px 0 0; color: #83958d; font-size: 12px; line-height: 1.5; }
.landing-auth { max-width: 430px; margin-top: 22px; padding: 20px; border: 1px solid rgba(217, 240, 226, .16); border-radius: 12px; background: rgba(6, 21, 18, .58); box-shadow: 0 18px 45px rgba(0, 0, 0, .17); }
.landing-auth-form { display: grid; gap: 13px; }
.landing-auth-form[hidden] { display: none; }
.landing-auth-form h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.landing-auth-form p { margin: -4px 0 2px; color: #aabdb4; font-size: 13px; line-height: 1.45; }
.landing-auth-form label { display: grid; gap: 6px; color: #d7e4dd; font-size: 12px; font-weight: 750; }
.landing-auth-form input { min-width: 0; border: 1px solid rgba(217, 240, 226, .2); border-radius: 7px; padding: 11px 12px; background: rgba(1, 12, 10, .58); color: var(--ink); outline: none; }
.landing-auth-form input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(88, 220, 255, .14); }
.landing-auth-submit { display: inline-flex; justify-content: center; align-items: center; gap: 15px; min-height: 43px; border: 0; border-radius: 7px; background: var(--lime); color: #050A12; cursor: pointer; font-weight: 900; }
.landing-auth-submit:disabled { cursor: progress; opacity: .68; }
.landing-auth-error { margin: 14px 0 0; color: #ffc1b7; font-size: 13px; font-weight: 650; }

.public-landing.landing-auth-active .landing-hero { grid-template-columns: minmax(0, 1fr); align-items: start; width: min(620px, 100%); min-height: calc(100svh - 88px); padding-top: clamp(24px, 4vh, 42px); padding-bottom: 42px; }
.public-landing.landing-auth-active .landing-copy { max-width: 520px; }
.public-landing.landing-auth-active .landing-kicker { margin-bottom: 12px; }
.public-landing.landing-auth-active .landing-copy h1 { max-width: 480px; font-size: clamp(38px, 4.7vw, 58px); line-height: 1; letter-spacing: -.05em; }
.public-landing.landing-auth-active .landing-lede { max-width: 470px; margin-top: 16px; font-size: 16px; line-height: 1.45; }
.public-landing.landing-auth-active .landing-actions { margin-top: 22px; }
.public-landing.landing-auth-active .landing-auth { margin-top: 16px; }
.public-landing.landing-auth-active .landing-access-note { margin-top: 12px; }
.public-landing.landing-auth-active .landing-visual, .public-landing.landing-auth-active .landing-proof { display: none; }

.landing-visual { position: relative; isolation: isolate; min-height: 430px; overflow: hidden; border: 1px solid rgba(211, 235, 222, .13); border-radius: 22px; background: linear-gradient(145deg, rgba(33, 71, 64, .68), rgba(7, 22, 20, .92)); box-shadow: 0 38px 90px rgba(0, 0, 0, .28); }
.landing-visual::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(203, 235, 219, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(203, 235, 219, .06) 1px, transparent 1px); background-size: 52px 52px; content: ""; mask-image: linear-gradient(to bottom, black, transparent); }
.visual-orbit { position: absolute; z-index: -1; border: 1px solid rgba(88, 220, 255, .2); border-radius: 50%; }
.orbit-one { width: 500px; height: 500px; top: -220px; right: -150px; }
.orbit-two { width: 360px; height: 360px; bottom: -215px; left: -170px; border-color: rgba(102, 183, 220, .22); }
.visual-lake { position: absolute; top: 53%; left: 51%; width: 72%; height: 47%; transform: translate(-50%, -50%) rotate(-15deg); border-radius: 48% 52% 43% 57% / 48% 39% 61% 52%; background: radial-gradient(ellipse at 35% 36%, #7ec3c7 0 3%, transparent 3.5%), radial-gradient(ellipse at 54% 67%, #9bd16b 0 3%, transparent 3.5%), linear-gradient(130deg, #2f8d8f, #176065 48%, #0f3d43); box-shadow: inset 0 0 70px rgba(189, 237, 225, .23), 0 0 0 28px rgba(76, 144, 122, .13), 0 0 0 58px rgba(76, 144, 122, .07); }
.visual-lake span { position: absolute; width: 42%; height: 2px; border-radius: 4px; background: rgba(232, 254, 244, .42); transform: rotate(18deg); }
.visual-lake span:nth-child(1) { top: 30%; left: 20%; }
.visual-lake span:nth-child(2) { top: 49%; right: 10%; width: 30%; }
.visual-lake span:nth-child(3) { bottom: 20%; left: 26%; width: 34%; }
.visual-card { position: absolute; border: 1px solid rgba(225, 245, 234, .16); border-radius: 11px; background: rgba(7, 23, 20, .8); box-shadow: 0 16px 34px rgba(0, 0, 0, .2); backdrop-filter: blur(12px); }
.visual-card-main { top: 34px; left: 30px; width: min(300px, calc(100% - 60px)); padding: 17px 18px; }
.visual-card small { display: block; color: var(--lime); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.visual-card-main strong { display: block; margin-top: 8px; font-size: 18px; line-height: 1.13; }
.visual-card-main p { margin: 8px 0 0; color: #a5b8b0; font-size: 11px; }
.visual-card-signal { right: 24px; bottom: 25px; display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; padding: 13px 15px; }
.visual-card-signal i { grid-row: span 2; width: 7px; height: 7px; }
.visual-card-signal span { color: #a4b4ad; font-size: 10px; }
.visual-card-signal strong { margin-top: 2px; font-size: 12px; }

.landing-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(1380px, 100%); margin: 0 auto; padding: 0 clamp(24px, 5vw, 78px) 55px; }
.landing-proof article { padding: 20px clamp(16px, 2vw, 28px); border-top: 1px solid rgba(215, 236, 226, .16); }
.landing-proof article:first-child { padding-left: 0; }
.landing-proof span { color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .15em; }
.landing-proof strong { display: block; margin-top: 8px; font-size: 16px; }
.landing-proof p { max-width: 255px; margin: 7px 0 0; color: #91a49c; font-size: 12px; line-height: 1.5; }

/* ---------------------------------------------------------------------- */
/* App shell                                                               */
/* ---------------------------------------------------------------------- */

button, input, select { font: inherit; }

.app-shell { display: grid; grid-template-rows: 54px minmax(0, 1fr); height: 100%; }

.app-header { display: flex; align-items: center; gap: 14px; padding: 0 16px; background: rgba(5, 10, 18, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.app-header .brand-mark { width: 34px; height: 34px; border-radius: 0; background: none; }
.app-header .brand-copy strong { font-size: 16px; }
.app-header .eyebrow { color: var(--muted); font-size: 9px; }

.app-layout { display: grid; grid-template-columns: 306px minmax(0, 1fr); min-height: 0; }

.site-rail { min-height: 0; overflow-y: auto; padding: 18px 8px; border-right: 1px solid var(--line); background: #091829; }
.site-rail h2 { margin: 0 4px; font-size: 16px; }
.site-rail > p { margin: 5px 4px 14px; color: var(--muted); font-size: 12px; }
.site-rail .site-list { display: grid; gap: 5px; margin: 0; }
.site-button { display: grid; gap: 2px; width: 100%; border: 0; border-radius: 6px; padding: 10px 8px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.site-button strong { font-size: 13px; }
.site-button small { color: var(--muted); font-size: 11px; }
.site-button.active { background: var(--panel-soft); }
.site-button:hover, .site-button:focus-visible { background: var(--panel-raised); outline: 2px solid var(--lime); outline-offset: -2px; }

.application-main { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-width: 0; min-height: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.brand-mark { display: block; width: 32px; height: 32px; object-fit: contain; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 16px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }

.tenant-switcher-label { display: none; margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tenant-switcher { display: none; min-width: 158px; max-width: 240px; padding: 8px 30px 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; }
.tenant-switcher:hover:not(:disabled) { border-color: var(--lime); }
.tenant-switcher:focus-visible { outline: 2px solid var(--lime-bright); outline-offset: 2px; }
.tenant-switcher:disabled { cursor: wait; opacity: .64; }

.record-badge { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 12px; }
.app-header:has(.tenant-switcher:not([hidden])) .record-badge { margin-left: 0; }
.record-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(88, 220, 255, .12); }

.user-identity { display: grid; gap: 2px; min-width: 112px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--ink); font-size: 12px; line-height: 1.15; }
.user-identity strong { font-weight: 800; }
.user-identity span { color: var(--muted); font-size: 10px; text-transform: capitalize; }

.logout-button { border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 12px; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; }
.logout-button:hover { background: var(--panel-raised); }
.logout-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ---------------------------------------------------------------------- */
/* Layer strip (persistent map-layer control, above the tab bar)          */
/* ---------------------------------------------------------------------- */

.layer-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 8px 18px; background: #091829; border-bottom: 1px solid var(--line); }
.layer-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.layer-btn { font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel-soft); color: var(--muted); cursor: pointer; }
.layer-btn:hover { color: var(--ink); }
.layer-btn.active { border-color: var(--lime); color: var(--lime); background: rgba(88, 220, 255, .1); }

.date-scrubber { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.date-scrubber button { border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel-soft); color: var(--ink); cursor: pointer; padding: 5px 9px; font-weight: 700; font-size: 12px; }
.date-scrubber button:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); }
.date-scrubber button:disabled { opacity: .4; cursor: not-allowed; }
.date-scrubber-label { min-width: 92px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink); }

.layer-legend { display: flex; align-items: center; gap: 10px; width: 100%; }
.layer-legend-bar { flex-shrink: 0; width: 140px; height: 8px; border-radius: 4px; border: 1px solid var(--line-strong); }
.layer-legend-scale { display: flex; justify-content: space-between; width: 140px; font-size: 10px; color: var(--muted); }
.layer-legend-note { flex: 1; min-width: 0; margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ---------------------------------------------------------------------- */
/* Beat nav (Brief / Compliance / History / USGS / Trends)                */
/* ---------------------------------------------------------------------- */

.beat-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: #050A12; border-bottom: 1px solid var(--line); padding: 0 18px; }
.beat-tab { position: relative; border: 0; background: transparent; color: #8da099; cursor: pointer; text-align: left; padding: 9px 14px 8px; }
.beat-tab::after { position: absolute; right: 14px; bottom: -1px; left: 14px; height: 3px; border-radius: 4px 4px 0 0; background: transparent; content: ""; }
.beat-tab span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.beat-tab strong { display: block; margin-top: 3px; color: inherit; font-size: 14px; }
.beat-tab.active { color: var(--ink); }
.beat-tab.active span { color: var(--lime); }
.beat-tab.active::after { background: var(--lime); }

.workspace { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) 410px; }

.map-stage { position: relative; min-width: 0; overflow: hidden; background: #162724; }
#map { width: 100%; height: 100%; background: radial-gradient(circle at 48% 48%, #0D2946 0, #0A1F35 42%, #091829 100%); }
.leaflet-tile-pane { filter: saturate(.52) brightness(.76) contrast(1.12); }
.leaflet-control-attribution { opacity: .55; font-size: 9px; }

.map-heading { position: absolute; z-index: 500; top: 20px; left: 22px; max-width: min(560px, 65%); padding: 10px 14px; border: 1px solid rgba(220, 238, 228, .15); border-radius: 8px; background: rgba(8, 22, 20, .84); box-shadow: 0 12px 28px rgba(0, 0, 0, .25); backdrop-filter: blur(9px); }
.map-heading span { display: block; color: var(--lime); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.map-heading strong { display: block; margin-top: 3px; font-size: 17px; }

.map-legend { position: absolute; z-index: 500; bottom: 32px; left: 22px; display: flex; flex-wrap: wrap; gap: 12px; padding: 9px 12px; border: 1px solid rgba(220, 238, 228, .13); border-radius: 7px; background: rgba(8, 22, 20, .86); font-size: 11px; color: #d4dfda; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 3px; background: currentColor; opacity: .9; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

.map-source { position: absolute; z-index: 500; right: 72px; bottom: 8px; color: rgba(225, 235, 230, .58); font-size: 9px; letter-spacing: .04em; }

.number-marker, .site-marker { display: grid; place-items: center; border: 2px solid #ecf5ef; border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,.48); color: #050A12; font-weight: 900; }
.number-marker { width: 25px; height: 25px; background: var(--blue); font-size: 11px; }
.number-marker.amber { background: var(--amber); }
.number-marker.green { background: var(--green); }
.site-marker { width: 18px; height: 18px; border-width: 3px; }
.leaflet-tooltip.map-label { border: 0; border-radius: 4px; background: rgba(8, 22, 20, .92); color: #edf5f1; box-shadow: 0 4px 12px rgba(0,0,0,.28); font-size: 11px; }
.leaflet-tooltip.map-label::before { display: none; }

/* ---------------------------------------------------------------------- */
/* Story panel (per-tab content)                                          */
/* ---------------------------------------------------------------------- */

.story-panel { overflow-y: auto; padding: 28px 28px 22px; background: linear-gradient(180deg, var(--panel) 0, #050A12 100%); border-left: 1px solid var(--line); }
.panel-kicker { color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.story-panel h1 { margin: 8px 0 10px; font-size: 28px; line-height: 1.05; letter-spacing: -.04em; }
.lede { margin: 0 0 20px; color: #c6d2cc; font-size: 14px; line-height: 1.55; }
.boundary { display: flex; gap: 9px; margin: 16px 0; padding: 11px 12px; border-left: 3px solid var(--amber); background: rgba(240, 180, 95, .08); color: #e4d7c4; font-size: 12px; line-height: 1.45; }
.data-warning { display: grid; gap: 3px; margin: 14px 0; padding: 11px 12px; border: 1px solid rgba(240, 180, 95, .42); border-radius: 8px; background: rgba(240, 180, 95, .09); color: #eadbc5; font-size: 12px; line-height: 1.45; }
.data-warning strong { color: #ffd99c; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

.release-status-panel { display: grid; place-items: center; padding: clamp(28px, 6vw, 80px); background: radial-gradient(circle at 75% 20%, rgba(102, 183, 220, .1), transparent 34%), #050A12; }
.release-status-panel[hidden] { display: none; }
.release-status-copy { width: min(820px, 100%); padding: clamp(24px, 5vw, 50px); border: 1px solid rgba(88, 220, 255, .24); border-radius: 16px; background: linear-gradient(145deg, rgba(20, 55, 49, .92), rgba(10, 29, 26, .92)); box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.release-status-copy h1 { max-width: 650px; margin: 9px 0 12px; font-size: clamp(28px, 4vw, 46px); line-height: 1.03; letter-spacing: -.04em; }
.release-status-copy > p:not(.panel-kicker) { max-width: 690px; color: #c6d2cc; line-height: 1.6; }
.release-status-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 28px 0 22px; }
.release-status-facts div { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.release-status-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.release-status-facts dd { margin: 7px 0 0; color: var(--ink); font-size: 15px; font-weight: 800; line-height: 1.4; }
.release-status-guidance { margin-bottom: 0; padding: 13px 14px; border-left: 3px solid var(--amber); background: rgba(240, 180, 95, .08); color: #e4d7c4; }

.app-shell.limited-release-mode { grid-template-rows: 72px minmax(0, 1fr); }
.app-shell.limited-release-mode .beat-nav, .app-shell.limited-release-mode .layer-strip { display: none; }
.workspace.limited-release-mode { grid-template-columns: minmax(0, 1fr); }

/* ---------------------------------------------------------------------- */
/* EPA content components (Brief / Compliance / History / USGS / Trends)  */
/* ---------------------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.chip { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); background: var(--panel-soft); }
.chip b { color: var(--ink); font-weight: 700; }

.stat3 { display: flex; gap: 8px; margin: 0 0 18px; }
.scard { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); padding: 12px; }
.scard .n { margin: 0; font-size: 20px; font-weight: 800; }
.scard .l { margin: 2px 0 0; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tone-red { color: var(--danger); }
.tone-orange { color: var(--amber); }
.tone-green { color: var(--green); }
.tone-blue { color: var(--blue); }
.tone-muted { color: var(--muted); }

.subh { margin: 20px 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); padding: 12px; margin-bottom: 10px; }
.card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.idbadge { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 4px; background: rgba(88, 220, 255, .16); color: var(--lime); }
.nm { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink); }
.prio { font-size: 9px; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; padding: 2px 7px; border-radius: 4px; }
.prio.tone-red { background: rgba(255, 111, 78, .18); }
.prio.tone-orange { background: rgba(255, 179, 61, .18); }
.prio.tone-blue { background: rgba(27, 163, 201, .18); }
.prio.tone-muted { background: rgba(160, 178, 200, .18); }
.type { margin: 0 0 4px; font-size: 11px; color: var(--lime); }
.rat { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.meas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.meas span { font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: var(--muted); }

.comp { border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; background: var(--panel-soft); padding: 12px; margin-bottom: 10px; }
.comp.status-flag { border-left-color: var(--danger); }
.comp.status-watch { border-left-color: var(--amber); }
.comp.status-ok { border-left-color: var(--green); }
.comp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.prog { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink); }
.badge { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 4px; }
.badge.status-flag { background: rgba(255, 111, 78, .18); color: var(--danger); }
.badge.status-watch { background: rgba(255, 179, 61, .18); color: var(--amber); }
.badge.status-ok { background: rgba(75, 176, 110, .18); color: var(--green); }
.permit-line { font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; color: var(--lime); background: var(--panel-soft); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 0 0 16px; }
.tie-line { font-size: 12px; color: var(--lime); background: var(--panel-soft); border-left: 3px solid var(--lime); border-radius: 0 8px 8px 0; padding: 10px 12px; line-height: 1.5; margin: 0 0 16px; }
.contam { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 16px; }
.contam span { font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; color: var(--muted); }

.timeline { display: flex; flex-direction: column; gap: 16px; padding-left: 16px; border-left: 2px solid var(--line); margin: 4px 0 0 4px; }
.event { position: relative; }
.event::before { content: ""; position: absolute; left: -21px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.event--legacy::before, .event--critical::before { background: var(--danger); }
.event--regulatory::before, .event--decision::before { background: var(--amber); }
.event--milestone::before { background: var(--green); }
.event--ongoing::before, .event--context::before { background: var(--lime); }
.event-year { margin: 0; font-size: 10px; color: var(--muted); letter-spacing: .03em; }
.event-kind { text-transform: uppercase; font-size: 9px; margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: var(--panel-soft); }
.event-title { margin: 2px 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.event-text { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.event-src { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }
.event-src:hover { color: var(--lime); }

.station { border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; background: var(--panel-soft); padding: 12px; margin-bottom: 8px; }
.station--streamgage { border-left-color: var(--lime); }
.station--facility { border-left-color: var(--ink); }
.station--groundwater { border-left-color: var(--blue); }
.station-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.station-type { font-size: 9px; text-transform: uppercase; letter-spacing: .03em; color: var(--lime); margin-left: 6px; }
.station-meta { margin: 3px 0 0; font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; color: var(--muted); }
.station-note { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }

.usgs-chart { display: block; width: 100%; height: auto; margin: 4px 0 16px; }
.usgs-chart text { fill: var(--muted); font: 10px system-ui, sans-serif; }
.usgs-chart .series-discharge { fill: none; stroke: var(--blue); stroke-width: 2; }
.usgs-chart .series-gage { fill: none; stroke: var(--amber); stroke-width: 2; }
.usgs-chart .series-grid { stroke: var(--line); stroke-width: 1; }

.trend { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); padding: 12px; margin-bottom: 10px; }
.trend-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.trend-title { font-size: 12px; font-weight: 700; color: var(--ink); }
.trend-value { font-size: 13px; font-weight: 800; }
.trend-unit { font-size: 10px; color: var(--muted); font-weight: 400; }
.trend-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.sparkline { display: block; flex-shrink: 0; }
.delta { font-size: 11px; text-align: right; white-space: nowrap; }
.delta-up { color: var(--danger); }
.delta-dn { color: var(--green); }
.delta-sub { color: var(--muted); font-size: 9px; }

table.trend-table { width: 100%; border-collapse: collapse; font-size: 11px; margin: 4px 0 18px; }
table.trend-table th, table.trend-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.trend-table th:first-child, table.trend-table td:first-child { text-align: left; }
table.trend-table th { color: var(--muted); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }

.src-note { margin: 20px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }

details.evidence { margin-top: 18px; border-top: 1px solid var(--line); }
details.evidence summary { padding: 14px 0; cursor: pointer; color: #c7d3cd; font-size: 12px; font-weight: 800; }
.evidence-body { padding: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.evidence-body ul { margin: 0; padding-left: 18px; }
.evidence-body li { margin: 5px 0; }

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

@media (max-width: 1100px) {
  .landing-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 62px; }
  .landing-copy { max-width: 760px; }
  .landing-visual { min-height: 360px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 365px; }
  .story-panel { padding: 22px 22px 18px; }
  .story-panel h1 { font-size: 24px; }
  .beat-tab { padding-inline: 8px; }
  .tenant-switcher { min-width: 130px; max-width: 180px; }
  .tenant-switcher-label, .tenant-switcher { display: block; }
  .app-layout { grid-template-columns: minmax(0, 1fr); }
  .site-rail { display: none; }
}

@media (max-width: 760px) {
  .record-badge, .user-identity { display: none; }
  .app-header { gap: 8px; padding-inline: 10px; }
  .tenant-switcher-label { margin-left: auto; }
  .tenant-switcher { min-width: 110px; max-width: 150px; }
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(240px, 1fr) minmax(0, 1fr); }
  .story-panel { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 650px) {
  .landing-header { min-height: 74px; padding-inline: 20px; }
  .landing-header-note { display: none; }
  .landing-hero { gap: 44px; padding: 48px 20px 40px; }
  .landing-copy h1 { font-size: clamp(38px, 12vw, 56px); }
  .landing-lede { margin-top: 22px; font-size: 16px; }
  .landing-visual { min-height: 310px; border-radius: 16px; }
  .visual-card-main { top: 18px; left: 18px; }
  .visual-card-signal { right: 15px; bottom: 16px; }
  .landing-proof { grid-template-columns: 1fr; padding: 0 20px 36px; }
  .landing-proof article, .landing-proof article:first-child { padding: 16px 0; }
  .release-status-facts { grid-template-columns: 1fr; }
  .app-header .brand-copy .eyebrow { display: none; }
  .app-header .brand-copy strong { font-size: 13px; }
}
