/* ==========================================================================
   Srikakulam Flood Assessment — page styles
   Loaded after reservoir-theme.css and reservoir-chat.css. Everything page-specific is scoped under .sfa;
   the only global rules are the body scroll override, the expanded-map lock and the chat hide while a map is expanded.
   Always dark: the portal theme has no light mode. Fonts come from the theme (Inter / Plus Jakarta Sans).
   ========================================================================== */

/* portal pages are fixed-height; this one scrolls */
body { overflow-y: auto; overflow-x: hidden; }
body.noscroll { overflow: hidden; }
/* an expanded map covers the whole window: keep the chat button and panel out of the way */
body.noscroll .chat-fab, body.noscroll .chat-panel { display: none !important; }
/* nine nav links: let the bar scroll sideways instead of pushing the clock off the page (the theme does this at <=1100px) */
@media (min-width: 1101px) { .nav-bar { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; } }

.sfa {
  color-scheme: dark;
  /* page tokens mapped to the portal's navy palette; surfaces are opaque (label halos and sticky table cells need that) */
  --bg: transparent; --surface: #10233a; --surface-2: #173049;
  --ink: #e8eef4; --ink-2: #b9c7d4; --muted: #8b9fb2; --hair: #203b58; --line: #33547a; --line-strong: #8b9fb2; --on-dark: #091520;
  --land: #10233a; --land-out: #0a192b;
  --flood-earlier: #86b6ef; --flood-new: #2a78d6; --flood-out: #184f95; --channel: #cde2fb;
  --river: #5598e7; --stream: #2f5277;
  --hit: #e8692e; --bar: #3987e5;
  --rain-0: #193429; --rain-1: #16513c; --rain-2: #1c6d51; --rain-3: #258e6a; --rain-4: #3eaf86; --rain-5: #65d3a7;
  --vul-1: #3d2d4e; --vul-2: #5d407b; --vul-3: #8058ab; --vul-4: #a377d3; --vul-5: #c6a0f2;
  --crit: #ff5252; --crit-ink: #ff8a80; --crit-wash: rgba(255, 82, 82, .16);
  --warn: #ff9800; --warn-ink: #ffb74d; --warn-wash: rgba(255, 152, 0, .15);
  --ok: #69f0ae; --ok-ink: #69f0ae; --ok-wash: rgba(105, 240, 174, .12);
  --info-ink: #65d3a7; --info-wash: rgba(62, 175, 134, .14); --hm3-ink: #091520;
  --focus: #86b6ef;
  --display: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mapfont: 'Inter', 'Segoe UI', system-ui, sans-serif;
  display: block; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body);
}
.sfa [hidden], .sfa[hidden] { display: none !important; }
.sfa .wrap { max-width: 1320px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 32px); padding-block: 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.sfa h1, .sfa h2, .sfa h3 { font-family: var(--display); text-wrap: balance; margin: 0; letter-spacing: .005em; color: var(--ink); }
.sfa h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.1; }
.sfa h2 { font-size: 20px; font-weight: 700; }
.sfa h3 { font-size: 15.5px; font-weight: 700; }
.sfa h3 .hsub { font-weight: 600; color: var(--muted); }
.sfa h3 .hsub::before { content: "· "; }
@media (max-width: 440px) { .sfa h3 .hsub { display: block; } .sfa h3 .hsub::before { content: none; } }
.sfa .eyebrow { font: 700 12px/1.35 var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.sfa .lede { color: var(--ink-2); max-width: 80ch; margin: 6px 0 0; }
.sfa .asof { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.sfa .sub { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; max-width: 90ch; }
.sfa .num { font-variant-numeric: tabular-nums; }
.sfa header.head { display: grid; gap: 6px; }
.sfa .panel { background: var(--surface); border: 1px solid var(--hair); border-radius: 10px; padding: 16px; }
.sfa .stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* live-data banner and stale marks */
.sfa .banner { display: grid; gap: 4px; border: 1px solid var(--warn); border-left-width: 4px; background: var(--warn-wash); color: var(--ink); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.sfa .banner b { color: var(--warn-ink); font-family: var(--display); }
.sfa .banner p { margin: 0; }
.sfa .banner.sample { border-color: var(--line-strong); background: var(--surface-2); }
.sfa .banner.sample b { color: var(--ink); }
.sfa .old { color: var(--warn-ink); font-weight: 600; white-space: nowrap; }

/* status cards */
.sfa .alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; container-type: inline-size; }
@container (min-width: 776px) and (max-width: 1171.98px) { .sfa .alerts > .alert:last-child { grid-column: 1 / -1; } }
.sfa .alert { display: grid; gap: 10px; align-content: start; border-left: 4px solid var(--line); }
.sfa .alert.crit { border-left-color: var(--crit); } .sfa .alert.warn { border-left-color: var(--warn); }
.sfa .alert.info { border-left-color: var(--rain-4); } .sfa .alert.ok { border-left-color: var(--ok); }
.sfa .alert-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.sfa .pill { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.sfa .pill svg { width: 13px; height: 13px; }
.sfa .pill.crit { background: var(--crit-wash); color: var(--crit-ink); } .sfa .pill.warn { background: var(--warn-wash); color: var(--warn-ink); }
.sfa .pill.info { background: var(--info-wash); color: var(--info-ink); } .sfa .pill.ok { background: var(--ok-wash); color: var(--ok-ink); }
.sfa .readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; margin: 0; }
.sfa .readings div { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 1px; align-content: start; }
.sfa .readings dt { align-self: end; font-size: 12px; color: var(--muted); }
.sfa .readings dd { margin: 0; font: 700 18px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.sfa .readings dd small { font: 400 12.5px/1.3 var(--body); color: var(--ink-2); display: block; }
.sfa .readings dd .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.sfa .assess { margin: 0; max-width: 80ch; }
.sfa .assess + .assess { margin-top: -4px; }
.sfa .caveat { margin: 0; font-size: 13px; color: var(--ink-2); }

/* main grid */
.sfa .main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1020px) { .sfa .main { grid-template-columns: minmax(0, 1fr); } }
.sfa .controls { display: grid; gap: 12px; }
.sfa .ctl { display: grid; gap: 6px; }
.sfa .ctl .lab { font: 700 13px/1.2 var(--display); letter-spacing: .03em; color: var(--ink-2); }
.sfa .ctl .lab span { font: 400 12.5px/1.2 var(--body); color: var(--muted); }
.sfa .seg { display: flex; flex-wrap: wrap; gap: 4px; }
.sfa .seg button { font: 700 12.5px/1 var(--display); letter-spacing: .02em; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--hair); border-radius: 6px; padding: 8px 10px; cursor: pointer; font-variant-numeric: tabular-nums; }
.sfa .seg button:hover { border-color: var(--line-strong); color: var(--ink); }
.sfa .seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sfa .seg button:focus-visible, .sfa .zoom button:focus-visible, .sfa .toggles input:focus-visible, .sfa input[type=search]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sfa .toggles { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; color: var(--ink-2); }
.sfa .toggles label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

.sfa .mapbox { position: relative; background: var(--surface); border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.sfa .stage { position: relative; min-height: 0; }
.sfa .mapsvg { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.sfa #map { aspect-ratio: 800 / 700; max-height: min(82vh, 900px); }
.sfa .mapsvg:active { cursor: grabbing; }
.sfa .mapsvg:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sfa .zoom { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 4px; z-index: 2; }
.sfa .zoom button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.sfa .zoom button svg { width: 16px; height: 16px; }
.sfa .zoom button:hover { border-color: var(--line-strong); }
.sfa .zoom button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
@media (max-width: 440px) { .sfa .mapbox:not(.expanded) .zoom { position: static; grid-auto-flow: column; justify-content: end; gap: 6px; padding: 8px 10px; } }
.sfa .coop { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 16px; text-align: center; background: color-mix(in srgb, var(--on-dark) 70%, transparent); color: var(--ink); font: 700 16px/1.3 var(--display); letter-spacing: .02em; pointer-events: none; opacity: 0; transition: opacity .2s; }
.sfa .coop.on { opacity: 1; }
/* expanded map: above the portal header (100), nav (99), chat (9990/9991) and loading overlay (9999) */
.sfa .mapbox.expanded { position: fixed; inset: 0; z-index: 10000; border: 0; border-radius: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.sfa .mapbox.expanded .stage { flex: 1 1 auto; }
.sfa .mapbox.expanded .mapsvg, .sfa .mapbox.expanded #map, .sfa .mapbox.expanded #cmap { height: 100%; max-height: none; aspect-ratio: auto; touch-action: none; }
@media (orientation: landscape) and (max-height: 500px) {   /* short landscape screens: legend beside the expanded map, not under it */
  .sfa .mapbox.expanded { flex-direction: row; }
  .sfa .mapbox.expanded .stage { flex: 1 1 0; min-width: 0; }
  .sfa .mapbox.expanded .legend { flex: 0 0 min(40%, 250px); border-top: 0; border-left: 1px solid var(--hair); overflow: auto; align-content: flex-start; }
}
.sfa .legend { border-top: 1px solid var(--hair); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.sfa .legend .row { display: inline-flex; align-items: center; gap: 7px; }
.sfa .legend .ttl { font: 700 12.5px var(--display); color: var(--ink); letter-spacing: .02em; }
.sfa .legend .ramp { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: stretch; gap: 0; }
.sfa .legend .ramp span { display: grid; justify-items: center; font-size: 11.5px; color: var(--muted); min-width: 44px; padding: 0 4px; }
.sfa .legend .ramp i { display: block; justify-self: stretch; width: auto; margin: 0 -4px; height: 12px; }
.sfa .legend .brk { flex-basis: 100%; height: 0; }
.sfa .sw { width: 18px; height: 12px; border-radius: 2px; flex: none; display: inline-block; }
.sfa .sw.line { height: 0; border-top: 2px solid; border-radius: 0; }
.sfa .maphint { font-size: 12.5px; color: var(--muted); margin: 0; }

/* map classes */
.sfa .v-land { fill: var(--land); stroke: var(--hair); stroke-width: .6; vector-effect: non-scaling-stroke; }
.sfa .v-land:hover { stroke: var(--ink); stroke-width: 1.6; }
.sfa .v-land.r0 { fill: var(--rain-0); } .sfa .v-land.r1 { fill: var(--rain-1); } .sfa .v-land.r2 { fill: var(--rain-2); }
.sfa .v-land.r3 { fill: var(--rain-3); } .sfa .v-land.r4 { fill: var(--rain-4); } .sfa .v-land.r5 { fill: var(--rain-5); }
.sfa .v-land.q1 { fill: var(--vul-1); } .sfa .v-land.q2 { fill: var(--vul-2); } .sfa .v-land.q3 { fill: var(--vul-3); }
.sfa .v-land.q4 { fill: var(--vul-4); } .sfa .v-land.q5 { fill: var(--vul-5); }
.sfa .v-land.nd { fill: var(--land-out); }
.sfa .dist-nb { fill: var(--land-out); stroke: var(--line); stroke-width: .8; vector-effect: non-scaling-stroke; }
.sfa .dist-skl { fill: none; stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; pointer-events: none; }
.sfa .dist-skl-fill { fill: var(--surface-2); stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.sfa .mand { fill: none; stroke: var(--line-strong); stroke-width: 1.1; vector-effect: non-scaling-stroke; pointer-events: none; }
.sfa .z-earlier { fill: var(--flood-earlier); pointer-events: none; }
.sfa .z-new { fill: var(--flood-new); pointer-events: none; }
.sfa .z-out { fill: var(--flood-out); opacity: .75; pointer-events: none; }
.sfa .outline .z-earlier, .sfa .outline .z-new { fill: none; stroke: var(--flood-earlier); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sfa .chan { fill: var(--channel); pointer-events: none; }
.sfa .stream { fill: none; stroke: var(--stream); stroke-width: .6; stroke-opacity: .8; vector-effect: non-scaling-stroke; pointer-events: none; }
.sfa .river { fill: none; stroke: var(--river); stroke-width: 1.3; vector-effect: non-scaling-stroke; pointer-events: none; }
.sfa .river.major { stroke-width: 2; }
.sfa .hit { fill: none; stroke: var(--hit); stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
.sfa .mlab { font-family: var(--mapfont); font-weight: 600; fill: var(--ink-2); paint-order: stroke; stroke: var(--surface); stroke-linejoin: round; text-anchor: middle; pointer-events: none; }
.sfa .rlab { font-family: var(--mapfont); font-style: italic; font-weight: 500; fill: var(--river); paint-order: stroke; stroke: var(--surface); stroke-linejoin: round; text-anchor: middle; pointer-events: none; }
.sfa .nlab { font-family: var(--mapfont); font-weight: 600; fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-linejoin: round; text-anchor: middle; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.sfa .fac { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sfa .cwcg { fill: var(--surface); stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sfa .rg { fill: var(--ink); stroke: var(--surface); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sfa .catch { fill: var(--rain-0); fill-opacity: .55; stroke: var(--rain-5); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sfa .catch.sub { fill: none; stroke: var(--rain-5); stroke-width: 1; stroke-dasharray: 4 3; }
.sfa .net { fill: none; stroke: var(--river); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sfa .glab { font-family: var(--mapfont); font-weight: 600; font-size: 12px; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.sfa .glab tspan.s { font: 500 12px var(--mapfont); fill: var(--ink-2); }

/* tooltip: above the expanded map */
.sfa .tip { position: fixed; z-index: 10001; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); max-width: min(300px, calc(100vw - 16px)); }
.sfa .tip b { font-family: var(--display); font-size: 14.5px; font-weight: 700; }
.sfa .tip .k { color: var(--muted); }
.sfa .tip .nw { white-space: nowrap; }

/* side panel */
.sfa .side { display: grid; gap: 16px; }
.sfa .selname { font: 700 14px/1.35 var(--display); color: var(--ink-2); }
.sfa .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 8px; overflow: hidden; }
.sfa .kpi { background: var(--surface); padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.sfa .kpi .v { font: 800 24px/1.1 var(--display); }
.sfa .kpi .l { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.sfa .kpinote { margin: 0; font-size: 12px; color: var(--muted); }
.sfa .facs { display: grid; gap: 8px; }
.sfa .faccounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.sfa .side, .sfa .facs { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 339px) { .sfa .faccounts { grid-template-columns: repeat(3, 1fr); } }
.sfa .faccounts div { background: var(--surface-2); border-radius: 6px; padding: 8px 4px; display: grid; gap: 2px; }
.sfa .faccounts b { font: 800 19px/1 var(--display); font-variant-numeric: tabular-nums; }
.sfa .faccounts span { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.sfa .faclist { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; max-height: 220px; overflow: auto; }
.sfa .faclist li { display: flex; gap: 8px; justify-content: space-between; border-bottom: 1px solid var(--hair); padding-bottom: 4px; }
.sfa .faclist .t { color: var(--muted); white-space: nowrap; }
.sfa .empty { color: var(--muted); font-size: 13px; margin: 0; }

/* charts */
.sfa .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.sfa .chart { display: grid; gap: 8px; }
.sfa .chart p { margin: 0; font-size: 13px; color: var(--ink-2); }
.sfa .chart svg { width: 100%; max-width: 620px; height: auto; display: block; }
.sfa .ax text { font: 500 11.5px var(--body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.sfa .ax line, .sfa .ax path { stroke: var(--line); }
.sfa .grid line { stroke: var(--hair); }
.sfa .bar { fill: var(--bar); opacity: .42; cursor: pointer; }
.sfa .bar.on { opacity: 1; }
.sfa .bar:hover { opacity: .8; }
.sfa .bar:focus-visible { outline: none; stroke: var(--focus); stroke-width: 2; }
.sfa .rbar { fill: var(--rain-4); }
.sfa .rbar.run { fill: var(--rain-2); }
.sfa .rbar:hover { fill: var(--rain-5); }
.sfa .barlab { font: 600 12px var(--body); fill: var(--ink); text-anchor: middle; font-variant-numeric: tabular-nums; }
.sfa .nodata { font: 500 10.5px var(--body); fill: var(--muted); text-anchor: middle; }
.sfa .now line { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.sfa .now text { font: 600 11.5px var(--body); fill: var(--ink); }
.sfa .now.old line { stroke: var(--warn-ink); } .sfa .now.old text { fill: var(--warn-ink); }

/* heatmap tables */
.sfa .heat-wrap { overflow-x: auto; }
.sfa .heat-wrap + .heat-wrap { margin-top: 4px; }
.sfa table.heat { border-collapse: separate; border-spacing: 2px; font-size: 13px; min-width: 100%; }
.sfa table.heat caption { caption-side: top; text-align: left; font: 700 12.5px/1.3 var(--display); color: var(--ink-2); padding: 0 2px 4px; }
.sfa .heat-wrap { container-type: inline-size; }
.sfa table.heat caption { max-width: 100cqi; box-sizing: border-box; }   /* wrap the caption at the visible width, not the scrolling table's */
.sfa table.heat caption span { font: 400 12px var(--body); color: var(--muted); }
.sfa table.heat th { font: 700 12px/1.2 var(--display); color: var(--ink-2); padding: 4px 6px; text-align: center; white-space: nowrap; background: none; position: static; }
.sfa table.heat th span { font: 400 11px var(--body); color: var(--muted); }
.sfa table.heat th.rl { text-align: left; width: 1%; }
@media (max-width: 600px) { .sfa table.heat th.rl span { display: block; white-space: normal; min-width: 7.5em; line-height: 1.3; } }
.sfa table.heat td { text-align: center; padding: 6px 4px; border-radius: 3px; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 42px; border: 0; }
.sfa table.heat .today { box-shadow: inset 2px 0 0 var(--ink); }
.sfa table.heat td.past { font-style: italic; }
.sfa table.heat tr > th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.sfa #fc-mandal thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 0 2px 0 var(--surface); }
.sfa #fc-mandal thead th:first-child { z-index: 3; }
.sfa .hm.r0 { background: var(--rain-0); color: var(--ink); } .sfa .hm.r1 { background: var(--rain-1); color: var(--ink); } .sfa .hm.r2 { background: var(--rain-2); color: var(--ink); }
.sfa .hm.r3 { background: var(--rain-3); color: var(--hm3-ink); } .sfa .hm.r4 { background: var(--rain-4); color: var(--on-dark); } .sfa .hm.r5 { background: var(--rain-5); color: var(--on-dark); }
.sfa .hm.nd { background: var(--surface-2); color: var(--muted); }
.sfa .catmap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.sfa #cmap { aspect-ratio: 700 / 640; max-height: min(82vh, 820px); }

/* tables */
.sfa .tables { display: grid; grid-template-columns: 1fr; gap: 16px; }
.sfa .tbl-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--hair); border-radius: 8px; }
.sfa table.dt { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.sfa .dt th, .sfa .dt td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.sfa .dt th { position: sticky; top: 0; background: var(--surface-2); font: 700 12px var(--display); letter-spacing: .03em; color: var(--ink-2); z-index: 1; }
.sfa .dt td.r, .sfa .dt th.r { text-align: right; font-variant-numeric: tabular-nums; }
.sfa .dt th span { display: block; font: 400 11px var(--body); letter-spacing: 0; color: var(--muted); }
.sfa #rg-table thead th.r { white-space: normal; }
.sfa #rg-table th, .sfa #rg-table td { padding-inline: 8px; }
.sfa #rain .two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 490px), 1fr)); }
.sfa .dt tbody tr:hover { background: var(--surface-2); }
.sfa .dt tr.zero td { color: var(--muted); }
.sfa .dt tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--hair); }
.sfa .dt thead tr > :first-child { z-index: 2; background: var(--surface-2); }
.sfa .dt tbody tr:hover > :first-child { background: var(--surface-2); }
.sfa .chip { display: inline-flex; align-items: center; gap: 5px; font: 700 11.5px/1 var(--display); letter-spacing: .03em; padding: 3px 6px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--hair); }
.sfa .chip i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sfa .tblhead { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.sfa input[type=search] { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); width: min(100%, 240px); }

.sfa .notes { display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.sfa .notes ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 100ch; }
.sfa .notes strong { color: var(--ink); }
.sfa .attrib { margin: 0; font-size: 13px; color: var(--muted); max-width: 100ch; }
@media (prefers-reduced-motion: reduce) { .sfa * { transition: none !important; } }
