/* Roll-up dashboard v2. Site colour tokens from global.css, light theme only. Sample data only.
   Communication state: one ordinal blue ramp plus shape. Shading and heat cells: warm grey. Gone-quiet hexes: orange. All validated. */
#rollup { position: relative; margin: 2em calc(50% - min(560px, 50vw - 24px)); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 16px; font-size: .95rem; line-height: 1.45; color: var(--text); }
#rollup [hidden] { display: none !important; }
#rollup button, #rollup input, #rollup select { font: inherit; color: inherit; }
#rollup button { cursor: pointer; }
#rollup h3 { font-size: 1.15rem; margin: 0 0 4px; }
#rollup h4 { font: 600 .9rem/1.3 var(--body); color: var(--ink); margin: 14px 0 6px; letter-spacing: 0; }
#rollup .ru-small { font-size: .84rem; color: var(--muted); }
#rollup .ru-ico { display: inline-block; vertical-align: -3px; margin-right: 5px; flex: none; }
#rollup .ru-head .ru-headrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#rollup .ru-title { font: 600 1.25rem/1.2 var(--display); color: var(--ink); letter-spacing: -.01em; }
#rollup .ru-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 3px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--alt); font-size: .82rem; font-weight: 600; color: var(--ink); }
#rollup .ru-chip .ru-ico { margin-right: 6px; vertical-align: 0; }
#rollup .ru-info { margin: 8px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--alt); border-radius: 6px; font-size: .88rem; color: var(--muted); }
#rollup .ru-info p + p { margin-top: 6px; }
#rollup .ru-headline { margin: 10px 0 2px; font-size: 1.05rem; color: var(--ink); max-width: 70ch; }
#rollup .ru-limit { font-size: .84rem; color: var(--muted); }
#rollup .ru-filters { background: var(--surface); margin: 12px -16px 0; padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#rollup .ru-frow { display: flex; flex-wrap: wrap; gap: 8px; }
#rollup .ru-frow input[type="search"] { flex: 1 1 200px; min-width: 0; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
#rollup .ru-frow select { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
#rollup .ru-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
#rollup .ru-seg button { min-height: 42px; padding: 6px 12px; border: 0; background: var(--surface); }
#rollup .ru-seg button + button { border-left: 1px solid var(--line-strong); }
#rollup .ru-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
#rollup .ru-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#rollup .ru-sec { display: inline-flex; align-items: center; min-height: 36px; padding: 3px 11px 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .86rem; }
#rollup .ru-sec .ru-ico { margin-right: 4px; vertical-align: 0; }
#rollup .ru-sec[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
#rollup .ru-tabs { display: flex; gap: 2px; margin: 14px 0 12px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
#rollup .ru-tabs button { min-height: 46px; padding: 8px 16px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; background: none; font-weight: 600; color: var(--muted); white-space: nowrap; }
#rollup .ru-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
#rollup #ru-panel:focus-visible { outline-offset: 6px; }
#rollup .ru-btn { min-height: 40px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font-weight: 600; }
#rollup .ru-btn:hover, #rollup .ru-seg button:hover, #rollup .ru-sec:hover { background: var(--alt); color: var(--ink); }
#rollup .ru-seg button[aria-pressed="true"]:hover, #rollup .ru-sec[aria-pressed="true"]:hover { background: var(--ink); color: #fff; }
#rollup .ru-link { padding: 4px 0; min-height: 40px; border: 0; background: none; text-align: left; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
/* one faint mark per map or chart panel, in the corner, so a cropped screenshot still says sample data */
#rollup .ru-wm { position: relative; }
#rollup .ru-wm::after { content: "SAMPLE DATA"; position: absolute; right: 10px; bottom: 7px; pointer-events: none; z-index: 5; font: 600 10.5px/1 var(--body); letter-spacing: .18em; color: var(--muted); opacity: .35; }
/* map */
#rollup .ru-mapgrid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { #rollup .ru-mapgrid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } }
#rollup .ru-mapbox { border: 1px solid var(--line); border-radius: 8px; background: var(--page); overflow: hidden; }
#rollup .ru-map { width: 100%; height: auto; aspect-ratio: 800 / 700; touch-action: manipulation; }
#rollup .ru-prov path { fill: var(--alt); stroke: var(--line-strong); stroke-width: 1.2; cursor: pointer; }
#rollup .ru-prov.shaded path { fill: var(--shade); fill-opacity: .4; }
#rollup .ru-prov path:hover { stroke: var(--ink); }
#rollup .ru-prov path:focus-visible { outline: none; stroke: var(--accent-text); stroke-width: 3; }
#rollup .ru-pts .pt, #rollup .ru-cm .pt { cursor: pointer; }
#rollup .ru-country { position: absolute; left: 10px; top: 10px; z-index: 6; background: var(--surface); }
#rollup .ru-layers { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; }
#rollup .ru-layers summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
#rollup .ru-layerlist { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; }
#rollup .ru-layerlist label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
#rollup .ru-layerlist input { width: 18px; height: 18px; accent-color: var(--ink); }
#rollup .ru-key { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; font-size: .84rem; color: var(--muted); }
#rollup .ru-key li { display: flex; align-items: center; gap: 6px; }
#rollup .ru-key b { color: var(--ink); }
#rollup .ru-ramps { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
#rollup .ru-ramps i { display: inline-block; width: 22px; height: 12px; }
#rollup .ru-sdot { display: inline-block; vertical-align: -2px; margin-right: 6px; }
/* tiles and mini bars */
#rollup .ru-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; margin: 10px 0 4px; }
#rollup .ru-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--page); }
#rollup .ru-kpi b { display: block; font: 600 1.45rem/1.15 var(--display); color: var(--ink); }
#rollup .ru-kl { display: block; font-size: .8rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
#rollup .ru-kpi small { display: block; font-size: .74rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
#rollup .ru-minirow { display: grid; grid-template-columns: 18px 92px minmax(0, 1fr) 40px; align-items: center; gap: 6px; font-size: .85rem; min-height: 26px; }
#rollup .ru-minirow.ru-wide { grid-template-columns: 150px minmax(0, 1fr) 56px; }
#rollup .ru-minirow i, #rollup .ru-rung i { display: block; height: 10px; background: var(--alt); border-radius: 0 4px 4px 0; position: relative; overflow: hidden; }
#rollup .ru-minirow s, #rollup .ru-rung s { position: absolute; inset: 0 auto 0 0; background: #1c5cab; border-radius: 0 4px 4px 0; }
#rollup .ru-minirow b { text-align: right; color: var(--ink); }
#rollup .ru-mini ol { margin: 4px 0 0; padding-left: 20px; font-size: .88rem; }
/* tables */
#rollup .ru-tablewrap { overflow-x: auto; max-width: 100%; }
#rollup .ru-short { max-height: 280px; overflow-y: auto; }
#rollup .ru-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
#rollup .ru-table th, #rollup .ru-table td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
#rollup .ru-table th { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
#rollup .ru-table .num { text-align: right; white-space: nowrap; }
#rollup .ru-table td.name small { display: block; color: var(--subtle); font-size: .78rem; }
#rollup .ru-cmp td.rate { white-space: nowrap; }
#rollup .ru-cmp td.rate b { display: inline-block; min-width: 3.4ch; text-align: right; margin-left: 6px; color: var(--ink); }
#rollup .ru-dots { display: inline-block; width: 104px; height: 18px; vertical-align: middle; }
#rollup .ru-strip { display: block; width: 100%; min-width: 90px; max-width: 220px; height: 16px; background: var(--page); }
#rollup .ru-heat th, #rollup .ru-heat td { text-align: center; padding: 6px 2px; }
#rollup .ru-heat tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: .84rem; color: var(--ink); white-space: nowrap; }
#rollup .ru-heat td { font-weight: 600; min-width: 34px; }
#rollup .hmd { color: #fff; }
#rollup .hml, #rollup .hm0 { color: var(--ink); }
#rollup .ru-list { margin-top: 12px; }
#rollup .ru-list summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
#rollup .ru-crumbs { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; margin: 10px 0; font-size: .9rem; }
#rollup .ru-crumbs button { min-height: 36px; padding: 2px 6px; border: 0; background: none; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
#rollup .ru-crumbs i { color: var(--subtle); font-style: normal; }
#rollup .ru-crumbs [aria-current] { font-weight: 600; color: var(--ink); }
/* cards, charts */
#rollup .ru-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 14px; background: var(--surface); }
#rollup .ru-toolrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
#rollup .ru-chart { width: 100%; height: auto; overflow: hidden; }
#rollup .ru-plab { fill: var(--ink); stroke: #fff; paint-order: stroke; stroke-linejoin: round; font: 600 11px/1 var(--body); pointer-events: none; }
#rollup .ru-leg p { font-size: .84rem; color: var(--muted); margin-top: 6px; }
#rollup .ru-leg svg { display: inline-block; vertical-align: middle; margin-right: 3px; }
#rollup .ru-leg b { color: var(--ink); }
#rollup .ru-ramp { display: inline-flex; opacity: .45; }
#rollup .ru-ramp i { display: inline-block; width: 18px; height: 12px; }
#rollup .ru-ax { font: 400 11px/1 var(--body); fill: var(--muted); }
#rollup .ru-lab { font: 600 12px/1 var(--body); fill: var(--ink); }
#rollup .ru-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
#rollup .ru-smcell p { font-size: .85rem; color: var(--ink); margin-bottom: 2px; }
#rollup .ru-ladders { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 10px; }
#rollup .ru-ladder h4 { margin-top: 0; }
#rollup .ru-rung { border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: var(--page); }
#rollup .ru-rung p { font-size: .86rem; }
#rollup .ru-rn { margin: 2px 0 6px; color: var(--muted); }
#rollup .ru-rn b { color: var(--ink); font-size: 1.1rem; }
#rollup .ru-up { text-align: center; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); line-height: 1.6; }
#rollup .ru-up::before { content: "\2193  "; }
/* project sheet: right drawer on desktop, bottom sheet on phones */
#rollup .ru-sheet { position: fixed; z-index: 60; right: 0; top: 0; bottom: 0; width: min(430px, 100%); overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: -8px 0 28px rgba(10, 27, 46, .18); padding: 16px; }
#rollup .ru-sheethead { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
#rollup .ru-sheethead h3 { margin: 0; font-size: 1.1rem; }
#rollup .ru-sheethead h3:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
#rollup .ru-chain { list-style: none; margin: 6px 0 10px; padding: 0; font-size: .8rem; color: var(--muted); }
#rollup .ru-chain li { display: flex; align-items: center; gap: 6px; margin: 0; line-height: 1.5; }
#rollup .ru-chain li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); flex: none; }
#rollup .ru-chain li:last-child { color: var(--ink); font-weight: 600; }
#rollup .ru-pstrip { display: block; width: 100%; height: 22px; margin: 6px 0; }
#rollup .ru-flags { list-style: none; padding: 0; margin: 6px 0; }
#rollup .ru-flags li { padding: 5px 0 5px 10px; border-left: 3px solid var(--accent-text); margin: 5px 0; font-size: .88rem; }
#rollup pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: .78rem; line-height: 1.5; margin: 8px 0; }
#rollup .ru-tip { position: absolute; z-index: 70; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: .8rem; max-width: 260px; line-height: 1.35; }
#rollup .ru-foot { margin-top: 12px; font-size: .8rem; color: var(--muted); }
@media (max-width: 899px) {
  #rollup .ru-sheet { top: auto; width: 100%; max-height: 78vh; border-left: 0; border-top: 1px solid var(--line-strong); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 28px rgba(10, 27, 46, .22); }
}
@media (max-width: 640px) {
  #rollup { padding: 12px; margin: 1.5em 0; }
  #rollup .ru-filters { margin-inline: -12px; padding-inline: 12px; }
  #rollup .ru-tabs button { padding: 8px 9px; font-size: .92rem; }
  #rollup .hide-s { display: none; }
  #rollup .ru-minirow { grid-template-columns: 18px 82px minmax(0, 1fr) 38px; }
  #rollup .ru-minirow.ru-wide { grid-template-columns: 110px minmax(0, 1fr) 46px; }
  #rollup .ru-dots { width: 80px; }
  #rollup .ru-seg button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { #rollup * { transition: none !important; animation: none !important; } }
@media print {
  #rollup { margin: 12px 0; border: 0; padding: 0; }
  #rollup .ru-sheet, #rollup .ru-filters, #rollup .ru-tabs, #rollup .ru-tip, #rollup .ru-chip, #rollup .ru-info, #rollup .ru-country,
  #rollup .ru-layers summary, #rollup .ru-layerlist, #rollup .ru-btn { display: none !important; }
  #rollup .ru-layers { border: 0; padding: 0; }
  #rollup .ru-mapgrid { display: block; }
  #rollup .ru-card, #rollup .ru-mapbox { break-inside: avoid; }
  #rollup .ru-tablewrap, #rollup .ru-short { overflow: visible; max-height: none; }
}
