/* Tokens. --accent and --on-accent are set at runtime from the user's color choice (app.js). */
:root {
  --accent: #0739a6;
  --on-accent: #fff;
  --accent-ink: #052b7d; /* hover and accent text; recomputed from the accent in app.js */
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--card));

  --bg: #f7f7fa;
  --card: #fff;
  --text: #242428;
  --muted: #5f5f6b;
  --border: #dfdfe8;
  --error: #b91c1c;
  --gold-bg: #fdf3d7;
  --gold-ink: #7a5300;
  --gold: #d4a017;
  --silver-bg: #eef1f6;
  --silver-ink: #474d57;
  --silver: #9aa3ae;
  --bronze-bg: #f9e8dc;
  --bronze-ink: #7c3f17;
  --bronze: #b8703d;
  --radius: 6px;

  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100;
  --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #6250d6; --cat-other: #9a9a94;

  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-ink: #7692ce;
    --bg: #111317;
    --card: #1b1e24;
    --text: #e8eaed;
    --muted: #a0a6ae;
    --border: #2c3038;
    --error: #f87171;
    --gold-bg: #3a2f12;
    --gold-ink: #f5d27a;
    --silver-bg: #2a2e36;
    --silver-ink: #d5dae1;
    --bronze-bg: #3a2416;
    --bronze-ink: #eab48c;
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500;
    --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-other: #77776f;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
h1, h2, h3, h4 { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
dl, dd { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.muted { color: var(--muted); font-size: .85rem; font-weight: normal; }
.error { color: var(--error); }

/* Top bar */
.topbar { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1100; }
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { color: var(--accent-ink); font-weight: 900; font-size: 1.6rem; letter-spacing: -.02em; font-style: italic; }
/* Sections, like Strava's header: full-height links underlined in the accent when active. */
.main-nav { display: flex; align-self: stretch; margin-left: 20px; margin-right: auto; }
.main-nav a {
  display: flex; align-items: center; padding: 0 16px; font-size: .95rem; color: var(--muted);
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
[x-cloak] { display: none !important; }
.btn {
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius);
  padding: 8px 16px; font-weight: 600; font-size: .9rem;
}
.btn:not(:disabled):hover { filter: brightness(.9); }

/* Feed on the left, running and cycling summaries on the right. */
.layout {
  max-width: 1200px; margin: 0 auto; padding: 24px 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start;
}
.col-sports { position: sticky; top: 80px; display: grid; gap: 16px; max-height: calc(100vh - 96px); overflow-y: auto; padding-bottom: 4px; }
.col-feed { display: grid; gap: 16px; min-width: 0; }
.col-feed > *, .detail > * { min-width: 0; }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .col-sports { position: static; max-height: none; overflow: visible; order: -1; }
}

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0; }

/* Sign-in */
.sign-in { min-height: calc(100vh - 57px); display: grid; place-items: center; padding: 24px 16px; }
.sign-in-card { width: 100%; max-width: 380px; display: grid; gap: 16px; padding: 24px; }
.sign-in-head { display: grid; gap: 4px; }
.sign-in-head h1 { font-size: 1.4rem; }
.sign-in-card .btn { padding: 10px 16px; font-size: .95rem; }
.sign-in-card .error { margin: 0; font-size: .9rem; }
.sign-in-note { margin: 0; line-height: 1.45; }
.sign-in-form { display: grid; gap: 16px; }
/* The form and the MFA field use `hidden` rather than x-show (which waits for the next frame),
   so the code field can take the focus as soon as it is back. */
.sign-in-form[hidden], .field[hidden] { display: none; }

/* Sign-in progress: a map drawn after an activity map, with a run drawn then erased (SMIL, see index.html). */
.sign-in-progress { display: grid; gap: 16px; }
.trace-map { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
/* Colors of the MapTiler Dataviz basemap used on activity maps. */
.trace-map { --map-land: #f5f5f4; --map-road: #fff; --map-road-edge: #e2e2e0; --map-path: #c9c9c7; --map-building: #e8e8e6; --map-label: #8a8a88; }
.map-land { fill: var(--map-land); }
.map-buildings rect { fill: var(--map-building); }
.map-river { fill: none; stroke: var(--map-path); stroke-width: 1; }
.map-roads path { fill: none; stroke: var(--map-road); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; paint-order: stroke; filter: drop-shadow(0 0 .4px var(--map-road-edge)); }
.map-paths path { fill: none; stroke: var(--map-path); stroke-width: 1.2; stroke-dasharray: 5 2 1 2; stroke-linecap: round; stroke-linejoin: round; }
.map-label { fill: var(--map-label); font-size: 7px; font-weight: 500; text-anchor: middle; }
.trace-casing, .trace-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; }
.trace-casing { stroke: #fff; stroke-width: 4.5; opacity: .9; }
.trace-line { stroke: var(--accent); stroke-width: 2.6; }
.trace-start { fill: #16a34a; stroke: #fff; stroke-width: 1.5; }
.trace-head { fill: #1c1f24; stroke: #fff; stroke-width: 1.5; }
.sign-in-stage { display: grid; gap: 4px; text-align: center; min-height: 4.5em; align-content: start; }
.sign-in-stage strong { font-size: 1rem; line-height: 1.4; }
.field { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.field input {
  font: inherit; font-weight: normal; padding: 10px 12px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.notice { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); font-size: .9rem; }
.link-btn { justify-self: center; color: var(--accent-ink); font-size: .85rem; }
.link-btn:not(:disabled):hover { text-decoration: underline; }

/* User menu */
.history { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); min-width: 150px; }
.progress { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); transition: width .4s; }

.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--bg); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; background: var(--accent); color: var(--on-accent);
}
.user-name { font-weight: 600; font-size: .9rem; }
.chevron { color: var(--muted); font-size: .75rem; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 280px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / .14); padding: 16px;
}
.menu-title { display: block; font-weight: 700; margin-bottom: 12px; }
.menu-label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.menu-account { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.menu-item { display: block; width: 100%; text-align: left; padding: 4px 0; font-weight: 600; font-size: .9rem; }
.menu-item:hover { color: var(--accent-ink); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch-btn {
  width: 24px; height: 24px; border-radius: 50%; background: var(--swatch);
  box-shadow: 0 0 0 2px var(--card), 0 0 0 3px transparent; position: relative;
}
.swatch-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--swatch); }
.swatch-btn.custom {
  background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444);
  cursor: pointer; overflow: hidden;
}
.swatch-btn.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.menu-group { margin-top: 14px; }
.map-styles { display: flex; gap: 6px; flex-wrap: wrap; }
.map-style-btn {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .82rem; color: var(--text);
}
.map-style-btn:hover { border-color: var(--accent-ink); }
.map-style-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Weekly streak banner: same layout as the activity callouts below. */
.streak { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
/* Not extended yet this week: the flame waits in grey. */
.streak.pending .callout-icon { background: var(--bg); color: var(--muted); }
/* Activity callouts (records, streak): grey block that stands apart from the stats, like
   Strava's achievements. The icon badge wears the accent color. */
.callout {
  display: flex; align-items: center; gap: 16px; margin-top: 16px;
  background: var(--bg); border-radius: var(--radius); padding: 16px 20px;
}
.callout-icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent); color: var(--on-accent);
}
.callout-text { display: grid; gap: 6px; min-width: 0; }
.callout-text strong { font-size: 1.05rem; }
.callout-text > span { color: var(--muted); font-size: .9rem; }
/* Chips need their own fill to show on grey. */
.callout .chip { background: var(--card); }
/* Inside the detail grid, the gap already spaces it from the map; kept tight under it. */
.detail .callout { margin-top: 0; padding: 12px 16px; }
.detail .callout-text { gap: 4px; }

/* Month navigation */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.month-label { text-align: center; }
.month-label h2 { font-size: 1.6rem; letter-spacing: -.01em; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.icon-btn:not(:disabled):hover { background: var(--bg); color: var(--accent-ink); }
.empty-month { text-align: center; padding: 32px 16px; }

/* Activity cards */
.activity { padding: 20px; }
.activity-meta { display: flex; gap: 12px; align-items: center; font-size: .9rem; }
.activity-meta .muted { font-size: .8rem; }
.icon { display: block; flex: none; }
.sport-badge {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent-ink);
}
.sport-badge.small { width: 32px; height: 32px; }
.activity-title { font-size: 1.5rem; margin: 14px 0 12px; line-height: 1.25; }
.stats { display: flex; flex-wrap: wrap; gap: 0; }
.stats div { padding-right: 20px; margin-right: 20px; border-right: 1px solid var(--border); }
.stats div:last-child { border-right: 0; }
.stats dt { font-size: .75rem; color: var(--muted); }
.stats dd { font-size: 1.25rem; font-weight: 500; margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: .8rem; }
/* Records of an activity: one per line, columns aligned across lines. */
.record-list {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto auto auto auto 1fr;
  gap: 2px 10px; align-items: center; font-size: .9rem; line-height: 1.35;
}
.record { display: contents; }
.medal {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid; font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.record-period { color: var(--muted); font-size: .8rem; }
.record-name { font-weight: 600; }
.record-value { font-variant-numeric: tabular-nums; }
.record-previous { color: var(--muted); font-size: .8rem; min-width: 0; }
/* Phones: the trophy gives its width to the records, the previous record drops under its line. */
@media (max-width: 560px) {
  .detail .callout .callout-icon { display: none; }
  .record-list { grid-template-columns: auto auto auto 1fr; row-gap: 0; }
  .record-value { justify-self: end; }
  .record-previous { grid-column: 2 / -1; margin-bottom: 4px; }
}
/* Podium metals: fill and number in a readable ink of the same family. */
.metal-gold { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-ink); }
.metal-silver { background: var(--silver-bg); border-color: var(--silver); color: var(--silver-ink); }
.metal-bronze { background: var(--bronze-bg); border-color: var(--bronze); color: var(--bronze-ink); }
.badge-month { background: var(--card); border-color: var(--muted); color: var(--muted); }

.detail { display: grid; gap: 14px; margin-top: 16px; }
.map { height: 280px; border-radius: var(--radius); border: 1px solid var(--border); z-index: 0; }
.link-btn { color: var(--accent-ink); font-weight: 600; font-size: .85rem; justify-self: start; }
.link-btn:hover { text-decoration: underline; }

/* Heart-rate chart */
/* Run splits: one row per kilometre, the bar grows with speed. */
.splits h4 { font-size: 1.1rem; margin-bottom: 8px; }
.splits table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.splits th { text-align: left; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 0 6px; border-bottom: 1px solid var(--border); }
.splits td { padding: 3px 0; }
.splits tbody tr:first-child td { padding-top: 8px; }
.splits th:first-child, .splits td:first-child { width: 48px; }
.splits .pace { width: 64px; }
.splits .bar-cell { padding-right: 16px; }
.split-bar { display: block; height: 14px; border-radius: 3px; background: var(--accent); }
.splits .num { text-align: right; width: 56px; }
.hr-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.hr-head h4 { font-size: 1.1rem; }
.chart { position: relative; touch-action: none; }
/* Fluid width: the SVG must never hold its container open when the window shrinks. */
.chart svg { display: block; overflow: visible; width: 100%; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .avg { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; }
.chart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }

.tooltip {
  position: absolute; top: -8px; transform: translate(-50%, -100%); pointer-events: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; font-size: .8rem; white-space: nowrap; display: flex; gap: 8px;
  box-shadow: 0 4px 12px rgb(0 0 0 / .12); z-index: 1000;
}

/* Sport cards */
.tabs { display: flex; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; gap: 4px; }
.tabs button { flex: 1; color: var(--muted); padding: 8px 12px; font-size: .85rem; font-weight: 600; border-radius: 4px; }
.tabs button.active { background: var(--accent); color: var(--on-accent); }

.sport { display: grid; gap: 10px; }
.sport-head { display: flex; justify-content: space-between; align-items: baseline; }
.sport-head h2 { font-size: 1.05rem; }
.sport-title { display: flex; align-items: center; gap: 10px; }
.sport-total { font-size: 1.25rem; }
.sport-sub { display: flex; justify-content: space-between; align-items: baseline; }
.empty-note { margin: 4px 0; }

.legend { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.legend button { display: flex; align-items: center; gap: 6px; font-size: .8rem; padding: 2px 0; }
.legend button.off { opacity: .6; }
.legend button.off .swatch { background: transparent !important; outline: 2px solid var(--muted); outline-offset: -2px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }

.bars { position: relative; height: 150px; padding: 0 0 20px 32px; margin-top: 4px; }
.bars-grid { position: absolute; inset: 0 0 20px 32px; pointer-events: none; }
.bars-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.bars-tick span { position: absolute; right: calc(100% + 6px); top: -7px; font-size: 11px; color: var(--muted); }
.bars-plot { position: relative; height: 100%; display: flex; gap: 2px; justify-content: space-around; }
.bar-col { flex: 1; min-width: 0; max-width: 40px; height: 100%; display: flex; flex-direction: column; position: relative; }
.bar-col.hovered { background: color-mix(in srgb, var(--muted) 12%, transparent); border-radius: 4px 4px 0 0; }
.bar-stack { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; }
.bar-seg { min-height: 1px; }
.bar-seg:last-child { border-radius: 4px 4px 0 0; }
.bar-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); padding-top: 4px; white-space: nowrap; }
.bars-tooltip { top: 0; flex-direction: column; gap: 2px; min-width: 150px; }
.tooltip-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 6px; align-items: center; }
.tooltip-row.total { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 4px; font-weight: 600; }

.volume-table { overflow-x: auto; font-size: .8rem; }
.volume-table table { border-collapse: collapse; width: 100%; }
.volume-table th, .volume-table td { white-space: nowrap; padding: 4px 10px 4px 0; text-align: left; border-bottom: 1px solid var(--border); font-weight: normal; }

.records-title { margin: 8px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }
.records { width: 100%; border-collapse: collapse; font-size: .9rem; }
.records th { text-align: left; font-weight: 500; width: 72px; }
.records td, .records th { padding: 6px 0; border-bottom: 1px solid var(--border); }
.records tr:last-child td, .records tr:last-child th { border-bottom: 0; }
.records .value { font-weight: 700; }
.records td.muted { text-align: right; }
.records td.date { text-align: right; width: 84px; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.records tr.empty th, .records tr.empty .value { color: var(--muted); font-weight: normal; }

/* Health page */
.health { max-width: 1200px; margin: 0 auto; padding: 24px 16px; display: grid; gap: 16px; }
.health-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.health-head h1 { font-size: 1.6rem; letter-spacing: -.01em; }
.health-head .tabs { min-width: 220px; }
.health-body { display: grid; gap: 16px; }
.health-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.tile { display: grid; gap: 2px; align-content: start; }
.tile dt { font-size: .8rem; color: var(--muted); }
.tile-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.health-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.health-chart { display: grid; gap: 8px; }
.health-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.health-chart-head h2 { font-size: 1.05rem; }
.health-chart-head .legend li { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.health-chart .chart { min-height: 170px; }
.chart .bar { fill: var(--accent); }
.chart .goal { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .hover-band { fill: color-mix(in srgb, var(--muted) 12%, transparent); }
.chart .dot.focus { stroke-width: 2; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }
@media (max-width: 800px) {
  .health-charts { grid-template-columns: minmax(0, 1fr); }
}

/* Admin page */
.admin { max-width: 960px; margin: 0 auto; padding: 24px 16px; display: grid; gap: 16px; align-content: start; }
.admin h1 { font-size: 1.6rem; letter-spacing: -.01em; }
.admin-section { display: grid; gap: 16px; }
.admin-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.admin-section-head h2 { font-size: 1.05rem; margin-bottom: 4px; }
.admin-section-head .muted { margin: 0; line-height: 1.45; }
.admin-section .error { margin: 0; font-size: .9rem; }
.admin-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.admin-config .records th { width: 110px; }
.admin-config .records td.muted { text-align: left; }
.admin-emails { list-style: none; margin: 8px 0 0; padding: 0; font-size: .9rem; }
.admin-emails li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.admin-emails li:last-child { border-bottom: 0; }
.admin-tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.admin-note { margin: 8px 0 0; line-height: 1.45; }
@media (max-width: 720px) {
  .admin-config { grid-template-columns: minmax(0, 1fr); }
}

/* Last so it wins over the component rules above. */
@media (max-width: 640px) {
  .user-name, .chevron, .history { display: none; }
  .btn { padding: 8px 12px; }
  /* The sections get their own row under the logo. */
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 8px; row-gap: 0; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 -16px; height: 44px; }
  .health, .admin { padding-top: 16px; }
}

/* A dark accent would vanish on dark surfaces: data lines use the lighter accent ink. */
@media (prefers-color-scheme: dark) {
  .chart .series { stroke: var(--accent-ink); }
  .chart .dot { fill: var(--accent-ink); }
  .progress-bar { background: var(--accent-ink); }
  .chart .bar { fill: var(--accent-ink); }
  .trace-line { stroke: var(--accent-ink); }
  .trace-map { --map-land: #1f2227; --map-road: #353a42; --map-road-edge: #2a2e35; --map-path: #4b5059; --map-building: #282c32; --map-label: #8b919a; }
}
