/* Dashboard styles, after the revised dashboard design (same class names, same look).
   Brand tokens: colours.css; fonts: fonts.css (ProximaNova 400 = Light, 700 = Medium).
   No inline styles anywhere (CSP style-src 'self'). */

:root {
    --orange: #EE712B;
    --blue: #535777;
    --yellow: #F5BB51;
    --red: #BE3743;
    --green: #30933C;
    --lgrey: #909394;
    --dgrey: #545454;
    --grid: #D9D9D9;
    --panel: #F2F2F2;
    --bg: #FFFFFF;
    --rail: #FAFAFA;
    --text: #545454;
    /* Darker than the old #909394 so small grey text meets WCAG AA on white and on the rail. */
    --muted: #6B6E70;
    --line: #E4E4E4;
    --thead: #535776;
    --zebra1: #D7D7D7;
    --zebra2: #F2F2F2;
    --input: #FFFFFF;
    --canvas: #FFFFFF;
    /* Brand orange for small text and white-on-orange controls, darkened for AA contrast. */
    --orange-text: #B4511A;
    --error: #A12E37;
    /* The navigation bar is dark in both themes. */
    --navbg: #272940;
    --navtext: rgba(255, 255, 255, .8);
    --navmuted: rgba(255, 255, 255, .58);
    --navline: rgba(255, 255, 255, .16);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #1E1F24;
        --rail: #23242A;
        --text: #D8D8D8;
        --muted: #A6A9AF;
        --line: #33353D;
        --panel: #2A2B32;
        --grid: #3A3C45;
        --dgrey: #D8D8D8;
        --lgrey: #9A9DA3;
        --thead: #535776;
        --zebra1: #2E2F37;
        --zebra2: #26272E;
        --input: #2A2B32;
        --canvas: #1E1F24;
        --orange-text: #F0884A;
        --error: #E5868D;
        --navbg: #1B1C2B;
    }
}

:root[data-theme="dark"] {
    --bg: #1E1F24;
    --rail: #23242A;
    --text: #D8D8D8;
    --muted: #A6A9AF;
    --line: #33353D;
    --panel: #2A2B32;
    --grid: #3A3C45;
    --dgrey: #D8D8D8;
    --lgrey: #9A9DA3;
    --thead: #535776;
    --zebra1: #2E2F37;
    --zebra2: #26272E;
    --input: #2A2B32;
    --canvas: #1E1F24;
    --orange-text: #F0884A;
    --error: #E5868D;
    --navbg: #1B1C2B;
}

[hidden] { display: none !important }

* { box-sizing: border-box }

html, body { margin: 0; padding: 0 }

body {
    background: var(--bg);
    color: var(--text);
    font-family: ProximaNova, system-ui, Arial, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45
}

h1, h2, h3, h4 { font-weight: 400; margin: 0 }

strong { font-weight: 700 }

a { color: var(--orange-text); text-decoration: none }
a:hover { text-decoration: underline }

button, input, select {
    font-family: inherit;
    font-weight: 400;
    font-size: 14px;
    color: var(--text)
}

input[type=number], input[type=text], input[type=search], select {
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 6px 8px;
    width: 100%
}

input:focus, select:focus, button:focus-visible, a:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 1px
}

.skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--bg);
    padding: 8px 12px;
    border: 1px solid var(--orange);
    z-index: 10
}
.skip:focus { left: 8px }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0
}

/* ---------- screens (sign-in, no access, errors) reuse login.css ---------- */
.screen h2 { color: var(--orange); font-weight: 400 }
.login-box.narrow { max-width: 440px }
.login-container { background-color: var(--panel) }
.login-box { background-color: var(--bg) }
button.ms-signin-btn { cursor: pointer }

/* ---------- header ---------- */
header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 28px 14px;
    border-bottom: 1px solid var(--line)
}
header .brand { display: flex; align-items: baseline; gap: 16px }
header .brand .mark { font-weight: 700; color: var(--orange); font-size: 26px; letter-spacing: .5px }
header h1 { font-size: 22px; color: var(--dgrey) }
header .meta { color: var(--muted); font-size: 13px; text-align: right }
header .user { margin-top: 4px; display: flex; gap: 12px; justify-content: flex-end; align-items: baseline }
header .user span { color: var(--text) }
.railtoggle { display: none }

/* ---------- layout ---------- */
/* --navh is the navigation bar's height, written by main.js, so the panels and the KPI row stick below it. */
.app {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: calc(100vh - var(--navh, 56px))
}
body[data-panel="none"] .app { grid-template-columns: minmax(0, 1fr) }
body[data-panel^="tool-"] .app { grid-template-columns: 320px minmax(0, 1fr) }

aside {
    background: var(--rail);
    border-right: 1px solid var(--line);
    padding: 18px 18px 40px;
    position: sticky;
    top: var(--navh, 56px);
    height: calc(100vh - var(--navh, 56px));
    overflow-y: auto
}
/* Which left panel shows depends on the tab: body[data-panel] is set by main.js applyPanel. */
#rail, .toolrail { display: none }
body[data-panel="filters"] #rail, body[data-panel="disabled"] #rail { display: block }
body[data-panel="tool-benchmark"] #railBench, body[data-panel="tool-judges"] #railJudges { display: block }
.railscope { font-size: 12px; color: var(--muted); margin: -2px 0 12px; line-height: 1.4 }
/* "Filters unavailable for this view": reserved for a tab that wants to show the filters greyed. */
.railoff {
    display: none;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text);
    background: var(--canvas);
    border: 1px solid var(--orange);
    border-top-width: 3px;
    border-radius: 4px;
    padding: 10px 12px;
    margin: 0 0 12px
}
.railoff strong { display: block; color: var(--orange-text); margin-bottom: 2px }
body[data-panel="disabled"] .railoff { display: block }
body[data-panel="disabled"] .railscope { display: none }
body[data-panel="disabled"] #rail > :not(h2):not(.railoff) { opacity: .35; filter: grayscale(1); pointer-events: none }
body[data-panel="disabled"] #kpis { opacity: .35; filter: grayscale(1); pointer-events: none }
.toolrail .form { border: 0; padding: 0; background: none; gap: 14px }
.toolrail .toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 0 }
.toolrail .jcombo { width: 100% }
aside h2 { font-size: 17px; color: var(--dgrey); margin-bottom: 4px }
aside .count { color: var(--muted); font-size: 13px; margin-bottom: 14px }
aside .count strong { font-weight: 700; color: var(--orange-text) }

.fgroup { border-top: 1px solid var(--line); padding: 12px 0 }
.fgroup summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--dgrey)
}
.fgroup summary::-webkit-details-marker { display: none }
.fgroup summary::after { content: "+"; color: var(--muted); font-size: 18px }
.fgroup[open] summary::after { content: "−" }
.active {
    font-size: 12px;
    color: var(--orange-text);
    font-weight: 700;
    margin-left: auto;
    margin-right: 8px
}
.fbody { padding-top: 10px; display: flex; flex-direction: column; gap: 6px }
.fbody.first { padding-top: 0 }

.seg { display: flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden }
.seg button {
    flex: 1;
    background: var(--input);
    border: 0;
    padding: 6px 4px;
    cursor: pointer;
    font-size: 13px;
    border-right: 1px solid var(--line);
    line-height: 1.2
}
.seg button:last-child { border-right: 0 }
#segMeasure { flex-direction: column }
#segMeasure button { border-right: 0; border-bottom: 1px solid var(--line); text-align: left; padding-left: 8px }
#segMeasure button:last-child { border-bottom: 0 }
.seg button.on { background: var(--orange); color: #fff; font-weight: 700 }

.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; padding: 2px 0 }
.chk input { accent-color: var(--orange); margin: 0 }
.chk .n { margin-left: auto; color: var(--muted); font-size: 12px }
.chk.mt { margin-top: 6px }
.chk.all { border-bottom: 1px solid var(--line); padding-bottom: 5px; margin-bottom: 3px }

/* number inputs carry a small clear button inside the field (added by filters.js) */
input[type=number] { -moz-appearance: textfield; appearance: textfield }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0 }
.numwrap { position: relative; display: block; min-width: 0 }
.numwrap input { padding-right: 26px }
.numclear {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 4px; cursor: pointer
}
.numclear:hover { color: var(--orange-text) }
.numwrap input:placeholder-shown + .numclear { display: none }

.orange { color: var(--orange-text) }

.range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: 13px
}

.hint { font-size: 12px; color: var(--muted) }
.hint.mt, .mt8 { margin-top: 8px }

.tri { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 14px }
.tri select { width: auto; padding: 3px 6px; font-size: 13px }
.tri .subset { display: block; color: var(--orange-text) }
.flags { display: flex; flex-direction: column; gap: 6px; margin-top: 8px }

.scroll { max-height: 220px; overflow-y: auto; padding-right: 4px }

.linkbtn {
    background: none;
    border: 0;
    color: var(--orange-text);
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    text-align: left
}
.linkbtn:hover { text-decoration: underline }

.reset {
    margin: 0 0 12px;
    width: 100%;
    background: var(--input);
    border: 1px solid var(--orange);
    color: var(--orange-text);
    padding: 8px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700
}

main { padding: 0 28px 60px; min-width: 0 }
body:not([data-panel="filters"]):not([data-panel="disabled"]) main { padding-top: 20px }
main:focus { outline: none }

/* ---------- KPIs ---------- */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 22px
}
.kpi { padding: 10px 12px; border-right: 1px solid var(--line); background: var(--bg) }
.kpi:last-child { border-right: 0 }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--dgrey); line-height: 1.1 }
.kpi .v.o { color: var(--orange) }
.kpi .v.ned { font-size: 15px; font-weight: 400; color: var(--muted); line-height: 1.75 }
.kpi .l { font-size: 13px; color: var(--muted); margin-top: 4px }

/* ---------- the KPI row (Explore tabs only) ---------- */
.stickyhead { background: var(--bg); margin: 0 -28px 22px }
.kpiwrap { padding: 14px 28px 4px }
.stickyhead .kpis { margin-bottom: 10px }
@media (min-width: 1200px) {
    .stickyhead {
        position: sticky;
        top: var(--navh, 56px);
        z-index: 20;
        box-shadow: 0 6px 10px -8px rgba(35, 36, 37, .18)
    }
}
body:not([data-panel="filters"]):not([data-panel="disabled"]) .stickyhead { display: none }

/* ---------- navigation bar: one tablist, three labelled groups, sticky at the top ---------- */
nav.tabs {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    background: var(--navbg);
    padding: 0 28px
}
nav.tabs .tgrp { display: flex; flex-direction: column; padding-top: 8px; flex: 0 0 auto }
nav.tabs .tgrp + .tgrp { border-left: 1px solid var(--navline); margin-left: 14px; padding-left: 14px }
nav.tabs .tgl {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--navmuted);
    padding: 0 14px 2px;
    white-space: nowrap
}
nav.tabs .tgrp.cur .tgl { color: var(--orange) }
nav.tabs .tgb { display: flex; gap: 2px; flex-wrap: nowrap }
nav.tabs button {
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 15px;
    color: var(--navtext);
    white-space: nowrap
}
nav.tabs button:hover { color: #fff }
nav.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--orange); font-weight: 700 }

.tab[data-state="loading"] .grid, .tab[data-state="loading"] .tablewrap,
.tab[data-state="loading"] .msec {
    opacity: .55;
    transition: opacity .15s
}

.intro { max-width: 78ch; color: var(--text); margin: 0 0 18px; font-size: 15px }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 26px;
    margin-bottom: 26px
}
.grid .wide { grid-column: 1 / -1 }

.card {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px 16px 10px;
    background: var(--canvas)
}
.card h3 { font-size: 15px; color: var(--dgrey); text-align: center; margin-bottom: 6px }
.card .sub { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px }

.ch { position: relative; height: 300px }
.ch.tall { height: 420px }
.ch.short { height: 240px }

/* As in the 2026.10.21 page: a dashed box on the input background. */
.empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    color: var(--muted);
    font-size: 14px;
    background: var(--input);
    border: 1px dashed var(--line);
    border-radius: 6px
}

/* ---------- tables ---------- */
table.fid { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 13.5px }
table.fid th {
    background: var(--thead);
    color: #fff;
    font-weight: 700;
    padding: 8px 8px;
    text-align: center;
    vertical-align: middle
}
table.fid th button {
    background: none; border: 0; color: #fff; font-weight: 700; cursor: pointer; font-size: 13.5px; padding: 0
}
table.fid th[aria-sort="descending"] button::after { content: " ▾"; font-size: 10px }
table.fid th[aria-sort="ascending"] button::after { content: " ▴"; font-size: 10px }
table.fid td { padding: 7px 8px; text-align: center; color: var(--text) }
table.fid tbody tr:nth-child(odd) td { background: var(--zebra1) }
table.fid tbody tr:nth-child(even) td { background: var(--zebra2) }
table.fid td.l, table.fid th.l { text-align: left }
table.fid tr.total td { font-weight: 700 }
table.fid td.ned { color: var(--muted); font-style: italic }
table.fid td .linkbtn { font-size: 13.5px; color: var(--text); text-decoration: underline; text-decoration-color: var(--orange) }

.tablewrap { overflow-x: auto; margin-bottom: 18px }

.caption { font-style: italic; font-weight: 700; color: var(--dgrey); font-size: 14px; margin: 0 0 6px 2px }

.btn {
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 7px 12px;
    cursor: pointer
}
.btn.primary { background: var(--orange-text); border-color: var(--orange-text); color: #fff; font-weight: 700 }

/* ---------- benchmark your case ---------- */
.form {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--rail);
    align-self: start
}
.form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px }
/* Benchmark your case: the "Your case" form in the left panel and the results in the tab. */
.mform { display: flex; flex-direction: column; gap: 12px; margin: 0 }
.mform label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; line-height: 1.3 }
.mform label input[type=number], .mform label > select { width: 100%; box-sizing: border-box; height: 34px }
.mform .req { color: var(--orange-text) }
.mform .mh {
    font-size: 11.5px;
    color: var(--orange-text);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line)
}
.mform .mh:first-child { margin-top: 0; padding-top: 0; border-top: 0 }
.mrange { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted) }
.mrange .mrv { color: var(--text); font-weight: 700 }
.mrange .mrv em { font-style: normal; font-weight: 400; color: var(--muted) }
.mrange.off { opacity: .45 }
.mrin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.mform .mrin input[type=number] { width: 96px; height: 30px }
.mrs { position: relative; height: 24px }
.mrs .mrt { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--line) }
.mrs .mrf { position: absolute; top: 10px; height: 4px; border-radius: 2px; background: var(--orange) }
.mrs input[type=range] {
    position: absolute; left: 0; top: 0; width: 100%; height: 24px; margin: 0;
    background: none; pointer-events: none; -webkit-appearance: none; appearance: none
}
.mrs input[type=range]::-webkit-slider-runnable-track { background: none; height: 24px }
.mrs input[type=range]::-moz-range-track { background: none }
.mrs input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; pointer-events: auto; width: 16px; height: 16px; margin-top: 4px;
    border-radius: 50%; background: var(--bg); border: 2px solid var(--orange); cursor: grab
}
.mrs input[type=range]::-moz-range-thumb {
    pointer-events: auto; width: 14px; height: 14px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--orange); cursor: grab
}
.mrs input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--blue); outline-offset: 2px }
.mrs input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--blue); outline-offset: 2px }
.mchks { display: flex; flex-direction: column; gap: 8px }
.mform label.mchk { flex-direction: row; align-items: center; gap: 8px; color: var(--text) }
.msec { margin: 0 0 26px }
.mkpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 10px }
.mkpi { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; background: var(--canvas) }
.mkpi.mid { border-top: 3px solid var(--orange) }
.mkpi .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em }
.mkpi .v { font-size: 26px; font-weight: 700; color: var(--dgrey); letter-spacing: -.02em; margin-top: 4px }
.mkpi .v.ned { font-size: 15px; font-weight: 400; color: var(--muted); line-height: 1.75 }
.mkpi .s { font-size: 12.5px; color: var(--muted); margin-top: 2px }
.mlead { font-size: 14px; line-height: 1.55; max-width: 95ch; margin: 0 0 12px }
.mfoot { font-size: 12px; color: var(--muted); margin: 6px 0 0; max-width: 95ch; line-height: 1.5 }
.mhint { font-size: 14px }
.mt10 { margin-top: 10px }
.mt14 { margin-top: 14px }
@media (max-width: 900px) { .mkpis { grid-template-columns: 1fr } }

/* ---------- notes and notices ---------- */
.note {
    font-size: 13px;
    color: var(--muted);
    max-width: 90ch;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 10px
}
.note p { margin: 4px 0 }
.note strong { color: var(--text) }

.notice {
    background: var(--panel);
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 16px
}
.notice.warn { border-left: 3px solid var(--yellow) }
.taberror {
    background: var(--panel);
    border-left: 3px solid var(--red);
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap
}
.taberror .msg { color: var(--error); font-weight: 700 }
.counselnote { max-width: 90ch; font-size: 12px; color: var(--muted); margin: -4px 0 12px }
.counselnote + .counselnote { margin-top: 0 }
.mt26 { margin-top: 26px }
.mt6 { margin-top: 6px }

/* "How to read the range charts" panel */
.rangehelp {
    font-size: 12.5px;
    color: var(--dgrey);
    background: var(--panel);
    border-radius: 4px;
    padding: 8px 14px;
    margin: 0 0 14px;
    line-height: 1.55
}
.rangehelp .rh-title { color: var(--orange-text); font-weight: 700; margin-bottom: 2px }
.rangehelp strong { font-weight: 700 }

.pathnote { font-size: 12px; color: var(--muted); margin: 8px 0 26px; max-width: 110ch }

/* Litigation path: starting point of the flow diagram */
.flowpick { margin: 2px 0 8px }
.flowpick .seg { width: 100% }
.flowpick .seg button { padding: 5px 12px }

/* ---------- judges ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 12px }
.jfield { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted) }
/* The search box and the list are one box: the box filters the list under it. */
.jcombo { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 3px; background: var(--input); width: 340px; max-width: 100% }
.jcombo input[type=search], .jcombo select { width: 100%; max-width: 100%; border: 0; border-radius: 0; background: transparent; margin: 0; box-sizing: border-box }
.jcombo input[type=search] { border-bottom: 1px solid var(--line) }
.jcombo:focus-within { outline: 2px solid var(--blue); outline-offset: 1px }
.jcombo :focus-visible { outline: 0 }
.jhead { margin: 4px 0 14px; padding-top: 12px; border-top: 3px solid var(--orange) }
.jeyebrow { font-size: 11.5px; color: var(--orange-text); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px }
.jname { font-weight: 700; font-size: 24px; letter-spacing: -.02em; color: var(--text) }
#t_judgeS table.fid { max-width: 860px }
#t_judgeS td:first-child { width: 34% }
#t_judgeS tbody tr:first-child td { font-weight: 700; border-bottom: 2px solid var(--orange) }
#t_judgeS tbody tr:not(:first-child) td:first-child { padding-left: 20px }
.jnote { font-size: 12px; color: var(--muted); margin: 8px 0 0; max-width: 90ch }

.pathnote strong { font-weight: 700 }

/* ---------- glossary ---------- */
.gopen {
    color: var(--orange-text);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0 0 12px
}
.gnotes { border-top: 0; padding-top: 0; margin: 0 0 26px; color: var(--text); font-size: 14px; line-height: 1.55; max-width: 960px }
.gnotes p { margin: 0 0 8px }
.glossary { max-width: 960px }
.gsec { break-inside: avoid; margin-bottom: 22px }
.gsec-title {
    color: var(--orange-text);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px
}
.gterm {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--line)
}
.gterm .gt { font-weight: 700; color: var(--dgrey); font-size: 14px }
.gterm .gd { font-size: 14px; color: var(--text); text-wrap: pretty }
.gfoot { font-size: 12.5px; color: var(--muted); margin: 8px 0 0 }

/* ---------- responsive: the Explore filters collapse behind a Filters button; a tool's panel stacks above its results ---------- */
@media (max-width: 1100px) {
    nav.tabs button { padding: 10px 10px; font-size: 14px }
    nav.tabs .tgl { padding: 0 10px 2px }
    nav.tabs .tgrp + .tgrp { margin-left: 8px; padding-left: 8px }
}
@media (max-width: 1000px) {
    body[data-panel] .app { grid-template-columns: 1fr }
    aside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line) }
    body[data-panel="filters"] #rail:not(.open), body[data-panel="disabled"] #rail:not(.open) { display: none }
    .grid { grid-template-columns: 1fr }
    header { flex-direction: column; gap: 6px; align-items: stretch; padding: 14px 16px 12px }
    header .meta { text-align: left }
    header .user { justify-content: flex-start }
    .railtoggle { display: inline-flex; gap: 8px; align-items: baseline; justify-self: start; margin: 12px 16px 0 }
    nav.tabs { padding: 0 16px }
    main { padding: 0 16px 48px }
    body:not([data-panel="filters"]):not([data-panel="disabled"]) main { padding-top: 16px }
    .stickyhead { margin: 0 -16px 18px }
    .kpiwrap { padding: 12px 16px 2px }
}
/* The Filters button only belongs to the Explore tabs. */
body:not([data-panel="filters"]):not([data-panel="disabled"]) .railtoggle { display: none }

@media (max-width: 760px) {
    .gterm { grid-template-columns: 1fr; gap: 4px }
}

@media (max-width: 480px) {
    header .brand { flex-direction: column; gap: 2px }
    header h1 { font-size: 18px }
    .kpi { padding: 10px 12px }
    .kpi .v { font-size: 21px }
    .ch { height: 280px }
    .ch.tall { height: 360px }
    .card { padding: 12px 10px 8px }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important }
}
