/* The Skew-T page: two panes side by side (map, diagram) with the time
   ribbon underneath, stacking to map/diagram/ribbon on a phone. The controls
   (background/top buttons, the hint/error state line) live inside the map
   pane, above the map itself (skewt-look) -- Ivan tried a full-width row
   above the nav first and reversed it on seeing it, so there is no row for
   them at the top of the grid any more. Everything that draws inside these
   panes -- the map, the canvas, the paywall -- is styled by its own task;
   this file only lays out the shell.

   Mobile rework (skewt-look, this task): the fixed-viewport shell below
   (.sk-body's 100dvh/overflow:hidden, .sk's grid rows sized in vh) is a
   desktop-and-up thing only now. Below 760px the final @media block at the
   foot of this file kills every one of those constraints -- height:auto,
   overflow:visible, the grid collapsed to stacked blocks -- so the page
   simply scrolls, the way any other page on this site does; Ivan's
   complaint ("the whole page is fixed... the map is too short... the plot
   is too short and completely distorted") was this shell, inherited
   wholesale from the map viewer where a fixed viewport is the right call
   (one map, nothing to scroll to) but is the wrong call here (a map, a
   written analysis, a plate, nineteen cards and a ribbon, all fighting a
   phone's tiny fixed 1fr share of the screen). The plate itself becomes a
   lightbox on a phone (see .sk-plate's own comment, further down) rather
   than a plot squeezed into whatever height was left over. Nothing here
   changes above 760px -- every desktop rule above this comment, and the
   `min-width: 761px` blocks below, are untouched by this rework. */

/* .sk fills whatever the nav bar leaves behind. Not
   `calc(100dvh - <nav height>)`: that needs the nav's real rendered height,
   which lives only in landing.css's padding and font-size and isn't exposed
   as a variable, so any number here would be a guess that drifts the moment
   the nav is restyled. mg-body/mg-main (meteograms.css) solve the same
   problem the same way -- flexbox derives the split from the nav's actual
   box, so there is nothing to keep in sync. */
.sk-body { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* Two rows: the map/diagram pair share the first (`1fr`, the flex space they
   compete for), the ribbon is its own full-width row beneath both. The
   controls are not a grid row of their own any more (skewt-look) -- they are
   ordinary flex children of .sk-map-pane, laid out below. */
.sk { display: grid; gap: 0; flex: 1; min-height: 0;
      grid-template-columns: minmax(280px, 40%) 1fr;
      grid-template-rows: 1fr auto; }
.sk-map-pane  { grid-column: 1; grid-row: 1; display: flex; flex-direction: column;
                min-height: 0; }
.sk-plot-pane { grid-column: 2; grid-row: 1; display: flex; flex-direction: column;
                min-height: 0; padding: .6rem; gap: 8px; overflow-y: auto; }
.sk-ribbon    { grid-column: 1 / -1; grid-row: 2; position: relative; height: 54px;
                /* The browser must never claim a finger on the time axis as
                   a page scroll: without this, a horizontal drag starts,
                   the browser fires pointercancel to take over scrolling,
                   and the cursor stops following mid-gesture. app.css:343
                   learned this first for /models; this page met the bug
                   the day it became scrollable on phones. */
                touch-action: none; }
.sk-canvas    { flex: 1; min-height: 0; width: 100%; }

/* ---- the controls (skewt-look) --------------------------------------------
   A row of labelled control groups, not two hardcoded widgets: `.sk-control`
   is the unit a future control (more are coming) adds another of, so growing
   this row is adding a sibling, never restyling the two that exist today.
   `flex-wrap` is what lets it wrap on a narrow map column rather than
   crushing two labelled button pairs into a strip too narrow for both --
   the same reasoning the header cards (design §2, `.sk-head`) use `auto-fit`
   for, just with real buttons instead of cards. `.sk-state` (the hint, or an
   error/outside-click message -- see further down) is the third flex child
   here and forces its own line under the button pairs via `flex-basis: 100%`
   below, rather than fighting them for room on the first line. */
.sk-controls {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 22px; padding: 8px 14px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.sk-control { display: flex; align-items: center; gap: 8px; }
.sk-control-label {
  font-family: var(--sans); font-size: 13px; letter-spacing: .03em;
  color: var(--muted); white-space: nowrap;
}

/* One pair of real buttons, not a <select>: `.on`/`aria-pressed` is the same
   toggle /index.html's billing switch and viewer.js's plan toggle already
   use (landing.css's `.seg`/`.seg button.on`) -- copied here rather than
   invented fresh, though this page keeps its own rule block since skewt.css
   does not otherwise depend on landing.css. Both buttons are always real,
   focusable, keyboard-reachable elements -- there is no hidden native
   control underneath standing in for them. */
.sk-seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden;
}
.sk-seg-btn {
  font: inherit; font-size: 13.5px; color: var(--ink); background: var(--panel);
  border: 0; padding: 5px 11px; cursor: pointer;
}
.sk-seg-btn + .sk-seg-btn { border-left: 1px solid var(--line); }
.sk-seg-btn.on { background: var(--accent); color: var(--on-accent); }
/* Inset, because .sk-seg clips its overflow -- an outer ring on the last
   button would be cut off at the rounded corner. Same reasoning as
   landing.css's own `.seg button:focus-visible`. */
.sk-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sk-seg-btn.on:focus-visible { outline-color: var(--on-accent); }

/* The left column is map above, the analysis panel (design task: reserved
   space for a written analysis, below) beneath it -- so the map itself needs
   its own positioned wrapper now rather than filling .sk-map-pane directly:
   .sk-map and .sk-search are both `position: absolute` against whichever
   element has `position: relative`, and if that stayed .sk-map-pane once it
   also held the analysis panel, the map would cover the panel (`inset: 0`
   spans the whole pane) and the search box's `bottom: 10px` would land over
   the analysis panel's own text instead of the map's bottom-left corner. */
.sk-map-wrap  { position: relative; flex: 1; min-height: 0; }

/* The map fills the whole wrap -- .sk-map-wrap's own `position: relative`
   above exists for this -- rather than sharing a flex column with the
   search box the way /meteograms/'s top bar does. The design's mock-up
   floats the search box over the bottom-left corner of the map itself, so
   it has to be an overlay, not a sibling that pushes the map down. */
.sk-map     { position: absolute; inset: 0; background: var(--bg); }

.sk-search  { position: absolute; z-index: 1000; left: 10px; bottom: 10px;
              width: min(280px, calc(100% - 20px)); }
.sk-search input {
  width: 100%; font: inherit; font-size: 13.5px;
  padding: 7px 10px; border-radius: 3px;
  color: var(--ink); background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px var(--shadow-2);
}
.sk-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Opens upward, not down like /meteograms/'s -- the box sits at the pane's
   bottom edge, and a downward list would run off the map. */
.sk-results {
  position: absolute; bottom: calc(100% + 4px); left: 0; right: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 6px 24px var(--shadow-2); padding: 4px; max-height: 260px;
  overflow-y: auto;
}
.sk-result {
  display: block; width: 100%; text-align: left;
  font: inherit; font-size: 13.5px; padding: 7px 9px; border-radius: 3px;
  background: none; border: none; color: var(--ink); cursor: pointer;
}
.sk-result:hover { background: var(--panel-hover); }
.sk-result.none { color: var(--muted); cursor: default; }

/* ---- the analysis panel (docs/superpowers/specs/2026-08-02-skewt-analysis-
   design.md §6, reworked by the amendment at the spec's foot, then again by
   Ivan's flat-panel rework) -------------------------------------------------
   One flat block now, titled anLabel ("Analiza"/"Analysis") over the
   sentences skewt.js's renderAnalysis builds, sitting below the map instead
   of the map filling the whole left column. NESTABILNOST/VLAGA/VJETAR/TUČA
   no longer get their own headers, but the sentence group with nothing
   confident to say still contributes nothing (unchanged from the amendment
   this replaces), so a quiet sounding may show one line or several -- never
   four fixed headers regardless of what fired. `flex: none`, like .sk-ch
   above the plate: this pane does not get a share of .sk-map-pane's flex
   space, which stays the map's alone to grow into -- instead its own
   height is capped and fixed (not just a `max-height`) with
   `overflow-y: auto`, so a long sentence scrolls inside the panel rather
   than pushing the map down or squeezing it. Fixed rather than merely
   capped is what keeps the null-hour placeholder, a one-line quiet
   sounding and a full flat block the exact same box height -- Ivan has
   twice rejected layouts that settle late, and settle.py (the scratchpad
   harness) pins that nothing moves the first time a sounding lands, or
   when a quiet one replaces a loud one. */
.sk-analysis {
  flex: none; border-top: 1px solid var(--line);
  padding: 10px 12px; height: 340px; overflow-y: auto;
}

/* Sized and coloured as a panel title now (skewt-look), not a card label it
   used to share size with -- 17px, and --accent rather than --muted, is
   what actually reads as "the name of this panel" over a block of body
   text, the way .sk-paywall-title (a real heading elsewhere on this page)
   already does. Still uppercase, still its own line. */
.sk-an-h {
  margin: 0 0 7px; font-family: var(--sans); font-weight: 600; font-size: 17px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--accent);
}
/* Every line a bullet (skewt-look): `::before` rather than a literal "• "
   character in the text itself, so skewt.js's anLine() keeps building a
   plain sentence and the bullet is presentation, not content a screen
   reader repeats as part of the sentence. The hanging indent
   (padding-left/absolute) is what keeps a wrapped second line under the
   sentence's own first word rather than under the bullet -- an inline
   bullet would push only the first line over. --accent on the bullet is
   the tasteful dose of colour Ivan asked for; the sentence text itself
   stays --ink, unchanged. */
.sk-an-line {
  position: relative; margin: 0 0 4px; padding-left: 1.1em;
  font-size: 14px; line-height: 1.42; color: var(--ink);
}
.sk-an-line::before {
  content: "•"; position: absolute; left: 0; color: var(--accent);
}
.sk-an-line:last-child { margin-bottom: 0; }

/* Cross-section mode: one plot covers every hour, so the hour ribbon has
   nothing to pick, and the strip/analysis narrate a single sounding the
   mode is not showing. Hidden, not removed -- switching back restores
   them with their state intact. */
body.xs-mode .sk-ribbon,
body.xs-mode .sk-analysis,
body.xs-mode #skStrip,
body.xs-mode #skParcelControl { display: none; }

/* Leaflet ships its own light chrome; nudge it onto our tokens so the
   controls do not glow white on the dark theme -- same rule /meteograms/
   already carries, matched here so the two maps agree. */
.leaflet-container { background: var(--bg); font-family: var(--sans); }
.leaflet-bar a, .leaflet-control-layers {
  background: var(--panel); color: var(--ink); border-color: var(--line);
}
.leaflet-bar a:hover { background: var(--panel-hover); color: var(--ink); }
.leaflet-control-attribution {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--muted); font-size: 10.5px;
}
.leaflet-control-attribution a { color: var(--accent); }
[data-theme="dark"] .leaflet-control-layers-toggle { filter: invert(0.85); }

/* Design §7: everything written *over* the map reads larger on a screen
   roomy enough to spare it -- our own search box and its results, and
   Leaflet's own layer-switcher labels and attribution line. The 760px
   breakpoint matches the one below that stacks map/plot/ribbon on a phone,
   so "large screen" here means exactly the screens still showing the map
   and the diagram side by side. What this cannot touch: the place names
   printed on the basemap tiles themselves (CARTO/OSM raster imagery) --
   those are baked into the tile images pixel by pixel, not text this page
   draws, so no CSS or JS on this page can make them bigger. */
@media (min-width: 761px) {
  .sk-search input,
  .sk-result { font-size: 16px; padding: 9px 12px; }
  .leaflet-control-layers-expanded,
  .leaflet-control-layers label { font-size: 15px; }
  .leaflet-control-attribution { font-size: 12.5px; }
}

/* Cursors, as on the gamma map: a crosshair says "click anywhere and get a
   forecast", where Leaflet's default grab hand says only "drag me". Over a
   marker it becomes a finger — the canvas renderer sets `cursor: pointer`
   inline on hover, and an inline style beats these. `.leaflet-dragging` is
   listed because Leaflet's own grabbing rule is more specific than a bare
   `.leaflet-container`. */
.leaflet-container,
.leaflet-dragging .leaflet-grab { cursor: crosshair; }
.leaflet-interactive { cursor: pointer; }
.leaflet-control a, .leaflet-control label,
.leaflet-control-layers-toggle { cursor: pointer; }

/* ---- the state line: the hint, or an error --------------------------------
   Lives in `.sk-controls` now (skewt-look), the third flex child under the
   two button pairs -- `flex-basis: 100%` forces it onto its own line rather
   than fighting them for room on the first one. The ordinary hint ("click
   anywhere on the map") and a failure are not the same thing and must not
   read as the same thing: in one colour and one weight, "the sounding
   failed" is indistinguishable from an invitation, which is how a failed
   fetch comes to look like a page working normally. --stale is the
   palette's own failure colour (tokens.css), the one the run-age badge
   already uses for "this data is too old to trust". */
/* Two lines' room, always, so the map beneath it does not resize -- the
   hint runs to two lines in the narrower map column (and more on a phone)
   while an error message fits on one, and without a floor the map (the flex
   sibling taking whatever height this row does not) grew or shrank by a
   line every time a fetch failed or a fresh one succeeded. */
.sk-state { flex-basis: 100%; margin: 6px 0 0; font-size: 14px; line-height: 1.4;
            min-height: 2.8em; color: var(--muted); }
.sk-state.error {
  color: var(--stale); font-weight: 500;
  border-left: 3px solid var(--stale); padding-left: 8px;
}

/* ---- the header above the plate (design §2) -------------------------------
   Cards, not a stack of paragraphs. It began as the mock-up's `.ch` -- the
   lead in hours large with the date beneath it -- and Ivan asked for it to
   match the numbers below the plate instead, so it reuses .sk-f/.sk-k/.sk-v
   exactly and only sets its own column rule and a larger value for the lead.

   Same `auto-fit` as .sk-strip, and for the same reason: this pane's width
   varies with the map beside it, and four fixed columns would either cram
   onto a phone or strand three empty on a wide screen. */
.sk-ch { display: flex; flex-direction: column; flex: none; }
.sk-head {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border-bottom: 1px solid var(--line);
}
/* Explicit fractions once all four cards actually share one row (skewt-
   look): equal auto-fit columns let hdModelValue ("Meteo Centar WRF 3 km")
   wrap inside MODEL while SAT SIMULACIJE's short "+006 h" sat in a column
   exactly as wide as VRIJEDI ZA's longer date/time string. First cut: MODEL
   2.8fr, SAT SIMULACIJE and VRIJEDI ZA 1fr apiece, KOORDINATE 1.15fr.

   Ivan then found VRIJEDI ZA (fmtWhen's "pon 4.8. 14:00 LT") still wrapping
   to three lines while MODEL sat on room it did not need, and gave exact
   ratios rather than a re-guess: MODEL down by a quarter of its own share
   (2.8fr * 0.75 = 2.1fr), VRIJEDI ZA up by 60% of its own (1fr * 1.6 =
   1.6fr). SAT SIMULACIJE and KOORDINATE untouched -- neither was the
   complaint. Below 760px the phone rule further down still wins (auto-fit,
   equal columns, cards already wrap to two per row there) -- these
   fractions only ever apply to the four-across desktop row, so nothing
   below 760px changes here. */
@media (min-width: 761px) {
  /* minmax(0, Nfr), not a bare Nfr: an un-clamped fr track's automatic
     minimum is its content's min-content size (here, the width of the
     single longest word in that card's own label -- "SIMULACIJE",
     "KOORDINATE" -- since the label can otherwise wrap at a space), which
     fought the ratio below and left MODEL still narrower than intended.
     The 0 floor hands full control to the fractions. */
  .sk-head {
    grid-template-columns:
      minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.15fr);
  }
  /* Belt-and-suspenders for the 0 floor just above: KOORDINATE's value
     ("43.53°N 16.48°E") and label are otherwise ordinary wrapping text,
     but the label itself is one word ("Koordinate") that cannot wrap at a
     space -- at this column's narrowest (~1100px window) it once rendered
     wider than its own card and bled into the next one. Every other label/
     value here already tolerates line-wrapping (the 2.3em floor below
     exists for exactly that); this only changes what happens in the rarer
     case where even a single word does not fit. */
  .sk-head .sk-k, .sk-head .sk-v { overflow-wrap: break-word; }
}
/* The lead hours stay the largest thing in the header -- Ivan asked for
   "+xxx h" to lead when the header was paragraphs, and turning it into a
   card should not quietly demote it. */
.sk-v-lead { font-size: 30px; }
/* Two lines' worth of room, held whether or not there are two lines in it.
   A placeholder em dash is one line and "ned, 02. 08. 02:00" wraps to two,
   so without this the header still grew the moment the first sounding
   landed -- which is the jump these placeholders exist to remove, just
   smaller. The lead is exempt: "+006 h" never wraps, and giving it the same
   floor would make it the tallest card and inflate the whole row. */
.sk-head .sk-v { line-height: 1.15; }
.sk-head .sk-v:not(.sk-v-lead) { min-height: 2.3em; }

/* The MODEL card (skewt-look), first in the row: its value is a product
   name and a run stamp, not a number, so it earns its own smaller size
   rather than the 22px every other card's plain `.sk-v` gets -- Ivan's
   name for the model ("Meteo Centar WRF 3 km") is long enough that the
   default size would either wrap awkwardly in a 150px column or crowd the
   run-init line underneath it. Still well under .sk-v-lead's 30px: the
   lead in hours is what this header leads with, not the model name.
   `.sk-head .sk-v:not(.sk-v-lead)`'s 2.3em floor above already reserves
   this card's own room for up to two lines, so no extra min-height is
   needed here. */
.sk-v-model { font-size: 15px; }
/* The run's own init time, on its own line beneath the model name -- not a
   trailing unit (`.sk-v i`), because a run stamp reads as a caption to the
   card, not a suffix to its value. Reserved height even for the "—"
   placeholder shown before `meta` has loaded (renderHeader, skewt.js): the
   MODEL card renders from boot, so this line's own height must not change
   the moment the real run stamp replaces the dash, or the whole header row
   would grow under a settled layout (settle.py). min-height is in `em`, so
   raising the size below scales the reserved height with it -- the
   placeholder and the real string are still measured against the same
   font-size whatever it is, and that invariant is what stays true, not any
   one pixel value.

   Ivan found this line too small next to a sibling card's plain `.sk-v`
   (22px desktop / 18px mobile) -- full parity was the first thing tried,
   but the run string ("02.08.2026. 12 UTC", 18 characters, --mono) does not
   fit one line at 22px in the narrowest column this card actually reaches:
   at the 761px breakpoint (the narrowest window still on the desktop side
   of .sk-head's own grid, MODEL's own share of a pane that is itself
   minmax(280px, 40%) of the window) the MODEL column is only wide enough
   for about 12px of this string before it wraps, and this line's own
   min-height only ever reserves one. 11px was the largest that still
   cleared that narrowest case with margin to spare. Mobile is tighter
   still (two ~150px columns, not one wide one), so it stops at 13px --
   .sk-v-model's own mobile size, already proven to fit a *longer* string
   ("Meteo Centar WRF 3 km", 21 characters) in this same card, so a shorter
   one at the same size is not a new risk. (Mobile's own budget is
   untouched by MODEL's desktop share below: it uses equal auto-fit
   columns, not these fractions.) Neither number is a live measurement (no
   browser on this box); if either still wraps on a real phone, it is the
   next number down that should give, not this comment's reasoning.
   Recomputed once already (MODEL's share cut from 2.8fr to 2.1fr, further
   below, so VRIJEDI ZA could grow) -- 16px, chosen against the original
   2.8fr share, no longer cleared the narrower one; this is the number the
   same method gives against the current fraction, not the original. */
.sk-v-sub {
  display: block; font-family: var(--mono); font-size: 11px;
  color: var(--muted); margin-top: 2px; min-height: 1.3em; line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

/* ---- the plate (design §1, later revised): light by default, dark on
   request -----------------------------------------------------------------
   Every colour skewt-draw.js's palette() reads back off the canvas is
   pinned here, regardless of [data-theme] on <html> -- the plate's own
   reading, light or dark, is a choice independent of the site's chrome
   theme, not inherited from it. This was once fixed to light only ("the
   one choice Ivan asked to be fixed, not adjustable") on the reasoning that
   a chart which went dark with the rest of the chrome would lose the
   "reads like paper" quality that lets the parcel path be sight-read; Ivan
   has since asked for a dark plate of its own, so that reasoning now
   argues for keeping Pozadina independent of [data-theme] rather than
   against a dark plate existing at all. skewt.js sets `data-bg` on this
   same element from the reader's own saved choice (localStorage, like
   theme.js) -- light is simply this rule with no attribute needed; dark is
   the block below it, selected the same way. Neither block is a fallback
   for the other: skewt-draw.js's palette() just reads whichever one the
   cascade currently resolves to.

   Below 760px (skewt-look, this task) this same element doubles as a
   lightbox: a small in-flow preview (~200px, so picking a different hour
   without leaving the map is still cheap) that a tap expands to
   `position: fixed; inset: 0`, above Leaflet's own z-index (1000) and
   everything else on the page, and the close button (above) collapses
   back down. See the `@media (max-width: 760px)` rule at the foot of this
   file -- nothing here in the shared, always-applied rule below changes
   for that; the fixed-position/z-index/small-preview-height rules are
   additions scoped to that one breakpoint, not edits to this rule. */
.sk-plate {
  --panel: #ffffff;
  --ink: #14242f;
  --muted: #5d6b78;
  --skewt-grid: #7f93a0;
  --skewt-temp: #a03328;
  --skewt-dewpoint: #0f6b6b;
  --skewt-dry: #b8860b;
  --skewt-moist: #3f7d5a;
  --skewt-mix: #7a8fa6;
  --xs-ground: #cbb894;
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  /* min-height is a floor, not the usual flex-shrink escape hatch: on a
     390px phone the header and the card grid below already claim most of
     .sk-plot-pane's fixed share of the viewport (design §5's cards read
     easily at this scale, which costs more height than the old one-line
     strip did), and without a floor flexbox happily shrinks the plate --
     the one thing on this page actually being looked at -- down to a
     sliver to give the cards their full height. .sk-plot-pane's own
     overflow-y:auto (below) is the escape valve if the floor and the rest
     of the column still do not fit: the pane scrolls, the plate does not
     shrink past being useful. */
  flex: 1; min-height: 160px; display: flex; flex-direction: column;
}

/* The dark plate: the same values tokens.css's own [data-theme="dark"]
   already carries for --panel/--ink/--muted/--skewt-* (already checked
   there for >=3:1 contrast against a dark panel, the isotherm grid included)
   -- picked because they exist, vetted, rather than invented fresh here.
   Independent of [data-theme]: a reader on the light site theme can still
   choose a dark plate, and one on the dark site theme can still keep the
   plate reading like paper. --plate is included too (not just the six
   `palette()` reads) so no light sliver of the wrapping div shows behind
   the canvas at the plate's own rounded corners. */
.sk-plate[data-bg="dark"] {
  --panel: #151f28;
  --ink: #d9e4ec;
  --muted: #7f93a3;
  --skewt-grid: #5f7995;
  --skewt-temp: #e0685a;
  --skewt-dewpoint: #4fb8ac;
  --skewt-dry: #d9b84f;
  --skewt-moist: #6fbf8b;
  --skewt-mix: #9fb3c8;
  --xs-ground: #5f5647;
  --plate: #151f28;
}

/* The plate's own close button (skewt-look, mobile lightbox): a real
   <button>, not a styled <span>, so it is focusable and reachable by
   keyboard like every other control on this page -- aria-label comes from
   the strings table (applyLang, skewt.js) in both languages, same
   convention as #navBurger's. Hidden here, unconditionally, at every
   width: on a phone it only ever means anything while the plate itself is
   the fullscreen lightbox (the `@media (max-width: 760px)` rule at the
   foot of this file is what actually shows it, scoped to
   `.sk-plate.sk-lightbox-open`), and above 760px the plate is never a
   lightbox at all -- a button visible here at any other time or width
   would draw a stray x in the corner of an ordinary, non-fullscreen plot
   nobody asked to close. */
.sk-plate-close { display: none; }

/* ---- the numbers strip beneath the diagram (design §5) -------------------
   The mock-up's `.strip`/`.f`/`.k`/`.v`: a grid of cards, each an uppercase
   muted label above a mono value with its unit trailing in a smaller,
   muted <i> -- CAPE, CIN, LCL, LFC, EL, the surface reading and the terrain
   height, no longer run together into one string. `auto-fit` rather than a
   fixed column count is what gives four across on a wide screen and fewer
   as it narrows: the plot pane's own width varies with the map pane beside
   it (desktop) and with the page itself (a 390px phone stacks them), and a
   fixed `repeat(4, …)` would either cram four onto a phone-width pane or
   waste width leaving three columns empty on a very wide one. */
.sk-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--line); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); flex: none;
}
.sk-f {
  background: var(--panel); padding: 8px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.sk-k {
  font-family: var(--sans); font-size: 12px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.sk-v {
  font-family: var(--mono); font-size: 22px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sk-v i {
  font-style: normal; font-size: 14px; color: var(--muted); margin-left: .28em;
}

/* Which hour is on screen -- still computed (renderStrip) and still landed
   in the strip, because the diagram deliberately holds the last sounding
   while the ribbon is dragged and a failed refresh leaves the previous one
   up, and design §2 needs *some* element tying the strip to the hour it
   describes either way. Visually silent now that the header above the
   plate leads with the same readout (design §2) and the plate itself
   repeats it a second time as its title (design §4): a third, visible copy
   here would also sit oddly inside the strip's own 4-across card grid,
   which is why this is hidden off-screen rather than styled as a card. */
.sk-strip-time {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* ---- the paywall --------------------------------------------------------
   A centred card, the shape /models' .paywall (app.css) already uses, not a
   full-bleed paragraph flush to the viewport edge above a screen of empty
   page. showPaywall hides `main.sk`, so this takes the flex column's whole
   remaining height and centres itself inside it. */
.sk-paywall {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 20px;
}
.sk-paywall-card {
  max-width: 380px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 26px 30px; box-shadow: 0 4px 24px var(--shadow-2);
}
.sk-paywall-lock { font-size: 26px; margin-bottom: 6px; }
.sk-paywall-title { margin: 0 0 6px; font-family: var(--cond); font-weight: 600;
                    font-size: 19px; letter-spacing: -.01em; }
.sk-paywall-text { margin: 0 0 18px; font-size: 14.5px; line-height: 1.45;
                   color: var(--muted); }
.sk-paywall-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Copied from app.css's .ribbon-cursor -- the viewer's equivalent, and the
   reason this rule cannot be left out: ribbon.js places the cursor by
   setting `style.left`, which does nothing at all against the default
   `position: static`. Without this the cursor renders *below* the ribbon
   and the time axis has no visible cursor whatsoever. */
.sk-ribbon-cursor {
  /* A grabbable-looking handle (Ivan), not a hairline: an 18px column
     centred by transform on the exact x the JS sets (ribbon.js positions
     `left` at the time's pixel; the translate keeps a wide handle honest
     about which instant it marks). ::before is the full-height hairline,
     ::after the grip pill with two slits. pointer-events stays off -- the
     whole ribbon surface is the drag target, the handle only shows it. */
  position: absolute; top: 0; width: 18px; height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  transition: left 60ms linear;
}
.sk-ribbon-cursor::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: 50%; width: 2px; margin-left: -1px;
  background: var(--accent);
}
.sk-ribbon-cursor::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 28px; border-radius: 7px;
  background: linear-gradient(90deg,
    var(--accent) 0 4px,  var(--panel) 4px 5px,
    var(--accent) 5px 9px, var(--panel) 9px 10px,
    var(--accent) 10px 14px);
  box-shadow: 0 1px 4px var(--shadow-2);
}
@media (prefers-reduced-motion: reduce) {
  .sk-ribbon-cursor { transition: none; }
}

/* Canvas has no intrinsic size that matches its container -- unset, it
   defaults to 300x150 and pokes out below the 54px ribbon strip. The main
   viewer's #ribbonCanvas rule (app.css) sizes it the same way for the same
   reason; matched here so the two ribbons agree. createRibbon sets the
   backing-store resolution from devicePixelRatio on every draw, but never
   the CSS box -- that half of the sizing is always the page's job. */
.sk-ribbon canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 760px) {
  /* Kill the fixed viewport (skewt-look, this task -- Ivan's own words:
     "the whole page is fixed... the map is too short... the plot is too
     short and completely distorted"). .sk-body's 100dvh/overflow:hidden
     and .sk's grid-rows-in-vh (the block this replaces) exist to make the
     map viewer's one-screen page work, where there is nothing to scroll to
     and never will be; on this page a map, a written analysis, header
     cards, a plate, nineteen number cards and a ribbon were all fighting
     over one fixed 1fr share of a phone screen instead. A normal document
     now: the body scrolls, and .sk collapses from a grid to plain stacked
     blocks -- nav, controls+hint, map, Analiza, header cards, plot, number
     cards, ribbon, each exactly as tall as its own content and nothing
     more, in the same source order they already render in. */
  .sk-body { height: auto; overflow: visible; }
  .sk { display: block; }
  .sk-controls  { padding: 6px 10px; gap: 6px 14px; }
  .sk-seg-btn   { padding: 4px 9px; font-size: 13px; }
  /* Dead weight below this width (Ivan): skewt.js's own isMobileWidth()
     (MOBILE_QUERY, the same 760px breakpoint this block itself is scoped
     to) skips building the marker layer entirely on a phone, so there is
     never anything for this control to show or hide there. */
  #skMarkersControl { display: none; }
  /* min-height stays 2.8em, not scaled down alongside font-size the way
     every other measurement in this block is (skewt-look; found while
     verifying the new boot-vs-meta-load settle invariant below) -- 2.8em
     already means "two lines of *this* font's own line-height" regardless
     of what font-size resolves to, since em is relative to it; a smaller
     multiplier here (2.6em, this rule's own value until now) doubly
     shrinks the reserved room, and two real lines of the hint text
     ("Klikni bilo gdje...") measured 36.4px against a 33.8px floor -- so
     the state line, and everything below it, grew by a few pixels the
     moment loadMeta replaced the one-line "Učitavanje…" with the real
     (two-line) hint, exactly the settle-on-load jump this box exists to
     prevent. */
  .sk-state     { font-size: 13px; min-height: 2.8em; }

  /* The map's own room to work in, comfortable enough to tap a point
     (Ivan's ask): .sk-map-wrap's flex:1 (the base rule, shared with
     desktop) grows into whatever free space .sk-map-pane's flex column
     has to give it, which was the fixed 42vh grid row the block above used
     to carve out of the screen; with .sk-body no longer a fixed height
     there is no free space left to distribute, so this needs a real
     height of its own instead, not a share of a container that no longer
     has one. flex:none, not merely a taller flex-basis: this box's height
     is meant to be exactly 48vh, not "at least" it.

     38vh now: ~60vh shipped first, Ivan took 20% off (48vh), then another
     20% off that (2026-08-02 evening) -- each cut giving the freed room back
     to the ribbon/analysis/plate stacked beneath it -- the map itself
     already had comfortable room to tap a point at 60vh, and this page is
     mostly about what a reader does *after* picking a point, not the map
     alone. */
  .sk-map-wrap { flex: none; height: 38vh; }

  /* .sk-plot-pane no longer scrolls on its own -- the base rule's
     overflow-y:auto exists to keep an over-tall column inside its fixed
     desktop-grid cell; the page itself scrolls now, so a second, nested
     scrollbar in here would just be a smaller box confusingly scrolling
     inside the bigger one the reader is already scrolling. */
  .sk-plot-pane { gap: 6px; overflow-y: visible; }

  /* Typography only below this line, unrelated to the fixed-layout fight
     above -- unchanged from before this task, still correct for a
     normally-scrolling page. */
  .sk-v-lead { font-size: 22px; }
  /* Two columns, not three: at 110px a column is eight characters wide
     and the valid time wrapped to three lines. */
  .sk-head { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .sk-f { padding: 5px 10px; gap: 2px; }
  .sk-k { font-size: 11px; }
  .sk-v { font-size: 18px; }
  .sk-v i { font-size: 12px; }
  .sk-v-model { font-size: 13px; }
  .sk-v-sub { font-size: 13px; }

  /* The strip's own capped height and internal scroll used to live here
     (max-height: 104px) for the same reason .sk-plot-pane's did -- a fixed
     pane too short for nineteen cards. Gone now, on purpose: every card is
     simply in flow, the full height it needs, scrolling up and away with
     the rest of the page -- "number cards" named explicitly among the
     things Ivan asked to flow rather than be trapped in their own small
     scrolling box. */

  /* ---- the plate as a lightbox (skewt-look, this task) --------------------
     Closed (the default, and the state every render leaves it in except
     the one below): a small in-flow preview, not a plot squeezed into
     whatever a fixed grid row happened to leave over -- 200px is enough to
     recognise the shape of a sounding and know a tap is worth it, not to
     read the numbers off it; `cursor: pointer` is the only visible
     affordance, skewt.js's own click handler on #skPlate does the
     expanding. Open (`.sk-lightbox-open`, added by skewt.js's
     openLightbox() -- wired to fire after selectPoint's own render lands,
     never on a plain ribbon step, per this task's own instruction): fixed
     to the whole viewport and stacked above Leaflet's own panes and
     controls (whose highest z-index is 1000) and everything else on the
     page, so the plot -- the one thing actually being read -- gets the
     entire screen rather than a sliver of it. `height`/`width: auto`
     clears the preview's own fixed 200px so `inset: 0` alone decides the
     box; the canvas inside needs no rule of its own to redraw sharply at
     the new size -- the ResizeObserver already wired to it (initMap,
     skewt.js) fires on this exactly as it does on any other resize. */
  .sk-plate {
    flex: none; height: 200px; min-height: 0;
    cursor: pointer;
  }
  .sk-plate.sk-lightbox-open {
    position: fixed; inset: 0; z-index: 2000;
    height: auto; width: auto; margin: 0;
    border-radius: 0; border: none;
    cursor: default;
  }
  .sk-plate.sk-lightbox-open .sk-plate-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 10px; right: 10px; z-index: 1;
    width: 36px; height: 36px; padding: 0;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--panel); color: var(--ink);
    font-size: 18px; line-height: 1; cursor: pointer;
  }
  /* Locked only while the lightbox is actually open -- skewt.js toggles
     this on <body> alongside .sk-lightbox-open, never on its own, so a
     background scroll under the fullscreen plate can never leave the map
     and the ribbon in a different place than they started when the reader
     taps the close button. */
  body.sk-lightbox-locked { overflow: hidden; height: 100%; }

  /* The analysis panel loses its capped height and internal scroll here
     (Ivan's own ask): the base rule's fixed 340px/overflow-y:auto (above,
     shared with desktop) exists to hold a settled layout inside a
     fixed-height column sharing the screen with the map; with the map's
     own height now a fixed 60vh instead and the page itself free to
     scroll, the panel can simply grow to whatever its sentences need and
     scroll away with everything else, exactly like the strip above it. */
  .sk-analysis { height: auto; padding: 8px 10px; overflow-y: visible; }
  .sk-an-h { font-size: 14px; }
  .sk-an-line { font-size: 13px; }
}
