/* still.css: THE BOARD (the Index tab as the still page), a port of the GG Index board's shell.
   Every class is wb- : the page already carries .rail, .two, .rank, .tops, .tinl and friends
   from other modules, and a shared name is the GG project's third-time trap. Tokens are scoped
   on .wb-board and fall back to the page's own variables (--ink, --mut, --line, --card, --panel,
   --navh). One colour rule everywhere: the GG ramp from severe to fine through five stops for
   the dial and the map, pills green from 80, amber from 40, red below, grey when nobody raised
   it. */

.wb-board {
  --wb-fg: var(--ink, #1a1c20); --wb-muted: var(--mut, #6b6e76); --wb-line: var(--line, #e3dfd7);
  --wb-line2: #cec9be; --wb-surface: var(--card, #fff); --wb-sunk: var(--panel, #f3f0ea);
  --wb-accent: #2d3a6b; --wb-accent-soft: #e7e9f2; --wb-none: #efece6;
  --wb-good: #1c6b3f; --wb-goodsoft: #e8f2ec; --wb-bad: #b4341f; --wb-badsoft: #fbeeea;
  --wb-amber: #8a5a00; --wb-ambersoft: #fbefd6;
  --wb-mono: ui-monospace, "IBM Plex Mono", Menlo, Consolas, monospace;
  color: var(--wb-fg); font-variant-numeric: tabular-nums; overflow-anchor: none;
}
.wb-board * { box-sizing: border-box; }
.wb-board h3 { font-size: 13px; margin: 0 0 8px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--wb-muted); }
.wb-board h3 .wb-hsub { font: 11px var(--wb-mono); letter-spacing: 0; text-transform: none; color: var(--wb-muted); margin-left: 8px; }
.wb-cap { font-size: 12.5px; color: var(--wb-muted); line-height: 1.5; margin: 8px 0 0; max-width: 64ch; }
.wb-mut { color: var(--wb-muted); }
.wb-err { color: var(--wb-bad); font-size: 13px; margin: 4px 0 8px; }
.wb-note { color: var(--wb-muted); font-size: 12px; line-height: 1.45; margin: 16px 0 0; max-width: 90ch; }
.wb-tsub { font: 10.5px var(--wb-mono); color: var(--wb-muted); font-style: normal; margin-left: 6px; }
.wb-ch2 { font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--wb-muted); margin: 10px 0 4px; }

/* the head bar: the door switch, the period bar, Against last, the counts lede */
.wb-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 6px 0 6px; }
.wb-bar { display: flex; gap: 0; border: 1px solid var(--wb-line2); border-radius: 3px; overflow: hidden; }
.wb-bar button { font: 500 12px inherit; font-family: inherit; background: var(--wb-surface); color: var(--wb-muted); border: 0; border-right: 1px solid var(--wb-line2); padding: 6px 12px; cursor: pointer; }
.wb-bar button:last-child { border-right: 0; }
.wb-bar button.wb-on { background: var(--wb-accent); color: #fff; }
.wb-cmp { font: 500 12px inherit; font-family: inherit; border: 1px solid var(--wb-line2); border-radius: 3px; background: var(--wb-surface); color: var(--wb-muted); padding: 6px 12px; cursor: pointer; }
.wb-cmp.wb-on { background: var(--wb-fg); color: var(--wb-surface); border-color: var(--wb-fg); }
.wb-busy { font: 11px var(--wb-mono); color: var(--wb-muted); }
.wb-lede { font: 12px var(--wb-mono); color: var(--wb-muted); margin: 0 0 10px; line-height: 1.5; }

/* the shell: the sticky rail and the board */
.wb-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); background: var(--wb-surface); border: 1px solid var(--wb-line); border-radius: 4px; }
/* the top block holds under the page's own sticky header; the rail holds under the top block */
.wb-top { position: sticky; top: var(--wb-navtop, 0px); z-index: 6; background: var(--paper, #f7f5f0); padding: 4px 0 4px; margin: 0 0 6px; border-bottom: 1px solid var(--wb-line); }
.wb-top .wb-head { margin: 4px 0 4px; }
.wb-top .wb-chain { margin-bottom: 4px; }
.wb-rail { border-right: 1px solid var(--wb-line); background: var(--wb-surface); padding: 10px 0 26px; max-height: calc(100vh - var(--wb-navtop, 0px) - var(--wb-toph, 0px)); overflow-y: auto; position: sticky; top: calc(var(--wb-navtop, 0px) + var(--wb-toph, 0px)); align-self: start; }
.wb-rhead { padding: 6px 16px 8px; border-bottom: 1px solid var(--wb-line); margin-bottom: 6px; }
.wb-rhead b { display: block; font-size: 14px; font-weight: 600; color: var(--wb-fg); }
.wb-rhead span { display: block; font: 11px var(--wb-mono); color: var(--wb-muted); }
.wb-rhead .wb-rworst { margin-top: 3px; color: var(--wb-bad); }
.wb-rhead .wb-rnone { margin-top: 3px; }
.wb-rhead svg.wb-gauge { display: block; margin: 4px auto 2px; }
.wb-ri { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; padding: 5px 13px 5px 15px; cursor: pointer; color: var(--wb-fg); font: 400 12.5px inherit; font-family: inherit; }
.wb-ri:hover { background: var(--wb-sunk); }
.wb-ri.wb-on { border-left-color: var(--wb-accent); background: var(--wb-accent-soft); font-weight: 600; }
.wb-ri .wb-rl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-ri .wb-rv { font: 500 11px var(--wb-mono); padding: 2px 5px; border-radius: 2px; min-width: 44px; text-align: center; }
.wb-ri.wb-top { font-weight: 600; font-size: 13px; }
.wb-ri.wb-grp { margin-top: 9px; font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--wb-muted); }
.wb-ri.wb-ind { padding-left: 25px; }
.wb-main { padding: 16px 22px 40px; min-width: 0; min-height: 820px; }

/* the chain, the crumb, the focus line */
.wb-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.wb-chain a { display: flex; flex-direction: column; gap: 1px; background: var(--wb-surface); border: 1px solid var(--wb-line); border-radius: 4px; padding: 6px 12px; cursor: pointer; text-decoration: none; color: var(--wb-fg); min-width: 110px; }
.wb-chain a:hover { border-color: var(--wb-accent); }
.wb-chain a b { font-size: 13.5px; font-weight: 600; }
.wb-chain a span { font: 11px var(--wb-mono); color: var(--wb-muted); }
.wb-chain i { font-style: normal; color: var(--wb-muted); font-size: 18px; }
.wb-chain a:last-child { border-color: var(--wb-accent); background: var(--wb-accent-soft); }
.wb-crumb { font-size: 13px; color: var(--wb-muted); margin-bottom: 13px; }
.wb-focus { display: flex; align-items: center; gap: 12px; margin: -6px 0 14px; padding: 6px 12px; border: 1px solid var(--wb-line); border-radius: 4px; background: var(--wb-surface); max-width: 560px; }
.wb-focus b { display: block; font-size: 14px; font-weight: 600; color: var(--wb-fg); }
.wb-focus span { font: 11.5px var(--wb-mono); color: var(--wb-muted); }
.wb-focus.wb-fnone { display: block; font-size: 13px; color: var(--wb-muted); }

/* the two columns: the map, sticky, and the side */
.wb-two { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.wb-side { min-width: 0; position: relative; z-index: 1; }
.wb-mapwrap { background: var(--wb-surface); border: 1px solid var(--wb-line); border-radius: 4px; padding: 12px; position: sticky; top: calc(var(--navh, 0px) + 12px); }
.wb-mhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--wb-muted); }
#wb-readout { font: 500 12px var(--wb-mono); text-transform: none; letter-spacing: 0; color: var(--wb-fg); min-height: 1.2em; text-align: right; }
.wb-mapbox { width: 100%; max-height: 520px; overflow: hidden; }
.wb-mapbox svg { width: 100%; height: auto; max-height: 520px; display: block; margin: 0 auto; }
.wb-leg { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 11px; color: var(--wb-muted); }
.wb-leg .wb-ramp { display: flex; gap: 2px; }
.wb-leg i { width: 13px; height: 11px; display: block; border-radius: 1px; }
.wb-leg .wb-lw { white-space: nowrap; }
.wb-leg .wb-lnone { display: inline-block; width: 14px; height: 10px; background: var(--wb-none); border: 1px solid var(--wb-line); margin: 0 5px 0 12px; vertical-align: middle; }
.wb-leg em { font: 11px var(--wb-mono); font-style: normal; margin-left: 4px; }
.wb-sites { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
.wb-sites th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--wb-muted); padding: 0 6px 5px; border-bottom: 1px solid var(--wb-line2); }
.wb-sites td { padding: 3.5px 6px; border-bottom: 1px solid var(--wb-line); }
.wb-sites td.wb-m { color: var(--wb-muted); font: 11.5px var(--wb-mono); }
.wb-sites th.wb-r, .wb-sites td.wb-r { text-align: right; white-space: nowrap; }
.wb-sites tr[data-go] { cursor: pointer; }
.wb-sites tr[data-go]:hover td { background: var(--wb-sunk); }

/* the dial and the pills */
svg.wb-gauge { display: inline-block; vertical-align: middle; margin-right: 5px; flex: none; }
.wb-pill { font: 500 11.5px var(--wb-mono); padding: 2px 5px; border-radius: 2px; display: inline-block; min-width: 46px; text-align: center; }
.wb-wpill { font: 500 11px var(--wb-mono); padding: 1px 6px; border-radius: 9px; display: inline-block; line-height: 1.35; white-space: normal; }
.wb-wsh { font: 11px var(--wb-mono); color: var(--wb-muted); margin-left: 6px; white-space: nowrap; }
.wb-dl { font: 500 11px var(--wb-mono); white-space: nowrap; }
.wb-dl.wb-up { color: var(--wb-good); } .wb-dl.wb-dn { color: var(--wb-bad); } .wb-dl.wb-flat { color: var(--wb-muted); }

/* the units under this one, and the questions */
.wb-rank { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 14px; }
.wb-rank th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--wb-muted); padding: 0 6px 5px; border-bottom: 1px solid var(--wb-line2); }
.wb-rank th.wb-r, .wb-rank td.wb-r { text-align: right; white-space: nowrap; }
.wb-rank td { padding: 3.5px 6px; border-bottom: 1px solid var(--wb-line); vertical-align: middle; }
.wb-rank td.wb-m { color: var(--wb-muted); font: 11.5px var(--wb-mono); max-width: 170px; }
.wb-rank tr[data-go] { cursor: pointer; }
.wb-rank tr[data-go]:hover td { background: var(--wb-sunk); }
.wb-rank td.wb-r svg.wb-gauge { margin-right: 6px; }
.wb-q td.wb-qq { font-size: 12.5px; line-height: 1.35; }
.wb-q td.wb-qq .wb-asrc { display: inline-block; margin-top: 3px; }
.wb-q tr.wb-qgrp td { font: 11px var(--wb-mono); color: var(--wb-muted); background: var(--wb-sunk); padding: 5px 8px; border-bottom: 1px solid var(--wb-line2); }
.wb-q tr.wb-qgrp b { color: var(--wb-fg); }
.wb-qrow { cursor: pointer; }
.wb-qrow:hover td { background: var(--wb-sunk); }
.wb-qrow.wb-on td { background: var(--wb-accent-soft); }
.wb-qi { font: 500 11px var(--wb-mono); color: var(--wb-muted); white-space: nowrap; }
.wb-asrc { font: 500 9.5px var(--wb-mono); letter-spacing: .5px; text-transform: uppercase; padding: 1px 6px; border-radius: 9px; background: var(--wb-sunk); color: var(--wb-muted); white-space: nowrap; }
.wb-q tr.wb-qinl td { padding: 0 0 8px; border-bottom: 0; }
.wb-q tr.wb-qinl .wb-tinl { border-top: 0; max-height: 320px; }
.wb-q tr.wb-qinl .wb-tinl.wb-tall { max-height: 680px; }

/* topics: the list, the spread chip, the panel that opens in place */
.wb-tops { border: 1px solid var(--wb-line); border-radius: 4px; background: var(--wb-surface); overflow: hidden; }
.wb-tp { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--wb-line); font-size: 12.5px; width: 100%; text-align: left; background: var(--wb-surface); cursor: pointer; color: var(--wb-fg); font-family: inherit; }
.wb-tp:last-child { border-bottom: 0; }
.wb-tp:hover { background: var(--wb-sunk); }
.wb-tp.wb-on { background: var(--wb-accent-soft); }
.wb-tn { flex: 1; min-width: 0; }
.wb-tc { font: 500 11.5px var(--wb-mono); color: var(--wb-muted); }
.wb-tg { font-size: 10px; font-weight: 500; letter-spacing: .3px; padding: 2px 7px; border-radius: 9px; white-space: nowrap; }
.wb-tg.wb-loc { background: var(--wb-badsoft); color: var(--wb-bad); }
.wb-tg.wb-mid { background: var(--wb-sunk); color: var(--wb-muted); }
.wb-tg.wb-ev { background: var(--wb-accent-soft); color: var(--wb-accent); }
.wb-tgrp { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 10px; background: var(--wb-sunk); border-bottom: 1px solid var(--wb-line); }
.wb-tgrp b { font-size: 12px; font-weight: 600; }
.wb-tgrp span { font: 11px var(--wb-mono); color: var(--wb-muted); }
.wb-tinl { max-height: 460px; overflow: auto; border: 1px solid var(--wb-line); border-top: 0; background: var(--wb-surface); padding: 10px 12px 12px; margin: 0 0 6px; border-radius: 0 0 4px 4px; }
.wb-tinl.wb-tall { max-height: 680px; }
.wb-tinl .wb-tops { margin-top: 6px; }
.wb-tpan { margin: 0; }
.wb-tph { font-size: 12.5px; color: var(--wb-muted); margin-bottom: 8px; }
.wb-tph b { color: var(--wb-fg); }
.wb-things { margin: 8px 0 12px; border: 1px solid var(--wb-line); border-radius: 4px; background: var(--wb-surface); padding: 6px 10px; }
.wb-thing { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid var(--wb-line); }
.wb-thing:last-child { border-bottom: 0; }
.wb-thing b { font: 500 11.5px var(--wb-mono); color: var(--wb-muted); }
.wb-accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px; }
.wb-acc { text-align: left; background: var(--wb-surface); border: 1px solid var(--wb-line); border-radius: 4px; padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; color: var(--wb-fg); font-family: inherit; box-shadow: 0 1px 2px rgba(26, 28, 32, .06); }
.wb-acc:hover { border-color: var(--wb-line2); }
.wb-at { font-size: 12.5px; line-height: 1.45; }
.wb-ai { display: flex; flex-wrap: wrap; gap: 4px; }
.wb-ai i { font-size: 10px; font-weight: 500; font-style: normal; padding: 2px 5px; border-radius: 2px; }
.wb-aw { font: 10.5px var(--wb-mono); color: var(--wb-muted); }
.wb-qtp { padding: 10px 10px 12px; border-bottom: 1px solid var(--wb-line); background: var(--wb-sunk); }

/* one account, opened in place */
.wb-apanel { margin-top: 14px; }
.wb-card { border: 1px solid var(--wb-line2); border-radius: 4px; overflow: clip; background: var(--wb-surface); max-width: 720px; }
.wb-ch { display: flex; align-items: center; justify-content: space-between; gap: 10px;
         font-size: 10px; font-weight: 600; letter-spacing: .9px; text-transform: uppercase;
         padding: 6px 12px; background: var(--wb-sunk); color: var(--wb-muted); }
.wb-ch.wb-dark { background: var(--wb-fg); color: var(--wb-surface); }
/* the way back holds at the top of the scrolling frame, however far down the card is read */
.wb-card > .wb-ch.wb-dark:first-child { position: sticky; top: 0; z-index: 2; }
.wb-cb { padding: 10px 12px; font-size: 13.5px; line-height: 1.55; }
.wb-cb.wb-cbq { font-style: italic; }
.wb-cb p { margin: 0 0 8px; } .wb-cb p:last-child { margin: 0; }
.wb-aclose { flex: 0 0 auto; border: 0; background: none; color: var(--wb-surface); font-size: 10.5px;
             font-weight: 600; font-family: inherit; letter-spacing: .4px; cursor: pointer;
             padding: 4px 6px; margin: -4px -6px -4px 0; border-radius: 3px; opacity: .85;
             min-height: 24px; }
.wb-aclose:hover { opacity: 1; }
.wb-pr { display: flex; align-items: center; gap: 6px; padding: 2px 0; cursor: pointer; }
.wb-pr:hover { background: var(--wb-sunk); }
.wb-pn { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-pb { width: 58px; height: 8px; background: var(--wb-sunk); border-radius: 1px; overflow: hidden; flex: none; }
.wb-pb i { display: block; height: 8px; border-radius: 1px; }
.wb-pv { font: 500 11px var(--wb-mono); width: 64px; text-align: right; flex: none; }

/* the fold: work this desk */
.wb-fold { border: 1px solid var(--wb-line); border-radius: 4px; margin: 14px 0 0; background: var(--wb-surface); }
.wb-foldh { width: 100%; text-align: left; font-size: 12px; font-weight: 600; font-family: inherit; letter-spacing: .5px; text-transform: uppercase; color: var(--wb-muted); background: none; border: 0; padding: 9px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.wb-foldh i { width: 0; height: 0; border-left: 5px solid var(--wb-muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s; }
.wb-fold.wb-on .wb-foldh i { transform: rotate(90deg); }
.wb-foldh span { font: 11px var(--wb-mono); letter-spacing: 0; text-transform: none; color: var(--wb-muted); margin-left: auto; text-align: right; }
.wb-foldb { padding: 0 12px 12px; }
.wb-link { font: 600 12px inherit; font-family: inherit; margin-top: 8px; padding: 6px 12px; border: 1px solid var(--wb-accent); border-radius: 3px; background: var(--wb-surface); color: var(--wb-accent); cursor: pointer; }
.wb-link:hover { background: var(--wb-accent-soft); }

@media (max-width: 980px) {
  .wb-shell { grid-template-columns: minmax(0, 1fr); }
  .wb-rail { border-right: 0; border-bottom: 1px solid var(--wb-line); max-height: 210px; position: static; }
  .wb-two { grid-template-columns: minmax(0, 1fr); }
  .wb-mapwrap { position: static; }
  .wb-main { padding: 12px 12px 30px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .wb-foldh i { transition: none; } }

/* the fold under an index group: the five largest topics show, the rest on a click */
.wb-more { display: block; width: 100%; text-align: left; font: 11px var(--wb-mono); color: var(--wb-muted); background: none; border: 0; border-bottom: 1px solid var(--wb-line); padding: 6px 10px; cursor: pointer; }
.wb-more:hover { color: var(--wb-fg); background: var(--wb-sunk); }
