/* stage.css — layout for the stage.js viewer pages (circulation.html, enso.html), the same look as the
   GEPS page's rail (subseasonal.html keeps its own copy of these rules). Sits on /assets/outlook.css. */
.ss-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.ss-rail { position: sticky; top: 4.6rem; max-height: calc(100vh - 5.4rem); overflow: auto; background: var(--surface); border: 1.5px solid var(--edge); border-radius: 4px; padding: 0.7rem 0.6rem 0.4rem; }
.rail-group { margin-bottom: 0.2rem; }
/* accordion: group titles are buttons; only .open groups list their figures (stage.js opens the
   group of the selected figure and collapses the rest, so the rail fits without scrolling) */
.ss-rail .rail-title { display: flex; align-items: center; gap: 0.4rem; width: 100%; text-align: left; font: 600 0.82rem var(--sans); color: var(--ink2); background: transparent; border: 0; border-radius: 3px; padding: 0.4rem 0.45rem; cursor: pointer; }
.rail-title:hover { background: var(--accent-light); color: var(--accent); }
.rail-group.has .rail-title { color: var(--accent); }
.rail-title .car { width: 0.7rem; font-size: 0.7rem; color: var(--muted); }
.rail-title .car::before { content: "\25B8"; }
.rail-group.open .rail-title .car::before { content: "\25BE"; }
.rail-title .ico { font-size: 0.85rem; opacity: 0.85; }
.rail-title .lbl { flex: 1; }
.rail-title .n { font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.rail-group:not(.open) button[data-p] { display: none; }
.rail-group button[data-p] { display: flex; align-items: center; gap: 0.55rem; width: 100%; text-align: left; font: 500 0.86rem var(--sans); color: var(--ink2); background: transparent; border: 0; border-left: 3px solid transparent; border-radius: 0 3px 3px 0; padding: 0.3rem 0.55rem 0.3rem 1.3rem; cursor: pointer; transition: background .15s, color .15s; }
.rail-group button[data-p] .ico { display: none; }
.rail-group button:hover { background: var(--accent-light); color: var(--accent); }
.rail-group button.on { background: var(--accent-light); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.rail-group button .ico { width: 1.1rem; text-align: center; font-size: 0.9rem; opacity: 0.85; }
.rail-group button small { display: block; font-weight: 400; font-size: 0.74rem; color: var(--muted); }
.ss-main { background: var(--surface); border: 1.5px solid var(--edge); border-radius: 4px; overflow: hidden; min-width: 0; }
.crumb { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; padding: 0.7rem 1.2rem; border-bottom: 1px solid var(--rule); background: #fbfaf7; }
.crumb .path { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.crumb .path span { color: var(--muted); margin: 0 0.35rem; }
.crumb .nav { display: flex; gap: 0.3rem; }
.crumb .nav button { font: 600 0.78rem var(--sans); color: var(--accent); background: var(--accent-light); border: 1.5px solid var(--accent); border-radius: 999px; padding: 0.28rem 0.7rem; cursor: pointer; }
.crumb .nav button:hover { background: var(--accent); color: #fff; }
.opts { padding: 0.75rem 1.2rem 0; }
.opts .controls { margin-bottom: 0.45rem; display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.opts .controls:empty { display: none; }
.seg-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-right: 0.35rem; min-width: 5.2rem; }
.stage { padding: 0.8rem 1.2rem 0.6rem; min-height: 320px; }
.stage img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; cursor: zoom-in; object-fit: contain; object-position: center top; }
.stage iframe { width: 100%; border: 0; display: block; background: #fff; margin: 0 auto; }
.stage > .card, .stage > .chart-card { border: 0; box-shadow: none; margin: 0; padding: 0; }
.stage > .card h2, .stage > .chart-card h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.ss-main .cap { font-size: 0.9rem; color: var(--ink2); margin: 0.6rem 1.2rem 0; max-width: 110ch; }
.ss-main .about { margin: 0.7rem 1.2rem 0.4rem; border-top: 1px solid var(--rule); padding-top: 0.5rem; }
.ss-main .about summary { cursor: pointer; font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.ss-main .about p { font-size: 0.95rem; color: var(--ink2); line-height: 1.65; max-width: 90ch; margin: 0.6rem 0; }
.ss-main .about .chart-sources, .ss-main .about .chart-card-footer { font-size: 0.85rem; color: var(--muted); display: block; margin-top: 0.4rem; }
.ss-main .about h2, .ss-main .about h3 { font-size: 1.05rem; margin: 0.6rem 0 0.2rem; }
.kbd { font: 600 0.7rem var(--sans); color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 0 0.3rem; }
.hint { font-size: 0.78rem; color: var(--muted); padding: 0.4rem 1.2rem 0.7rem; }
.lightbox { position: fixed; inset: 0; background: rgba(20,18,14,0.92); z-index: 50; display: none; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 96vw; max-height: 94vh; box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
.dom-holder { display: none; }
@media (max-width: 1000px) {
  .ss-layout { grid-template-columns: 1fr; }
  .ss-rail { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; padding: 0.5rem 0.6rem; }
  .rail-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0.2rem 0; }
  .rail-title { width: 100%; }
  .rail-title { width: 100%; padding: 0.25rem 0.2rem; }
  .rail-title .car, .rail-title .n { display: none; }
  .rail-group:not(.open) button[data-p] { display: flex; }               /* phones: every group open, pills */
  .rail-group button[data-p] { width: auto; border: 1.5px solid var(--accent); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.8rem; }
  .rail-group button[data-p].on { background: var(--accent); color: #fff; }
  .rail-group button small, .rail-group button .ico { display: none; }
}
