:root {
    --view: #fff;
    --accent: #e8edf4;
    --accent-bright: #ffffff;
    --accent-soft: rgba(232, 237, 244, 0.12);
    --accent-softer: rgba(232, 237, 244, 0.07);
    --accent-line: rgba(232, 237, 244, 0.22);
    --ink-hi: #f3f6fb;
    --ink: #ccd2dd;
    --ink-mid: #98a0af;
    --ink-lo: #7d8797;
    --ink-faint: #4a515e;
    --line: rgba(255, 255, 255, 0.09);
    --line-soft: rgba(255, 255, 255, 0.05);
    --line-strong: rgba(255, 255, 255, 0.16);
    --panel: #1b1b1e;
    --panel-solid: #1c1c1f;
    --menu-item-hover: rgba(255, 255, 255, 0.06);
    --field: rgba(255, 255, 255, 0.045);
    --field-hover: rgba(255, 255, 255, 0.085);
    --time: #ff6b6b;
    --shadow-pop: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.55), inset 0 0.0625rem 0 rgba(255, 255, 255, 0.06);
    /* One rule for type: words are set in --font, figures (years,
       counts, scale values) in --mono with tabular digits. */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, monospace;
    --hair: 1px;
    --ui-fs: clamp(0.75rem, 1.25vmin, 1.2rem);
    --rail-h: clamp(2.75rem, 5vmin, 4.25rem);
    --control-icon: clamp(1.125rem, 2.5vmin, 2.25rem);
    --control-label: clamp(0.6875rem, 0.95vmin, 0.875rem);
    --chart-label: clamp(0.5625rem, 1vmin, 0.9rem);
    --sea: #101010;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { background: var(--sea); overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    font-family: var(--font); color: var(--ink);
    -webkit-font-smoothing: antialiased; }
canvas { display: block;
    position: relative; z-index: 1;
    touch-action: none; }
#data-dock,
#data-dock-top {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: auto;
    display: block;
    width: 100%;
    overflow: visible;
    pointer-events: none;
    background: transparent;
    border: 0;
    box-shadow: none;
}
#data-dock { z-index: 0; }
#data-dock-top { z-index: 20; }
.data-dock-figure {
    position: relative;
    display: flex;
    align-items: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    /* The chart floor is the bottom of the screen and its year axis is the
       whole width; the bar floats over it. */
    padding: 0.5625rem 0 0;
}
.dock-chart-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}
.dock-event {
    position: absolute;
    z-index: 1;
    transform: translate(0, -100%);
    pointer-events: none;
    white-space: nowrap;
    font-family: var(--font);
    font-size: var(--chart-label); line-height: 1;
    color: var(--ink-mid);
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
    --stack: 0;
    padding-left: 0.375rem;
    padding-bottom: calc(0.875rem + var(--stack) * 0.875rem);
}
.dock-event i {
    position: absolute; left: 0; bottom: 0;
    width: var(--hair); height: calc(0.75rem + var(--stack) * 0.875rem);
    background: var(--ink-hi);
}
.dock-event b { color: var(--ink-hi); font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dock-event.is-left {
    transform: translate(-100%, -100%);
    padding-left: 0; padding-right: 0.375rem;
}
.dock-event.is-left i { left: auto; right: 0; }
.dock-marker-label {
    position: absolute;
    z-index: 1;
    transform: translate(0.5625rem, -50%);
    pointer-events: none;
    white-space: nowrap;
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    font-size: var(--chart-label); font-weight: 600;
    color: var(--ink-hi);
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
}
.ro-off {
    pointer-events: auto;
    padding: 0 0.25rem;
    border: 0; border-radius: 0.1875rem;
    background: transparent;
    color: var(--ink-mid);
    font: inherit; line-height: 1.2;
    cursor: pointer;
}
.ro-off:hover { color: var(--ink-hi); background: var(--field-hover); }
.ro-clear { padding: 0; }
.dock-marker {
    position: absolute;
    z-index: 1;
    display: block;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}
.dock-current {
    width: 0.625rem;
    height: 0.625rem;
    fill: var(--view);
    background: var(--view);
    border: 0.125rem solid #0d1429;
}
#readout {
    position: fixed;
    top: 0.875rem; left: 0.75rem;
    z-index: 25;
    pointer-events: none;
    color: var(--ink-hi);
    font-family: var(--font);
    white-space: nowrap;
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
}
.ro-year-value, .ro-val { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ro-world { display: inline-flex; align-items: center; gap: 0.25em; }
.ro-mark { display: inline-flex; align-items: center; }
.ro-mark-view { color: var(--view); }
.ro-world .icon { width: 1.125em; height: 1.125em; }
.ro-year,
.ro-subject { display: contents; }
.ro-year .ro-name, .ro-subject .ro-name {
    grid-column: 1;
    color: var(--ink-mid);
}
.ro-year-value, .ro-val {
    grid-column: 2;
    text-align: right;
    font-weight: 700;
}
.ro-year-value { color: var(--view); }
#readout {
    display: grid;
    grid-template-columns: max-content max-content max-content;
    column-gap: 0.625rem;
    row-gap: 0.25rem;
    font-size: var(--ui-fs);
    line-height: 1.4;
}
.ro-val { text-align: right; color: var(--ink-hi); font-weight: 700; }
.ro-x { min-width: 1em; }
/* A selected region's sources span the readout under its value. */
.ro-src {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    max-width: min(32rem, calc(100vw - 1.5rem));
    font-size: 0.8125em;
    line-height: 1.35;
    color: var(--ink-lo);
    pointer-events: auto;
}
.ro-src-label { flex: none; min-width: 3.5rem; }
.ro-src-name, .ro-src-more {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink-mid);
    text-decoration: none;
}
a.ro-src-name:hover { color: var(--ink-hi); text-decoration: underline; }
.ro-lic {
    flex: none;
    padding: 0 0.3125rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.1875rem;
    font-family: var(--mono);
    font-size: 0.9em;
    color: var(--ink-mid);
}
.region-diagnostics-table {
    font-size: 0.625rem;
    font-variant-numeric: tabular-nums;
}
.region-diagnostics-table th,
.region-diagnostics-table td {
    white-space: nowrap;
}
.region-diagnostics-table td { cursor: pointer; user-select: text; }
.region-diagnostics-table th {
    position: sticky; top: 0; z-index: 1;
    background: var(--panel-solid);
    border-bottom: var(--hair) solid var(--line-strong);
    color: var(--ink-mid); font-weight: 600;
    letter-spacing: 0.03125rem; text-align: left;
    font-size: 0.59375rem; text-transform: uppercase;
    cursor: pointer; user-select: none;
}
.region-diagnostics-table th.num,
.region-diagnostics-table td.num { text-align: right; }
.region-diagnostics-table th:hover { color: var(--ink-hi); }
.region-diagnostics-table tr:hover td { background: rgba(255,255,255,0.05); }
.region-diagnostics-table tr.selected td {
    background: var(--accent-soft); color: var(--ink-hi);
    box-shadow: inset 0.125rem 0 0 var(--accent);
}
.region-diagnostics-table tr.total td {
    color: var(--ink-hi); border-top: var(--hair) solid var(--line-strong);
    font-weight: 600;
}

#timebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--menu-h, 3.5rem);
    display: flex; align-items: center;
    padding: 0; gap: 0.5em; z-index: 20;
    cursor: ew-resize;
    touch-action: none;
}
/* The bar's pointer handling is the viewer's own (viewerInput.js): a press
   anywhere along it sets the year from the x position over the full width.
   The range input stays for the keyboard and assistive technology. */
#year-slider-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
#year-slider {
    flex: 1;
    -webkit-appearance: none; appearance: none;
    height: var(--rail-h);
    background: transparent;
    outline: none;
    margin: 0;
    padding: 0;
    pointer-events: none;
}
#year-slider::-webkit-slider-runnable-track { height: 0.5rem; background: transparent; }
#year-slider::-moz-range-track { height: 0.5rem; background: transparent; }
#year-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 0; height: 0; border: 0; }
#year-slider::-moz-range-thumb { width: 0; height: 0; border: 0; }
/* The grip stands at the year's x over the full width. Its box and label
   would leave the screen near the ends, so JS shifts them inward
   (--grip-dx, --label-dx) while the dashed line stays on the year. */
.dock-year-grip {
    position: absolute;
    bottom: 0;
    width: 1.5rem;
    transform: translateX(calc(-50% + var(--grip-dx, 0px)));
    pointer-events: auto;
    cursor: ew-resize;
    touch-action: none;
    z-index: 2;
}
.dock-year-grip.no-value { height: calc(var(--menu-h, 3.5rem) + 1.25rem); }
.dock-year-grip::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: calc(50% - var(--grip-dx, 0px) - var(--hair) / 2);
    border-left: 0.09375rem dashed var(--view);
    opacity: 0.85;
}
.dock-year-grip::after {
    content: "\25C2\2009" attr(data-year) "\2009\25B8";
    position: absolute;
    left: calc(50% - var(--grip-dx, 0px) + var(--label-dx, 0px));
    bottom: calc(var(--menu-h, 3.5rem) + 0.125rem);
    transform: translateX(-50%);
    padding: 0.3125rem 0.5rem;
    border: var(--hair) solid var(--view);
    border-radius: 0.35em;
    background: var(--sea);
    color: var(--view);
    font-family: var(--mono);
    font-size: var(--ui-fs); font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.6);
}
.dock-year-grip:hover::after,
body.scrubbing .dock-year-grip::after {
    background: var(--view);
    color: var(--sea);
}
/* Part labels inside the chart's right edge, each in its band's colour,
   in a column left of the scale numbers; a click hides or shows the part. */
.dock-part {
    position: absolute;
    right: calc(var(--dock-scale-col, 0px) + 0.5rem);
    transform: translateY(-50%);
    padding: 0.125rem 0.25rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    font: 600 var(--chart-label)/1 var(--font);
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}
.dock-part:hover { background: rgba(40, 40, 44, 0.85); }
.dock-century {
    position: absolute;
    bottom: 0;
    width: 0;
    border-left: var(--hair) dotted rgba(232, 237, 244, 0.42);
    pointer-events: none;
}
.dock-century b {
    position: absolute;
    left: 0.3125rem;
    bottom: calc(var(--menu-h, 3.5rem) + 0.5rem);
    font-family: var(--mono);
    font-size: var(--chart-label); font-weight: 600;
    line-height: 1;
    color: var(--ink-mid);
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
    white-space: nowrap;
}
.dock-value-guide {
    position: absolute;
    height: 0;
    border-top: var(--hair) solid rgba(232, 237, 244, 0.32);
    pointer-events: none;
}
.dock-value-guide.is-zero {
    border-top: 0.09375rem solid rgba(232, 237, 244, 0.7);
}
.dock-value-label.is-zero { color: var(--ink-hi); }
.dock-value-label {
    position: absolute;
    right: 0.25rem;
    transform: translateY(-50%);
    font-family: var(--mono);
    font-size: var(--chart-label);
    font-weight: 600;
    line-height: 1;
    color: var(--ink-mid);
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
    white-space: nowrap;
}
#hover-readout {
    position: fixed; top: 0; left: 0;
    z-index: 25;
    display: none;
    pointer-events: none;
    background: var(--panel-solid);
    border: var(--hair) solid var(--line-strong);
    border-radius: 0.5rem;
    padding: 0.375rem 0.6875rem;
    font-family: var(--font);
    font-size: var(--ui-fs);
    line-height: 1.35;
    box-shadow: var(--shadow-pop);
    white-space: nowrap;
    max-width: 44vw;
    overflow: hidden; text-overflow: ellipsis;
}
#hover-readout .hov-name { color: var(--ink-hi); font-weight: 600; }
#hover-readout .hov-native { color: var(--ink-lo); margin-left: 0.4375rem; }
.ro-subject .ro-native { color: var(--ink-lo); font-style: normal; margin-left: 0.4375rem; }
#menu-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    --bar-control-size: var(--rail-h);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.75em;
    padding: 0.125em 0.75em max(0.3em, env(safe-area-inset-bottom)); z-index: 30;
}

#menu-bar { pointer-events: none; }
#menu-bar .bar-section, #menu-bar button, #menu-bar a, #menu-bar .mode-row { pointer-events: auto; }

#menu-bar .bar-group {
    display: flex; align-items: center; gap: 0.5em; min-width: 0;
}
#menu-bar .bar-left {
    grid-column: 1; grid-row: 2;
    justify-self: stretch;
    justify-content: flex-end;
    overflow: hidden;
}
#menu-bar .bar-left .bar-section { flex-shrink: 1; min-width: 0; }
#menu-bar .bar-center {
    grid-column: 2; grid-row: 2;
    justify-self: center;
    max-width: 100%;
    overflow: visible;
}
#menu-bar .bar-right {
    grid-column: 3; grid-row: 2;
    justify-self: stretch;
    align-items: center; justify-content: flex-end;
    gap: 0.5em; overflow: hidden;
}
#menu-bar .bar-section {
    display: flex; align-items: center; gap: 0.4em; flex-shrink: 0;
}
#menu-bar #details-readout {
    flex: 1 1 auto; min-width: 0; overflow: hidden;
    justify-content: flex-end;
    color: var(--ink-mid); font-size: var(--ui-fs);
    font-weight: 500; line-height: 1.2;
    letter-spacing: 0.0125rem; font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
#details-info {
    display: inline-flex; align-items: center; gap: 0.625rem;
    min-width: 0; overflow: hidden;
}
#details-info .info-main {
    min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
#details-info .info-muted { color: var(--ink-mid); font-weight: 500; }
#menu-bar #details-readout { display: none; }
body.debug-ui #menu-bar #details-readout { display: flex; }



.sr-only {
    position: absolute;
    width: 0.0625rem; height: 0.0625rem;
    margin: -0.0625rem; padding: 0; border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.layer-tab:focus-visible,
.mode-option:focus-visible,
.level-toggle:focus-visible,
#year-slider:focus-visible {
    outline: 0.125rem solid var(--accent);
    outline-offset: 0.125rem;
}
.control-dock {
    position: relative;
    gap: 0.25rem !important;
    padding: 0;
}
.layer-tabs { display: flex; gap: 0.25rem; }
/* Tab items: a glyph over a word, no box. The active layer carries its
   colour; everything else is quiet until pressed. */
.layer-tab,
.level-toggle {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 0.1875rem;
    background: transparent;
    border: 0;
    border-radius: 0.75rem;
    color: var(--ink-mid); font-family: inherit; font-size: var(--ui-fs);
    padding: 0.25rem 0.75rem;
    min-inline-size: clamp(4.25rem, 7.5vmin, 6rem);
    block-size: var(--rail-h);
    cursor: pointer; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
}
/* The bar's marks are the same icons the readout uses: a person, a bolt
   and a sprout for the layers; a globe, a hex and a pin for the levels. */
.ctl-glyph { display: flex; align-items: center; block-size: var(--control-icon); color: currentColor; }
.ctl-glyph .icon { width: var(--control-icon); height: var(--control-icon); }
.icon-person path { fill: currentColor; stroke: none; }
.ctl-word {
    font-size: var(--control-label); line-height: 1; font-weight: 600;
    letter-spacing: 0.00625rem;
}
.layer-tab:hover, .level-toggle:hover { background: var(--field); color: var(--ink-hi); }
.layer-tab:active, .level-toggle:active, .mode-option:active { transform: scale(0.92); }
.layer-tab.is-active { color: var(--ink-hi); }
.level-toggle { color: var(--ink); }
/* The bar's top line: the active layer's views as plain words, the
   current one in the view colour. */
.mode-row {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.125rem;
    max-width: 100%;
    padding: 0.125rem 0.25rem 0.25rem;
    pointer-events: auto;
}
.mode-row::-webkit-scrollbar { display: none; }
.mode-option {
    flex: 0 0 auto;
    padding: 0.375rem 0.625rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-mid);
    font: 600 var(--control-label)/1 var(--font);
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 0 0.0625rem 0.1875rem #000, 0 0 0.5rem #000;
}
/* A part's pill: its mark before its word, in the part's colour while on. */
.mode-part { display: inline-flex; align-items: center; gap: 0.3125rem; padding-inline-start: 0.5rem; }
.mode-glyph { display: flex; align-items: center; }
.mode-glyph .icon { width: 1.05rem; height: 1.05rem; }
.mode-option:hover { color: var(--ink-hi); background: var(--field); }
.mode-option.is-active { color: var(--view); background: var(--field); }
.icon {
    display: block;
    width: 1.25em; height: 1.25em;
    fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}


@media (max-width: 48rem) {
    .data-dock-figure { padding: 0.3125rem 0 0; }
    .ro-subject { column-gap: 0.625rem; }
    .layer-tab,
    .level-toggle {
        padding: 0;
        block-size: var(--bar-control-size);
    }
    /* A phone gets one even row of tab items across the width. */
    #menu-bar {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;
        padding: 0.25em 0.25em max(0.35em, env(safe-area-inset-bottom));
    }
    #menu-bar .bar-left { display: none; }
    #menu-bar .bar-center, #menu-bar .bar-right { display: contents; }
    #menu-bar .control-dock, #menu-bar .layer-tabs { display: contents; }
    .layer-tab, .level-toggle { min-inline-size: 3.75rem; }
    .mode-row { flex: 1 0 100%; }
}

#developer-box {
    position: fixed;
    inset-inline: 0;
    top: var(--top-chrome-h, 0rem);
    z-index: 42;
    display: none;
    width: auto;
    max-height: calc(100dvh - var(--chrome-h, 7rem));
    flex-wrap: wrap;
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 0 clamp(0.75rem, 2vw, 2rem) 0.375rem;
    color: #fff;
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    user-select: text;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000,
                 -1px 1px 0 #000, 1px 1px 0 #000, 0 0 3px #000;
}
#developer-box .dashboard-muted,
#developer-box .dashboard-docs a,
#developer-box .dashboard-tab,
#developer-box a {
    color: #fff;
}
#developer-box .dashboard-tab:hover,
#developer-box .dashboard-docs a:hover { color: #fff; }
body.debug-ui #developer-box { display: block; }
#developer-box::-webkit-scrollbar { width: 7px; height: 7px; }
#developer-box::-webkit-scrollbar-thumb {
    background: var(--line-strong); border-radius: 4px;
}
#developer-box::-webkit-scrollbar-track { background: transparent; }
.dashboard-muted { color: var(--ink-mid); font-weight: 400; }
.dashboard-docs {
    padding: 7px 0 5px;
    border-top: 1px solid var(--loc-line, var(--line-soft));
    margin-top: 6px;
}
.dashboard-docs ul { margin: 0; padding-left: 18px; }
.dashboard-docs li { padding: 1px 0; }
.dashboard-docs a { color: var(--ink-mid); text-decoration: none; }
.dashboard-docs a:hover { color: var(--ink-hi); text-decoration: underline; }
.dashboard-nav {
    position: sticky; top: 0; z-index: 6;
    display: flex; flex-wrap: wrap; align-items: center; min-width: 0;
    padding: 8px 0 9px;
}
.dashboard-tab {
    flex: 0 0 auto; max-width: 100%;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 0; border: 0; background: transparent; color: var(--ink-mid);
    font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2;
    text-align: left; cursor: pointer; white-space: nowrap;
}
.dashboard-tab + .dashboard-tab::before {
    content: "│"; margin: 0 8px; color: var(--line-strong); font-weight: 400;
}
.dashboard-tab:hover { color: var(--ink-hi); }
.dashboard-tab:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
.dashboard-tab.is-active {
    color: var(--ink-hi); text-decoration: underline;
    text-decoration-color: var(--accent-line); text-underline-offset: 3px;
}
.dashboard-tab .dashboard-tab-label { color: var(--loc-color, var(--ink-hi)); }
.dashboard-tab .dashboard-tab-count { color: var(--loc-color, var(--ink-lo)); }
.dashboard-tab.is-active {
    text-decoration-color: var(--loc-line, var(--accent-line));
}
.dashboard-tab-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dashboard-tab-count {
    min-width: 0; overflow: hidden; text-overflow: ellipsis;
    color: var(--ink-lo); font: inherit;
    font-variant-numeric: tabular-nums;
}
.dashboard-tab-count:empty { display: none; }
.dashboard-tab.is-active .dashboard-tab-count { color: var(--ink-mid); }

.dashboard-runtime {
    display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
}
.dashboard-runtime-item {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--time);
    font-size: 14px; font-weight: 700; line-height: 1.2;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dashboard-content { min-width: 0; }
.dashboard-section {
    min-width: 0; padding-top: 0.625rem;
}
.dashboard-table-wrap { overflow-x: auto; margin-top: 4px; }
.stage-network {
    --stage-root: #7bb0ee;
    --stage-shared: #f2b84b;
    --stage-chain: #f0985a;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--line-soft);
}
.stage-network-toolbar {
    display: flex; align-items: center; gap: 7px;
    min-height: 28px; color: var(--ink-mid); font-size: 9px;
}
.stage-network-toolbar > span:first-child { color: var(--ink-hi); font-weight: 600; }
.stage-network-key {
    display: inline-flex; align-items: center; gap: 4px; margin-right: auto;
    color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em;
}
.stage-network-key i { width: 10px; height: 2px; margin-left: 5px; }
.stage-network-key .key-root { background: var(--stage-root); }
.stage-network-key .key-shared { background: var(--stage-shared); }
.stage-network-key .key-chain { background: var(--stage-chain); }
.stage-network-toolbar button {
    min-width: 26px; height: 22px; padding: 0 6px;
    border: 1px solid var(--line-strong); border-radius: 2px;
    background: rgba(0,0,0,.35); color: var(--ink-hi);
    font: 600 10px/1 var(--font); cursor: pointer; text-shadow: none;
}
.stage-network-toolbar button:hover,
.stage-network-toolbar button:focus-visible { border-color: var(--accent); outline: none; }
.stage-network-canvas {
    height: clamp(230px, 42vh, 390px); min-height: 0;
    border: 1px solid var(--line-soft); background: rgba(5,7,14,.90);
    overflow: hidden; touch-action: none;
}
.stage-network-canvas svg {
    width: 100%; height: 100%; display: block; cursor: grab;
    touch-action: none; user-select: none;
}
.stage-network-canvas svg.is-panning { cursor: grabbing; }
.stage-network-canvas marker path { fill: #aaa; }
.stage-network-cluster {
    fill: rgba(242,184,75,.035); stroke: rgba(242,184,75,.52);
    stroke-width: 1.5; stroke-dasharray: 5 4;
}
.stage-network-label, .stage-network-cluster-label {
    fill: #ddd; font: 600 11px var(--font); letter-spacing: .06em;
    text-shadow: none;
}
.stage-network-cluster-label { fill: var(--stage-shared); }
.stage-network-edge {
    fill: none; stroke: #aaa; stroke-width: 1.7;
    vector-effect: non-scaling-stroke;
}
.stage-network-node { --stage-color: var(--stage-shared); cursor: pointer; }
.stage-network-node.scope-root-only { --stage-color: var(--stage-root); }
.stage-network-node.scope-shared { --stage-color: var(--stage-shared); }
.stage-network-node.scope-chain-only { --stage-color: var(--stage-chain); }
.stage-node-box {
    fill: rgba(4,6,12,.88); stroke: var(--stage-color); stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}
.stage-node-id {
    fill: #fff; font: 700 11px var(--mono); text-anchor: middle;
    pointer-events: none; text-shadow: none;
}
.stage-network-node:hover .stage-node-box,
.stage-network-node:focus-visible .stage-node-box,
.stage-network-node.is-stage-focus .stage-node-box {
    fill: color-mix(in srgb, var(--stage-color) 24%, #070911);
    stroke-width: 3;
}
.stage-network-node:focus-visible { outline: none; }
.stage-network-world.has-stage-focus .stage-network-node:not(.is-stage-focus):not(.is-related),
.stage-network-world.has-stage-focus .stage-network-edge:not(.is-related) { opacity: .18; }
.stage-network-edge.is-related { stroke: #fff; stroke-width: 2.6; }
.stage-network-node.is-related .stage-node-box { stroke-width: 2.2; }
.stage-network-detail {
    display: flex; align-items: baseline; gap: 10px; min-height: 27px;
    padding: 6px 2px; color: var(--ink-faint); font-size: 9px;
}
.stage-network-detail strong { color: var(--ink-hi); }
.stage-network-detail span:last-child { margin-left: auto; color: var(--ink-mid); }
.stage-lines-sort {
    border: 0; padding: 0; background: none; color: inherit; font: inherit;
    cursor: pointer; white-space: nowrap;
}
.stage-lines-sort:hover { color: var(--ink-hi); }
.stage-lines-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.yearly-diagnostics-wrap { max-width: 100%; }
.yearly-diagnostics-table {
    min-width: 1900px;
    font-variant-numeric: tabular-nums;
}
.yearly-diagnostics-table th,
.yearly-diagnostics-table td { white-space: nowrap; }
.yearly-diagnostics-table .yearly-year {
    position: sticky; left: 0; z-index: 2;
    min-width: 48px; background: var(--panel-solid);
}
.yearly-diagnostics-table .yearly-time {
    min-width: 160px; background: var(--panel-solid);
}
.yearly-diagnostics-table .yearly-time small {
    display: block; color: var(--ink-lo); font-weight: 400;
}
.yearly-diagnostics-table th.yearly-metric-head {
    min-width: 104px; max-width: 132px; white-space: normal;
    line-height: 1.15;
}
.yearly-metric-head small {
    display: block; margin-top: 2px; color: var(--ink-lo);
    font-size: 8.5px; font-weight: 400; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.yearly-metric-head .yearly-metric-review {
    color: var(--accent-bright);
    font-size: 8px;
}
.yearly-diagnostics-table .yearly-issue {
    min-width: 86px;
}
.yearly-diagnostics-table .yearly-metric-cell {
    border-left: 1px solid var(--line-soft);
}
.yearly-diagnostics-table tr.yearly-summary td {
    background: var(--accent-softer);
    border-bottom: 1px solid var(--line-strong);
    color: var(--ink-hi);
    font-weight: 700;
}
.yearly-diagnostics-table tr.yearly-summary .yearly-year,
.yearly-diagnostics-table tr.yearly-summary .yearly-time {
    background: var(--panel-solid);
}
.yearly-diagnostics-table tr.yearly-summary:hover > td {
    background: var(--accent-softer);
}
.yearly-diagnostics-table tr:hover .yearly-year,
.yearly-diagnostics-table tr:hover .yearly-time {
    background: var(--menu-item-hover);
}
.dashboard-table {
    width: 100%; border-collapse: collapse; min-width: 690px;
    font-size: 10px;
}
.dashboard-table.compact { min-width: 0; }
.dashboard-table th, .dashboard-table td {
    padding: 3px 5px; border-bottom: 1px solid var(--line-soft);
    text-align: left; vertical-align: top;
}
.dashboard-table th { color: var(--ink-mid); font-weight: 600; }
.dashboard-table td.num, .dashboard-table th.num { text-align: right; }
.dashboard-table code {
    color: var(--ink-hi); font-family: var(--mono); font-size: 9.5px;
}
.dashboard-table thead th {
    position: sticky; top: 0; z-index: 4;
    background: var(--panel-solid); color: var(--loc-color, var(--ink-hi));
    border-bottom: 1px solid var(--loc-line, var(--line-strong));
}
.dashboard-table tbody tr:hover > td {
    background: var(--loc-soft, rgba(255,255,255,.045));
}

@media (max-width: 50rem) {
    #developer-box {
        max-height: calc(100dvh - var(--chrome-h, 7rem));
    }
    .stage-network-detail { align-items: flex-start; flex-wrap: wrap; }
    .stage-network-detail span:last-child { margin-left: 0; width: 100%; }
}

.dashboard-repository > details { padding: 10px 0; border-bottom: 1px solid var(--line-strong); }
.dashboard-repository > details > summary { cursor: pointer; color: var(--ink-mid); }
.dashboard-repository > details > summary strong { color: var(--loc-color); }
.dashboard-repository h4 { margin: 12px 0 4px; }
#developer-box .dashboard-runtime { flex-wrap: wrap; gap: 12px; }
#developer-box .dashboard-runtime-item { font-size: 12px; font-weight: 400; }

#developer-box:has(.dashboard-section.is-active) {
    background: var(--panel-solid);
    text-shadow: none;
    box-shadow: var(--shadow-pop);
}
#developer-box .dashboard-nav { background: var(--panel-solid); }
