/* Forecast Flakes — the Snowfall Explorer's skin over the network's dashboard shell.
 *
 * /explorer and /mountain load, in this order: Eagle's explorer stylesheet as vendored
 * (eagle-explorer.css: the stage, the plates, the point view, the compare handle, the
 * phone sheet), the shell (dashboard-shell.css: rail, side list, region bar, matte;
 * dashboard.css: the seams between the two), and then this file, which is everything
 * that is Flakes' own:
 *
 *   the tokens those stylesheets expect and flakes.css does not define;
 *   the controls Eagle keeps in its site stylesheet (.btn, .seg);
 *   the banded legend, which is this catalog's and not Eagle's — over the map, as
 *   the shell wants it, with light numerals on the matte;
 *   the frame ticks (a winter or a month is a thing with a name, not a time);
 *   the two stream switches in the rail;
 *   /mountain's base-and-summit table.
 *
 * Green is the chrome (the shell's --sign); blue is the data: the swatch beside each
 * map in the side list, the legend, the point view's line.
 *
 * /case and /situation do not load this; they keep assets/explorer.css.
 */
:root {
  --shield-red: var(--red);
  --amber: #f2ac14;
  --figure-line: #223142;
}

[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--sign); color: #fff;
        padding: 9px 14px; z-index: 200; font-weight: 800; }
.skip:focus { left: 0; }

/* The header is a document header, not a sticky bar: the instrument is sized to what is
   left under it on load, and fills the screen once the reader scrolls it away. */
body.lab-page.dash .util { position: static; }

/* ── controls (Eagle's, in the shell's register) ─────────────────────────── */
.fx .btn {
  cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink2);
  border-radius: 2px; font-family: var(--font); font-weight: 800; font-size: 11px;
  letter-spacing: .04em; padding: 5px 9px; line-height: 1.3; text-decoration: none;
}
.fx .btn:hover { border-color: var(--sign); color: var(--sign); }
.fx .btn.on, .fx .btn[aria-pressed="true"] { background: var(--sign); color: #fff; border-color: var(--sign); }
.fx .btn:disabled { opacity: .45; cursor: default; }
.fx select, .fx input[type="text"], .fx input[type="search"] {
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  border-radius: 2px; padding: 4px 6px; font-family: var(--font); font-weight: 700; font-size: 11px;
}
.fx label { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.fx .switch { font-size: 11px; letter-spacing: .04em; color: var(--ink2); display: inline-flex; align-items: center; gap: 5px;
              white-space: nowrap; cursor: pointer; }
.fx .switch input, .fx input[type="range"] { accent-color: var(--sign); }
.fx .faint { color: var(--mut); }

.fx .seg { display: flex; }
.fx .seg button { font: 700 10.5px var(--mono-font); background: var(--card); color: var(--ink2);
  border: 1px solid var(--line); border-left-width: 0; padding: 4px 7px; cursor: pointer; }
.fx .seg button:first-child { border-left-width: 1px; border-radius: 2px 0 0 2px; }
.fx .seg button:last-child { border-radius: 0 2px 2px 0; }
.fx .seg button:hover { color: var(--ink); }
.fx .seg button.on, .fx .seg button[aria-pressed="true"] { background: var(--sign); color: #fff; border-color: var(--sign); }

/* ── the rail ────────────────────────────────────────────────────────────── */
.fx-mark { flex: none; width: 24px; height: 24px; border-radius: 4px; background: #fff;
           border: 1px solid var(--line); display: grid; place-items: center; }
.fx-mark svg { width: 17px; height: 17px; display: block; }
.dash .lbrand { text-decoration: none; color: var(--ink); gap: 8px; }
.dash .lbrand:hover { text-decoration: none; }
.dash .lbrand .badge-obs { background: var(--snow); }
.fx-switches { gap: 12px; }
.fx-switches .switch { font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.fx-switches .switch[hidden] { display: none; }
.dash .lrail .lfield > label[for="ramp"] { font-size: 9px; }

/* ── the side list: the maps ─────────────────────────────────────────────── */
.dash #fields .field-btn { cursor: pointer; font-family: var(--font); gap: 0; }
.dash #fields .field-btn .sw { border-radius: 1px; background: var(--snow); }
.dash #fields .field-btn .n { margin-left: auto; font-size: 10px; opacity: .6; padding-left: 8px; }
.dash #fields .field-btn.on .n { opacity: .85; }
.dash .lopts .d.fx-note:empty { display: none; }
.dash .lopts .d.fx-note b { color: var(--ink); }
.dash .lopts input[type="range"] { width: 100%; }

/* ── the region bar and the stage ─────────────────────────────────────────── */
.fx #sector-name:not(:empty) + #range:not(:empty)::before { content: "\00a0·\00a0"; }
.fx #coords { font-size: 11px; }
.fx #coords:empty { display: none; }
.dash .ov-sub:empty { display: none; }

/* ── the legend: the table's own bands, over the map ─────────────────────── */
#lab #legend { width: min(640px, calc(100% - 260px)); }
#lab #legend .lg-strip { display: flex; }
#lab #legend .lg-cell { display: flex; flex-direction: column; align-items: stretch; min-width: 0; flex: 1 1 0; }
#lab #legend .lg-sw { display: block; height: 11px; border: 1px solid rgba(255,255,255,.35); border-right: 0; }
#lab #legend .lg-cell:last-child .lg-sw { border-right: 1px solid rgba(255,255,255,.35); }
#lab #legend .lg-v { font: 700 9.5px var(--mono-font); color: #e6e3dc; text-shadow: 0 1px 2px #000; margin-top: 2px;
        white-space: nowrap; transform: translateX(-50%); width: 0; overflow: visible; display: flex; justify-content: center; }
#lab #legend .lg-cell:first-child .lg-v { transform: none; justify-content: flex-start; }
#lab #legend .lg-unit { font: 800 9.5px var(--font); color: #e6e3dc; text-shadow: 0 1px 2px #000; margin-top: 12px;
                        letter-spacing: .06em; text-transform: uppercase; }
#lab #legend .lg-cats { display: flex; flex-direction: column; gap: 3px; background: rgba(8,13,20,.74); padding: 6px 8px; border-radius: 2px; }
#lab #legend .lg-cat { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: #f2f0ea; }
#lab #legend .lg-cat .lg-sw { width: 22px; height: 11px; border-radius: 1px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.35); }
@media (max-width: 700px) { #lab #legend { width: calc(100% - 16px); } #lab #legend .lg-v { font-size: 8.5px; } }

/* ── timeline: the shell's matte, this catalog's ticks ───────────────────── */
.dash .ltimeline .tl-side { display: flex; align-items: center; gap: 5px; }
.dash .ltimeline .tl-transport { display: flex; align-items: center; gap: 3px; }
.dash .ltimeline .tl-track { display: flex; flex-direction: column; min-width: 240px; }
.dash .ltimeline .tl-track input[type="range"] { width: 100%; margin: 0; accent-color: var(--sign); }
.tl-buffer { position: relative; height: 2px; margin: 2px 9px 0; border-radius: 2px; background: var(--line2);
             overflow: hidden; transition: opacity .4s ease .3s; }
.tl-buffer::before { content: ""; display: block; height: 100%; width: var(--pct, 0%);
                     background: var(--snow); transition: width .15s linear; }
.tl-buffer.is-full { opacity: 0; }
.dash .ltimeline .tl-count { font: 900 12px var(--mono-font); color: var(--ink); }
.dash .ltimeline .tl-load { font-size: 10px; padding: 4px 8px; font-family: var(--mono-font); white-space: nowrap; }
/* A winter or a month is a thing with a name, not a time on a clock — so each frame is
   a button that says which, under the place the thumb stops for it. */
.fx-ticks { display: flex; margin: 3px 2px 0; gap: 2px; }
.fx-ticks .tick {
  flex: 1 1 0; min-width: 0; font: 700 9.5px var(--mono-font); color: var(--mut);
  background: none; border: 1px solid transparent; border-radius: 2px; padding: 1px 0; cursor: pointer;
  overflow: hidden; white-space: nowrap;
}
.fx-ticks .tick:hover { color: var(--ink); border-color: var(--line); }
.fx-ticks .tick.on { background: var(--sign); border-color: var(--sign); color: #fff; font-weight: 900; }
.dash .lhint.fx-single { display: none; }

/* ── the options column ──────────────────────────────────────────────────── */
.fx-row { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap !important; }
.fx-k { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
        color: var(--mut); min-width: 46px; }
.fx-note { font-size: 10.5px; font-weight: 600; color: var(--mut); line-height: 1.4; display: block !important; }
.fx-note:empty { display: none !important; }
.fx-note b { color: var(--ink2); }
.dash .drawer .group > div { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.dash .drawer .group > label { display: block; }
.dash .drawer select { min-width: 0; flex: 1 1 96px; }
.dash .drawer input[type="range"] { flex: 1 1 0; min-width: 0; }
.dash .drawer .overlay-box { gap: 3px 12px; }
.dash .drawer .overlay-box label { font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--ink2); display: inline-flex; align-items: center; gap: 4px; }
.fx #export-opts { display: block; }
.fx #export-opts > * { margin-bottom: 5px; }

/* ── under the instrument ────────────────────────────────────────────────── */
.dash-below .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.dash-below .fact { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.dash-below .fact .k { font: 800 9.5px var(--mono-font); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.dash-below .fact .v { font-size: 14px; font-weight: 800; color: var(--ink); margin-top: 3px; }
.fx-src { font-size: 12px; color: var(--mut); font-weight: 600; margin: 10px 2px 0;
          display: flex; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; }
.fx .disc { margin-top: 14px; }

/* The point view's accents, in the data colour. */
.fx .point-panel { border-left-color: var(--snow); }
.fx .pp-line { stroke: var(--snow); }
.fx .pp-area { fill: var(--snow); }
.fx .pp-dot { stroke: var(--snow); }
.fx .pp-tick.day { stroke: var(--line); stroke-width: 1; }
.fx .pp-bar { fill: var(--snow); }

@media (pointer: coarse) {
  .fx .btn { min-height: 36px; padding: 8px 12px; }
  .fx .seg button { padding: 9px 11px; font-size: 12px; }
  .fx select { min-height: 36px; }
  .fx-ticks .tick { padding: 7px 0; }
}

/* ── /mountain: the base-and-summit table (assets/mountainpoints.js) ─────────── */
.mtn-points { margin-top: 14px; background: var(--card); border: 1px solid var(--line);
              border-radius: 6px; padding: 12px 14px 10px; border-top: 4px solid var(--sign); }
.mtn-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 8px; }
.mtn-head h3 { margin: 0; font-size: 17px; font-weight: 900; }
.mtn-sub { margin: 3px 0 0; font-size: 12px; font-weight: 600; color: var(--ink2); max-width: 70ch; }
.mtn-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mtn-tools input[type="search"] { font-size: 12px; padding: 5px 8px; min-width: 200px; }
.mtn-scroll { overflow-x: auto; max-height: 560px; overflow-y: auto; border-top: 1px solid var(--line2); }
.mtn-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mtn-table th { position: sticky; top: 0; background: var(--card); text-align: left; font-size: 9.5px; font-weight: 800;
                letter-spacing: .08em; text-transform: uppercase; color: var(--mut); padding: 7px 8px; border-bottom: 1px solid var(--line); }
.mtn-table th small, .mtn-table td small { font-size: 10px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--mut); }
.mtn-table td { padding: 5px 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.mtn-table .n { text-align: right; font-family: var(--mono-font); white-space: nowrap; }
.mtn-st { color: var(--mut); font-size: 11px; font-weight: 700; }
.mtn-top { position: relative; font-weight: 800; color: var(--snow-dk); min-width: 92px; }
.mtn-top span { position: relative; }
.mtn-bar { position: absolute; right: 8px; top: 50%; height: 14px; transform: translateY(-50%);
           background: var(--blue-sub); border-radius: 2px; max-width: calc(100% - 16px); }
.mtn-raw { color: var(--mut); }
.mtn-note { margin: 7px 0 0; font-size: 11px; font-weight: 600; color: var(--mut); }
@media (max-width: 700px) { .mtn-tools input[type="search"] { min-width: 0; flex: 1; } }
