/* ==========================================================================
   Design Lab stage: Local Forecast (local_wx.php and local_wx_pro.php share this vocabulary).
   Shared tokens and glass recipes are in slate.css. The live pages are not edited.

   Surfaces on this page:
     toolbar pill ............ clear glass pill; location field is a recessed well; the selected group is the raised glass pill
     cards and the chart card  clear glass panes
     cards inside a pane ..... the quieter "sheet"
     menus ................... white, as in the new nav (they pass over everything)
     charts .................. Dark: re-coloured by charts.js.  White: untouched, in a white rounded frame
   ========================================================================== */

html.stage{
  --lw-shadow:var(--glass-shadow);       /* the page's one card shadow */
  --lw-high:#ff8a7a;                     /* daytime highs  (warm, as on the homepage dark map) */
  --lw-low:#8db8ff;                      /* overnight lows (cold) */
}

/* ---------- column: same edges as the nav ---------- */
html.stage main{padding-top:4px}
@media (min-width:641px){html.stage #module-deck.section{max-width:var(--site);padding-left:calc(var(--gut) - 16px);padding-right:calc(var(--gut) - 16px)}}   /* the toolbar and cards carry their own 16px margin; phones keep the live 16px edge */
html.stage .section{border-bottom-color:transparent}
html.stage .deck-panel .section{max-width:none}

/* ---------- menus: dark, the shared menu surface from slate.css (they were white until 2026-11-14) ---------- */
html.stage .category-dropdown .dropdown__menu,
html.stage .deck-dropdown-menu,
html.stage .saved-locations-menu,
html.stage .awesomplete > ul,
html.stage .deck-units__menu{
  background:var(--menu-bg);color:var(--sg-ink);border-color:var(--menu-border);box-shadow:var(--menu-shadow)}
html.stage .category-dropdown .dropdown__menu :focus-visible,
html.stage .deck-dropdown-menu :focus-visible,
html.stage .saved-locations-menu :focus-visible,
html.stage .deck-units__menu :focus-visible{outline-color:#fff}
/* rows: light text, a faint lift under the pointer, mint for the one that is showing */
html.stage .category-dropdown .dropdown__item,
html.stage .deck-dropdown-item,html.stage .deck-dropdown-item.premium,
html.stage .saved-location-item,
html.stage .awesomplete > ul > li{color:#fff}
html.stage .category-dropdown .dropdown__item:hover,
html.stage .deck-dropdown-item:hover,html.stage .deck-dropdown-item.premium:hover,
html.stage .saved-location-item:hover{background:var(--menu-hover);color:#fff}
html.stage .category-dropdown .dropdown__item.is-active,html.stage .category-dropdown .dropdown__item.is-active:hover,
html.stage .deck-dropdown-item.is-active,html.stage .deck-dropdown-item.is-active:hover{background:var(--menu-on-bg);color:var(--menu-on)}
html.stage .deck-dropdown-item.premium::after,html.stage .category-dropdown .dropdown__item.premium::after{color:#5eead4}   /* the small "Pro" tag */
/* saved locations */
html.stage .saved-location-item{border-bottom-color:rgba(255,255,255,.08)}
html.stage .saved-location-item i,html.stage .saved-location-item[data-lat]::before{color:#6ee7b7}
html.stage .saved-location-item--away{color:var(--sg-muted)}
html.stage .saved-location-item--away::after{color:var(--sg-faint)}
html.stage .saved-location-item .sli-cc{background:rgba(255,255,255,.12);color:var(--sg-soft)}
html.stage .saved-location-coords{color:var(--sg-muted)}
/* place search suggestions */
html.stage .awesomplete > ul > li:hover,html.stage .awesomplete > ul > li[aria-selected="true"]{background:var(--menu-on-bg);color:#fff}
html.stage .awesomplete > ul > li mark,html.stage .awesomplete > ul > li[aria-selected="true"] mark{color:#6ee7b7}
/* units popover */
html.stage .deck-units__label{color:var(--sg-soft)}
html.stage .deck-units__hint{color:var(--sg-muted)}
html.stage .deck-units__menu .units-pill{border-color:var(--sg-line2);background:var(--well-bg)}
html.stage .deck-units__menu .units-pill button{color:#cbd5e1}
html.stage .deck-units__menu .units-pill button+button{border-left-color:var(--sg-line)}
html.stage .deck-units__menu .units-pill button.is-on{background:#047857;color:#fff}

/* ---------- toolbar pill ---------- */
html.stage .deck-head{position:relative;top:auto}          /* never sticks on the live site either; the nav is the one sticky bar */
@media (min-width:641px){
  html.stage .deck-head{background:var(--glass-bg);-webkit-backdrop-filter:none;backdrop-filter:none;border-color:var(--glass-border);box-shadow:var(--glass-shadow)}
}
html.stage .deck-loc .deck-loc__input{background:var(--well-bg);box-shadow:var(--well-shadow);border-color:transparent}
html.stage .deck-loc .deck-loc__input:hover{background:rgba(2,6,23,.42)}
html.stage .deck-loc .deck-loc__input:focus-within{background:rgba(2,6,23,.5);border-color:rgba(110,231,183,.75);box-shadow:0 0 0 3px rgba(110,231,183,.2)}
html.stage .deck-loc .deck-loc__input i,html.stage .loc-input i{color:#cbd5e1}
html.stage #cityInput{color:var(--sg-ink);caret-color:#6ee7b7}
html.stage #cityInput::placeholder{color:#a9b6c8;opacity:1}
html.stage .deck-loc .btn-saved-locations,html.stage .deck-loc__icon-btn{color:#f1f5f9}
html.stage .deck-loc .btn-saved-locations:hover,html.stage .deck-loc__icon-btn:hover,
html.stage .deck-loc .saved-locations-dropdown.is-open .btn-saved-locations,
html.stage .deck-units.is-open > .deck-loc__icon-btn{background:rgba(255,255,255,.12);color:#fff}
html.stage .deck-loc .btn-saved-locations:active,html.stage .deck-loc__icon-btn:active{background:rgba(255,255,255,.18)}
html.stage .mini-spinner,html.stage .deck-loc .mini-spinner{border-color:rgba(255,255,255,.2);border-top-color:#6ee7b7}

/* module groups: quiet text, the selected group is the raised glass pill (same idea as the homepage map tabs) */
html.stage .category-dropdown .dropdown__toggle{color:#f8fafc}   /* near white: the softer grey sank into the glass (owner, 2026-11-14) */
html.stage .category-dropdown .dropdown__toggle:hover,
html.stage .category-dropdown .dropdown__toggle[aria-expanded="true"]{background:rgba(255,255,255,.1);color:#fff}
html.stage .category-dropdown .dropdown__toggle:active{background:rgba(255,255,255,.16)}
html.stage .category-dropdown.has-active .dropdown__toggle,
html.stage .category-dropdown.has-active .dropdown__toggle[aria-expanded="true"],
html.stage .category-dropdown.has-active .dropdown__toggle:hover{background:var(--pill-bg);box-shadow:var(--pill-shadow);color:#fff}
@media (min-width:641px){
  html.stage .deck-dropdown-toggle,html.stage .deck-dropdown-toggle:hover{background:var(--pill-bg);box-shadow:var(--pill-shadow);color:#fff}
}
/* Upgrade: a quiet mint chip. The one rust button on the page is the Pro call to action. */
html.stage .deck-cta{border-color:rgba(110,231,183,.42);background:rgba(110,231,183,.12);color:#6ee7b7}
html.stage .deck-cta:hover{background:rgba(110,231,183,.2);border-color:rgba(110,231,183,.6);color:#a7f3d0}

/* phone location island */
html.stage .loc-input{background:var(--well-bg);border-color:var(--sg-line2);box-shadow:var(--well-shadow)}
html.stage .loc-input:focus-within{border-color:rgba(110,231,183,.75);box-shadow:0 0 0 3px rgba(110,231,183,.2)}
html.stage .location-bar .btn-saved-locations{background:rgba(255,255,255,.08);border-color:var(--sg-line2);color:#6ee7b7;box-shadow:none}
html.stage .location-bar .units-pill{border-color:var(--sg-line2);background:var(--well-bg)}
html.stage .location-bar .units-pill button{color:#cbd5e1}
html.stage .location-bar .units-pill button+button{border-left-color:var(--sg-line)}
html.stage .location-bar .units-pill button.is-on{background:#047857;color:#fff}
html.stage .loc-action{color:var(--sg-muted)}
html.stage .loc-action:hover{color:#6ee7b7}
html.stage .loc-action--pro,html.stage .loc-save-hint a{color:#5eead4}
html.stage .loc-action--pro:hover{color:#99f6e4}
html.stage .loc-save-hint,html.stage .loc-status{color:var(--sg-muted)}

/* ---------- glass panes ---------- */
html.stage .cwb-band,
html.stage #seven-day-cards-wrapper,
html.stage .cw-stats-col,
html.stage #alertContent,
html.stage .nws-panel,
html.stage #stats-content .stats-loading-container,
html.stage .module-deck:has(.deck-panel.is-active:not(#panel-current)) .deck-body{
  background:var(--glass-bg);-webkit-backdrop-filter:none;backdrop-filter:none;border-color:var(--glass-border);box-shadow:var(--glass-shadow)}
@media (max-width:640px){
  html.stage .module-deck:has(.deck-panel.is-active:not(#panel-current)){background:none;border-color:transparent;box-shadow:none}
  html.stage .module-deck:has(.deck-panel.is-active:not(#panel-current)) .deck-head{background:none;border-bottom-color:transparent}
  html.stage .module-deck:has(.deck-panel.is-active:not(#panel-current)) .deck-body{border:1px solid var(--glass-border);border-radius:14px}
}

/* ---------- current conditions band ---------- */
html.stage .cwb-loc,html.stage .cwb-temp-block,html.stage .cwb-meta strong,html.stage .cwb-condition,
html.stage .cwb-hilo-value,html.stage .cwb-dv,html.stage .cwb-radar-title{color:var(--sg-ink)}
html.stage #current-weather .cwb-eyebrow,html.stage .cwb-coords,html.stage .cwb-temp-unit,html.stage .cwb-meta,
html.stage .cwb-ds,html.stage .cwb-alert-pill,html.stage .cwb-dl,html.stage .cwb-rv-ts,html.stage .cwb-radar-wait__label{color:var(--sg-muted)}
html.stage .cwb-time{color:var(--sg-faint)}
html.stage .cwb-details,html.stage .cwb-d,html.stage .cwb-radar,html.stage .cwb-radar-head{border-color:var(--sg-line)}
html.stage .cwb-d:nth-child(even){border-left-color:var(--sg-line)}   /* phones: the widget's own rule for this divider has higher specificity than the line above (found by the city-pages reviewer) */
html.stage .cwb-alert-dot{filter:brightness(1.9) saturate(1.1)}   /* the script sets the colour inline per alert state; brighten whatever it sets */
html.stage .cwb-hilo-arrow--hi{color:#fbbf24}
html.stage .cwb-hilo-arrow--lo{color:#6ea4ff}
html.stage #current-weather .cw-icon,html.stage .cwb-band img,html.stage .seven-day-card img,html.stage .seven-day-card svg{filter:drop-shadow(0 2px 5px rgba(0,0,0,.35))}   /* pale cloud icons need an edge on glass */
html.stage .cwb-site-chip{color:#6ee7b7;background:rgba(110,231,183,.12)}
html.stage .cwb-radar-link{color:var(--sg-soft);border-color:var(--sg-line2)}
html.stage .cwb-radar-link:hover{color:#fff;border-color:rgba(255,255,255,.42);background:rgba(255,255,255,.1)}
html.stage .cwb-radar-link.cwb-sim{color:#6ee7b7;background:rgba(110,231,183,.12);border-color:transparent}
html.stage .cwb-radar-link.cwb-sim:hover{background:rgba(110,231,183,.2)}
html.stage .cwb-radar-body,html.stage .cwb-radar-wait,html.stage .cwb-radar-body .cwb-rv-map,html.stage .cwb-rv-note{background:var(--night2)}
html.stage .cwb-radar-wait__ring{border-color:rgba(255,255,255,.18);border-top-color:#6ee7b7}
html.stage .cwb-rv-ctl{background:var(--smoke-bg);-webkit-backdrop-filter:none;backdrop-filter:none;border-color:var(--sg-line2);box-shadow:0 6px 18px rgba(0,0,0,.4)}
html.stage .cwb-rv-note{color:var(--sg-muted)}
html.stage .cwb-rv-note i{color:var(--sg-faint)}
html.stage .cwb-rv-map .leaflet-control-attribution{background:rgba(11,18,32,.6);color:#cbd5e1}
html.stage .weather-error{background:rgba(127,29,29,.28);-webkit-backdrop-filter:none;backdrop-filter:none;border-color:rgba(252,165,165,.4);color:#fecaca}

/* ---------- alerts ---------- */
html.stage .cw-alert-row{border-bottom-color:var(--sg-line);color:var(--sg-ink)}
html.stage .cw-alert-none,html.stage .cw-alert-headline{color:var(--sg-muted)}
html.stage .cw-alert-none .cw-alert-icon{color:#34d399}
html.stage .cw-alert-active .cw-alert-icon{color:#fbbf24}
html.stage .cw-alert-shimmer{background:linear-gradient(90deg,rgba(255,255,255,.08) 25%,rgba(255,255,255,.18) 50%,rgba(255,255,255,.08) 75%);background-size:200% 100%}

/* ---------- 7-day cards ---------- */
html.stage .seven-day-card + .seven-day-card{border-left-color:var(--sg-line)}
html.stage .sdc-day,html.stage .sdc-high{color:var(--sg-ink)}
html.stage .sdc-date,html.stage .sdc-low{color:var(--sg-muted)}
html.stage .seven-day-cards.is-linked .seven-day-card:hover{background-color:rgba(255,255,255,.06)}   /* a card opens the 2 Week Daily tab */
html.stage .seven-day-cards.is-linked .seven-day-card:focus-visible{outline-color:#6ee7b7}

/* ---------- stat tables ---------- */
html.stage .cw-stats-heading{color:var(--sg-ink)}
html.stage .cw-stat-row{border-top-color:var(--sg-line)}
html.stage .cw-stat-row:hover{background:rgba(255,255,255,.05)}
html.stage .cw-stat-label{color:var(--sg-muted)}
html.stage .cw-stat-value{color:var(--sg-ink)}

/* ---------- NWS written forecast ---------- */
html.stage .nws-row{border-bottom-color:var(--sg-line)}
html.stage .nws-row:hover{background:rgba(255,255,255,.05)}
html.stage .nws-period{color:#6ee7b7}
html.stage .nws-detail{color:var(--sg-soft)}
/* NWS office weather story graphics under the forecast (2026-11-30, nws_forecast_plot.js) */
html.stage .nws-story__heading{color:var(--sg-ink)}
html.stage .nws-story__link{color:#6ee7b7}
html.stage .nws-story__card{background:var(--glass-bg);border-color:var(--glass-border);box-shadow:var(--glass-shadow)}
html.stage .nws-story__imglink{background:rgba(255,255,255,.06)}   /* the frame only; the graphic itself is NWS's */
html.stage .nws-story__title{color:#6ee7b7}
html.stage .nws-story__desc{color:var(--sg-soft)}
html.stage .nws-story__when{color:var(--sg-muted)}

/* ---------- 14-day cards: sheets on the chart pane ---------- */
html.stage .forecast-card,
html.stage #forecast-cards-container > *:not(style):not(script){
  background:var(--sheet-bg);-webkit-backdrop-filter:none;backdrop-filter:none;border-color:var(--sheet-border);box-shadow:var(--sheet-shadow)}
html.stage #forecast-cards-container > *:hover,html.stage .forecast-card:hover{border-color:rgba(110,231,183,.55);box-shadow:var(--sheet-shadow)}
html.stage .forecast-card .fc-date{color:var(--sg-ink)}
html.stage .forecast-card .high{color:var(--lw-high)}
html.stage .forecast-card .low{color:var(--lw-low)}
html.stage .forecast-card .metric{color:var(--sg-muted)}
html.stage .forecast-card .metric-label{color:var(--sg-soft)}

/* ---------- charts ---------- */
/* loading overlays (chart-spinner.js and the Precip YTD chart's own) */
html.stage .cs-overlay,html.stage .precipYTD-spinner-overlay{background:rgba(11,18,32,.55)}
html.stage .cs-spinner,html.stage .precipYTD-spinner{border-color:rgba(255,255,255,.2);border-top-color:#fff}
html.stage .cs-text,html.stage .precipYTD-spinner-text{color:rgba(255,255,255,.82)}
html.stage #title-precip-chart,html.stage #title-precip-chart-10d{color:var(--sg-ink) !important}   /* the chart script sets these with !important */
html.stage #title-precip-chart em,html.stage #title-precip-chart-10d em{color:var(--sg-muted)}

/* Charts: Dark. Multi-model precip panels become sheets. */
html.stage:not([data-charts="white"]) .precip-panel{background:var(--sheet-bg);border-color:var(--sheet-border);box-shadow:var(--sheet-shadow)}
html.stage:not([data-charts="white"]) .precip-panel-head .name{color:var(--sg-ink)}
html.stage:not([data-charts="white"]) .precip-panel-head .badge{color:var(--sg-muted);border-color:var(--sg-line2)}
html.stage:not([data-charts="white"]) .precip-panel-head .badge.ens{background:rgba(251,191,36,.14);border-color:rgba(251,191,36,.42);color:#fcd34d}
html.stage:not([data-charts="white"]) .precip-panel .stat .k{color:var(--sg-muted)}
html.stage:not([data-charts="white"]) .precip-panel .stat .v{color:var(--sg-ink)}

/* Charts: White. Each chart keeps its live look inside a white rounded frame, like the published map images. */
/* A chart on paper (every chart in Light, the colour-heavy ones in Mixed; charts.js adds .sg-paper). */
html.stage .js-plotly-plot.sg-paper,
html.stage[data-charts="white"] .deck-panel .js-plotly-plot{background:var(--paper);border-radius:14px;overflow:hidden;box-shadow:0 14px 30px -18px rgba(0,0,0,.7)}
html.stage .js-plotly-plot.sg-paper + .js-plotly-plot,html.stage .js-plotly-plot + .js-plotly-plot.sg-paper,
html.stage[data-charts="white"] .deck-panel .js-plotly-plot + .js-plotly-plot{margin-top:14px}   /* stacked charts: a gap between frames */
html.stage[data-charts="white"] .precip-panel{--ink:#0f172a;--muted:#64748b;color:#0f172a;border-radius:14px}
html.stage[data-charts="white"] .precip-panel .js-plotly-plot{box-shadow:none;border-radius:0}

/* ---------- Pro lock card (free page) ---------- */
html.stage .pro-lockout-card .pro-lockout-eyebrow{color:#6ee7b7}
html.stage .pro-lockout-card .pro-lockout-title{color:var(--sg-ink)}
html.stage .pro-lockout-card .pro-lockout-tagline{color:var(--sg-soft)}
html.stage .pro-sample-btn{background:transparent;color:#6ee7b7;border-color:rgba(110,231,183,.6)}
html.stage .pro-sample-btn:hover{background:rgba(110,231,183,.12);box-shadow:none}
html.stage .pro-lockout-cta{background:var(--pro);color:#fff;transition:var(--pro-ease)}
html.stage .pro-lockout-cta:hover{background:var(--pro-h);color:#fff;box-shadow:var(--pro-glow)}
html.stage .pro-lockout-cta:active{background:var(--pro-d);box-shadow:none;transition-duration:.08s}
html.stage .pro-lockout-trust{color:var(--sg-faint)}

/* ---------- Pro page only (local_wx_pro.php) ---------- */
html.stage .stats-loading-container{color:var(--sg-muted)}
html.stage .stats-loading-spinner{border-color:rgba(255,255,255,.18);border-top-color:#6ee7b7}
html.stage .deck-loc__text-btn{border-color:var(--sg-line2);color:#6ee7b7}
html.stage .deck-loc__text-btn:hover{background:rgba(110,231,183,.12);border-color:rgba(110,231,183,.6)}
html.stage[data-stage="local_wx_pro"] .loc-action--pro{color:#fbbf24}          /* amber on the Pro page, as live */
html.stage[data-stage="local_wx_pro"] .loc-action--pro:hover{color:#fcd34d}

/* ==========================================================================
   Pro tools on the Pro page. Three kinds of thing, three treatments:
     1. token-driven panels (.cs chart stats, .ei ensemble insights, .sf soil forecast): their own colour tokens are re-pointed
     2. data tables (ensemble member grids, YTD tables, soil table, spray, workability, ET): STAY WHITE in a rounded frame.
        They are colour-coded heat tables built for a white ground; same treatment as the published map images.
        These are also listed in the page's `keep` option so stage.js leaves their inline colours alone.
     3. chart buttons (Download / Share): glass chips
   ========================================================================== */

/* 1a. stats under a chart (both chart modes: they sit on the pane, not in the chart) */
html.stage .cs{--cs-ink:var(--sg-ink);--cs-ink2:var(--sg-soft);--cs-muted:var(--sg-muted);--cs-ring:var(--sg-line)}
html.stage .cs-note.warm{color:#fdba74}
html.stage .cs-note.cold,html.stage .cs-note.wet{color:#93c5fd}
html.stage .cs-note.dry{color:#fcd34d}
html.stage .cs-list li{border-bottom-color:var(--sg-line)}

/* 1b. ensemble insights + soil forecast, Charts: Dark */
html.stage:not([data-charts="white"]) .ei-root{--ei-ink:var(--sg-ink);--ei-ink2:var(--sg-soft);--ei-muted:var(--sg-muted);--ei-ring:var(--sg-line2);--ei-card:rgba(255,255,255,.07)}
html.stage:not([data-charts="white"]) .sf-root{--sf-ink:var(--sg-ink);--sf-ink2:var(--sg-soft);--sf-muted:var(--sg-muted);--sf-ring:var(--sg-line2);--sf-card:rgba(255,255,255,.07)}
html.stage:not([data-charts="white"]) .ei-view,html.stage:not([data-charts="white"]) .sf-view{background:var(--sheet-bg);border-color:var(--sheet-border);box-shadow:var(--sheet-shadow)}
html.stage:not([data-charts="white"]) .ei-seg,html.stage:not([data-charts="white"]) .sf-seg{background:var(--well-bg);border-color:transparent;box-shadow:var(--well-shadow)}
html.stage:not([data-charts="white"]) .ei-seg button.is-on,html.stage:not([data-charts="white"]) .sf-seg button.is-on{background:var(--pill-bg);box-shadow:var(--pill-shadow);color:#fff}
html.stage:not([data-charts="white"]) .sf-select select{background:rgba(2,6,23,.4);border-color:var(--sg-line2);color:var(--sg-ink)}
html.stage:not([data-charts="white"]) .sf-key:hover{background:rgba(255,255,255,.08)}
html.stage:not([data-charts="white"]) .sf-btn{color:#6ee7b7;background:rgba(255,255,255,.07)}
html.stage:not([data-charts="white"]) .sf-btn:hover{border-color:rgba(110,231,183,.6)}
html.stage:not([data-charts="white"]) .sf-col-band{border-bottom-color:var(--night2)}
html.stage:not([data-charts="white"]) .ty-card{border-color:var(--sg-line)}
/* default (uncoloured) chips; the coloured ones keep their own pale ground and dark text */
html.stage:not([data-charts="white"]) .ei-chip:not(.wet,.warm,.cold),
html.stage:not([data-charts="white"]) .sf-chip:not(.warm,.cold,.dry2,.dry1,.ok,.wet,.sat){background:rgba(255,255,255,.12);color:var(--sg-soft)}

/* 1c. Charts: White. The whole panel sits in one white frame and keeps its live look. */
html.stage[data-charts="white"] .ei-root,html.stage[data-charts="white"] .sf-root{background:var(--paper);border-radius:14px;padding:14px 12px 10px;color-scheme:light;box-shadow:0 14px 30px -18px rgba(0,0,0,.7)}
html.stage[data-charts="white"] .ei-root .js-plotly-plot,html.stage[data-charts="white"] .sf-root .js-plotly-plot{box-shadow:none;border-radius:0}

/* 2. data tables, ported to dark. Owner, 2026-11-14: in the Dark look nothing stays white. */

/* 2a. Spray decision, soil workability, hay drying strip, stock water tiles.
   Their scripts write every colour as an inline style, so the surfaces below need !important and are matched on the
   inline text itself. Inline TEXT colours are not listed here: stage.js lifts those once the surface under them is dark.
   Each surface is matched TWICE: as the script wrote it ("background:#f9fafb") and as the browser rewrites it
   ("rgb(249, 250, 251)") once stage.js has changed that element's text colour. Without the second form the header
   row and the "Top Reason" cells went back to white (owner screenshots, 2026-11-14).
   The GO / CAUTION / NO-GO chips keep their own pale ground and dark text, like the other status chips. */
html.stage :is(#spray-decision-container,#workability-table-container,#et-drying-strip,#et-stock-summary) :is([style*="background:#fff;"],[style*="background: rgb(255, 255, 255)"]){
  background:rgba(255,255,255,.05) !important;box-shadow:0 0 0 1px var(--sg-line) !important}                      /* the table / tile itself */
html.stage :is(#spray-decision-container,#workability-table-container,#et-drying-strip,#et-stock-summary) :is([style*="background:#f9fafb"],[style*="background:#fafafa"],[style*="rgb(249, 250, 251)"],[style*="rgb(250, 250, 250)"]){
  background:rgba(255,255,255,.045) !important}                                                                    /* header row and alternate stripes */
html.stage :is(#spray-decision-container,#workability-table-container,#et-drying-strip,#et-stock-summary) :is([style*="solid #f3f4f6"],[style*="solid rgb(243, 244, 246)"]){border-bottom-color:rgba(255,255,255,.08) !important}
html.stage :is(#spray-decision-container,#workability-table-container,#et-drying-strip,#et-stock-summary) :is([style*="solid #e5e7eb"],[style*="solid rgb(229, 231, 235)"]){border-bottom-color:rgba(255,255,255,.2) !important}
html.stage #workability-table-container :is([style*="background:#fff8e1"],[style*="rgb(255, 248, 225)"]){background:rgba(240,192,64,.13) !important;box-shadow:none !important;color:#eadfbe !important}   /* the "generic soil" note */
/* Pond / Tank switch: the script sets the two states inline (dark grey = on, white = off) */
html.stage #et-stock-mode{border-color:var(--sg-line2) !important;background:var(--well-bg)}
html.stage #et-stock-mode button{background:transparent !important;color:#cbd5e1 !important}
html.stage #et-stock-mode button[style*="55, 65, 81"]{background:rgba(255,255,255,.24) !important;color:#fff !important}

/* 2b. Ensemble member grids. Cells that carry a value set their own background AND text colour inline, as a pair,
   so they are left exactly as drawn (.ei-table-wrap is in the page's keep list). Everything else goes dark.
   Header and row-head cells are sticky, so they get solid colours. */
html.stage .ei-table-wrap{background:#141c2b;border-color:var(--sg-line2);color:var(--sg-soft);color-scheme:dark}
html.stage .ei-grid th,html.stage .ei-grid td{border-right-color:rgba(255,255,255,.06);border-bottom-color:rgba(255,255,255,.06)}
html.stage .ei-grid thead th{background:#1d2738;color:var(--sg-soft)}
html.stage .ei-grid .rowhead{background:#1a2333;color:var(--sg-soft)}
html.stage .ei-grid .total{background:#1d2738;border-left-color:rgba(255,255,255,.28)}
html.stage .ei-grid tr.summary td{background:#232e42;color:#f1f5f9;border-bottom-color:rgba(255,255,255,.16)}
html.stage .ei-grid tr.summary.last td{border-bottom-color:rgba(255,255,255,.34)}
html.stage .ei-grid tr.summary td.rowhead{background:#283449}
html.stage .ei-grid td.midnight,html.stage .ei-grid th.midnight{border-left-color:rgba(255,255,255,.28)}
html.stage .ei-grid tr.summary td.prob{color:#a9c3ff}
/* Value cells whose colour was built for a white page, where pale = little and deep = a lot. On dark that reads
   backwards (the smallest amounts were the brightest white boxes: owner screenshots, 2026-11-14), so the pale end of
   each scale is re-pointed. The script sets these colours through the DOM, so the browser always writes them as rgb().
   Precipitation / snow grid: the four grey steps at the bottom of the scale become rising tints. Greens and up are kept. */
html.stage .ei-grid td[style*="background-color: rgb(255, 255, 255)"]{background-color:rgba(255,255,255,.07) !important;color:var(--sg-soft) !important}
html.stage .ei-grid td[style*="background-color: rgb(224, 224, 224)"]{background-color:rgba(255,255,255,.14) !important;color:#f1f5f9 !important}
html.stage .ei-grid td[style*="background-color: rgb(192, 192, 192)"]{background-color:rgba(255,255,255,.22) !important;color:#fff !important}
html.stage .ei-grid td[style*="background-color: rgb(160, 160, 160)"]{background-color:rgba(255,255,255,.32) !important;color:#fff !important}
/* Chance row (0 to 100%): white-to-deep-purple on the live page; here faint blue to bright, so a higher chance is brighter. */
html.stage .ei-grid td.prob[style*="background-color: rgb(255, 255, 255)"]{background-color:transparent !important;color:var(--sg-muted) !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(228, 237, 248)"]{background-color:rgba(96,165,250,.14) !important;color:var(--sg-soft) !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(188, 211, 238)"]{background-color:rgba(96,165,250,.26) !important;color:#f1f5f9 !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(143, 181, 226)"]{background-color:rgba(96,165,250,.4) !important;color:#fff !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(95, 145, 208)"]{background-color:rgba(96,165,250,.56) !important;color:#fff !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(59, 107, 183)"]{background-color:#6ea4ff !important;color:#0b1220 !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(63, 78, 166)"]{background-color:#93c5fd !important;color:#0b1220 !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(75, 45, 138)"]{background-color:#c4b5fd !important;color:#0b1220 !important}
html.stage .ei-grid td.prob[style*="background-color: rgb(58, 23, 102)"]{background-color:#e9d5ff !important;color:#0b1220 !important}

/* 2c. Year-to-date tables and the soil table: plain rows, tinted by meaning */
html.stage .py-table-wrap,html.stage .sf-table-scroll{background:none}
html.stage .py-table th,html.stage .py-table td{border-bottom-color:rgba(255,255,255,.08)}
html.stage .py-table th{background:#1d2738}
html.stage .py-table tr.wet td,html.stage .ty-table tr.cold td{background:rgba(96,165,250,.14)}
html.stage .py-table tr.dry td{background:rgba(217,160,91,.14)}
html.stage .ty-table tr.warm td{background:rgba(251,146,60,.14)}
html.stage .py-table tr.total td{background:transparent;border-top-color:rgba(255,255,255,.3)}
html.stage .ty-card{border-color:var(--sg-line)}
html.stage .sf-table th{background:rgba(255,255,255,.06)}
html.stage .sf-table td{border-bottom-color:rgba(255,255,255,.08)}
html.stage .sf-table tr.is-fcst td{background:rgba(255,255,255,.04)}


/* 3. Download / Share buttons on each chart */
html.stage .agwx-section-btn{background:rgba(255,255,255,.1);border-color:var(--sg-line2);color:var(--sg-soft);box-shadow:none}
html.stage .agwx-section-btn:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.45);color:#fff;box-shadow:none}
html.stage .agwx-section-btn:focus-visible{outline-color:#fff}
