/* Style of the whole site: tokens, layout (sidebar), and components.
   Class names avoid those of Bootstrap (button, panel, tag, data-table, notice...), which the default account pages of
   ASP.NET Identity still load. Dark theme: html[data-theme="dark"], or the system preference when none is chosen. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e6e8ec;
  --line-strong: #d4d7dd;
  --text: #16181d;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-ink: #ffffff;
  --success: #047857; --success-soft: #ecfdf5;
  --warning: #b45309; --warning-soft: #fffbeb;
  --danger: #dc2626; --danger-soft: #fef2f2;
  --info: #0369a1; --info-soft: #f0f9ff;
  --focus: 0 0 0 3px rgba(79, 70, 229, .25);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
  --sidebar-width: 248px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  /* Series of the charts (charts.js): eight hues checked together for color blindness and contrast, light and dark. */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #18202b;
  --line: #232d3a;
  --line-strong: #2f3b4b;
  --text: #e6edf3;
  --muted: #8b98a8;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-soft: rgba(45, 212, 191, .12);
  --accent-ink: #042f2a;
  --success: #34d399; --success-soft: rgba(52, 211, 153, .12);
  --warning: #fbbf24; --warning-soft: rgba(251, 191, 36, .12);
  --danger: #f87171; --danger-soft: rgba(248, 113, 113, .12);
  --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
  --focus: 0 0 0 3px rgba(45, 212, 191, .3);
  --shadow: none;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0b0f14; --surface: #121821; --surface-2: #18202b; --line: #232d3a; --line-strong: #2f3b4b;
    --text: #e6edf3; --muted: #8b98a8; --accent: #2dd4bf; --accent-hover: #5eead4; --accent-soft: rgba(45, 212, 191, .12);
    --accent-ink: #042f2a; --success: #34d399; --success-soft: rgba(52, 211, 153, .12); --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .12); --danger: #f87171; --danger-soft: rgba(248, 113, 113, .12); --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, .12); --focus: 0 0 0 3px rgba(45, 212, 191, .3); --shadow: none;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5); color-scheme: dark;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.07rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: var(--mono); font-size: .93em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.right { text-align: right; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icons (sprite in _Icons.cshtml) */
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-sm { width: 15px; height: 15px; }

/* Layout */
.shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 6px 10px 16px; font-weight: 700; font-size: 1.07rem; color: var(--text); }
.sidebar-brand:hover { text-decoration: none; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 16px 10px 6px; font-weight: 600; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; }
.side-link:hover { background: var(--surface-2); text-decoration: none; }
.side-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-link .trail { margin-left: auto; color: var(--muted); }
.side-link .count { margin-left: auto; font-size: .78rem; color: var(--muted); font-weight: 500; }
.side-link.active .count { color: inherit; }
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.account { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.account-text { min-width: 0; }
.account-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; text-transform: uppercase; }
.sidebar-tools { display: flex; gap: 6px; padding: 0 6px; }
.main { min-width: 0; }
.topbar { display: none; position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; align-items: center; gap: 12px; }
.page { max-width: 1280px; padding: 28px 36px 64px; }
.page-narrow { max-width: 880px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-header .crumb { font-size: .86rem; color: var(--muted); margin-bottom: 4px; display: block; }
.page-sub { color: var(--muted); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: var(--sidebar-width); transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .shell.menu-open .sidebar { transform: none; }
  .shell.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .35); }
  .topbar { display: flex; }
  .page { padding: 20px 16px 48px; }
}

/* Grids and stacks */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-2-1 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-lg { gap: 20px; }
.inline-fit { flex-wrap: nowrap; }
.end { justify-content: flex-end; }
.center { text-align: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flush { margin: 0; }
.narrow { max-width: 420px; }
.measure { max-width: 640px; }
ol.steps { padding-left: 20px; margin: 0; }
.qr { background: #fff; padding: 10px; border-radius: var(--radius-sm); width: max-content; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-sm { margin-top: 8px; } .mb-sm { margin-bottom: 8px; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.panel-header .hint { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.panel-body { padding: 16px 20px 20px; }
.panel-flush > .data-wrap { border-top: 1px solid var(--line); margin-top: 14px; }
.panel.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.panel.attention-warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); }
.panel.attention { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }

/* Stats */
.stat { padding: 18px 20px; }
.stat-label { color: var(--muted); font-size: .86rem; font-weight: 500; }
.stat-value { font-size: 1.85rem; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.stat-value-text { font-size: 1.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-hint { color: var(--muted); font-size: .82rem; margin-top: 2px; }
a.stat { display: block; color: inherit; }
a.stat:hover { text-decoration: none; border-color: var(--line-strong); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; vertical-align: middle; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none; }
.button:hover { background: var(--surface-2); text-decoration: none; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.button-danger:hover { background: var(--danger-soft); }
.button-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.button-ghost { border-color: transparent; background: transparent; }
.button-ghost:hover { background: var(--surface-2); }
.button-sm { height: 30px; padding: 0 10px; font-size: .86rem; }
.button-icon { width: 36px; padding: 0; }
.button-icon.button-sm { width: 30px; }
.button-block { width: 100%; height: 42px; }
form.inline-form { display: inline-flex; vertical-align: middle; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); vertical-align: 1px; }
.tag-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.tag-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.tag-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tag-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tag-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag-remove { background: none; border: 0; padding: 0 0 0 2px; color: inherit; cursor: pointer; font: inherit; line-height: 1; opacity: .6; }
.tag-remove:hover { opacity: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot-live { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }

/* Tables */
.data-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-weight: 550; color: var(--muted); font-size: .8rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table tr.row-link, .data-table tr[data-expand] { cursor: pointer; }
.data-table tr[aria-expanded="true"] td { background: var(--surface-2); border-bottom-color: transparent; }
.data-table tr.row-danger td { background: var(--danger-soft); }
.data-table tr.row-warning td { background: var(--warning-soft); }
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th a { color: inherit; }
.data-table th[data-sort]::after { content: " ↕"; opacity: .45; }
.data-table th[data-dir="asc"]::after { content: " ↑"; opacity: 1; }
.data-table th[data-dir="desc"]::after { content: " ↓"; opacity: 1; }
.data-table td.actions { text-align: right; white-space: nowrap; }
.cell-title { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: .82rem; }
.detail-row td { background: var(--surface-2); }
.data-table[data-rows]:not(.rows-all) tr.row-beyond { display: none; }
.table-more { display: flex; justify-content: center; padding: 6px 20px 10px; border-top: 1px solid var(--line); }
/* Links to the sections of a long page, kept in view while it scrolls. */
.section-nav { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; background: var(--bg); }
.section-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .86rem; font-weight: 550; white-space: nowrap; }
.section-nav a:hover { background: var(--surface-2); text-decoration: none; }
.section-nav .count { color: var(--muted); font-weight: 500; }
.section-nav ~ section { scroll-margin-top: 56px; }
@media (max-width: 960px) { .section-nav { position: static; } }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 20px; font-size: .86rem; }
.kv div { overflow-wrap: anywhere; }
.kv div > span:first-child { color: var(--muted); margin-right: 4px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.rows > * + * { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

/* Toolbar, tabs, search */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 16px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 10px; color: var(--muted); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs-wrap { flex-wrap: wrap; overflow-x: visible; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .count { font-size: .76rem; padding: 0 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button { border: 0; background: none; padding: 4px 12px; border-radius: 7px; font: inherit; font-size: .86rem; color: var(--muted); cursor: pointer; font-weight: 550; }
.segmented label { position: relative; padding: 4px 12px; border-radius: 7px; font-size: .86rem; color: var(--muted); cursor: pointer; font-weight: 550; }
.segmented label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.segmented label:has(input:focus-visible) { box-shadow: var(--focus); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search .icon { position: absolute; left: 11px; top: 10px; color: var(--muted); }
.search .input { padding-left: 34px; }

/* Forms */
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 550; font-size: .9rem; }
.field .hint { color: var(--muted); font-size: .82rem; }
.field .error, .field-validation-error, .validation-summary-errors { color: var(--danger); font-size: .84rem; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none !important; }
/* A summary that only holds the hidden placeholder line of the tag helper */
.validation-summary-errors:has(> ul > li:only-child[style*="display:none"]) { display: none !important; }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; }
input[type="file"].input { padding-top: 6px; }
.textarea { height: auto; min-height: 90px; padding: 10px 12px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input[readonly] { background: var(--surface-2); }
.input-sm, .select.input-sm { height: 32px; font-size: .9rem; }
.input-auto { width: auto; }
.input-limit { max-width: 320px; }
.form-grid { display: grid; gap: 14px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 180px; }
.form-row .field-wide { flex-grow: 2; }
.form-row > .switch, .form-row > .check { height: 38px; }
.disclosure .form-row { margin-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }

/* Copyable value */
.copy-field { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px 4px 4px 12px; }
.copy-field .value { flex: 1; min-width: 0; font-family: var(--mono); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-field input.value { border: 0; background: none; color: inherit; padding: 0; height: 28px; }
.copy-field input.value:focus { outline: none; box-shadow: none; }

/* Notices and toasts */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); margin-bottom: 16px; }
.notice-success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.notice-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.notice-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.notice-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.notice .text { flex: 1; color: var(--text); }
.notice .close { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font-size: 1.2rem; line-height: 1; }

/* Dialogs */
dialog.dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.dialog::backdrop { background: rgba(10, 12, 16, .45); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.dialog-body { padding: 16px 20px; display: grid; gap: 14px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }

/* Disclosure */
details.disclosure { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
details.disclosure > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.disclosure > summary::after { content: "+"; color: var(--muted); }
details.disclosure[open] > summary::after { content: "–"; }
details.disclosure > div { padding: 0 16px 16px; }
/* A disclosure at the bottom of a panel: a separator line instead of its own frame, content as wide as the panel */
details.disclosure-flush { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: none; margin-top: 14px; }
details.disclosure-flush > summary { padding: 12px 20px; }
details.disclosure-flush > summary:hover { color: var(--accent); }
details.disclosure-flush > div { padding: 0; }
details.disclosure-flush > div > .toolbar { padding-top: 0; }
details.disclosure-flush > div > .data-wrap { border-top: 1px solid var(--line); margin-top: 14px; }

/* Progress */
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); }
/* Vertical bars: one .bar per value, its <i> takes --share (0 to 1) of the height left by the two labels. */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 240px; }
.bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar > i { display: block; width: 100%; max-width: 48px; height: calc((100% - 46px) * var(--share, 0)); min-height: 2px; border-radius: 6px 6px 0 0; background: var(--accent); }
.bar-running > i { opacity: .5; }
.bar-value, .bar-label { color: var(--muted); font-size: .76rem; white-space: nowrap; line-height: 1; }
.bar-value { margin-bottom: 6px; } .bar-label { margin-top: 8px; }
@media (max-width: 720px) { .bar-value { display: none; } }
.trend-up { color: var(--success); font-weight: 600; } .trend-down { color: var(--danger); font-weight: 600; }

/* Rows of a list */
.item-list > .item-row + .item-row { border-top: 1px solid var(--line); }
.item-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.item-row:hover { background: var(--surface-2); }
.item-text { flex: 1; min-width: 0; }
.item-name { font-weight: 650; font-size: 1.07rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Pagination */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 20px; }

/* Prose */
.prose { max-width: 760px; line-height: 1.65; }
.prose h2 { margin: 28px 0 10px; font-size: 1.15rem; scroll-margin-top: 72px; }
.prose h3 { margin: 20px 0 8px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

/* Signed-out pages: a centered card */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; position: relative; }
.auth-card { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-tools { position: absolute; top: 16px; right: 16px; }

/* Charts */
.chart-box { position: relative; height: 280px; }
.chart-box-sm { height: 220px; }

/* Theme switch icons: the moon offers the dark theme, the sun the light one */
.theme-light { display: none; }
html[data-theme="dark"] .theme-light { display: inline; }
html[data-theme="dark"] .theme-dark { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-light { display: inline; }
  html:not([data-theme]) .theme-dark { display: none; }
}

/* Releases: changelogs are plain text, their line breaks kept. */
.changelog { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.row-muted > td { opacity: .6; }
