/* ==========================================================================
   Daddypie training log
   Flat colour, hairline rules, type does the work.
   ========================================================================== */

@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
    --bg: #11110f;
    --raised: #191917;
    --line: #2a2926;
    --line-strong: #3b3a36;
    --text: #ebe8e1;
    --muted: #918d84;
    --faint: #5f5c56;
    --hr: #f0505c;
    --up: #b9e04c;
    --down: #a8a29a;

    --display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
    font: 400 15px/1.5 var(--sans);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

/* Small uppercase mono labels used everywhere for metadata */
.label, .kicker, dt, .section-note, .masthead-sub, .status, .axis-label, .tag {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.unit {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-left: 0.5em;
    text-transform: lowercase;
}

.tag {
    display: inline-block;
    padding: 1px 5px;
    color: var(--bg);
    background: var(--sport, var(--muted));
    letter-spacing: 0.08em;
    line-height: 1.5;
}

/* ---------- Boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; }
.boot-bar { display: block; width: 120px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.boot-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--blazor-load-percentage, 10%);
    background: var(--text);
    transition: width 0.2s linear;
}

.wordmark {
    font-family: var(--display);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1;
}
.wordmark-lg { font-size: 64px; }

/* ---------- Masthead ---------- */
.masthead {
    display: flex;
    align-items: baseline;
    gap: 18px;
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 22px clamp(16px, 4vw, 40px) 14px;
    padding-top: max(22px, env(safe-area-inset-top));
    border-bottom: 2px solid var(--text);
}
.nav { display: flex; gap: 22px; margin-left: 28px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); box-shadow: 0 2px 0 var(--text); }
.masthead-status { margin-left: auto; display: flex; align-items: baseline; gap: 14px; }
.status-live::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 7px;
    background: var(--up);
    vertical-align: 1px;
}

.text-btn {
    background: none;
    border: 0;
    padding: 0;
    font: 500 13px var(--sans);
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 3px;
    cursor: pointer;
}
.text-btn:hover { text-decoration-color: var(--text); }
.text-btn:disabled { color: var(--muted); cursor: default; }

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--text);
    background: var(--text);
    color: var(--bg);
    font: 600 14px var(--sans);
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: transparent; color: var(--text); }
.btn:disabled { opacity: 0.5; cursor: default; }

.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: 400 15px var(--sans);
}
.input:focus { outline: none; border-color: var(--text); }
.input-sm { width: 76px; padding: 4px 8px; font-family: var(--mono); font-size: 13px; }

/* ---------- Page ---------- */
.page {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px) 64px;
}

.note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.note a { color: var(--text); }

/* ---------- Filters ---------- */
.filters {
    display: flex;
    justify-content: space-between;
    gap: 12px 24px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.tabs { display: flex; gap: 18px; flex-wrap: wrap; }
.tab {
    font: 500 13px var(--sans);
    color: var(--muted);
    text-decoration: none;
    padding: 2px 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); box-shadow: 0 2px 0 var(--sport, var(--text)); }

/* ---------- Lead: the count ---------- */
.lead {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 40px;
    padding: 36px 0 28px;
    align-items: end;
}
.big-number {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(120px, 19vw, 240px);
    line-height: 0.8;
    letter-spacing: -0.02em;
    margin: 18px 0 26px -0.04em;
}
.facts { display: flex; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 10px 18px 0 0; margin-right: 18px; border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; margin-right: 0; }
.facts dd { margin: 2px 0 0; font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.1; }

.tally { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.tally-group { display: block; overflow: visible; }
.tally-mark {
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw 0.35s ease-out forwards;
}
.tally-mark:hover { stroke: var(--text); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tally-key { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* ---------- Goal ---------- */
.goal { padding: 20px 0 28px; border-top: 1px solid var(--line); }
.goal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 30px; }
.goal-title { display: flex; align-items: baseline; gap: 12px; }
.goal-title strong { font-family: var(--display); font-size: 24px; font-weight: 600; }
.goal-form { display: flex; align-items: center; gap: 10px; }
.goal-notes { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.goal-notes strong { color: var(--text); font-weight: 600; }
.goal-notes strong.up { color: var(--up); }
.goal-notes strong.down { color: var(--down); }

.ruler { position: relative; }
.ruler-track { position: relative; height: 10px; background: var(--raised); border: 1px solid var(--line); }
.ruler-fill { height: 100%; background: var(--text); animation: grow-x 1s cubic-bezier(0.3, 0.7, 0.2, 1) both; transform-origin: left; }
.ruler-pace { position: absolute; top: -6px; bottom: -6px; width: 4px; margin-left: -2px; background: var(--bg); border: 1px solid var(--text); }
.ruler-pace span {
    position: absolute;
    top: -18px;
    left: 6px;
    white-space: nowrap;
    font: 500 11px var(--mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}
.ruler-scale { position: relative; height: 18px; margin-top: 6px; }
.ruler-scale span { position: absolute; transform: translateX(-50%); font: 400 11px var(--mono); color: var(--faint); }
.ruler-scale span:first-child { transform: none; }
.ruler-scale span:last-child { transform: translateX(-100%); }
@keyframes grow-x { from { transform: scaleX(0); } }

/* ---------- Figures ---------- */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--text); border-bottom: 1px solid var(--line); }
.figure { padding: 16px 18px 18px; border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; padding-left: 0; }
.figure-value { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1; margin: 10px 0 6px; }
.figure-sub { font-size: 13px; color: var(--muted); }
.figure-hr .figure-value { color: var(--hr); }

/* ---------- Sections ---------- */
.block { padding: 34px 0 6px; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 20px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.section-head h2, .block > h2, .columns h2 {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.005em;
}
.section-note { text-transform: none; letter-spacing: 0.02em; }
.section-link { font-size: 13px; color: var(--text); }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }

/* ---------- Sports ---------- */
.sports { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 32px; }
.sport { display: block; padding-top: 14px; border-top: 3px solid var(--sport); text-decoration: none; }
.sport:hover .sport-name, .sport.active .sport-name { text-decoration: underline; text-underline-offset: 4px; }
.sport-head { display: flex; align-items: center; gap: 10px; }
.sport-name { font-weight: 600; }
.sport-count { font-family: var(--display); font-size: 64px; font-weight: 600; line-height: 1; margin: 14px 0 12px; }
.spec { margin: 0; }
.spec > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.spec dd { margin: 0; font-size: 14px; }

.also { margin-top: 26px; }
.also-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0 32px; }
.also-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 3.5rem; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; }
.also-list a:hover .also-name { text-decoration: underline; text-underline-offset: 3px; }
.also-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.also-num { font: 400 13px var(--mono); text-align: right; }

.tab-more {
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: 500 13px var(--sans);
    cursor: pointer;
}
.tab-more:hover, .tab-more:focus { color: var(--text); outline: none; }
.tab-more option { background: var(--raised); color: var(--text); }

/* ---------- Charts (shared) ---------- */
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis-label { fill: var(--faint); font-size: 11px; letter-spacing: 0.04em; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.chart-empty { fill: var(--muted); font: 14px var(--sans); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; display: inline-block; flex: none; }

/* Monthly bars */
.bar-stack { animation: rise-y 0.6s cubic-bezier(0.3, 0.7, 0.2, 1) both; animation-delay: var(--delay); transform-box: fill-box; transform-origin: bottom; }
@keyframes rise-y { from { transform: scaleY(0); } }
.bar-hit { fill: transparent; }
.bar-group:hover .bar-hit { fill: rgba(235, 232, 225, 0.04); }
.bar-value { fill: var(--text); font: 600 15px var(--display); }
.bar-future { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.is-current .month-label { fill: var(--text); }

.split { display: flex; gap: 2px; margin-top: 8px; }
.split-caption { margin-top: 24px; }
.split-part { min-width: 0; height: 6px; background: var(--sport); }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.split-legend li { display: inline-flex; align-items: center; gap: 6px; }
.split-legend b { color: var(--text); font-weight: 600; }

/* Calendar */
.heatmap-scroll { overflow-x: auto; scrollbar-width: thin; }
.heatmap { min-width: 760px; }
.day { cursor: pointer; }
.day:hover { stroke: var(--text); stroke-width: 1; }
.day.is-today { stroke: var(--text); stroke-width: 1; }
.day.is-selected { stroke: var(--text); stroke-width: 2; }
.day-detail { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; }

/* Pace */
.trend-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.dot { fill: none; stroke-width: 1.4; stroke-opacity: 0.75; }
.dot:hover { stroke-opacity: 1; stroke-width: 2.4; }

/* Heart-rate strips */
.strip-label { fill: var(--text); font: 600 14px var(--sans); }
.strip-sub { fill: var(--muted); font: 400 11px var(--mono); }
.strip-base { stroke: var(--line); }
.strip-tick { stroke-width: 1.6; stroke-opacity: 0.55; }
.strip-tick:hover { stroke-opacity: 1; stroke-width: 3; }
.strip-median-halo { stroke: var(--bg); stroke-width: 7; }
.strip-median { stroke: var(--text); stroke-width: 2.5; }

/* Punch card */
.punch { fill-opacity: 0.9; }
.punch:hover { stroke: var(--text); stroke-width: 1.5; }

/* ---------- Notes & records ---------- */
.notes { list-style: none; counter-reset: note; margin: 0; padding: 0; }
.notes li {
    counter-increment: note;
    position: relative;
    padding: 0 0 14px 42px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.notes li::before {
    content: counter(note, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 1px;
    font: 500 12px var(--mono);
    color: var(--sport, var(--muted));
}
.notes h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.notes p { color: var(--muted); font-size: 14px; }

.records { width: 100%; border-collapse: collapse; }
.records th, .records td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.records th { font-weight: 600; font-size: 14px; }
.records-when { font-size: 13px; color: var(--muted); padding-left: 12px !important; white-space: nowrap; }
.records-value { text-align: right !important; font-family: var(--display); font-size: 24px; font-weight: 600; white-space: nowrap; }

/* ---------- Log rows ---------- */
.log { display: grid; }
.log-row {
    display: grid;
    grid-template-columns: 9.5rem minmax(9rem, 1.4fr) 5.5rem 6rem 7.5rem minmax(10rem, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.log-main, .log-metrics { display: contents; }
.log-row:hover { background: var(--raised); }
.log-date { font-weight: 500; }
.log-time { margin-left: 8px; font: 400 12px var(--mono); color: var(--muted); }
.log-sport { display: flex; align-items: baseline; gap: 10px; }
.log-sport .tag { background: var(--sport); }
.log-num { font-family: var(--mono); font-size: 13px; text-align: right; }
.log-dist { color: var(--muted); }
.log-row.compact { grid-template-columns: minmax(9rem, 1.4fr) 5.5rem 6rem 7.5rem minmax(10rem, 1fr); }
.log-row.compact .log-date { display: none; }

.month-group + .month-group { margin-top: 28px; }
.month-heading { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.month-heading > span:first-child { font-family: var(--display); font-size: 22px; font-weight: 600; }

/* ---------- Empty / unlock ---------- */
.empty { padding: 80px 0; display: grid; gap: 16px; justify-items: start; }
.empty h1 { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1.05; }
.empty p { color: var(--muted); }

.unlock { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.unlock-panel { width: min(400px, 100%); display: grid; gap: 18px; }
.unlock-lede { color: var(--muted); margin-top: -8px; }
.unlock-form { display: grid; gap: 6px; margin-top: 12px; }
.unlock-row { display: flex; }
.unlock-row .input { border-right: 0; }
.unlock-demo { justify-self: start; color: var(--muted); }
.error { color: var(--text); font-size: 14px; border-left: 2px solid var(--text); padding-left: 10px; }

/* ---------- Language ---------- */
.lang-root { display: contents; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line-strong); }
.lang-toggle button {
    padding: 2px 7px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: 500 11px var(--mono);
    letter-spacing: 0.08em;
    cursor: pointer;
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.active { background: var(--text); color: var(--bg); }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

/* ---------- Goal setup (first run) ---------- */
.setup { min-height: 100vh; display: grid; place-items: center; padding: 32px clamp(16px, 4vw, 40px); }
.setup-panel { width: min(560px, 100%); }
.setup-kicker { margin-top: 48px; padding-top: 12px; border-top: 2px solid var(--text); }
.setup-title { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 7vw, 64px); line-height: 1; margin: 14px 0 12px; }
.setup-lede { color: var(--muted); }
.setup-lede strong { color: var(--text); }
.setup-form { display: grid; gap: 6px; margin-top: 32px; }
.setup-input {
    width: 100%;
    padding: 0 0 6px;
    border: 0;
    border-bottom: 2px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: 600 clamp(96px, 18vw, 150px)/1 var(--display);
    letter-spacing: -0.02em;
    -moz-appearance: textfield;
    appearance: textfield;
}
.setup-input::-webkit-outer-spin-button, .setup-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.setup-input:focus { outline: none; border-bottom-color: var(--text); }
.setup-per-week { min-height: 22px; font-size: 14px; color: var(--muted); }
.setup-per-week strong { color: var(--text); }
.setup-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 22px 0 8px; }
.suggestion {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    text-align: left;
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--text);
    cursor: pointer;
}
.suggestion:hover { border-color: var(--text); }
.suggestion.active { background: var(--text); border-color: var(--text); }
.suggestion.active .label, .suggestion.active .suggestion-value { color: var(--bg); }
.suggestion-value { font: 600 28px/1 var(--display); }
.setup-submit { justify-self: start; margin-top: 14px; }
.setup-note { margin-top: 10px; font-size: 13px; color: var(--faint); }

/* ---------- Connect page ---------- */
.connect-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: end; padding-top: 40px; }
.connect-hero h1 { font-family: var(--display); font-size: 56px; font-weight: 600; line-height: 1; margin: 8px 0 14px; }
.connect-hero p { max-width: 60ch; }
.status-box { border-top: 2px solid var(--text); }
.status-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.block > h2, .columns > div > h2 { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.block p { max-width: 75ch; }
code { font-family: var(--mono); font-size: 0.88em; color: var(--text); background: var(--raised); padding: 1px 5px; word-break: break-all; }
.code-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.method { font: 500 11px var(--mono); letter-spacing: 0.08em; padding: 2px 6px; background: var(--text); color: var(--bg); }
.code {
    font: 400 13px/1.65 var(--mono);
    padding: 14px 16px;
    background: var(--raised);
    border-left: 2px solid var(--line-strong);
    overflow-x: auto;
    white-space: pre;
    margin: 10px 0 0;
}
.step-list { margin: 12px 0 0; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; max-width: 80ch; }
.step-list li { position: relative; padding-left: 42px; }
.step-list li:not(.sub) { counter-increment: step; }
.step-list li:not(.sub)::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; font: 500 12px/1.9 var(--mono); color: var(--muted); }
.step-list li.sub { padding-left: 64px; }
.step-list li.sub::before { content: "–"; position: absolute; left: 44px; color: var(--faint); }
.tip { margin-top: 20px; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); max-width: 80ch; }

/* ---------- Blazor error UI ---------- */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 16px;
    background: var(--text);
    color: var(--bg);
    font-size: 14px;
}
#blazor-error-ui .reload { margin: 0 10px; font-weight: 600; }
#blazor-error-ui .dismiss { cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .lead { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .figure:nth-child(3) { border-left: 0; padding-left: 0; }
    .figure:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .columns, .connect-hero { grid-template-columns: minmax(0, 1fr); }
    .log-row, .log-row.compact { display: block; }
    .log-main { display: flex; align-items: baseline; gap: 12px; }
    .log-main .log-date { order: 2; margin-left: auto; text-align: right; }
    .log-metrics { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 4px; }
    .log-metrics .log-num { text-align: left; color: var(--muted); }
    .log-metrics .log-num:first-child { color: var(--text); }
    .log-metrics .log-num:empty { display: none; }
}

@media (max-width: 640px) {
    .masthead { flex-wrap: wrap; gap: 8px 14px; }
    .nav { order: 3; width: 100%; margin-left: 0; }
    .masthead-sub, .hide-sm { display: none; }
    .facts { flex-wrap: wrap; }
    .facts dd { font-size: 22px; }
    .figure-value { font-size: 34px; }
    .figure { padding: 12px 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .tally-mark { stroke-dashoffset: 0; }
}
