/* Panel layout on top of assets/brand/altegio-docs.css (tokens, tables, tooltips).
   Dense dashboard: 1px lines instead of card boxes, one radius (8px), numbers in mono. */

@font-face { font-family: "Inter"; src: url("/fonts/Inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-cyrillic.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0400-04FF; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--fg); font: 15px/1.5 var(--font); }
a { color: inherit; }
.num, td.num, .tile-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 4px; box-shadow: 0 0 0 5px var(--alt-yellow); }
.bar :focus-visible { outline-color: var(--alt-yellow); box-shadow: none; }
/* Light theme: darker status/caption text and chart grey so text passes 4.5:1 and marks 3:1 on white.
   Dark-theme values in assets/brand/altegio-docs.css win by specificity. */
:root { --ok: #057a40; --warn: #8a5a00; --fg-3: #6e6e7e; --chart-3: #7d7d8c; }

/* top bar */
.bar { background: var(--surface-dark); color: var(--fg-on-dark); }
.bar-in { max-width: 1400px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; white-space: nowrap; }
.brand img { height: 20px; width: auto; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--fg-on-dark-3); font-weight: 500; white-space: nowrap; transition: color .15s, background .15s; }
.nav a:hover { color: var(--fg-on-dark); }
.nav a[aria-current="page"] { background: var(--alt-yellow); color: var(--alt-ink); }
.theme-btn { background: none; border: 1px solid var(--surface-dark-3); color: var(--fg-on-dark-3); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; min-height: 32px; }
.theme-btn:hover { color: var(--fg-on-dark); }

/* page */
main { max-width: 1400px; margin: 0 auto; padding: 24px 24px 64px; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.head h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.head p { margin: 4px 0 0; color: var(--fg-2); font-size: 0.875rem; }
.filters { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.filters label { display: grid; gap: 2px; font-size: 12px; color: var(--fg-2); font-weight: 500; }
.filters select, .filters input, .btn, textarea { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--fg-3); border-radius: 8px; padding: 6px 10px; min-height: 36px; }
.btn { cursor: pointer; font-weight: 600; background: var(--alt-yellow); color: var(--alt-ink); border-color: var(--alt-yellow); }
.btn:hover { background: var(--alt-yellow-hover); }
.btn:active { transform: translateY(1px); }

section { padding: 24px 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }
section > h2 { margin: 0 0 4px; font-size: 1rem; font-weight: 650; }
section > .sub { margin: 0 0 16px; color: var(--fg-2); font-size: 0.875rem; max-width: 80ch; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.grid2 > div > h3, .multi h3 { margin: 0 0 8px; font-size: 0.875rem; font-weight: 600; }
.multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 32px; }

/* KPI tiles: plain layout, separated by lines, no boxes */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tile-label { font-size: 12px; color: var(--fg-2); font-weight: 500; }
.tile-value { font-size: 1.75rem; font-weight: 600; line-height: 1.2; margin-top: 4px; }
.tile-meta { font-size: 12px; color: var(--fg-2); margin-top: 4px; }
.tile.focus { box-shadow: inset 0 3px 0 var(--alt-yellow); }

/* status text: never colour alone, always a word */
.st { font-family: var(--font); font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-bad { color: var(--bad); }
.st-warn { color: var(--warn); }
.st-ok { color: var(--ok); }
.st-muted { color: var(--fg-3); }
td .st { margin-left: 6px; }

/* charts */
.chart { position: relative; min-height: 120px; }
.chart svg { display: block; overflow: visible; }
.chart text { fill: var(--fg-2); font-size: 11px; font-family: var(--font); }
.chart .t-strong { fill: var(--fg); font-weight: 600; }
.chart .t-num { font-variant-numeric: tabular-nums; } /* Inter: JetBrains Mono's dotted zero reads as 8 at 11px */
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--fg-2); margin: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 0; }
details.tbl { margin-top: 8px; font-size: 13px; }
details.tbl summary { cursor: pointer; color: var(--fg-2); font-size: 12px; }
.empty { padding: 24px 0; color: var(--fg-2); font-size: 0.9375rem; }

.alt-table td.lft, .alt-table th.lft { text-align: left; }
.alt-table td a { text-decoration: none; font-weight: 600; }
.alt-table td a:hover { text-decoration: underline; }
.alt-table tr.focus td { background: var(--alt-yellow-soft); }

/* notes */
.notes { display: grid; gap: 12px; max-width: 80ch; }
.note { border-left: 2px solid var(--line-strong); padding: 2px 0 2px 12px; }
.note time { display: block; font-size: 12px; color: var(--fg-3); }
.note p { margin: 2px 0 0; white-space: pre-wrap; }
form.note-form { display: grid; gap: 8px; max-width: 80ch; margin-top: 16px; }
form.note-form label { font-size: 12px; font-weight: 600; color: var(--fg-2); }
textarea { min-height: 80px; resize: vertical; }
.err { color: var(--bad); font-size: 13px; }

.foot { color: var(--fg-3); font-size: 12px; padding-top: 16px; }

@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 1280px) { .brand span { display: none; } .bar-in { gap: 16px; } }
@media (max-width: 640px) {
  .bar-in { padding: 8px 16px 0; gap: 8px 12px; height: auto; flex-wrap: wrap; justify-content: space-between; }
  .nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
  .brand span { display: none; }
  main { padding: 16px 16px 48px; }
  .tile-value { font-size: 1.375rem; }
  .theme-btn { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Magnitude ramp for dark surfaces: ink on near-black is invisible, so the ramp runs light-to-dark instead.
   Same selectors as assets/brand/altegio-docs.css so the manual theme toggle wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --chart-1: #e6e8ee; --chart-2: #a7aab8; --chart-3: #6b6d7c; --chart-4: #3a3a4a; --heat: #e6e8ee; }
}
:root[data-theme="dark"] { --chart-1: #e6e8ee; --chart-2: #a7aab8; --chart-3: #6b6d7c; --chart-4: #3a3a4a; --heat: #e6e8ee; }
:root { --heat: var(--alt-ink); }

/* language + theme buttons */
.bar-tools { display: flex; gap: 8px; align-items: center; }
.lang-btn { text-decoration: none; font-weight: 600; letter-spacing: .02em; display: inline-flex; align-items: center; }

/* KPI values coloured by tier; the word is in the tooltip and for screen readers */
.kv { font-weight: 600; }
.kv-bad { color: var(--bad); } .kv-warn { color: var(--warn); } .kv-ok { color: var(--ok); } .kv-stretch { color: var(--stretch); }
:root { --stretch: #0062cc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --stretch: #4da3ff; } }
:root[data-theme="dark"] { --stretch: #4da3ff; }
.th-target { font-weight: 500; color: var(--fg-3); font-size: 11px; }
.kv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--fg-2); margin: 8px 0 0; }
.kv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kv-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; background: currentColor; }
.kv-legend .kv-levels { color: var(--fg-3); }
.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; }

/* help balloon next to headings */
.help { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 999px;
  border: 1px solid var(--fg-3); color: var(--fg-2); font-size: 11px; font-weight: 700; cursor: help; vertical-align: 2px; }
.help-pop { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(calc(-50% + var(--pop-dx, 0px))); z-index: 20; width: max-content; max-width: min(420px, 80vw);
  background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow);
  padding: 10px 12px; font-size: 13px; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal;
  clip: rect(0 0 0 0); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.help:hover .help-pop, .help:focus .help-pop, .help:focus-within .help-pop { clip: auto; clip-path: none; width: max-content; height: auto; overflow: visible; }
.alt-table th.lft { white-space: nowrap; }

/* month over month */
.chart.spark { min-height: 34px; margin-top: 8px; }
.mom td, .mom th { white-space: nowrap; }

/* journeys: wide charts scroll sideways on narrow screens */
.hscroll { overflow-x: auto; overscroll-behavior-x: contain; margin-top: 16px; }
.chart.wide { min-width: 820px; }
.sub-h { margin: 20px 0 8px; font-size: 0.875rem; font-weight: 600; }
.chart .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.maps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.maps li { display: grid; gap: 2px; }
.maps a { font-weight: 600; }
.maps span { font-size: 12px; color: var(--fg-2); }
.stacked { display: grid; gap: 24px; }
.stacked h3 { margin: 0 0 8px; font-size: 0.875rem; font-weight: 600; }

/* agents scorecard: readable names and headers; levels live in the ? balloons */
.scorecard th[scope="col"] { font-size: 0.8125rem; color: var(--fg); font-weight: 600; white-space: normal; min-width: 7ch; line-height: 1.3; vertical-align: bottom; }
.scorecard th[scope="row"], .scorecard th[scope="row"] a { font-size: 0.9375rem; font-weight: 600; }
.scorecard .help { margin-left: 4px; vertical-align: 1px; }

/* settings: KPI targets table, compact and aligned */
.alt-table.targets { width: auto; min-width: min(100%, 640px); }
.targets th[scope="col"] { text-align: right; padding-right: 12px; }
.targets th[scope="col"].lft { text-align: left; }
.targets th[scope="row"] { font-size: 0.9375rem; font-weight: 600; color: var(--fg); padding-right: 32px; white-space: nowrap; }
.targets td { padding: 10px 12px; text-align: right; vertical-align: middle; }
.targets td.none { color: var(--fg-3); padding-right: 40px; }
.kpi-meta { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--fg-2); }
.lv { display: inline-flex; align-items: center; border: 1px solid var(--fg-3); border-radius: 8px; background: var(--surface); overflow: hidden; }
.lv:focus-within { outline: 2px solid var(--fg); outline-offset: 1px; box-shadow: 0 0 0 4px var(--alt-yellow); }
.lv input { width: 5ch; border: 0; background: transparent; color: var(--fg); font: 500 14px/1 var(--font-mono); text-align: right; padding: 8px 4px 8px 10px; min-height: 36px; }
.lv input:focus { outline: none; }
.lv .u { min-width: 3.2ch; padding: 0 10px 0 2px; font-size: 12px; color: var(--fg-2); }

/* shifts */
:root { --agent-1: #2a78d6; --agent-2: #eb6834; --agent-3: #1baf7a; --agent-4: #6250d6; --agent-5: #e87ba4; --agent-6: #008300; --agent-7: #eda100; --agent-8: #e34948; --agent-tint: 24%; --plot: var(--alt-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --agent-1: #3987e5; --agent-2: #d95926; --agent-3: #199e70; --agent-4: #9085e9; --agent-5: #d55181; --agent-6: #2f9e2f; --agent-7: #c98500; --agent-8: #e66767; --agent-tint: 38%; --plot: #c3c5d0; } }
:root[data-theme="dark"] { --agent-1: #3987e5; --agent-2: #d95926; --agent-3: #199e70; --agent-4: #9085e9; --agent-5: #d55181; --agent-6: #2f9e2f; --agent-7: #c98500; --agent-8: #e66767; --agent-tint: 38%; --plot: #c3c5d0; }
.st-bad { background: color-mix(in srgb, var(--bad-fill) 16%, transparent); color: var(--bad); }
.st-warn { background: color-mix(in srgb, var(--warn-fill) 22%, transparent); color: var(--warn); }
.st-ok { background: color-mix(in srgb, var(--ok-fill) 14%, transparent); color: var(--ok); }
.sh-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.sh-figs b { display: block; font: 600 26px/1.1 var(--font-mono); }
.sh-figs > div > span { font-size: 13px; color: var(--fg-2); }
.sh-figs .is-bad b { color: var(--bad); } .sh-figs .is-warn b { color: var(--warn); } .sh-figs .is-ok b { color: var(--ok); }
.sh-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.sh-roster { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.sh-who { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; padding: 3px 10px; white-space: nowrap; border-right: 1px solid var(--line); font-weight: 600; min-width: 128px; }
.sh-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; background: var(--ac); }
.sh-d { min-width: 37px; padding: 6px 0 4px; text-align: center; font-size: 11px; font-weight: 400; color: var(--fg-2); line-height: 1.2; }
.sh-d a { display: block; color: inherit; text-decoration: none; border-radius: 8px; }
.sh-d b { display: block; width: fit-content; margin: auto; padding: 0 5px; font: 600 13px var(--font-mono); color: var(--fg); border-radius: 999px; }
.sh-d.today b { background: var(--alt-yellow); color: var(--alt-ink); }
.sh-we { background: var(--surface-muted); }
.sh-sel { background: var(--alt-yellow-soft); }
.sh-c { padding: 1.5px; text-align: center; }
.sh-cell { display: block; min-height: 36px; border-radius: 6px; font: 500 10.5px/1.15 var(--font-mono); padding: 3px 0; color: var(--fg); text-decoration: none; }
.sh-cell.work { background: color-mix(in srgb, var(--ac) var(--agent-tint), var(--surface)); box-shadow: inset 0 -2px 0 var(--ac); }
.sh-cell.noshow { box-shadow: inset 0 0 0 2px var(--bad); }
.k-ns { width: 14px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--bad); }
.sh-cell.off, .sh-cell.none { color: var(--fg-3); font-size: 14px; }
.sh-cell.leave, .sh-cell.away { background: repeating-linear-gradient(135deg, var(--surface-muted) 0 4px, var(--line-strong) 4px 7px); color: var(--fg-2); font: 400 9.5px/1.2 var(--font); padding-top: 11px; }
.sh-cell.sick { background: color-mix(in srgb, var(--bad-fill) 16%, transparent); color: var(--bad); font: 400 9.5px/1.2 var(--font); padding-top: 11px; }
.sh-n { padding: 3px 8px; text-align: right; font: 500 13px var(--font-mono); white-space: nowrap; border-left: 1px solid var(--line); }
th.sh-n { font: 400 11px var(--font); color: var(--fg-2); }
.sh-sum td { border-top: 1px solid var(--line-strong); }
.sh-sum .sh-who { font-weight: 500; font-size: 12px; color: var(--fg-2); }
.sh-v { font: 500 11px var(--font-mono); padding: 5px 0; text-align: center; }
.sh-key { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 12px; color: var(--fg-2); align-items: center; margin-top: 8px; }
.sh-pill { border-radius: 999px; padding: 2px 9px; }
.sh-key i { display: inline-block; margin-right: 6px; vertical-align: middle; }
.k-b { width: 10px; height: 12px; background: var(--plot); border-radius: 2px; } .k-c { width: 16px; border-top: 2px solid var(--alt-yellow); } .k-l { width: 16px; border-top: 1.5px dashed var(--fg-3); }
.sh-day { min-width: 860px; display: grid; grid-template-columns: 128px repeat(13, minmax(0, 1fr)) 70px; font-size: 12px; }
.sh-l { padding: 5px 10px; font-weight: 600; white-space: nowrap; border-right: 1px solid var(--line); display: flex; align-items: center; position: sticky; left: 0; z-index: 2; background: var(--surface); }
.sh-l.s { font-weight: 500; color: var(--fg-2); }
.sh-hh { text-align: center; color: var(--fg-2); font: 500 11px var(--font-mono); padding: 7px 0 4px; border-left: 1px solid var(--line); }
.sh-tt { padding: 5px 8px; text-align: right; font: 500 12px var(--font-mono); border-left: 1px solid var(--line); }
.sh-track { grid-column: 2 / 15; position: relative; height: 30px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / 13) 100%; }
.sh-bar { position: absolute; top: 4px; bottom: 4px; border-radius: 6px; background: var(--ac); color: #fff; font: 600 11px var(--font-mono); display: flex; align-items: center; padding-inline: 8px; white-space: nowrap; overflow: hidden; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.sh-none { position: absolute; left: 8px; top: 7px; color: var(--fg-3); }
.sh-plot { grid-column: 2 / 15; display: grid; grid-template-columns: repeat(13, 1fr); height: 150px; border-block: 1px solid var(--line-strong); }
.sh-pc { position: relative; border-left: 1px solid var(--line); }
.sh-pb { position: absolute; bottom: 0; left: 16%; right: 16%; background: var(--plot); border-radius: 4px 4px 0 0; }
.sh-pb.over { background: var(--bad-fill); }
.sh-pl { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--alt-yellow); }
.sh-pl.limit { border-top: 1.5px dashed var(--fg-3); }
.sh-vc { text-align: center; font: 500 11px var(--font-mono); padding: 5px 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.sh-l.bt, .sh-tt.bt { border-top: 1px solid var(--line); }
.sh-week { border-collapse: separate; border-spacing: 0; width: 100%; }
.sh-week td, .sh-week th { text-align: center; font: 500 12px var(--font-mono); padding: 6px 0; min-width: 44px; border-left: 1px solid var(--surface); border-top: 1px solid var(--surface); }
.sh-week th { color: var(--fg-2); font-size: 11px; }
.sh-week th.sh-who { font: 600 13px var(--font); color: var(--fg); min-width: 64px; }
.sh-rate { display: grid; grid-template-columns: minmax(150px, 1fr) 36px; gap: 8px; align-items: center; min-width: 210px; }
.sh-rt { height: 16px; position: relative; background: var(--surface-muted); border-radius: 4px; }
.sh-rt i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ac); border-radius: 4px; }
.sh-rt u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--fg); }
.sh-rt s { position: absolute; top: -3px; bottom: -3px; border-left: 1.5px dashed var(--fg-3); }

.sh-err { color: var(--bad); font-weight: 600; margin: 12px 0; }
.sh-forms { display: grid; gap: 10px; }
.sh-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin: 8px 0; }
.sh-form > b { min-width: 150px; align-self: center; }
.sh-form label { display: grid; gap: 3px; font-size: 13px; color: var(--fg-2); }
.sh-form input, .sh-form select { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; max-width: 100%; }
.sh-btn2 { background: transparent; border: 1px solid var(--line); color: var(--fg); }
.sh-btn2:hover { border-color: var(--line-strong); background: transparent; }
.sh-wk { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-wk label { display: flex; align-items: center; gap: 4px; }
.sh-abs { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.sh-abs li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sh-edit > summary { display: inline-block; list-style: none; }
.sh-edit > summary::-webkit-details-marker { display: none; }

/* Metrics page */
.bar-tools a[aria-current="page"] { color: var(--fg-on-dark); border-color: var(--alt-yellow); }
.mx-toc { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.mx-toc a { color: var(--fg); text-decoration: none; } .mx-toc a:hover { text-decoration: underline; text-decoration-color: var(--alt-yellow); }
.mx-sec { scroll-margin-top: 16px; }
.mx-rules { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 1.2em; max-width: 78ch; }
.mx { display: grid; gap: 8px; padding-block: 20px; border-top: 1px solid var(--line); }
.mx h3 { margin: 0; }
.mx-f { font: 500 13px/1.5 var(--font-mono); background: var(--surface-muted); border-left: 3px solid var(--alt-yellow); padding: 6px 12px; border-radius: 0 8px 8px 0; width: fit-content; max-width: 78ch; overflow-wrap: anywhere; margin: 0; }
.mx dl { display: grid; grid-template-columns: 180px minmax(0, 72ch); gap: 4px 16px; margin: 4px 0 0; }
.mx dt { color: var(--fg-2); font-size: 13px; padding-top: 2px; } .mx dd { margin: 0; }
.mx code { font: .85em var(--font-mono); overflow-wrap: anywhere; }
@media (max-width: 640px) { .mx dl { grid-template-columns: minmax(0, 1fr); gap: 0; } .mx dd { margin-bottom: 10px; } }


/* Daily page */
.dl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dl-card, .dl-tile { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface-card); min-width: 0; }
.dl-card h3, .dl-tile h4 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.dl-big { font: 700 28px/1.2 var(--font-mono); margin: 6px 0 2px; }
.dl-big small, .dl-val small { font: 400 12px var(--font); color: var(--fg-3); margin-left: 8px; }
.dl-pace { font-size: 13px; margin: 2px 0 6px; min-height: 38px; color: var(--fg-2); }
.dl-cat { margin: 20px 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.dl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.dl-val { font: 600 20px/1.2 var(--font-mono); margin: 6px 0 4px; }
.dl-ph { opacity: .75; }
.dl-focus { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.muted { color: var(--fg-3); }
@media (max-width: 1000px) { .dl-cards { grid-template-columns: 1fr; } }
/* charts sit on one baseline in a row of tiles, whatever the title and value wrap to */
.dl-card, .dl-tile { display: flex; flex-direction: column; }
.dl-card > .chart, .dl-tile > .chart { margin-top: auto; }
.dl-card > .chart-data { order: 2; }
.dl-split { font-size: 12px; color: var(--fg-2); margin: 0 0 6px; }
