:root {
    color-scheme: dark;
    --bg: #050817;
    --bg-2: #081b2b;
    --surface: rgba(10, 25, 44, 0.78);
    --surface-strong: rgba(13, 32, 55, 0.94);
    --surface-soft: rgba(16, 45, 78, 0.72);
    --ink: #ffffff;
    --text: #e7eef8;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --line-strong: rgba(34, 211, 238, 0.28);
    --accent: #22d3ee;
    --accent-2: #0ea5e9;
    --accent-3: #38bdf8;
    --good: #2dd4bf;
    --danger: #fb7185;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
    --glow: 0 0 28px rgba(34, 211, 238, 0.18);
}

/* Canonical training availability. Calendar days are derived client-side from
   the compact weekly profile and dated exceptions returned by the API. */
.availability-settings-card {
    display: grid;
    grid-template-columns: 48px minmax(220px, 1fr) minmax(360px, 1.35fr) auto;
    align-items: center;
    gap: 18px;
}
.availability-settings-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(34, 211, 238, .35); border-radius: 12px; color: var(--accent); background: rgba(34, 211, 238, .08); }
.availability-settings-copy h2, .availability-settings-copy p, .availability-hero h2, .availability-hero p, .availability-onboarding h2, .availability-onboarding p, .availability-calendar-header h2, .availability-calendar-header p, .availability-record h3, .availability-record p, .availability-health-note { margin: 0; }
.availability-settings-copy h2, .availability-hero h2, .availability-onboarding h2, .availability-calendar-header h2 { color: var(--ink); font-family: Sora, Inter, sans-serif; font-weight: 600; }
.availability-settings-copy > p:last-child, .availability-hero > div > p:last-child, .availability-onboarding p, .availability-calendar-header p, .availability-editor-head p, .availability-health-note { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.availability-settings-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.availability-settings-facts div { min-width: 0; border-left: 1px solid var(--line); padding-left: 12px; }
.availability-settings-facts dt { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.availability-settings-facts dd { margin: 5px 0 0; color: var(--ink); font-size: 13px; font-weight: 650; }
.availability-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.availability-hero > div:first-child { max-width: 760px; }
.availability-hero h2 { font-size: 23px; }
.availability-actions, .availability-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.availability-actions button { display: inline-flex; align-items: center; gap: 7px; }
.availability-actions svg { width: 16px; height: 16px; }
.availability-editor, .availability-onboarding, .availability-calendar-panel, .availability-lists { margin-bottom: 16px; }
.availability-editor { border-color: rgba(34, 211, 238, .42); }
.availability-editor-head { align-items: flex-start; }
.availability-editor-head > div { max-width: 760px; }
.availability-onboarding { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 16px; border-color: rgba(251, 191, 36, .32); }
.availability-onboarding > svg { color: #fbbf24; }
.availability-calendar-header { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 12px; margin-bottom: 16px; text-align: center; }
.availability-calendar-header h2 { font-size: 20px; text-transform: capitalize; }
.availability-weekdays, .availability-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.availability-weekdays { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; text-transform: capitalize; }
.availability-day { display: grid; align-content: start; gap: 5px; min-height: 132px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 8, 23, .46); padding: 9px; }
.availability-day.is-empty { min-height: 0; border-style: dashed; background: transparent; }
.availability-day.is-today { border-color: rgba(34, 211, 238, .72); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .14); }
.availability-day.has-override { background: rgba(14, 44, 67, .68); }
.availability-day.health-no_training { border-color: rgba(251, 113, 133, .58); }
.availability-day.health-modified { border-color: rgba(251, 191, 36, .48); }
.availability-day.health-unknown { border-style: dashed; border-color: rgba(251, 191, 36, .56); }
.availability-day-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.availability-day-heading time { color: var(--ink); font-size: 13px; font-weight: 700; }
.availability-day-value { margin-top: 3px; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.35; }
.availability-day > small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.availability-day-tag, .availability-health-tag, .availability-conflict { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; gap: 4px; border-radius: 999px; margin-top: 3px; padding: 3px 6px; background: rgba(34, 211, 238, .11); color: var(--accent); font-size: 9px; line-height: 1.25; }
.availability-day-tag.is-normal { background: rgba(148, 163, 184, .09); color: var(--muted); }
.availability-health-tag { background: rgba(251, 191, 36, .1); color: #fcd34d; }
.availability-conflict { background: rgba(251, 113, 133, .12); color: #fda4af; }
.availability-health-tag svg, .availability-conflict svg { width: 11px; height: 11px; flex: 0 0 auto; }
.availability-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.availability-record-list { display: grid; gap: 0; }
.availability-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding: 12px 0; }
.availability-record:first-child { border-top: 0; }
.availability-record h3 { margin-top: 3px; color: var(--ink); font-size: 14px; }
.availability-record p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.availability-record-date { color: var(--accent); font-size: 10px; font-weight: 700; }
.availability-resolved { color: #6ee7b7; font-size: 12px; }
.availability-record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.availability-week-editor { display: grid; gap: 8px; }
.availability-week-row { display: grid; grid-template-columns: minmax(100px, .4fr) minmax(130px, .45fr) minmax(260px, 1fr); align-items: end; gap: 12px; border-top: 1px solid var(--line); padding-top: 9px; }
.availability-week-row > strong { align-self: center; color: var(--ink); font-size: 13px; text-transform: capitalize; }
.availability-week-row label, .availability-form-grid > label { display: grid; gap: 6px; }
.availability-week-row .field input, .availability-form-grid .field input, .availability-form-grid .field select, .availability-form-grid .field textarea, .checkin-availability-change .field input { width: 100%; min-height: 42px; }
.availability-form-grid .field textarea { border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 8, 23, .76); color: var(--ink); padding: 9px 11px; outline: none; }
.availability-form-grid .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, .14); }
.availability-form-grid textarea { min-height: 84px; resize: vertical; }
.availability-form-help { color: var(--muted); font-size: 11px; }
.availability-form-actions { margin-top: 14px; }
.availability-form-actions > p { margin: 0 auto 0 0; }
.availability-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; }
.availability-form-wide { grid-column: 1 / -1; }
.availability-weekday-picker, .availability-sport-picker { display: flex; flex-wrap: wrap; gap: 8px 16px; border: 0; padding: 0; }
.availability-weekday-picker legend, .availability-sport-picker legend { width: 100%; color: var(--muted); font-size: 11px; font-weight: 700; }
.availability-weekday-picker label, .availability-sport-picker label { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 12px; }
.availability-day-constraints { color: #b8c7dc !important; }
.checkin-availability-fieldset { display: grid; gap: 14px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; margin: 18px 0 0; padding: 16px; }
.checkin-availability-fieldset legend { color: var(--ink); font-size: 13px; font-weight: 700; padding: 0 6px; }
.checkin-availability-fieldset > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.checkin-availability-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.checkin-availability-option { position: relative; min-width: 0; cursor: pointer; }
.checkin-availability-option input { position: absolute; opacity: 0; pointer-events: none; }
.field.checkin-availability-option > span { display: flex; align-items: center; min-height: 48px; margin: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); padding: 9px 11px; cursor: pointer; font-size: 12px; font-weight: 650; letter-spacing: 0; line-height: 1.35; text-transform: none; }
.field.checkin-availability-option > span::before { content: ""; width: 14px; height: 14px; flex: 0 0 auto; border: 1px solid rgba(148, 163, 184, .58); border-radius: 50%; margin-right: 8px; background: rgba(5, 8, 23, .76); box-shadow: inset 0 0 0 3px rgba(5, 8, 23, .76); }
.checkin-availability-option input:checked + span { border-color: var(--accent); background: rgba(34, 211, 238, .10); color: var(--ink); box-shadow: 0 0 0 2px rgba(34, 211, 238, .10); }
.checkin-availability-option input:checked + span::before { border-color: var(--accent); background: var(--accent); }
.checkin-availability-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.checkin-availability-option input:disabled + span { cursor: not-allowed; opacity: .46; }
.checkin-availability-change { display: grid; grid-template-columns: repeat(2, minmax(200px, 320px)); align-items: end; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.checkin-availability-change .field { min-width: 0; }
.checkin-availability-change[hidden] { display: none; }
.checkin-availability-health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.checkin-availability-health > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; }
.checkin-notes-field { grid-column: 1 / -1; }

@media (max-width: 1050px) {
    .availability-hero { display: grid; align-items: start; }
    .availability-actions { justify-content: start; flex-wrap: wrap; }
    .checkin-availability-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .availability-settings-card, .availability-hero, .availability-onboarding, .availability-lists, .availability-form-grid, .availability-week-row { grid-template-columns: 1fr; }
    .availability-settings-card, .availability-hero { display: grid; align-items: start; }
    .availability-settings-facts { grid-template-columns: 1fr; }
    .availability-settings-facts div { border-left: 0; border-top: 1px solid var(--line); padding: 8px 0 0; }
    .availability-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .availability-actions button, .availability-onboarding button { width: 100%; justify-content: center; }
    .availability-weekdays { display: none; }
    .availability-calendar-grid { grid-template-columns: 1fr; }
    .availability-day.is-empty { display: none; }
    .availability-day { min-height: 0; }
    .availability-form-wide { grid-column: auto; }
    .availability-week-row { align-items: stretch; }
    .availability-record { grid-template-columns: 1fr; align-items: start; }
    .availability-record button { justify-self: start; }
    .availability-record-actions { justify-content: flex-start; }
    .checkin-availability-options { grid-template-columns: 1fr; }
    .checkin-availability-change { grid-template-columns: 1fr; }
    .checkin-availability-health { grid-template-columns: 1fr; }
}

* {
    box-sizing: border-box;
}

/* Shared icon-only button primitive. Feature sections may change color, but
   not hit area, focus treatment or icon sizing. */
.icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(5, 8, 23, .48);
    color: var(--ink);
    padding: 0;
    cursor: pointer;
}
.icon-button svg { width: 20px; height: 20px; }
.icon-button:hover { color: var(--accent); border-color: var(--accent); }
.icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon-button:disabled { opacity: .45; cursor: not-allowed; }
.panel-close-button { border-radius: 999px; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.24), transparent 30%),
        radial-gradient(circle at 74% 92%, rgba(34, 211, 238, 0.18), transparent 28%),
        linear-gradient(135deg, #02040d 0%, var(--bg) 42%, #071a2a 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(460px, 100%);
    background: linear-gradient(180deg, rgba(13, 32, 55, 0.94), rgba(5, 8, 23, 0.9));
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    padding: 34px;
    box-shadow: var(--shadow), var(--glow);
    backdrop-filter: blur(18px);
}

.login-logo {
    display: block;
    width: min(340px, 100%);
    height: auto;
    margin-bottom: 30px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--ink);
    font-weight: 800;
    letter-spacing: 0;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

[hidden] {
    display: none !important;
}

.login-panel h1 {
    margin: 0 0 24px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 0;
}

.login-panel label,
.filters span,
.field span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-row {
    display: flex;
    gap: 10px;
}

.login-panel > input[type="text"],
.login-row input,
.filters input,
.filters select,
.field input,
.field select {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(5, 8, 23, 0.76);
    color: var(--ink);
    padding: 8px 11px;
    outline: none;
}

.login-panel > input[type="text"]:focus,
.login-row input:focus,
.filters input:focus,
.filters select:focus,
.field input:focus,
.field select:focus,
.settings-table input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.login-row input {
    flex: 1;
    min-width: 0;
}

.login-panel > input[type="text"] {
    width: 100%;
    margin-bottom: 16px;
}

.login-row button,
.primary-button,
.ghost-button {
    min-height: 40px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #020617;
    padding: 8px 16px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.24);
}

.ghost-button {
    border-color: var(--line);
    background: rgba(5, 8, 23, 0.45);
    color: var(--text);
    box-shadow: none;
}

.login-error {
    margin: 14px 0 0;
    color: var(--danger);
    font-weight: 700;
}

.login-help-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.login-help-link:hover,
.login-help-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.session-warning {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: min(620px, calc(100vw - 40px));
    border: 1px solid rgba(251, 146, 60, 0.48);
    border-radius: 8px;
    padding: 14px 16px;
    background: rgba(5, 13, 27, 0.98);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.session-warning[hidden] {
    display: none;
}

.session-warning > svg {
    width: 24px;
    height: 24px;
    color: #fb923c;
}

.session-warning strong,
.session-warning p {
    margin: 0;
}

.session-warning strong {
    color: var(--ink);
    font-size: 14px;
}

.session-warning p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.session-warning .primary-button {
    white-space: nowrap;
}

.account-panel .login-logo {
    margin-inline: auto;
}

.account-intro,
.account-message,
.account-field-help {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.account-form {
    display: grid;
    gap: 10px;
}

.account-form input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.76);
    color: var(--ink);
    padding: 8px 11px;
    outline: none;
}

.account-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.account-form .primary-button {
    justify-self: start;
    margin-top: 8px;
}

.account-field-help {
    margin: -3px 0 5px;
    font-size: 12px;
}

.account-success { color: #6ee7b7; }
.account-error { color: var(--danger); }

.primary-link-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #020617;
    padding: 8px 16px;
    font-weight: 800;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 16px;
    background: linear-gradient(180deg, rgba(5, 8, 23, 0.96), rgba(8, 27, 43, 0.86));
    border-right: 1px solid var(--line);
    color: var(--text);
    backdrop-filter: blur(18px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 0 6px 8px;
}

.sidebar-brand a {
    display: block;
    border-radius: 6px;
}

.sidebar-brand a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.sidebar-brand img {
    display: block;
    width: 204px;
    height: auto;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav-group,
.nav-children {
    display: grid;
    gap: 4px;
}

.nav-children {
    display: none;
}

.nav-group.expanded .nav-children {
    display: grid;
}

.nav .nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.nav-parent svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    transition: transform 160ms ease;
}

.nav-group.expanded .nav-parent svg {
    transform: rotate(180deg);
}

.nav button {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #c8d5e5;
    padding: 11px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.nav button.active,
.nav button:hover {
    border-color: rgba(14, 165, 233, 0.35);
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.22), rgba(34, 211, 238, 0.05));
    color: var(--ink);
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 6px;
    color: var(--muted);
    font-size: 14px;
}

.sidebar-account-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.sidebar-icon-link {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(5, 8, 23, 0.62);
    color: var(--muted);
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.sidebar-icon-link:hover,
.sidebar-icon-link:focus-visible {
    border-color: var(--accent);
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent);
    outline: none;
}

.sidebar-icon-link > svg {
    width: 19px;
    height: 19px;
}

.sidebar-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-menu-link {
    position: relative;
    overflow: visible;
}

.notification-count {
    position: absolute;
    top: -4px;
    right: -5px;
    display: grid;
    min-width: 19px;
    height: 19px;
    place-items: center;
    padding: 0 5px;
    border: 2px solid #040a16;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.notification-count[hidden] {
    display: none;
}

.notification-settings-panel {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.notification-settings-icon,
.notification-type-icon {
    display: grid;
    place-items: center;
    border: 1px solid rgba(34, 211, 238, 0.32);
    color: var(--accent);
    background: rgba(34, 211, 238, 0.08);
}

.notification-settings-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.notification-settings-icon svg {
    width: 24px;
    height: 24px;
}

.notification-settings-copy h2,
.notification-settings-copy p {
    margin: 0;
}

.notification-settings-copy h2 {
    margin-bottom: 4px;
    font-size: 20px;
}

.notification-settings-copy > p:last-child {
    color: var(--muted);
}

.notification-settings-panel > button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notification-settings-panel > button svg {
    width: 18px;
    height: 18px;
}

.notification-inbox {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.notification-inbox .panel-head > span {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.notification-list {
    border-top: 1px solid var(--line);
}

.notification-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 22px;
    align-items: center;
    min-height: 74px;
    gap: 13px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.notification-row:hover,
.notification-row:focus-visible {
    background: rgba(34, 211, 238, 0.045);
    outline: none;
}

.notification-type-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.notification-type-icon svg,
.notification-open-icon {
    width: 18px;
    height: 18px;
}

.notification-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.notification-copy strong {
    font-size: 15px;
}

.notification-copy time {
    color: var(--muted);
    font-size: 12px;
}

.notification-open-icon {
    color: var(--muted);
}

.notification-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 16px;
    color: var(--muted);
    font-size: 13px;
}

.notification-inbox .empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 42px 20px;
    color: var(--muted);
    text-align: center;
}

.notification-inbox .empty-state svg {
    width: 28px;
    height: 28px;
}

.push-permission-prompt {
    position: fixed;
    z-index: 1200;
    right: 22px;
    bottom: 22px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    max-width: 680px;
    gap: 13px;
    padding: 16px;
    border: 1px solid rgba(34, 211, 238, 0.38);
    border-radius: 8px;
    background: #081426;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.push-permission-prompt > svg {
    color: var(--accent);
}

.push-permission-prompt p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.push-permission-actions {
    display: flex;
    gap: 8px;
}

.strava-menu-link {
    border-radius: 8px;
}

.strava-menu-link img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.nav .nav-subitem {
    padding: 8px 12px 8px 26px;
    font-size: 12px;
    font-weight: 500;
}

.archive-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
}

.archive-tabs button {
    background: transparent;
    color: var(--muted);
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 0;
}

.archive-tabs button.active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.archive-notice, .capability-asof {
    color: var(--muted);
    font-size: 13px;
    margin: 12px 0 20px;
}

.archive-coverage {
    border-left: 2px solid var(--accent);
    padding-left: 16px;
    margin: 20px 0;
    font-size: 13px;
}

.archive-coverage p { margin: 6px 0; }

#view-capability-analysis .metrics-grid > .metric-card:last-child .metric-value {
    font-size: 20px;
}

.capability-summary td:first-child { white-space: nowrap; }

.activity-laps {
    min-width: 0;
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding: 24px 0;
}
.laps-heading { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.laps-heading h2 { margin: 0 auto 0 0; font-size: 20px; }
.laps-heading .field { width: 120px; }
.laps-mode { flex: 0 1 auto; }
.laps-summary { color: var(--muted); font-size: 13px; margin: 16px 0; }
.laps-warning { color: #fbbf24; font-size: 13px; }
.laps-table { min-width: 960px; width: 100%; font-variant-numeric: tabular-nums; }
.laps-table th small { display: block; margin-top: 4px; font-weight: 400; text-transform: none; }
.laps-table td, .laps-table th { text-align: right; }
.laps-table td { white-space: nowrap; }
.laps-table th:first-child { text-align: left; position: sticky; left: 0; background: #081523; z-index: 1; }
.laps-table .laps-partial { text-decoration: underline dotted; text-underline-offset: 4px; }
.laps-method { position: relative; }
.laps-method summary { list-style: none; display: grid; place-items: center; width: 36px; height: 36px; cursor: pointer; color: var(--accent); }
.laps-method summary::-webkit-details-marker { display: none; }
.laps-method summary svg { width: 20px; height: 20px; }
.laps-method summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.laps-method > div { position: absolute; right: 0; top: 42px; z-index: 5; width: min(440px, calc(100vw - 48px)); padding: 16px; background: #081523; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.6; box-shadow: 0 8px 24px #0008; }

.sidebar-foot a:hover {
    color: var(--accent);
}

.logout-form {
    margin: 0;
}

.logout-form button {
    padding: 0;
    cursor: pointer;
}

.logout-form button:hover {
    color: var(--accent);
}

.language-selector {
    width: 100%;
    margin: 8px 0;
}

.sidebar-foot .language-selector {
    margin-top: 0;
}

.language-selector label > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--muted);
}

.language-selector select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

.language-selector select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.login-content {
    width: min(460px, 100%);
}

.login-content > .language-selector {
    max-width: 200px;
    margin: 20px auto 0;
}

.metric-label,
.panel-head h2,
.metric-value {
    overflow-wrap: anywhere;
}

.main {
    min-width: 0;
    padding: 28px;
}

.skip-link {
    position: fixed;
    z-index: 2000;
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    border: 2px solid var(--accent);
    border-radius: 4px;
    padding: 0;
    background: #ffffff;
    color: #020617;
    font-weight: 800;
}

.skip-link:focus-visible {
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    opacity: 1;
    pointer-events: auto;
    padding: 10px 14px;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.topbar-heading {
    min-width: 0;
}

.topbar-tools {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    margin-left: auto;
}

.topbar-tools .filters {
    order: 1;
}

.coach-launcher {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-top: 22px;
    overflow: visible;
    border: 1px solid rgba(118, 231, 241, 0.34);
    border-radius: 50%;
    background: #07192c;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    order: 2;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.coach-launcher > img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.coach-launcher-badge {
    position: absolute;
    right: -4px;
    bottom: -3px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    color: #02131f;
}

.coach-launcher-badge svg {
    width: 11px;
    height: 11px;
    stroke-width: 2.4;
}

.coach-launcher:hover,
.coach-launcher:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16), 0 10px 24px rgba(0, 0, 0, 0.34);
    outline: none;
    transform: translateY(-1px);
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.topbar h1 {
    margin: 0;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 32px;
    overflow-wrap: anywhere;
    font-weight: 600;
    letter-spacing: 0;
}

.filters,
.inline-filters {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.filters label,
.field {
    min-width: 128px;
}

.activity-list-filters {
    margin-left: auto;
}

.activity-list-filters > summary {
    display: none;
}

.view {
    display: none;
}

.view.active {
    display: grid;
    gap: 16px;
}

/* Charts and wide contents must not enlarge the overview's single grid track. */
#view-overview.view.active {
    grid-template-columns: minmax(0, 1fr);
}

.metrics-grid,
.chart-grid,
.explorer-grid,
.activity-layout,
.compare-grid {
    display: grid;
    gap: 14px;
}

.metrics-grid {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.overview-state-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(125px, 1fr));
    gap: 14px;
}

.overview-startup-skeleton {
    display: grid;
    gap: 16px;
}

.startup-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 14px;
}

.startup-skeleton-state {
    grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(125px, 1fr));
}

.startup-skeleton-block,
.startup-skeleton-wide {
    display: block;
    min-height: 116px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(12, 31, 53, 0.72);
    animation: startup-skeleton-pulse 1.15s ease-in-out infinite alternate;
}

.startup-skeleton-wide {
    min-height: 150px;
}

@keyframes startup-skeleton-pulse {
    from { opacity: 0.52; }
    to { opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
    .startup-skeleton-block,
    .startup-skeleton-wide {
        animation: none;
    }
}

.coach-panel-layout {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.coach-avatar {
    width: 64px;
    height: 64px;
    border: 1px solid rgba(62, 200, 234, 0.28);
    border-radius: 50%;
    background: rgba(5, 8, 23, 0.72);
    object-fit: cover;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.coach-panel-content {
    min-width: 0;
}

.coach-panel-head {
    margin-bottom: 0.75rem;
}

.coach-reflection {
    display: grid;
    gap: 1rem;
}

.coach-reflection-head,
.coach-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.coach-reflection-head h3,
.coach-block h4 {
    margin: 0;
}

.coach-summary {
    margin: 0;
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.55;
    max-width: 72ch;
}

.coach-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    gap: 0.75rem;
}

.coach-block {
    grid-column: span 4;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.035);
}

.coach-block-main {
    grid-column: span 8;
}

.coach-block-side {
    grid-column: span 4;
}

.coach-block-half {
    grid-column: span 6;
}

.coach-block-full {
    grid-column: 1 / -1;
}

.coach-block-priority {
    background: rgba(62, 200, 234, 0.055);
    border-color: rgba(62, 200, 234, 0.22);
}

.coach-block p,
.coach-block ul {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.coach-block ul {
    padding-left: 1.1rem;
}

.coach-block-head span {
    color: var(--muted);
    font-size: 0.82rem;
}

@media (min-width: 901px) {
    .coach-reflection {
        gap: 0.8rem;
    }

    .coach-summary {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .coach-grid {
        align-items: stretch;
        gap: 0.65rem;
    }

    .coach-block {
        padding: 0.85rem 0.95rem;
    }

    .coach-block-head h4 {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .coach-block p,
    .coach-block ul {
        margin-top: 0.42rem;
        font-size: 0.84rem;
        line-height: 1.48;
    }

    .coach-block-head span,
    .coach-interval-toggle small {
        font-size: 0.78rem;
    }
}

.coach-actions {
    display: flex;
    justify-content: flex-end;
}

.coach-reanalyze-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    line-height: 1;
}

.coach-reanalyze-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.coach-reanalyze-button:disabled {
    opacity: 0.52;
    cursor: wait;
}

.coach-progress-status {
    display: grid;
    gap: 0.65rem;
    border-block: 1px solid rgba(62, 200, 234, 0.22);
    padding: 0.8rem 0;
}

.coach-progress-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
}

.coach-progress-head strong {
    font-size: 0.9rem;
}

.coach-progress-head small {
    color: var(--muted);
    font-size: 0.76rem;
}

.coach-progress-spinner {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    animation: coach-progress-spin 0.85s linear infinite;
}

.coach-progress-spinner svg {
    width: 18px;
    height: 18px;
}

@keyframes coach-progress-spin {
    to { transform: rotate(360deg); }
}

.coach-progress-bar {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.coach-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(62, 200, 234, 0.3);
    transition: width 0.25s ease;
}

.coach-progress-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.coach-progress-steps li {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.coach-progress-steps li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.38rem;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.36);
    vertical-align: 0.08em;
}

.coach-progress-steps .is-active {
    color: var(--text);
    font-weight: 750;
}

.coach-progress-steps .is-active::before {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(62, 200, 234, 0.48);
}

.coach-progress-steps .is-complete {
    color: var(--good);
}

.coach-progress-steps .is-complete::before {
    background: var(--good);
}

.coach-progress-complete,
.coach-progress-error {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-block: 1px solid rgba(45, 212, 191, 0.24);
    padding: 0.7rem 0;
    color: var(--good);
    font-size: 0.86rem;
    font-weight: 700;
}

.coach-progress-error {
    border-color: rgba(248, 113, 113, 0.28);
    color: var(--danger);
}

.coach-progress-complete svg,
.coach-progress-error svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.coach-interval-details {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.coach-interval-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.coach-interval-toggle span {
    font-weight: 700;
}

.coach-interval-toggle small {
    color: var(--muted);
    font-size: 0.82rem;
    margin-left: auto;
}

.coach-interval-toggle svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--muted);
    transition: transform 0.16s ease;
}

.coach-interval-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.coach-interval-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

.coach-interval-panel > p {
    margin: 0;
    padding: 0 1rem 0.8rem;
    color: var(--muted);
}

.coach-interval-confidence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0 1rem 0.8rem;
}

.coach-interval-confidence div {
    display: flex;
    gap: 0.4rem;
    font-size: 0.82rem;
}

.coach-interval-confidence dt {
    color: var(--muted);
}

.coach-interval-confidence dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.coach-interval-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.65rem;
    padding: 0 1rem 1rem;
}

.coach-interval-row {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid rgba(143, 160, 181, 0.18);
    border-radius: 8px;
    background: rgba(5, 8, 23, 0.3);
    font-size: 0.82rem;
    line-height: 1.35;
}

.coach-interval-row h4 {
    margin: 0 0 0.6rem;
    color: var(--text);
    font-size: 0.86rem;
}

.coach-interval-metrics {
    display: grid;
    gap: 0.34rem;
    margin: 0;
}

.coach-interval-metrics div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
}

.coach-interval-metrics dt {
    color: var(--muted);
}

.coach-interval-metrics dt::after {
    content: ":";
}

.coach-interval-metrics dd {
    min-width: 0;
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.coach-interval-metrics dd span {
    color: var(--muted);
}

.coach-lap-role-editor {
    border-top: 1px solid var(--line);
    padding: 1rem;
}

.coach-lap-role-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.coach-lap-role-head h4,
.coach-lap-role-head p {
    margin: 0;
}

.coach-lap-role-head p {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.coach-lap-confirm-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    line-height: 1;
}

.coach-lap-confirm-button svg {
    width: 16px;
    height: 16px;
}

.coach-lap-role-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.coach-lap-role-row {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid rgba(143, 160, 181, 0.18);
    border-radius: 8px;
    background: rgba(5, 8, 23, 0.3);
}

.coach-lap-role-copy {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    min-width: 0;
}

.coach-lap-role-copy small {
    color: var(--muted);
    white-space: nowrap;
}

.coach-lap-role-field,
.coach-lap-role-field select {
    width: 100%;
    min-width: 0;
}

.ai-usage-panel {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ai-health-result span {
    color: var(--muted);
}

.ai-health-test-button {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.58);
    color: #dbe7f5;
    padding: 0;
    box-shadow: none;
}

.ai-health-test-button svg {
    width: 16px;
    height: 16px;
}

.ai-health-test-button:hover,
.ai-health-test-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.ai-health-test-button:disabled {
    opacity: 0.45;
    cursor: wait;
}

.ai-health-table th {
    width: 220px;
}

.ai-health-table strong {
    overflow-wrap: anywhere;
}

.ai-model-settings-form {
    display: grid;
    gap: 1rem;
}

.ai-model-job {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
}

.ai-model-job legend {
    padding: 0 0.35rem;
    font-weight: 800;
}

.ai-model-job .inline-filters {
    margin: 0;
}

.ai-model-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    color: var(--muted);
}

.ai-model-checkboxes label {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    color: var(--ink);
    font-weight: 700;
}

.ai-model-checkboxes input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.health-ok {
    color: #86efac;
}

.health-missing {
    color: #fca5a5;
}

@media (max-width: 1100px) {
    .coach-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coach-block {
        grid-column: span 1;
    }

    .coach-block-main,
    .coach-block-side,
    .coach-block-full {
        grid-column: span 2;
    }

    .coach-block-half {
        grid-column: span 1;
    }

    .coach-interval-list,
    .coach-lap-role-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .coach-panel-layout {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .coach-avatar {
        width: 48px;
        height: 48px;
        grid-column: 1;
        grid-row: 1;
    }

    .coach-panel-content {
        display: contents;
    }

    .coach-panel-head {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        margin-bottom: 0;
    }

    .coach-reflection {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .coach-progress-status,
    .coach-progress-complete,
    .coach-progress-error,
    .coach-reflection-empty {
        grid-column: 1 / -1;
    }

    .coach-reflection-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .coach-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .coach-block,
    .coach-block-main,
    .coach-block-side,
    .coach-block-half,
    .coach-block-full {
        grid-column: 1;
    }

    .coach-interval-list,
    .coach-lap-role-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .coach-panel-layout {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 0.65rem;
    }

    .coach-avatar {
        width: 44px;
        height: 44px;
    }

    .coach-summary {
        font-size: 0.9rem;
    }

    .coach-block p,
    .coach-block ul {
        font-size: 0.86rem;
    }

    .coach-interval-row {
        font-size: 0.8rem;
    }

    .coach-lap-role-head {
        align-items: stretch;
        flex-direction: column;
    }

    .coach-lap-confirm-button {
        align-self: flex-start;
    }

    .coach-block-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .coach-progress-head {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.45rem 0.55rem;
    }

    .coach-progress-head small {
        grid-column: 2;
    }

    .coach-progress-steps {
        gap: 0.3rem;
    }

    .coach-progress-steps li {
        font-size: 0.68rem;
    }

    #aiUsageFilters .field,
    #aiUsageFilters button {
        width: 100%;
    }

    .ai-health-panel .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .coach-progress-spinner {
        animation: none;
    }

    .coach-progress-bar span {
        transition: none;
    }
}

.overview-profile-card,
.training-state-card {
    min-width: 0;
    min-height: 116px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 24, 43, 0.88);
    box-shadow: var(--shadow);
}

.overview-profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
}

.overview-profile-card a {
    display: block;
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    overflow: hidden;
    border: 2px solid rgba(34, 211, 238, 0.46);
    border-radius: 50%;
}

.overview-profile-card a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.overview-profile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overview-profile-card p,
.overview-profile-card h2 {
    margin: 0;
}

.overview-profile-card p {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.overview-profile-card h2 {
    margin-top: 5px;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.25;
}

.overview-profile-card small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.training-state-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 14px 15px;
    color: inherit;
    text-align: left;
    --state-color: var(--accent);
}

.training-state-card:hover,
.training-state-card:focus-visible {
    border-color: var(--state-color);
    transform: translateY(-1px);
}

.training-state-card:focus-visible {
    outline: 2px solid var(--state-color);
    outline-offset: 2px;
}

.training-state-card::after {
    content: "";
    position: absolute;
    right: 15px;
    bottom: 12px;
    left: 15px;
    height: 2px;
    background: var(--state-color);
    opacity: 0.82;
}

.training-state-card.state-fitness { --state-color: #4f7cff; }
.training-state-card.state-form { --state-color: #fb923c; }
.training-state-card.state-fatigue { --state-color: #ec4899; }
.training-state-card.state-tss { --state-color: #22d3ee; }

.training-state-value {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    color: var(--state-color);
    font-family: Sora, Inter, sans-serif;
    font-size: 31px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.training-state-value svg {
    width: 20px;
    height: 20px;
}

.training-state-label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
}

.training-state-delta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.load-status-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.load-status-intro .section-heading {
    margin: 0;
}

.view-filter-disclosure {
    margin-left: auto;
}

.view-filter-disclosure > summary {
    display: none;
}

@media (min-width: 761px) {
    .view-filter-disclosure:not([open]) > .mobile-filter-disclosure-body {
        display: block;
    }
}

.load-status-range {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.load-status-range .primary-button {
    min-height: 40px;
}

.load-status-metrics {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.load-status-charts {
    display: grid;
    gap: 14px;
}

.load-insights-heading {
    align-items: flex-start;
}

.load-insights-heading .muted {
    margin: 7px 0 0;
}

.load-insight-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.load-insight-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 11px;
    min-width: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 15px;
}

.load-insight-row > svg {
    width: 21px;
    height: 21px;
    color: var(--accent);
}

.load-insight-row h3,
.load-insight-row p,
.load-performance-context h3,
.load-performance-context p,
.load-comparison-heading h3,
.load-comparison-heading p {
    margin: 0;
}

.load-insight-row h3,
.load-performance-context h3,
.load-comparison-heading h3 {
    color: var(--ink);
    font-size: 14px;
}

.load-insight-row p,
.load-performance-context p,
.load-comparison-heading p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.load-performance-context {
    margin-top: 16px;
    border-left: 3px solid #4f7cff;
    padding: 11px 13px;
    background: rgba(79, 124, 255, 0.07);
}

.load-performance-context small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

.load-comparison {
    margin-top: 20px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.load-comparison-heading {
    margin-bottom: 12px;
}

.load-comparison-table tr.is-current td {
    background: rgba(34, 211, 238, 0.07);
}

.load-comparison-table td:first-child small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.load-insight-method {
    margin-top: 16px;
}

.load-insight-method small {
    color: var(--muted);
}

.load-status-chart {
    height: 370px;
}

.load-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
}

.load-method-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 18px;
    background: rgba(7, 20, 37, 0.96);
}

.load-method-card > svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.load-method-card h3,
.load-method-card p {
    margin: 0;
}

.load-method-card h3 {
    color: var(--ink);
    font-size: 15px;
}

.load-method-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.load-method-card code {
    display: block;
    margin-top: 12px;
    overflow-wrap: anywhere;
    color: var(--accent);
    font-size: 12px;
}

.load-method-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    border-left: 3px solid var(--accent);
    padding: 10px 12px;
    background: rgba(34, 211, 238, 0.07);
}

.load-method-note svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--accent);
}

.load-method-note p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.load-reference-guide {
    margin-top: 28px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.load-reference-guide > .section-heading {
    margin-bottom: 18px;
}

.load-reference-guide > .section-heading .muted {
    max-width: 860px;
    margin: 8px 0 0;
    line-height: 1.55;
}

.load-reference-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.load-reference-card {
    min-width: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 18px;
}

.load-reference-card header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    min-height: 94px;
}

.load-reference-card header > svg {
    width: 23px;
    height: 23px;
    color: var(--accent);
}

.load-reference-card h3,
.load-reference-card p,
.load-reference-card dl,
.load-reference-card dd {
    margin: 0;
}

.load-reference-card h3 {
    color: var(--ink);
    font-size: 15px;
}

.load-reference-card header p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.load-reference-card dl > div {
    display: grid;
    grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
    gap: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 9px 0;
}

.load-reference-card dt {
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.load-reference-card dd {
    color: var(--ink);
    font-size: 12.5px;
    line-height: 1.45;
}

.load-reference-evidence {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 24px;
    margin-top: 18px;
    border-left: 3px solid var(--accent);
    padding: 14px 16px;
    background: rgba(34, 211, 238, 0.055);
}

.load-reference-evidence h3,
.load-reference-evidence p,
.load-reference-evidence ul {
    margin: 0;
}

.load-reference-evidence h3 {
    color: var(--ink);
    font-size: 14px;
}

.load-reference-evidence p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.load-reference-evidence ul {
    display: grid;
    gap: 5px;
    padding-left: 18px;
}

.load-reference-evidence a {
    color: var(--accent);
    font-size: 12px;
    line-height: 1.4;
    text-underline-offset: 3px;
}

.overview-today-section {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 22, 40, 0.82);
    box-shadow: var(--shadow);
}

.daily-checkin {
    overflow: hidden;
    border-radius: 8px;
}

.daily-checkin-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.daily-checkin-header h2,
.daily-checkin-header p {
    margin: 0;
}

.daily-checkin-header h2 {
    color: var(--ink);
    font-size: 20px;
}

.daily-checkin-header > div:nth-child(2) > p:last-child {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.daily-checkin-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
}

.daily-checkin-icon.is-complete {
    border-color: rgba(52, 211, 153, 0.48);
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.09);
}

.daily-checkin-icon svg {
    width: 22px;
    height: 22px;
}

.checkin-prefill-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.checkin-prefill-note svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
}

.readiness-assessment {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
}

.readiness-assessment-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.08);
}

.readiness-assessment.is-ready .readiness-assessment-mark { color: #34d399; background: rgba(52, 211, 153, 0.08); }
.readiness-assessment.is-balanced .readiness-assessment-mark { color: #60a5fa; background: rgba(96, 165, 250, 0.08); }
.readiness-assessment.is-cautious .readiness-assessment-mark { color: #fbbf24; background: rgba(251, 191, 36, 0.08); }
.readiness-assessment.is-recovery .readiness-assessment-mark { color: #fb7185; background: rgba(251, 113, 133, 0.08); }

.readiness-assessment-mark svg {
    width: 21px;
    height: 21px;
}

.readiness-assessment-copy h3,
.readiness-assessment-copy p {
    margin: 0;
}

.readiness-assessment-copy h3 {
    margin-top: 3px;
    color: var(--ink);
    font-size: 18px;
}

.readiness-assessment-copy > p:not(.eyebrow) {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.readiness-assessment-copy > strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

.readiness-assessment-score {
    display: grid;
    justify-items: end;
    min-width: 82px;
}

.readiness-assessment-score strong {
    color: var(--ink);
    font-size: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.readiness-assessment-score span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    text-align: right;
}

.readiness-method {
    grid-column: 2 / -1;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    color: var(--muted);
    font-size: 12px;
}

.readiness-method p {
    line-height: 1.5;
}

.readiness-method div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.readiness-method small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.readiness-sources {
    margin-top: 14px;
}

.readiness-sources > strong {
    color: var(--text);
    font-size: 12px;
}

.readiness-sources ul {
    display: grid;
    gap: 6px;
    margin: 8px 0 0;
    padding-left: 18px;
}

.readiness-sources a {
    color: var(--accent);
    line-height: 1.45;
    text-decoration: none;
}

.readiness-sources a:hover,
.readiness-sources a:focus-visible {
    text-decoration: underline;
}

.checkin-slider-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 22px;
    border-top: 1px solid var(--line);
}

.checkin-slider {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.checkin-slider-heading,
.checkin-slider-scale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.checkin-slider-heading strong {
    color: var(--ink);
    font-size: 13px;
}

.checkin-slider-heading output {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 30px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 5px;
    color: var(--accent);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.checkin-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: linear-gradient(90deg, #ef4444, #fbbf24 48%, #34d399);
    accent-color: var(--accent);
}

.checkin-slider input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    appearance: none;
    background: var(--accent-2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.checkin-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--accent-2);
}

.checkin-slider-scale {
    color: var(--muted);
    font-size: 10px;
}

.checkin-detail-grid {
    display: grid;
    grid-template-columns: minmax(200px, 0.35fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.checkin-detail-grid label,
.post-workout-comment {
    display: grid;
    align-content: start;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.checkin-number-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkin-number-wrap input,
.checkin-detail-grid textarea,
.post-workout-comment textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.76);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
}

.checkin-number-wrap input {
    height: 44px;
}

.checkin-detail-grid textarea,
.post-workout-comment textarea {
    min-height: 84px;
    resize: vertical;
}

.checkin-number-wrap input:focus,
.checkin-detail-grid textarea:focus,
.post-workout-comment textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.checkin-submit-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 18px;
}

.checkin-submit-row p {
    margin: 0 auto 0 0;
}

.checkin-result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.checkin-result {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 10px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.checkin-result svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.checkin-result span {
    color: var(--muted);
    font-size: 11px;
}

.checkin-result strong {
    color: var(--ink);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.checkin-note {
    margin: 16px 0 0;
    border-left: 3px solid var(--accent);
    padding: 8px 14px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.wellbeing-history-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.wellbeing-history-head {
    align-items: end;
    padding: 8px 0 0;
}

.wellbeing-history-head h2,
.wellbeing-history-head p {
    margin: 0;
}

.wellbeing-history-head p {
    margin-top: 5px;
}

.wellbeing-history-table {
    border: 1px solid var(--line);
    border-radius: 8px;
}

.wellbeing-history-table table {
    min-width: 1180px;
}

.calendar-checkin {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-left: auto;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    padding: 0;
}

.calendar-checkin svg {
    width: 17px;
    height: 17px;
}

.calendar-checkin.is-complete {
    color: #34d399;
}

.calendar-checkin.is-missing:not(.is-locked):hover,
.calendar-checkin.is-missing:not(.is-locked):focus-visible {
    color: var(--accent);
}

.calendar-checkin.is-locked {
    opacity: 0.42;
}

.post-workout-form {
    display: grid;
    gap: 20px;
}

.post-workout-form > .muted {
    margin: 0;
}

.post-workout-rpe {
    padding-top: 4px;
}

.post-workout-rpe input[type="range"] {
    background: linear-gradient(90deg, #34d399, #fbbf24 52%, #ef4444);
}

.post-workout-fieldset {
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.post-workout-fieldset legend,
.post-workout-comment > span {
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.body-feel-options,
.post-workout-radios,
.post-workout-issues {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.body-feel-options input,
.post-workout-radios input,
.post-workout-issues input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.body-feel-options span,
.post-workout-radios span,
.post-workout-issues span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    padding: 8px 10px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
}

.body-feel-options span {
    flex-direction: column;
    min-height: 62px;
}

.body-feel-options span svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    stroke-width: 1.8;
}

.body-feel-options input:checked + span,
.post-workout-radios input:checked + span,
.post-workout-issues input:checked + span {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.10);
    color: var(--ink);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.10);
}

.body-feel-options input:focus-visible + span,
.post-workout-radios input:focus-visible + span,
.post-workout-issues input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.post-workout-issues {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-workout-issues svg {
    width: 15px;
    height: 15px;
}

.post-workout-question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.post-workout-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.post-workout-gi {
    grid-column: span 2;
    align-self: end;
}

.post-workout-gi input[type="range"] {
    background: linear-gradient(90deg, #34d399, #fbbf24 52%, #ef4444);
}

.post-workout-radios {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-workout-lock {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: #6ee7b7;
}

.post-workout-lock svg {
    width: 20px;
    height: 20px;
}

.post-workout-lock div {
    display: grid;
    gap: 3px;
}

.post-workout-lock span {
    color: var(--muted);
    font-size: 12px;
}

.post-workout-result-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.post-workout-result-grid > div {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.post-workout-result-grid span {
    color: var(--muted);
    font-size: 11px;
}

.post-workout-result-grid strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.overview-today-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    border-bottom: 1px solid var(--line);
}

.overview-today-calendar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(34, 211, 238, 0.5);
    border-radius: 8px;
    background: rgba(34, 211, 238, 0.09);
    color: var(--accent);
}

.overview-today-calendar:hover,
.overview-today-calendar:focus-visible {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.16);
    outline: none;
}

.overview-today-calendar:focus-visible {
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.32);
}

.overview-today-calendar svg {
    width: 24px;
    height: 24px;
}

.overview-today-heading {
    min-width: 0;
}

.overview-today-heading h2,
.overview-today-heading p {
    margin: 0;
}

.overview-today-heading h2 {
    margin-top: 2px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0;
}

.overview-today-heading time {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    text-transform: capitalize;
}

.overview-today-summary {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.overview-today-list {
    display: grid;
}

.overview-today-item {
    display: grid;
    grid-template-columns: minmax(145px, 0.55fr) minmax(180px, 1.45fr) auto 20px;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 13px 18px;
    border: 0;
    border-left: 3px solid #2dd4bf;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.overview-today-item + .overview-today-item {
    border-top: 1px solid var(--line);
}

.overview-today-item.is-planned {
    border-left-color: var(--accent);
    background: rgba(34, 211, 238, 0.035);
}

.overview-today-item:hover,
.overview-today-item:focus-visible {
    background: rgba(34, 211, 238, 0.08);
    outline: none;
}

.overview-today-sport,
.overview-today-status {
    min-width: 0;
}

.overview-today-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.overview-today-item-title {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-today-meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-today-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.overview-today-item.is-planned .overview-today-status {
    color: var(--accent);
}

.overview-today-arrow {
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.overview-today-empty,
.overview-today-list > .error {
    margin: 0;
    padding: 22px 18px;
    color: var(--muted);
}

.recent-seven-section {
    display: grid;
    gap: 12px;
    margin: 4px 0 2px;
}

.recent-seven-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.recent-seven-heading h2 {
    margin: 2px 0 0;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0;
}

.recent-seven-range {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.recent-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
}

.recent-category-card {
    --category-accent: #94a3b8;
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 22, 40, 0.8);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.recent-category-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--category-accent);
}

.recent-category-card.tone-ride { --category-accent: #22d3ee; }
.recent-category-card.tone-run { --category-accent: #fb7185; }
.recent-category-card.tone-nordic { --category-accent: #2dd4bf; }
.recent-category-card.tone-alpine { --category-accent: #38bdf8; }
.recent-category-card.tone-swim { --category-accent: #0ea5e9; }
.recent-category-card.tone-walk { --category-accent: #a3e635; }
.recent-category-card.tone-workout { --category-accent: #f59e0b; }

.recent-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 17px 8px;
}

.recent-category-title {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.recent-category-title h3 {
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-category-title p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.recent-category-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(5, 8, 23, 0.58);
    color: var(--category-accent);
}

.recent-category-icon .recent-category-icon-svg {
    width: 21px;
    height: 21px;
    color: inherit;
}

.recent-category-link {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--category-accent);
}

.recent-category-link:hover,
.recent-category-link:focus-visible {
    border-color: var(--category-accent);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.recent-category-link svg {
    width: 17px;
    height: 17px;
}

.recent-category-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 17px 4px;
}

.recent-category-metrics div {
    min-width: 0;
}

.recent-category-metrics strong,
.recent-category-metrics span {
    display: block;
}

.recent-category-metrics strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-category-metrics span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.recent-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
    height: 128px;
    padding: 12px 17px 10px;
}

.recent-day-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 17px;
    gap: 6px;
    min-width: 0;
}

.recent-day-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.recent-day-bar {
    display: block;
    width: min(24px, 72%);
    min-height: 6px;
    border-radius: 5px 5px 1px 1px;
    background: var(--category-accent);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.1);
}

.recent-day-bar.is-empty {
    width: 4px;
    height: 4px !important;
    min-height: 4px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.42);
    box-shadow: none;
}

.recent-day-column > span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.recent-category-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding: 10px 17px 12px;
    color: var(--muted);
    font-size: 11px;
}

.chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.explorer-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    align-items: start;
}

.activity-layout {
    grid-template-columns: minmax(0, 3fr) minmax(420px, 2fr);
    align-items: stretch;
}

.activity-layout > .panel:nth-child(2) .status-line {
    align-items: flex-start;
    min-height: 24px;
    padding-bottom: 6px;
}

.activity-layout > .panel:nth-child(2) .status-line-label {
    flex: 0 1 42%;
    min-width: 0;
    font-size: 12px;
}

.activity-layout > .panel:nth-child(2) .status-line-value {
    flex: 1 1 58%;
    min-width: 0;
}

.activity-layout > .panel:nth-child(2) .status-line-value > strong {
    min-width: 0;
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: normal;
}

.activity-layout > .panel:nth-child(2) .status-line-value > em {
    min-width: 0;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.activity-layout > .panel:nth-child(2) .status-stack {
    gap: 8px;
}

.activity-weather-box {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.activity-weather-box > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.activity-weather-box h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
}

.activity-weather-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(38, 211, 238, 0.35);
    border-radius: 999px;
    background: rgba(38, 211, 238, 0.08);
    color: var(--accent);
}

.activity-weather-icon svg {
    width: 20px;
    height: 20px;
}

.activity-weather-icon.condition-clear {
    color: #ffd166;
    border-color: rgba(255, 209, 102, 0.38);
    background: rgba(255, 209, 102, 0.1);
}

.activity-weather-icon.condition-cloudy,
.activity-weather-icon.condition-unknown {
    color: var(--muted);
    border-color: rgba(151, 164, 185, 0.32);
    background: rgba(151, 164, 185, 0.08);
}

.activity-weather-icon.condition-light_rain,
.activity-weather-icon.condition-heavy_rain,
.activity-weather-icon.condition-rain {
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.38);
    background: rgba(125, 211, 252, 0.1);
}

.activity-weather-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

.activity-weather-metric {
    display: flex;
    align-items: baseline;
    min-width: 0;
    gap: 5px;
}

.activity-weather-metric span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.activity-weather-metric strong {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.activity-weather-metric em {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.activity-weather-source {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
    line-height: 1.45;
}

.activity-weather-source em {
    font-style: inherit;
}

.compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-grid .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}

.compare-period-summary {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
}

.compare-period-summary > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
}

.compare-period-summary > header strong {
    color: var(--ink);
    font-size: 13px;
}

.compare-period-summary > header span {
    color: var(--muted);
    font-size: 11px;
}

.compare-filter-form {
    width: 100%;
}

.compare-range-fieldset {
    flex: 1 1 330px;
    min-width: 280px;
    margin: 0;
    border: 0;
    padding: 0;
}

.compare-range-fieldset legend {
    margin-bottom: 6px;
    padding: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.compare-range-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.compare-range-date-grid .field,
.compare-range-date-grid input {
    min-width: 0;
    width: 100%;
}

.compare-load-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 4px 2px 0;
}

.compare-load-heading h2,
.compare-load-heading p {
    margin: 0;
}

.compare-load-heading > p {
    max-width: 760px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
}

.panel,
.metric-card,
.activity-detail {
    background: linear-gradient(180deg, rgba(13, 32, 55, 0.86), rgba(5, 8, 23, 0.72));
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.panel {
    padding: 16px;
    min-width: 0;
}

.activity-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.activity-hero-navigation {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 96px;
}

.activity-hero-navigation > .ghost-button {
    width: 100%;
}

.activity-navigation-arrows {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.activity-navigation-arrow:disabled {
    opacity: 0.32;
    cursor: default;
}

.activity-navigation-arrow:disabled:hover {
    color: var(--ink);
    border-color: var(--line);
}

.activity-hero-sport {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 7px;
    min-width: 86px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.activity-hero-copy,
.planned-workout-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.activity-device-subtitle {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

.activity-device-attribution {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.4;
}

.activity-detail-disclosure {
    min-width: 0;
}

.activity-detail-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 24px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    list-style: none;
    cursor: pointer;
}

.activity-detail-disclosure > summary::-webkit-details-marker {
    display: none;
}

.activity-detail-disclosure > summary::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.activity-detail-disclosure[open] > summary::after {
    content: "−";
}

.activity-detail-disclosure > summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.activity-hr-diagnostics > .status-stack {
    margin-top: 8px;
}

.activity-hr-diagnostics > .help-text {
    margin: 8px 0 0;
}

.activity-device-correction form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    align-items: end;
    gap: 12px;
    margin-top: 12px;
}

.activity-device-correction form > .help-text,
.activity-device-correction form > [data-device-error] {
    grid-column: 1 / -1;
}

.detail-date {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    color: var(--accent);
}

.detail-date > svg {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}

.detail-date time {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    min-width: 0;
}

.detail-date-copy {
    display: grid;
    gap: 3px;
}

.detail-date-weekday {
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

.detail-date strong {
    color: var(--ink);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.35;
}

.detail-date-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-size: 16px;
    white-space: nowrap;
}

.detail-date-time svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.activity-hero-sport .sport-icon-large {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.28));
}

.sport-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
}

.sport-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--accent);
}

.activity-hero h2 {
    margin: 0;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: clamp(24px, 2.5vw, 36px);
    font-weight: 600;
    letter-spacing: 0;
}

.metric-card {
    min-height: 104px;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto 12px 0 12px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.75), transparent);
}

.metric-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    margin-top: 8px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 600;
    letter-spacing: 0;
}

.metric-sub {
    margin-top: 4px;
    color: var(--accent);
    font-size: 13px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-head h2,
.activity-detail h2 {
    margin: 0;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
}

.panel-head-action {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.strava-attribution {
    display: inline-flex;
    align-items: center;
}

.strava-attribution img {
    display: block;
    width: 88px;
    height: 30px;
}

.activity-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 12px 0;
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.activity-page-controls { display: flex; align-items: center; gap: 6px; }
.activity-page-controls > span { margin-right: 6px; }
.activity-page-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}
.activity-page-controls button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.activity-page-controls button:disabled { opacity: 0.3; cursor: default; }
.activity-page-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.activity-page-controls svg { width: 18px; height: 18px; }
.activity-page-bottom { border-top: 1px solid var(--line); }
#view-explorer .panel-head { flex-wrap: wrap; }
@media (max-width: 600px) {
    #activityFilters { width: 100%; }
    #activityFilters .field { flex: 1 1 120px; min-width: 0; }
    #activityFilters input, #activityFilters select { width: 100%; min-width: 0; }
    .activity-page-controls { margin-left: auto; }
    .session-warning { grid-template-columns: 28px minmax(0, 1fr); right: 12px; bottom: 12px; width: calc(100vw - 24px); }
    .session-warning .primary-button { grid-column: 1 / -1; width: 100%; }
}

.chart {
    width: 100%;
    height: 320px;
}

.chart.compact {
    height: 220px;
}

.method-note {
    margin-top: 6px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.method-note summary {
    width: fit-content;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.method-note p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.docs-section {
    min-width: 0;
    display: grid;
    gap: 14px;
}

#view-docs .panel-head {
    flex-wrap: wrap;
}

.goal-user-guide {
    max-width: 78ch;
}

.docs-lead {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.docs-table {
    min-width: 0;
}

.docs-table code,
.docs-section code {
    color: var(--accent);
    font-size: 12px;
}

.docs-section pre {
    overflow: auto;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(5, 8, 23, 0.72);
    padding: 12px;
}

.docs-section pre code {
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
}

.docs-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.doc-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(5, 8, 23, 0.42);
    padding: 14px;
}

.doc-card h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.doc-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.table-wrap {
    position: relative;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    background: rgba(5, 8, 23, 0.38);
}

.compact-table {
    min-width: 0;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    background: rgba(16, 45, 78, 0.7);
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

tr.clickable:hover {
    background: rgba(14, 165, 233, 0.1);
}

.activity-name-cell span,
.activity-name-cell small {
    display: block;
}

.activity-name-cell small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

tr.best-effort-summary.active,
tr.best-effort-summary:hover {
    background: rgba(14, 165, 233, 0.1);
}

.table-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.table-link:hover {
    color: var(--white);
}

.table-link.subtle {
    color: var(--text);
    font-weight: 500;
}

.table-link.subtle:hover {
    color: var(--accent);
}

.best-efforts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.segmented-control {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(5, 8, 23, 0.48);
}

.segmented-control button,
.segmented-control a {
    min-height: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    padding: 6px 12px;
    font-weight: 800;
    font-size: 12px;
    white-space: nowrap;
}

.segmented-control button.active,
.segmented-control button:hover,
.segmented-control a[aria-current="page"],
.segmented-control a:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(14, 165, 233, 0.92));
    color: #020617;
}

nav.segmented-control {
    flex-wrap: wrap;
    max-width: 100%;
    border-radius: 12px;
}

.nested-table {
    margin: 2px 0 4px;
}

.nested-table table {
    min-width: 620px;
    background: rgba(8, 16, 34, 0.82);
}

.calendar-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.calendar-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    align-self: start;
    gap: 12px 20px;
    min-width: 0;
}

.calendar-heading h2 {
    font-size: 22px;
    line-height: 40px;
    text-transform: capitalize;
}

.calendar-navigation {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.calendar-month-arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--ink);
    background: rgba(5, 8, 23, 0.48);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}

.calendar-month-arrow svg {
    width: 20px;
    height: 20px;
}

.calendar-month-arrow:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.calendar-month-arrow:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.calendar-month-picker {
    justify-self: end;
    min-width: 0;
}

.calendar-month-picker input {
    width: 180px;
    max-width: 100%;
}

.calendar-grid,
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-weekdays {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    text-align: center;
}

.calendar-day-weekday {
    display: none;
}

.calendar-grid > .status,
.calendar-grid > .error {
    grid-column: 1 / -1;
}

.calendar-day {
    min-height: 118px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(5, 8, 23, 0.48);
}

.calendar-day.is-empty {
    background: transparent;
    border-style: dashed;
}

.day-number {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 850;
}

.load-bar {
    height: 5px;
    margin: 8px 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform-origin: left center;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.38);
}

.activity-chip {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    width: 100%;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 8px;
    margin-top: 5px;
    padding: 6px;
    background: rgba(16, 45, 78, 0.72);
    color: var(--text);
    text-align: left;
    font-size: 12px;
}

.activity-chip-main,
.calendar-day-totals {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

.calendar-day-totals {
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 11px;
}

.planned-total {
    color: #67e8f9;
}

.activity-chip-title {
    width: 100%;
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-chip.planned-chip {
    border-color: rgba(34, 211, 238, 0.62);
    border-style: dashed;
    background: rgba(5, 16, 31, 0.52);
}

.activity-chip.planned-chip.status-draft {
    border-color: rgba(148, 163, 184, 0.52);
}

.activity-chip.planned-chip.status-cancelled,
.activity-chip.planned-chip.status-replaced,
.activity-chip.planned-chip.status-rescheduled,
.activity-chip.planned-chip.status-skipped {
    opacity: 0.5;
}

.calendar-match {
    display: inline-grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border-radius: 50%;
    background: #2dd4bf;
    color: #03120f;
}

.calendar-match svg {
    width: 12px;
    height: 12px;
}

.calendar-more {
    padding: 5px 2px 0;
    color: var(--muted);
    font-size: 11px;
}

.adaptation-panel {
    margin-top: 18px;
}

.adaptation-panel > .panel-head {
    align-items: flex-start;
    margin-bottom: 18px;
}

.adaptation-panel > .panel-head p {
    max-width: 68ch;
    margin: 6px 0 0;
    color: var(--muted);
}

.adaptation-proposal {
    max-width: 1180px;
    padding: 24px 0 10px;
    border-top: 1px solid var(--line);
}

.adaptation-proposal:first-child {
    padding-top: 0;
    border-top: 0;
}

.adaptation-proposal-header {
    max-width: 88ch;
}

.adaptation-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.adaptation-title-row h3 {
    max-width: 72ch;
    margin: 0;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 600;
    line-height: 1.25;
}

.adaptation-proposal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 18px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
}

.adaptation-proposal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.adaptation-proposal-meta svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.adaptation-lead {
    max-width: 76ch;
    margin: 18px 0 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
}

.adaptation-analysis {
    max-width: 86ch;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.adaptation-section {
    max-width: 88ch;
    margin: 22px 0 0;
}

.adaptation-section h4,
.adaptation-option-section h5,
.adaptation-impact-grid h5,
.adaptation-change h5,
.adaptation-change h6 {
    margin: 0 0 7px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-weight: 600;
    line-height: 1.35;
}

.adaptation-section h4 {
    font-size: 14px;
}

.adaptation-section > p,
.adaptation-recommendation > p {
    margin: 0;
    line-height: 1.6;
}

.adaptation-recommendation {
    border-left: 2px solid var(--accent);
    padding-left: 14px;
}

.adaptation-recommendation-summary {
    color: var(--ink);
    font-size: 15px;
}

.adaptation-recommendation-summary + p {
    margin-top: 5px;
    color: var(--muted);
}

.adaptation-risk-section ul,
.adaptation-impact-grid ul,
.adaptation-change-goals ul {
    margin: 0;
    padding-left: 20px;
}

.adaptation-risk-section li,
.adaptation-impact-grid li,
.adaptation-change-goals li {
    margin: 4px 0;
    line-height: 1.5;
}

.adaptation-evidence > summary,
.adaptation-option-details > summary,
.adaptation-change-set > summary {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: start;
    gap: 9px;
    list-style: none;
    cursor: pointer;
}

.adaptation-evidence > summary::-webkit-details-marker,
.adaptation-option-details > summary::-webkit-details-marker,
.adaptation-change-set > summary::-webkit-details-marker {
    display: none;
}

.adaptation-evidence > summary::before,
.adaptation-option-details > summary::before,
.adaptation-change-set > summary::before {
    content: "›";
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    transform-origin: center;
    transition: transform 120ms ease;
}

.adaptation-evidence[open] > summary::before,
.adaptation-option-details[open] > summary::before,
.adaptation-change-set[open] > summary::before {
    transform: rotate(90deg);
}

.adaptation-evidence > summary,
.adaptation-change-set > summary {
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.adaptation-count {
    min-width: 24px;
    border-radius: 999px;
    padding: 1px 7px;
    background: var(--surface-soft);
    color: var(--muted);
    font-family: Inter, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.adaptation-evidence-list {
    display: grid;
    gap: 0;
    margin: 12px 0 0 21px;
    border-top: 1px solid var(--line);
}

.adaptation-evidence-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr) auto;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 9px 0;
    font-size: 13px;
}

.adaptation-evidence-label,
.adaptation-evidence-row small {
    color: var(--muted);
}

.adaptation-option-picker > .field {
    max-width: 700px;
    margin-top: 9px;
}

.adaptation-options {
    max-width: 1040px;
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.adaptation-option-details {
    margin: 0;
    border-bottom: 1px solid var(--line);
}

.adaptation-option-details > summary {
    padding: 14px 2px;
}

.adaptation-option-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 9px;
}

.adaptation-option-title {
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.adaptation-option-rationale {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.adaptation-option-heading .badge {
    min-height: 20px;
    padding: 1px 7px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
}

.adaptation-option-body {
    padding: 0 2px 20px 21px;
}

.adaptation-deltas {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 220px));
    gap: 10px;
    margin-bottom: 18px;
}

.adaptation-deltas > div {
    border-left: 1px solid var(--line-strong);
    padding-left: 11px;
}

.adaptation-deltas span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.adaptation-deltas strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.adaptation-option-section {
    margin-top: 16px;
}

.adaptation-option-section h5,
.adaptation-impact-grid h5 {
    font-size: 12px;
}

.adaptation-date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.adaptation-date-list time {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--muted);
    font-size: 12px;
}

.adaptation-impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.adaptation-impact-grid section {
    min-width: 0;
}

.adaptation-impact-grid ul {
    color: var(--muted);
    font-size: 13px;
}

.adaptation-change-set {
    margin-top: 22px;
}

.adaptation-change-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.adaptation-change {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    background: rgba(5, 16, 31, 0.32);
}

.adaptation-change-head {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
}

.adaptation-change-index {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--accent);
    font-size: 11px;
}

.adaptation-change h5 {
    font-size: 13px;
}

.adaptation-change-head p {
    max-width: 78ch;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.adaptation-change-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 12px 0 0 38px;
    color: var(--text);
    font-size: 12px;
}

.adaptation-change-meta > span > span {
    margin-right: 6px;
    color: var(--muted);
}

.adaptation-change-meta code {
    color: var(--accent);
    font-size: 11px;
}

.adaptation-change-goals {
    margin: 14px 0 0 38px;
}

.adaptation-change h6 {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.adaptation-change-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.adaptation-change-grid > section {
    min-width: 0;
    border-radius: 8px;
    padding: 12px;
    background: var(--surface);
}

.adaptation-snapshot {
    display: grid;
    gap: 0;
    margin: 0;
}

.adaptation-snapshot > div {
    display: grid;
    grid-template-columns: minmax(104px, 0.35fr) minmax(0, 1fr);
    gap: 10px;
    border-top: 1px solid var(--line);
    padding: 7px 0;
}

.adaptation-snapshot > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.adaptation-snapshot dt {
    color: var(--muted);
    font-size: 11px;
}

.adaptation-snapshot dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
}

.adaptation-empty-snapshot {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
}

.adaptation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
    .adaptation-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .adaptation-proposal-meta {
        display: grid;
        gap: 6px;
    }

    .adaptation-lead {
        font-size: 15px;
    }

    .adaptation-evidence-row,
    .adaptation-change-grid,
    .adaptation-snapshot > div {
        grid-template-columns: minmax(0, 1fr);
    }

    .adaptation-evidence-row {
        gap: 3px;
    }

    .adaptation-deltas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .adaptation-option-body {
        padding-left: 0;
    }

    .adaptation-change-meta,
    .adaptation-change-goals {
        margin-left: 0;
    }

    .adaptation-actions > button {
        flex: 1 1 180px;
    }
}

.activity-chip-duration {
    color: var(--muted);
    padding-left: 23px;
    white-space: nowrap;
}

.planned-workout-hero {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 138px;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.planned-workout-navigation {
    width: 112px;
}

.planned-workout-hero h2 {
    margin: 5px 0 8px;
    font-family: Sora, sans-serif;
    font-size: clamp(22px, 4vw, 38px);
    letter-spacing: 0;
}

.planned-workout-sport {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 0;
    color: var(--muted);
}

.planned-workout-status {
    min-width: 138px;
    padding: 12px 14px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    border-radius: 6px;
    color: #67e8f9;
    text-align: right;
    text-transform: capitalize;
}

.planned-workout-status span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.planned-metrics {
    margin: 18px 0;
}

.planned-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 16px;
}

.planning-steps {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 22px;
}

.planning-steps li {
    padding: 9px 10px;
    border-left: 2px solid var(--accent);
    background: rgba(5, 16, 31, 0.5);
}

.planning-steps li span,
.planning-targets span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.structured-workout-steps ol {
    display: grid;
    gap: 6px;
    margin: 8px 0 0;
    padding-left: 18px;
}

.planning-structure-summary {
    margin: 0 0 12px;
    color: var(--muted);
}

.planning-targets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.planning-targets span {
    margin: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.planned-export {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.planned-export-button {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.planning-copy + .planning-copy {
    margin-top: 16px;
}

.planning-copy h3 {
    margin: 0 0 5px;
    font-size: 13px;
}

.planning-copy p,
.planning-instructions {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.planning-instructions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.comparison-grid div {
    min-width: 0;
}

.comparison-grid span,
.comparison-grid em {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.comparison-grid strong {
    display: block;
    margin: 4px 0;
    overflow-wrap: anywhere;
}

.planned-audit {
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.planned-current-match {
    display: grid;
    gap: 12px;
}

.planned-current-match h3 {
    margin: 0;
    font-size: 14px;
}

.planned-match-editor {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.planned-match-editor > summary {
    width: fit-content;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.planned-match-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(220px, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.planned-match-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.planned-match-status {
    margin: 0 auto 0 0;
}

.planned-match-empty,
.planned-match-occupied {
    margin: 12px 0 0;
}

.activity-detail {
    padding: 16px;
}

.map {
    min-height: 560px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(5, 8, 23, 0.62);
}

.map-placeholder {
    min-height: inherit;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.leaflet-container {
    background: #050817;
    color: #020617;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.leaflet-control-attribution {
    background: rgba(5, 8, 23, 0.7) !important;
    color: var(--muted) !important;
}

.leaflet-control-attribution a {
    color: var(--accent) !important;
}

.settings-table input {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(5, 8, 23, 0.76);
    color: var(--ink);
    padding: 7px 9px;
}

.personal-settings-table {
    min-width: 760px;
}

.profile-settings-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.profile-image-editor {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.profile-image-preview {
    width: 136px;
    height: 136px;
    overflow: hidden;
    border: 2px solid rgba(34, 211, 238, 0.45);
    border-radius: 50%;
    background: var(--bg);
    box-shadow: 0 0 28px rgba(14, 165, 233, 0.16);
}

.profile-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.profile-upload-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.profile-upload-button:hover,
.profile-upload-button:focus-within {
    border-color: var(--accent);
    color: var(--accent);
}

.profile-upload-button svg {
    width: 16px;
    height: 16px;
}

.profile-image-help {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-fields label {
    display: grid;
    align-content: start;
    align-self: start;
    gap: 7px;
    min-width: 0;
}

.profile-fields label > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.profile-verification,
.profile-field-help {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.profile-verification svg {
    width: 14px;
    height: 14px;
}

.profile-verification.is-verified { color: #6ee7b7; }
.profile-verification.is-unverified { color: #fbbf24; }

.profile-fields input {
    width: 100%;
    height: 46px;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.76);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
    font-size: 15px;
    line-height: 1.2;
}

.profile-fields input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.profile-fields input:-webkit-autofill,
.profile-fields input:-webkit-autofill:hover,
.profile-fields input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px #09182a inset;
    caret-color: var(--ink);
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    grid-column: 1 / -1;
    padding-top: 4px;
}

.profile-status {
    grid-column: 1 / -1;
    margin: 0;
}

.personal-settings-table th:first-child,
.personal-settings-table td:first-child {
    width: 150px;
}

.personal-settings-table th:nth-child(2),
.personal-settings-table th:nth-child(3),
.personal-settings-table th:nth-child(4),
.personal-settings-table td:nth-child(2),
.personal-settings-table td:nth-child(3),
.personal-settings-table td:nth-child(4) {
    width: 112px;
}

.weight-history-table {
    min-width: 720px;
}

.weight-history-table th:first-child,
.weight-history-table td:first-child {
    width: 150px;
}

.weight-history-table th:nth-child(2),
.weight-history-table td:nth-child(2) {
    width: 120px;
}

.weight-history-table th:nth-child(3),
.weight-history-table td:nth-child(3) {
    width: 140px;
}

.personal-settings-table th:last-child,
.personal-settings-table td:last-child,
.weight-history-table th:last-child,
.weight-history-table td:last-child {
    width: 88px;
    text-align: right;
}

.personal-history-head-actions,
.settings-history-actions,
.settings-history-editor-actions,
.settings-history-page-controls,
.settings-history-pagination {
    display: flex;
    align-items: center;
}

.personal-history-settings {
    display: grid;
    gap: 16px;
}

.personal-history-head-actions,
.settings-history-editor-actions,
.settings-history-page-controls {
    gap: 8px;
}

.settings-history-editor {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 8px;
    background: rgba(5, 8, 23, 0.58);
    padding: 14px;
}

.settings-history-editor .field {
    min-width: 0;
}

.settings-history-editor .field input {
    width: 100%;
}

.settings-history-editor .settings-history-notes {
    grid-column: 1 / -2;
}

.settings-history-editor-actions {
    justify-content: flex-end;
}

.weight-history-editor {
    grid-template-columns: 160px 150px 180px minmax(180px, 1fr) auto;
}

.weight-history-editor .settings-history-notes {
    grid-column: auto;
}

.settings-history-actions {
    justify-content: flex-end;
    gap: 5px;
}

.settings-history-actions .icon-button,
.settings-history-page-controls .icon-button {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.58);
    color: #dbe7f5;
    padding: 0;
    box-shadow: none;
}

.settings-history-actions .icon-button svg,
.settings-history-page-controls .icon-button svg {
    width: 16px;
    height: 16px;
}

.settings-history-actions .icon-button:hover,
.settings-history-actions .icon-button:focus-visible,
.settings-history-page-controls .icon-button:hover,
.settings-history-page-controls .icon-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.settings-history-actions .icon-button.is-danger:hover,
.settings-history-actions .icon-button.is-danger:focus-visible {
    border-color: #fb7185;
    color: #fb7185;
}

.settings-history-actions .icon-button:disabled,
.settings-history-page-controls .icon-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.settings-history-pagination {
    justify-content: space-between;
    gap: 14px;
    min-height: 42px;
    color: var(--muted);
    font-size: 12px;
}

.gear-settings-panel .panel-head > div {
    min-width: 0;
}

.gear-settings-panel .panel-head p {
    max-width: 760px;
    margin: 5px 0 0;
}

.gear-settings-table {
    min-width: 760px;
}

.gear-settings-table td:first-child strong,
.gear-settings-table td:first-child small {
    display: block;
}

.gear-settings-table td:first-child small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.gear-settings-table th:nth-child(3),
.gear-settings-table td:nth-child(3) {
    width: 105px;
    text-align: right;
}

.gear-settings-table th:nth-child(4),
.gear-settings-table td:nth-child(4) {
    width: 145px;
}

.gear-settings-table th:last-child,
.gear-settings-table td:last-child {
    width: 190px;
}

.gear-primary {
    display: inline-block;
    margin-left: 5px;
    border: 1px solid rgba(34, 211, 238, 0.38);
    border-radius: 999px;
    color: var(--accent);
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.gear-current-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.gear-current-toggle input {
    inset: 0 auto auto 0;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.gear-toggle-track {
    display: flex;
    align-items: center;
    width: 38px;
    height: 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    padding: 2px;
    transition: border-color 160ms ease, background 160ms ease;
}

.gear-toggle-track span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform 160ms ease, background 160ms ease;
}

.gear-current-toggle input:checked + .gear-toggle-track {
    border-color: rgba(34, 211, 238, 0.7);
    background: rgba(34, 211, 238, 0.18);
}

.gear-current-toggle input:checked + .gear-toggle-track span {
    transform: translateX(16px);
    background: var(--accent);
}

.gear-current-toggle input:focus-visible + .gear-toggle-track {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.gear-current-toggle em {
    min-width: 70px;
    color: var(--ink);
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
}

.settings-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.settings-note p {
    margin: 4px 0;
}

.validation-matrix td {
    min-width: 118px;
    vertical-align: top;
}

.validation-matrix .cell-sub {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.validation-sources {
    display: grid;
    gap: 0;
}

.validation-source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.validation-source-row > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.validation-source-row span {
    color: var(--muted);
    font-size: 13px;
}

.source-state {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-weight: 750;
}

.source-state.available {
    border-color: rgba(45, 212, 191, 0.38);
    color: var(--good);
}

.source-state.unavailable {
    border-color: rgba(148, 163, 184, 0.28);
    color: var(--muted);
}

.validation-method-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.load-value {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.load-source-tag {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.load-source-tag.power {
    border-color: rgba(14, 165, 233, 0.42);
    color: var(--accent);
}

.load-source-tag.heart-rate {
    border-color: rgba(45, 212, 191, 0.38);
    color: var(--good);
}

.load-source-tag.hr-calibrated {
    border-color: rgba(34, 211, 238, 0.42);
    color: var(--accent);
}

.load-source-tag.hr-trimp {
    border-color: rgba(134, 239, 172, 0.38);
    color: #86efac;
}

.load-source-tag.estimated,
.load-source-tag.none {
    border-color: rgba(148, 163, 184, 0.28);
    color: var(--muted);
}

.load-source-tag.manual {
    border-color: rgba(250, 204, 21, 0.38);
    color: #facc15;
}

.model-current-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.model-current {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.44);
}

.model-current h3,
.model-current p {
    margin: 0 0 8px;
}

.model-current p,
.model-current dt {
    color: var(--muted);
}

.model-current dl,
.model-current dl div {
    display: grid;
    gap: 5px;
    margin: 0;
}

.model-current dl div {
    grid-template-columns: 1fr auto;
    border-top: 1px solid var(--line);
    padding-top: 6px;
}

.model-current dd {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

.detail-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.detail-metrics .metric-card {
    min-height: 82px;
    box-shadow: none;
}

.zone-block {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.zone-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.zone-grid .zone-block {
    margin-top: 0;
}

.zone-block h3 {
    margin: 0;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.zone-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.zone-row div {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.zone-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--good));
}

.zone-row strong {
    color: var(--text);
    text-align: right;
}

.zone-tooltip {
    margin-top: 4px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.zone-tooltip summary {
    width: fit-content;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.zone-tooltip div {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(5, 8, 23, 0.62);
}

.zone-tooltip p {
    display: grid;
    grid-template-columns: minmax(112px, 1.1fr) minmax(82px, 0.9fr) minmax(92px, auto);
    align-items: start;
    gap: 8px 12px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.zone-tooltip strong {
    color: var(--text);
    min-width: 0;
    overflow-wrap: anywhere;
}

.zone-tooltip span {
    color: var(--text);
    white-space: nowrap;
}

.zone-tooltip em {
    color: var(--muted);
    font-style: normal;
    text-align: right;
    white-space: nowrap;
}

.segment-table table {
    min-width: 820px;
}

.segment-table th,
.segment-table td {
    padding: 8px 10px;
}

.segment-table th:first-child,
.segment-table td:first-child {
    width: 42px;
    white-space: nowrap;
}

.segment-table th:nth-child(n + 3),
.segment-table td:nth-child(n + 3) {
    white-space: nowrap;
}

.segment-table td:nth-child(2) {
    min-width: 180px;
}

.segment-table .badge {
    margin: 0 4px 4px 0;
}

@media (max-width: 760px) {
    .segment-table table {
        min-width: 720px;
    }

    .segment-table th,
    .segment-table td {
        padding: 7px 8px;
        font-size: 13px;
    }

    .segment-table td:nth-child(2) {
        min-width: 150px;
    }
}

.rank-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;
    background: rgba(5, 8, 23, 0.5);
    vertical-align: middle;
}

.rank-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rank-icon span {
    position: absolute;
    right: 2px;
    bottom: 1px;
    min-width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(5, 8, 23, 0.88);
    color: var(--white);
    font-size: 9px;
    font-weight: 900;
    line-height: 14px;
    text-align: center;
}

.rank-gold {
    color: #facc15;
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.18);
}

.rank-silver {
    color: #cbd5e1;
    box-shadow: 0 0 16px rgba(203, 213, 225, 0.14);
}

.rank-bronze {
    color: #d08a45;
    box-shadow: 0 0 16px rgba(208, 138, 69, 0.16);
}

.rank-green {
    color: #86efac;
    box-shadow: 0 0 16px rgba(134, 239, 172, 0.16);
}

.muted {
    color: var(--muted);
}

.status {
    padding: 18px;
    color: var(--muted);
}

.error {
    color: var(--danger);
    font-weight: 800;
}

.status-stack {
    display: grid;
    gap: 10px;
}

.status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.status-line-label {
    color: var(--muted);
    font-size: 13px;
}

.status-line-value {
    display: inline-grid;
    grid-template-columns: minmax(0, auto) auto;
    align-items: baseline;
    justify-content: end;
    gap: 0.35em;
    min-width: 0;
    margin-left: auto;
    text-align: right;
}

.status-line-value strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    text-align: right;
}

.status-line-value em {
    min-width: max-content;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 2px 9px;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
}

.badge-success {
    background: rgba(45, 212, 191, 0.18);
    color: var(--good);
}

.badge-running {
    background: rgba(14, 165, 233, 0.22);
    color: var(--accent-3);
}

.badge-failed {
    background: rgba(251, 113, 133, 0.16);
    color: var(--danger);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
}

.badge-disabled,
.badge-unknown,
.badge-info,
.badge-debug {
    background: rgba(151, 164, 185, 0.12);
    color: var(--muted);
}

.badge-error {
    background: rgba(251, 113, 133, 0.16);
    color: var(--danger);
}

.panel-warning {
    border-color: rgba(251, 113, 133, 0.5);
}

.rate-row {
    display: grid;
    gap: 7px;
}

.validation-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.validation-toolbar .segmented-control {
    flex: 1 1 auto;
}

.validation-year-field {
    flex: 0 0 138px;
}

.validation-year-field select {
    width: 100%;
}

.analysis-badge,
.performance-tier {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.performance-tier {
    min-height: 22px;
    border-color: var(--line);
    color: var(--muted);
}

.tier-personal_best_level,
.tier-top_5 {
    border-color: rgba(45, 212, 191, 0.42);
    color: var(--good);
}

.tier-top_10,
.tier-top_25 {
    border-color: rgba(34, 211, 238, 0.34);
    color: var(--accent-3);
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.evidence-block {
    min-width: 0;
    padding: 20px 0;
}

.evidence-block + .evidence-block {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.evidence-block h2 {
    margin: 0 0 12px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

.evidence-block ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
}

.evidence-block li + li {
    margin-top: 9px;
}

.evidence-strong h2 {
    color: var(--good);
}

.evidence-moderate h2 {
    color: var(--accent-3);
}

.evidence-weak h2 {
    color: var(--muted);
}

.validation-assessment {
    padding: 8px 18px 18px;
}

.validation-assessment dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0 0 18px;
}

.validation-assessment dl div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.validation-assessment dt {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.validation-assessment dd {
    margin: 3px 0 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
}

.validation-assessment p,
.method-grid p {
    color: var(--muted);
    font-size: 13px;
}

.validation-method {
    margin-top: 18px;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}

.method-grid strong {
    color: var(--text);
    text-transform: capitalize;
}

.capability-toolbar,
.capability-window-bar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.capability-model-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.capability-model-switch > span:first-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.capability-toolbar > .segmented-control:first-child {
    flex: 1 1 auto;
}

.compact-segments {
    flex: 0 1 auto;
}

.capability-year-field {
    flex: 0 0 126px;
}

.capability-year-field select {
    width: 100%;
}

.capability-window-bar {
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
}

.capability-window-bar > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.chart-tall {
    height: 390px;
}

.capability-review-heading {
    margin-top: 28px;
}

.analysis-only-label {
    align-self: center;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--accent-3);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.capability-observed-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(105px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--line);
}

.capability-observed-grid > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 14px;
    background: var(--panel);
}

.capability-observed-grid span,
.capability-observed-grid small {
    color: var(--muted);
    font-size: 11px;
}

.capability-observed-grid strong {
    font-size: 20px;
}

.validation-ok {
    margin: -2px 0 18px;
    color: var(--good);
    font-size: 13px;
}

.validation-warning {
    padding-left: 10px;
    border-left: 3px solid var(--danger);
    color: var(--text);
    font-size: 13px;
}

.panel-note {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.selected-contributor td {
    background: rgba(34, 211, 238, 0.07);
}

.capability-trace-table {
    max-height: 520px;
}

.diagnostic-table-section + .diagnostic-table-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.diagnostic-table-section h3 {
    margin: 0 0 10px;
    font-size: 14px;
}

.capability-state,
.evidence-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.state-rising,
.evidence-label-strong {
    border-color: rgba(45, 212, 191, 0.42);
    color: var(--good);
}

.state-medium_high,
.state-high {
    border-color: rgba(45, 212, 191, 0.42);
    color: var(--good);
}

.state-medium {
    border-color: rgba(14, 165, 233, 0.42);
    color: var(--blue);
}

.state-low {
    border-color: rgba(251, 191, 36, 0.42);
    color: #fbbf24;
}

.state-declining {
    border-color: rgba(251, 113, 133, 0.42);
    color: var(--danger);
}

.evidence-label-moderate {
    border-color: rgba(34, 211, 238, 0.34);
    color: var(--accent-3);
}

.evidence-label-weak {
    border-color: rgba(251, 191, 36, 0.42);
    color: #fbbf24;
}

.trend-rising {
    color: var(--good);
}

.trend-declining {
    color: var(--danger);
}

.trend-stable {
    color: var(--muted);
}

.progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.progress span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--good), var(--accent), var(--accent-2));
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.42);
}

.goal-heading {
    margin-bottom: 14px;
}

.goal-registry {
    margin-bottom: 26px;
}

.goal-registry-heading {
    align-items: center;
    margin-bottom: 8px;
}

.goal-registry-intro {
    max-width: 820px;
    margin: 0 0 16px;
    color: var(--muted);
}

.goal-registry-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.goal-registry-help {
    display: none;
}

.goal-add-button,
.goal-dimensions-heading button,
.goal-form-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.goal-add-button svg,
.goal-dimensions-heading button svg,
.goal-form-actions button svg {
    width: 17px;
    height: 17px;
}

.goal-registry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.goal-registry-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(10, 25, 44, 0.64);
    padding: 17px;
}

.goal-registry-card.is-archived {
    background: rgba(10, 25, 44, 0.36);
}

.goal-registry-card-head,
.goal-card-actions,
.goal-meta,
.goal-dimensions-heading,
.goal-form-actions {
    display: flex;
    align-items: center;
}

.goal-registry-card-head,
.goal-dimensions-heading {
    justify-content: space-between;
    gap: 12px;
}

.goal-card-actions,
.goal-meta {
    gap: 8px;
}

.goal-registry-card h3,
.goal-editor h3,
.goal-dimensions-heading h4 {
    margin: 0;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    letter-spacing: 0;
}

.goal-registry-card h3 {
    margin-top: 13px;
    font-size: 18px;
}

.goal-registry-card > p {
    margin: 12px 0;
    color: #cbd5e1;
    line-height: 1.55;
}

.goal-priority,
.goal-role,
.goal-status {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    margin-right: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.goal-priority {
    border-color: rgba(34, 211, 238, 0.45);
    color: var(--accent);
}

.goal-role {
    border-color: rgba(14, 165, 233, 0.3);
    color: #bae6fd;
    text-transform: none;
}

.goal-status-active { border-color: rgba(45, 212, 191, 0.42); color: #5eead4; }
.goal-status-achieved { border-color: rgba(74, 222, 128, 0.42); color: #86efac; }
.goal-status-missed { border-color: rgba(251, 113, 133, 0.5); color: #fda4af; }
.goal-status-abandoned,
.goal-status-archived { border-color: rgba(148, 163, 184, 0.34); color: #cbd5e1; }
.goal-status-draft { color: #cbd5e1; }

.goal-card-actions .icon-button {
    width: 34px;
    height: 34px;
}

.goal-card-actions .icon-button,
.goal-remove-dimension {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.48);
    color: var(--muted);
    box-shadow: none;
    transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.goal-card-actions .icon-button svg,
.goal-remove-dimension svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.8;
}

.goal-card-actions .icon-button:hover,
.goal-card-actions .icon-button:focus-visible {
    border-color: rgba(34, 211, 238, 0.62);
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
}

.goal-card-actions .icon-button:hover,
.goal-remove-dimension:hover {
    transform: translateY(-1px);
}

.goal-card-actions .icon-button:focus-visible,
.goal-remove-dimension:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.goal-archive-button:hover,
.goal-archive-button:focus-visible,
.goal-remove-dimension:hover,
.goal-remove-dimension:focus-visible {
    border-color: rgba(251, 113, 133, 0.55);
    background: rgba(251, 113, 133, 0.1);
    color: #fda4af;
}

.goal-meta {
    flex-wrap: wrap;
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
}

.goal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.goal-meta svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.goal-dimension-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.goal-evidence-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.goal-evidence-overview > div {
    min-width: 0;
    padding: 9px 10px 9px 0;
}

.goal-evidence-overview dt,
.goal-dimension-metrics dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.goal-evidence-overview dd,
.goal-dimension-metrics dd {
    margin: 3px 0 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.goal-dimension-summary {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding-top: 11px;
}

.goal-dimension-summary.is-insufficient {
    opacity: 0.82;
}

.goal-dimension-summary.is-stale {
    border-top-color: rgba(251, 191, 36, 0.3);
}

.goal-dimension-title {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
}

.goal-dimension-summary strong,
.goal-dimension-summary small {
    display: block;
}

.goal-dimension-summary small,
.goal-no-dimensions {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.goal-evidence-state {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 3px 7px;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 700;
}

.goal-evidence-state.is-stale {
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

.goal-metric-role {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid rgba(34, 211, 238, .28);
    color: #67e8f9;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.goal-dimension-limitation {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}

.goal-scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.goal-scenario-item {
    min-width: 0;
    border-left: 2px solid rgba(14, 165, 233, 0.55);
    padding-left: 14px;
}

.goal-scenario-item h3 {
    margin: 3px 0 12px;
    color: var(--ink);
    font-size: 21px;
}

.goal-scenario-item dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 13px;
}

.goal-scenario-item dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.goal-scenario-item dd {
    margin: 3px 0 0;
    color: var(--ink);
    font-weight: 700;
}

.goal-scenario-item ul {
    margin: 8px 0 12px;
    padding-left: 18px;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.55;
}

.goal-scenario-item details {
    color: var(--muted);
    font-size: 12px;
}

.goal-dimension-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 0 37px;
}

.goal-dimension-metrics > div {
    min-width: 0;
}

.goal-dimension-explanation {
    margin: 10px 0 0 37px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.goal-trend {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.1);
    color: var(--muted);
}

.goal-trend svg { width: 15px; height: 15px; }
.goal-trend-rising { color: #5eead4; }
.goal-trend-declining { color: #fda4af; }
.goal-trend-stable { color: #7dd3fc; }

.goal-empty {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 20px;
    color: var(--muted);
}

.goal-empty > svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.goal-empty p { margin: 4px 0 0; }

.goal-editor {
    margin-top: 16px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 8px;
    background: rgba(5, 8, 23, 0.66);
    padding: 18px;
}

.goal-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.goal-form .field,
.goal-dimension-editor-row .field {
    display: grid;
    gap: 6px;
}

.goal-form .field > span,
.goal-dimension-editor-row .field > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.goal-form textarea,
.goal-dimension-editor-row textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(5, 8, 23, 0.76);
    color: var(--ink);
    padding: 10px 11px;
    font: inherit;
    outline: none;
}

.goal-form textarea:focus,
.goal-dimension-editor-row textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.goal-description-field {
    grid-column: 1 / -1;
}

.goal-dimensions-editor {
    margin-top: 22px;
    border-top: 1px solid var(--line);
    padding-top: 17px;
}

.goal-dimensions-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

#goalDimensionRows {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.goal-dimension-editor-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(115px, 1fr)) 38px;
    gap: 9px;
    align-items: end;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 6px;
    padding: 12px;
}

.goal-dimension-evidence {
    grid-column: 1 / -1;
}

.goal-remove-dimension {
    width: 38px;
    height: 40px;
}

.goal-form-actions {
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.goal-form-error {
    margin: 12px 0 0;
    color: var(--danger);
    font-weight: 700;
}

.goal-analysis-divider {
    height: 1px;
    margin: 26px 0;
    background: var(--line);
}

.goal-tabs {
    display: flex;
    flex-wrap: wrap;
    width: fit-content;
    margin-bottom: 12px;
}

.goal-provenance {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 12px;
}

.goal-source,
.compatibility-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.source-measured {
    border-color: rgba(45, 212, 191, 0.4);
    color: #5eead4;
}

.source-calculated {
    border-color: rgba(56, 189, 248, 0.42);
    color: #7dd3fc;
}

.source-estimated {
    border-color: rgba(251, 191, 36, 0.4);
    color: #fde68a;
}

.source-athlete {
    border-color: rgba(244, 114, 182, 0.4);
    color: #f9a8d4;
}

.goal-boundary {
    margin: 0 0 20px;
    border-left: 3px solid var(--accent);
    background: rgba(14, 165, 233, 0.08);
    padding: 12px 14px;
    color: #cbd5e1;
}

.goal-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.goal-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(10, 25, 44, 0.64);
    padding: 18px;
}

.goal-card h3 {
    margin: 5px 0 14px;
    color: var(--ink);
    font-family: Sora, Inter, sans-serif;
    font-size: 19px;
    letter-spacing: 0;
}

.goal-card p {
    color: #cbd5e1;
}

.goal-card dl {
    display: grid;
    grid-template-columns: minmax(120px, 0.35fr) 1fr;
    gap: 8px 14px;
    margin: 0;
}

.goal-card dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.goal-card dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.goal-evidence-grid h3 {
    margin: 10px 0 8px;
    color: var(--ink);
    font-size: 14px;
    letter-spacing: 0;
}

.goal-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.goal-list li {
    display: grid;
    grid-template-columns: minmax(110px, 0.25fr) 1fr auto;
    align-items: start;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 0 0 10px;
}

.goal-list li:last-child {
    border-bottom: 0;
}

.goal-list strong {
    color: var(--accent);
    text-transform: capitalize;
}

.goal-list.simple li {
    display: list-item;
    margin-left: 18px;
    border: 0;
    padding: 2px 0;
    list-style: disc;
}

.conflict-list li::marker {
    color: var(--danger);
}

.goal-conclusion {
    margin-top: 18px;
    border-top: 1px solid var(--line-strong);
    padding-top: 22px;
}

.goal-conclusion-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.goal-conclusion-grid > div {
    min-width: 0;
    border-right: 1px solid var(--line);
    padding: 14px;
}

.goal-conclusion-grid > div:last-child {
    border-right: 0;
}

.goal-conclusion-grid span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.goal-conclusion-grid p {
    margin: 8px 0 0;
    overflow-wrap: anywhere;
}

.compatibility-grid {
    display: grid;
    gap: 0;
}

.compatibility-row {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) 150px 1.5fr;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.compatibility-row:last-child {
    border-bottom: 0;
}

.compatibility-row > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compatibility-row p {
    margin: 0;
    color: #cbd5e1;
}

.compatibility-strong_synergy {
    border-color: rgba(45, 212, 191, 0.45);
    color: #5eead4;
}

.compatibility-moderate_synergy {
    border-color: rgba(34, 211, 238, 0.42);
    color: #67e8f9;
}

.compatibility-neutral {
    color: #cbd5e1;
}

.compatibility-moderate_conflict,
.compatibility-strong_conflict {
    border-color: rgba(251, 113, 133, 0.42);
    color: #fda4af;
}

@media (max-width: 1080px) {
    .checkin-slider-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkin-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-workout-result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .calendar-grid .activity-chip-main,
    .calendar-grid .sport-label {
        flex-wrap: wrap;
    }

    .calendar-grid .sport-label,
    .calendar-grid .activity-chip-duration {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .calendar-grid .activity-chip-duration {
        padding-left: 0;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-state-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .startup-skeleton-grid,
    .startup-skeleton-state {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .startup-skeleton-state .startup-skeleton-block:first-child {
        grid-column: 1 / -1;
    }

    .overview-profile-card {
        grid-column: 1 / -1;
    }

    .activity-weather-grid {
        grid-template-columns: 1fr;
    }

    .load-status-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .chart-grid,
    .explorer-grid,
    .activity-layout,
    .planned-detail-grid,
    .docs-grid,
    .compare-grid,
    .evidence-grid {
        grid-template-columns: 1fr;
    }

    .evidence-block + .evidence-block {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-left: 0;
    }

    .capability-observed-grid {
        grid-template-columns: repeat(3, minmax(105px, 1fr));
    }

    .goal-conclusion-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-conclusion-grid > div:nth-child(2n) {
        border-right: 0;
    }

    .compatibility-row {
        grid-template-columns: 1fr 150px;
    }

    .compatibility-row p {
        grid-column: 1 / -1;
    }

    .comparison-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .comparison-grid .ghost-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .daily-checkin-header {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .daily-checkin-header > .ghost-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .checkin-slider-grid,
    .checkin-detail-grid,
    .post-workout-question-grid,
    .post-workout-nutrition-grid {
        grid-template-columns: 1fr;
    }

    .post-workout-gi {
        grid-column: auto;
    }

    .planned-match-form {
        grid-template-columns: 1fr;
    }

    .planned-match-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .planned-match-status {
        margin: 0;
    }

    .planned-match-actions .primary-button,
    .planned-match-actions .ghost-button {
        width: 100%;
    }

    .body-feel-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-workout-issues,
    .post-workout-radios {
        grid-template-columns: 1fr;
    }

    .post-workout-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .readiness-assessment {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .readiness-assessment-score {
        grid-column: 2;
        justify-items: start;
    }

    .readiness-assessment-score span {
        text-align: left;
    }

    .readiness-method {
        grid-column: 1 / -1;
    }

    .overview-today-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .overview-today-summary {
        grid-column: 2;
        white-space: normal;
    }

    .overview-today-item {
        grid-template-columns: minmax(0, 1fr) 18px;
        gap: 7px 10px;
        padding: 13px 14px;
    }

    .overview-today-sport,
    .overview-today-copy,
    .overview-today-status {
        grid-column: 1;
    }

    .overview-today-status {
        justify-content: flex-start;
    }

    .overview-today-arrow {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
    }

    .planned-workout-hero {
        align-items: flex-start;
        grid-template-columns: minmax(0, 1fr);
    }

    .planned-workout-status {
        min-width: 0;
        text-align: left;
    }

    .planning-targets,
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid .ghost-button {
        grid-column: auto;
        width: 100%;
    }

    .recent-seven-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .recent-category-grid {
        grid-template-columns: 1fr;
    }

    .capability-observed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .capability-review-heading {
        align-items: flex-start;
    }

    .goal-card-grid,
    .goal-registry-grid,
    .goal-scenario-grid,
    .goal-conclusion-grid {
        grid-template-columns: 1fr;
    }

    .goal-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-dimension-editor-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-dimension-evidence {
        grid-column: 1 / -1;
    }

    .goal-remove-dimension {
        justify-self: end;
    }

    .goal-card dl,
    .goal-list li,
    .compatibility-row {
        grid-template-columns: 1fr;
    }

    .goal-dimension-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-conclusion-grid > div,
    .goal-conclusion-grid > div:nth-child(2n) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .goal-conclusion-grid > div:last-child {
        border-bottom: 0;
    }

    .goal-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 14px;
    }

    .sidebar-brand img {
        width: 190px;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-group {
        grid-column: 1 / -1;
    }

    .sidebar-foot {
        align-items: end;
    }

    .sidebar-foot .language-selector {
        width: min(220px, 100%);
    }

    .sidebar-account-actions {
        width: auto;
    }

    .main {
        padding: 16px;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-tools {
        width: 100%;
        margin-left: 0;
    }

    .validation-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .capability-toolbar,
    .capability-window-bar,
    .capability-model-switch {
        align-items: stretch;
        flex-direction: column;
    }

    .validation-toolbar .segmented-control {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .validation-year-field,
    .analysis-badge {
        width: 100%;
    }

    .capability-year-field,
    .capability-toolbar .segmented-control,
    .capability-window-bar .segmented-control {
        width: 100%;
    }

    .analysis-badge {
        justify-content: center;
    }

    .method-grid,
    .validation-assessment dl {
        grid-template-columns: 1fr;
    }

    .filters label,
    .field,
    .filters input,
    .filters select {
        width: 100%;
    }

    .validation-source-row,
    .validation-source-row > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .metrics-grid,
    .overview-state-grid,
    .detail-metrics,
    .zone-grid,
    .docs-cards,
    .model-current-grid {
        grid-template-columns: 1fr;
    }

    .overview-profile-card {
        grid-column: auto;
    }

    .load-status-range,
    .load-method-grid,
    .load-reference-grid,
    .load-reference-evidence,
    .load-insight-list {
        grid-template-columns: 1fr;
    }

    .load-insights-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .load-reference-card header {
        min-height: 0;
    }

    .load-reference-card dl {
        margin-top: 14px;
    }

    .load-status-range {
        display: grid;
    }

    .load-status-range .field,
    .load-status-range input,
    .load-status-range .primary-button {
        width: 100%;
    }

    .profile-settings-layout,
    .profile-fields {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        justify-content: stretch;
    }

    .profile-actions button {
        flex: 1 1 0;
    }

    .goal-registry-heading,
    .goal-dimensions-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .goal-add-button,
    .goal-dimensions-heading button {
        width: 100%;
    }

    .goal-form-grid,
    .goal-dimension-editor-row {
        grid-template-columns: 1fr;
    }

    .goal-description-field,
    .goal-dimension-evidence {
        grid-column: auto;
    }

    .goal-form-actions button {
        flex: 1 1 0;
    }

    .goal-evidence-overview,
    .goal-dimension-metrics {
        grid-template-columns: 1fr;
    }

    .goal-dimension-title {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .goal-evidence-state {
        grid-column: 2;
        justify-self: start;
    }

    .activity-hero {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .activity-hero-navigation {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .activity-hero-copy {
        grid-column: 1 / -1;
    }

    .activity-hero-sport {
        grid-column: 2;
        grid-row: 1;
        min-width: 68px;
    }

    .map {
        min-height: 480px;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-header {
        grid-template-columns: 1fr;
    }

    .calendar-heading {
        gap: 10px;
    }

    .calendar-heading h2 {
        font-size: 20px;
    }

    .calendar-month-picker {
        width: auto;
    }

    .calendar-weekdays {
        display: none;
    }

    .calendar-day .day-number {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .calendar-day-weekday {
        display: inline;
        color: var(--muted);
        font-size: 13px;
        font-weight: 500;
        text-transform: capitalize;
    }

    .calendar-day.is-empty {
        display: none;
    }
}

/* Mobile application shell. Desktop keeps the sidebar and existing layout. */
.mobile-app-header,
.mobile-tabbar,
.mobile-analysis-nav,
.mobile-overview-filters,
.mobile-detailed-filters,
.calendar-footer-navigation {
    display: none;
}

@media (max-width: 760px) {
    :root {
        --mobile-header-height: 54px;
        --mobile-tabbar-height: 62px;
        --mobile-tabbar-bottom: max(3px, calc(env(safe-area-inset-bottom) - 5px));
    }

    body {
        overflow-x: hidden;
    }

    .personal-history-panel .panel-head {
        align-items: flex-start;
        gap: 10px;
    }

    .personal-history-settings {
        gap: 12px;
    }

    .personal-history-head-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .personal-history-head-actions .ghost-button {
        min-height: 36px;
        padding: 6px 11px;
        font-size: 12px;
    }

    .settings-history-editor,
    .weight-history-editor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
    }

    .settings-history-editor .settings-history-notes,
    .weight-history-editor .settings-history-notes,
    .settings-history-editor-actions {
        grid-column: 1 / -1;
    }

    .settings-history-editor-actions button {
        flex: 1 1 0;
    }

    .settings-history-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding: 8px 0 2px;
    }

    .settings-history-page-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .app-shell {
        display: block;
        min-height: 100dvh;
    }

    .sidebar {
        display: none;
    }

    .mobile-app-header {
        position: fixed;
        z-index: 1000;
        top: 0;
        right: 0;
        left: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        height: calc(var(--mobile-header-height) + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 10px 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        background: rgba(4, 10, 22, 0.96);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
        backdrop-filter: blur(18px);
    }

    .mobile-header-action,
    .mobile-header-profile,
    .mobile-header-brand {
        display: grid;
        place-items: center;
        padding: 0;
        color: #dbe7f5;
        border-radius: 6px;
    }

    .mobile-header-action {
        width: 38px;
        height: 38px;
        border: 0;
        background: transparent;
    }

    .mobile-header-action svg {
        width: 21px;
        height: 21px;
    }

    .mobile-header-action.active,
    .mobile-header-action:hover,
    .mobile-header-action:focus-visible {
        color: var(--accent);
        background: rgba(34, 211, 238, 0.09);
        outline: none;
    }

    .mobile-header-action .notification-count {
        top: 0;
        right: -1px;
    }

    .notification-settings-panel {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 11px;
        margin-bottom: 16px;
        padding: 14px;
    }

    .notification-settings-icon {
        width: 42px;
        height: 42px;
    }

    .notification-settings-copy h2 {
        font-size: 17px;
    }

    .notification-settings-copy > p:last-child {
        font-size: 12px;
        line-height: 1.45;
    }

    .notification-settings-panel > button {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .notification-row {
        min-height: 68px;
        grid-template-columns: 36px minmax(0, 1fr) 18px;
        gap: 10px;
    }

    .notification-type-icon {
        width: 34px;
        height: 34px;
    }

    .push-permission-prompt {
        right: 10px;
        bottom: calc(var(--mobile-tabbar-height) + var(--mobile-tabbar-bottom) + 18px);
        left: 10px;
        grid-template-columns: 30px minmax(0, 1fr);
        padding: 13px;
    }

    .push-permission-actions {
        grid-column: 1 / -1;
    }

    .push-permission-actions button {
        flex: 1 1 0;
    }

    .mobile-header-brand {
        position: absolute;
        top: calc(env(safe-area-inset-top) + 27px);
        left: 50%;
        width: 38px;
        height: 38px;
        transform: translate(-50%, -50%) translateY(1px);
    }

    .mobile-header-brand img {
        display: block;
        width: 34px;
        height: 34px;
    }

    .pwa-standalone .mobile-header-brand {
        transform: translate(-50%, -50%) translateY(4px);
    }

    @media (display-mode: standalone) {
        .mobile-header-brand {
            transform: translate(-50%, -50%) translateY(4px);
        }
    }

    .mobile-header-brand:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    .mobile-header-account {
        grid-column: 3;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mobile-header-primary {
        grid-column: 1;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mobile-header-profile {
        width: 34px;
        height: 34px;
        overflow: hidden;
        border: 1px solid rgba(34, 211, 238, 0.52);
        border-radius: 50%;
    }

    .mobile-header-profile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-header-profile.active,
    .mobile-header-profile:focus-visible {
        border-color: var(--accent);
        outline: 2px solid rgba(34, 211, 238, 0.28);
        outline-offset: 2px;
    }

    .mobile-logout-form {
        margin: 0;
    }

    .mobile-tabbar {
        position: fixed;
        z-index: 1000;
        right: 12px;
        bottom: var(--mobile-tabbar-bottom);
        left: 12px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: var(--mobile-tabbar-height);
        padding: 5px;
        overflow: hidden;
        border: 1px solid rgba(210, 229, 244, 0.17);
        border-radius: 24px;
        background: rgba(6, 18, 31, 0.46);
        box-shadow:
            0 14px 38px rgba(0, 0, 0, 0.42),
            0 2px 8px rgba(0, 0, 0, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        -webkit-backdrop-filter: blur(26px) saturate(1.65) brightness(1.12);
        backdrop-filter: blur(26px) saturate(1.65) brightness(1.12);
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .mobile-tabbar a {
        display: grid;
        grid-template-rows: 29px 16px;
        place-items: center;
        align-content: center;
        min-width: 0;
        min-height: 50px;
        border: 1px solid transparent;
        border-radius: 18px;
        color: #a8b8ca;
        font-size: 10.5px;
        font-weight: 700;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
    }

    .mobile-tabbar a svg {
        width: 23px;
        height: 23px;
    }

    .mobile-tabbar-avatar {
        display: block;
        width: 25px;
        height: 25px;
        border: 1px solid rgba(168, 184, 202, 0.72);
        border-radius: 50%;
        object-fit: cover;
        transition: border-color 160ms ease, box-shadow 160ms ease;
    }

    .mobile-tabbar a span {
        display: block;
        width: 100%;
        overflow: hidden;
        padding: 0 2px;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-tabbar a.active,
    .mobile-tabbar a:focus-visible {
        color: var(--accent);
        border-color: rgba(118, 231, 241, 0.1);
        background: rgba(34, 211, 238, 0.12);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
        outline: none;
    }

    .mobile-tabbar .mobile-coach-tab.active .mobile-tabbar-avatar,
    .mobile-tabbar .mobile-coach-tab:focus-visible .mobile-tabbar-avatar {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.22);
    }

    @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
        .mobile-tabbar {
            background: rgba(8, 20, 34, 0.96);
        }
    }

    .mobile-analysis-nav:not([hidden]) {
        position: fixed;
        z-index: 990;
        top: calc(var(--mobile-header-height) + env(safe-area-inset-top));
        right: 0;
        left: 0;
        display: block;
        padding: 6px 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
        background: rgba(6, 17, 32, 0.96);
        backdrop-filter: blur(18px);
    }

    .mobile-analysis-nav details {
        position: relative;
    }

    .mobile-analysis-nav summary {
        display: grid;
        grid-template-columns: 26px auto minmax(0, 1fr) 18px;
        align-items: center;
        min-height: 36px;
        gap: 7px;
        border: 1px solid var(--line);
        border-radius: 6px;
        padding: 5px 9px;
        color: var(--ink);
        cursor: pointer;
        list-style: none;
        font-size: 12px;
    }

    .mobile-analysis-nav summary::-webkit-details-marker {
        display: none;
    }

    .mobile-analysis-summary-icon,
    .mobile-analysis-summary-icon svg {
        width: 19px;
        height: 19px;
        color: var(--accent);
    }

    #mobileAnalysisCurrent {
        overflow: hidden;
        color: var(--muted);
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        font-weight: 600;
    }

    .mobile-analysis-chevron {
        width: 16px;
        height: 16px;
        transition: transform 160ms ease;
    }

    .mobile-analysis-nav details[open] .mobile-analysis-chevron {
        transform: rotate(180deg);
    }

    .mobile-analysis-links {
        position: absolute;
        z-index: 2;
        top: 42px;
        right: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 7px;
        background: #071427;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
    }

    .mobile-analysis-links a {
        min-width: 0;
        border-radius: 5px;
        padding: 9px 8px;
        color: #bdcad9;
        font-size: 11px;
        font-weight: 650;
        line-height: 1.25;
    }

    .mobile-analysis-links a.active,
    .mobile-analysis-links a:focus-visible {
        background: rgba(34, 211, 238, 0.12);
        color: var(--accent);
        outline: none;
    }

    .main {
        width: 100%;
        padding: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 10px) 10px calc(var(--mobile-tabbar-height) + var(--mobile-tabbar-bottom) + 24px);
    }

    .mobile-analysis-active .main {
        padding-top: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 58px);
    }

    .topbar {
        gap: 10px;
        margin-bottom: 12px;
    }

    .topbar-tools {
        display: block;
    }

    .coach-launcher {
        display: none;
        margin-top: 0;
    }

    .topbar h1 {
        font-size: 23px;
        line-height: 1.2;
    }

    .topbar .eyebrow {
        font-size: 9px;
    }

    .app-shell[data-view="overview"] .topbar,
    .app-shell[data-view="calendar"] .topbar {
        display: none;
    }

    .view.active {
        gap: 12px;
    }

    #view-overview.view.active {
        gap: 16px;
    }

    .panel,
    .metric-card,
    .activity-detail {
        border-radius: 8px;
    }

    .panel {
        padding: 12px;
    }

    .chart {
        height: 270px;
    }

    #view-activity .chart {
        height: 310px;
    }

    .overview-state-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .overview-profile-card {
        grid-column: 1 / -1;
        min-height: 92px;
        gap: 12px;
        padding: 12px;
    }

    .overview-profile-card a {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }

    .overview-profile-card h2 {
        margin-top: 3px;
        font-size: 18px;
    }

    .overview-profile-card small {
        margin-top: 3px;
    }

    .training-state-card {
        min-height: 94px;
        padding: 10px 11px;
    }

    .training-state-card::after {
        right: 11px;
        bottom: 8px;
        left: 11px;
    }

    .training-state-value {
        margin-top: 4px;
        font-size: 23px;
    }

    .training-state-label {
        margin-top: 0;
        font-size: 12px;
    }

    .training-state-delta {
        margin-top: 2px;
        padding-bottom: 5px;
        font-size: 10px;
    }

    #view-overview > .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #view-overview > .metrics-grid .metric-card {
        min-height: 84px;
        padding: 11px;
    }

    #view-overview > .metrics-grid .metric-value {
        margin-top: 5px;
        font-size: 21px;
    }

    #view-overview > .metrics-grid .metric-sub {
        margin-top: 2px;
        font-size: 11px;
    }

    .overview-today-header,
    .overview-today-item,
    .recent-category-header,
    .recent-category-chart,
    .recent-category-footer {
        padding-right: 12px;
        padding-left: 12px;
    }

    .recent-seven-heading h2 {
        font-size: 18px;
    }

    .recent-category-grid {
        gap: 12px;
    }

    #view-training-load .load-status-intro {
        gap: 10px;
    }

    #view-training-load .load-status-intro .section-heading {
        align-items: center;
        gap: 8px;
    }

    #view-training-load .load-status-intro .section-heading h2 {
        font-size: 18px;
        line-height: 1.2;
    }

    #view-training-load .load-status-intro .analysis-badge {
        width: auto;
        min-height: 26px;
        padding: 4px 8px;
        font-size: 9px;
    }

    .mobile-filter-disclosure {
        width: 100%;
        margin: 0;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: rgba(8, 22, 40, 0.72);
    }

    .mobile-filter-disclosure > summary {
        display: grid;
        grid-template-columns: 20px minmax(0, auto) minmax(0, 1fr) 18px;
        align-items: center;
        min-height: 42px;
        gap: 8px;
        padding: 7px 11px;
        color: var(--ink);
        cursor: pointer;
        list-style: none;
        font-size: 12px;
        font-weight: 750;
    }

    .mobile-filter-disclosure > summary::-webkit-details-marker {
        display: none;
    }

    .mobile-filter-disclosure > summary > svg:first-child {
        width: 18px;
        height: 18px;
        color: var(--accent);
    }

    .mobile-filter-disclosure > summary small {
        min-width: 0;
        overflow: hidden;
        color: var(--muted);
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        font-weight: 600;
    }

    .mobile-filter-disclosure-chevron {
        grid-column: 4;
        width: 16px;
        height: 16px;
        transition: transform 160ms ease;
    }

    .mobile-filter-disclosure[open] .mobile-filter-disclosure-chevron {
        transform: rotate(180deg);
    }

    .mobile-filter-disclosure > summary:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    .mobile-filter-disclosure-body {
        border-top: 1px solid var(--line);
        padding: 10px;
    }

    #view-training-load .load-status-range {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #view-training-load .load-status-range .field > span {
        font-size: 9px;
    }

    #view-training-load .load-status-range .primary-button {
        grid-column: 1 / -1;
        min-height: 38px;
    }

    #view-training-load .load-status-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #view-training-load .load-status-metrics .metric-card {
        min-height: 84px;
        padding: 10px 11px;
    }

    #view-training-load .load-status-metrics .metric-label {
        font-size: 9px;
    }

    #view-training-load .load-status-metrics .metric-value {
        margin-top: 5px;
        font-size: 21px;
        line-height: 1.15;
    }

    #view-training-load .load-status-metrics .metric-sub {
        margin-top: 2px;
        font-size: 10px;
    }

    .analysis-filter-panel {
        border: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .view-filter-disclosure .validation-toolbar,
    .view-filter-disclosure .capability-toolbar,
    .view-filter-disclosure .capability-window-bar,
    .view-filter-disclosure .best-efforts-toolbar {
        margin: 0;
        border: 0;
        padding: 0;
        gap: 8px;
    }

    .view-filter-disclosure .validation-toolbar .segmented-control,
    .view-filter-disclosure .capability-toolbar .segmented-control,
    .view-filter-disclosure .capability-window-bar .segmented-control,
    .view-filter-disclosure .best-efforts-toolbar .segmented-control {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .view-filter-disclosure .segmented-control button {
        min-width: 0;
        padding-right: 8px;
        padding-left: 8px;
    }

    .view-filter-disclosure #compareFilters,
    .view-filter-disclosure .wellbeing-range-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
        gap: 8px;
    }

    .view-filter-disclosure #compareFilters .field,
    .view-filter-disclosure #compareFilters input,
    .view-filter-disclosure .wellbeing-range-form .field,
    .view-filter-disclosure .wellbeing-range-form input {
        min-width: 0;
        width: 100%;
    }

    .view-filter-disclosure #compareFilters .field > span,
    .view-filter-disclosure .wellbeing-range-form .field > span {
        font-size: 9px;
    }

    .view-filter-disclosure #compareFilters button,
    .view-filter-disclosure .wellbeing-range-form button {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 38px;
    }

    .view-filter-disclosure #compareFilters .compare-range-fieldset {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
    }

    .view-filter-disclosure #compareFilters .compare-range-date-grid {
        gap: 8px;
    }

    .view-filter-disclosure #compareFilters .compare-range-fieldset legend {
        margin-bottom: 5px;
        font-size: 11px;
    }

    .metrics-grid.mobile-compact-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-compact-metrics > .metric-card {
        min-height: 84px;
        padding: 10px 11px;
    }

    .mobile-compact-metrics > .metric-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .mobile-compact-metrics > .metric-card .metric-label {
        font-size: 9px;
    }

    .mobile-compact-metrics > .metric-card .metric-value {
        margin-top: 5px;
        font-size: 20px;
        line-height: 1.15;
    }

    .mobile-compact-metrics > .metric-card .metric-sub {
        margin-top: 2px;
        font-size: 10px;
        line-height: 1.25;
    }

    .compare-grid {
        gap: 16px;
    }

    .compare-period-summary > header {
        align-items: flex-start;
    }

    .compare-period-summary > header span {
        max-width: 68%;
        text-align: right;
    }

    .compare-load-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .compare-load-heading > p {
        max-width: none;
        text-align: left;
    }

    #view-wellbeing .wellbeing-history-head {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    #view-capability-analysis .capability-asof {
        margin: 0;
        font-size: 11px;
    }

    #view-capability-analysis .capability-review-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
    }

    .app-shell[data-view="compare"] #mobileDetailedFilterSlot #globalFilters label:has(input[name="from"]),
    .app-shell[data-view="compare"] #mobileDetailedFilterSlot #globalFilters label:has(input[name="to"]) {
        display: none;
    }

    .mobile-overview-filters,
    .mobile-detailed-filters {
        display: block;
        margin: 3px 0 0;
    }

    .mobile-detailed-filters[hidden] {
        display: none;
    }

    #overviewMobileFilterCount,
    #mobileDetailedFilterCount,
    .activity-list-filters summary small {
        display: grid;
        place-items: center;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--accent);
        color: #04101c;
        font-size: 10px;
    }

    #overviewMobileFilterCount[hidden],
    #mobileDetailedFilterCount[hidden],
    .activity-list-filters summary small[hidden] {
        display: none;
    }

    #overviewMobileFilterSlot .filters,
    #mobileDetailedFilterSlot .filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
        gap: 8px;
        width: 100%;
    }

    #overviewMobileFilterSlot .filters label,
    #overviewMobileFilterSlot .filters input,
    #overviewMobileFilterSlot .filters select,
    #mobileDetailedFilterSlot .filters label,
    #mobileDetailedFilterSlot .filters input,
    #mobileDetailedFilterSlot .filters select {
        min-width: 0;
        width: 100%;
    }

    #overviewMobileFilterSlot .filters label > span,
    #mobileDetailedFilterSlot .filters label > span {
        font-size: 9px;
    }

    .explorer-panel-head {
        align-items: center;
        gap: 8px;
    }

    .activity-list-filters {
        width: 100%;
        margin-left: 0;
    }

    #activityFilters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
        width: 100%;
        gap: 8px;
    }

    #activityFilters .field,
    #activityFilters input,
    #activityFilters select {
        min-width: 0;
        width: 100%;
    }

    #activityFilters .field > span {
        font-size: 9px;
    }

    #activityFilters .ghost-button {
        grid-column: 2;
        width: 100%;
        min-height: 38px;
    }

    .calendar-panel {
        padding: 10px;
    }

    .calendar-header {
        padding-bottom: 10px;
    }

    .calendar-heading {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 9px;
    }

    .calendar-heading h2 {
        font-size: 18px;
        line-height: 34px;
    }

    .calendar-month-arrow {
        width: 34px;
        height: 34px;
    }

    .icon-button {
        width: 34px;
        height: 34px;
    }

    .calendar-month-arrow svg,
    .icon-button svg {
        width: 18px;
        height: 18px;
    }

    .calendar-month-picker {
        display: none;
    }

    .calendar-grid {
        gap: 8px;
    }

    .calendar-day {
        min-height: 0;
        border-radius: 8px;
        padding: 11px;
    }

    .calendar-day.is-today {
        scroll-margin-top: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 10px);
    }

    .calendar-day .day-number {
        font-size: 18px;
    }

    .calendar-day-weekday {
        font-size: 12px;
    }

    .calendar-checkin {
        margin-left: auto;
    }

    .load-bar {
        margin: 7px 0;
    }

    .calendar-day-totals {
        font-size: 10px;
    }

    .activity-chip {
        margin-top: 6px;
        padding: 8px;
        font-size: 11px;
    }

    .activity-chip-title {
        font-size: 12px;
    }

    .calendar-footer-navigation {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
        border-top: 1px solid var(--line);
        padding-top: 10px;
    }

    .calendar-footer-navigation > span {
        overflow: hidden;
        color: var(--muted);
        text-align: center;
        text-overflow: ellipsis;
        text-transform: capitalize;
        white-space: nowrap;
        font-size: 12px;
        font-weight: 700;
    }

    #view-explorer .activity-page-top {
        display: none;
    }

    .app-shell[data-view="activity"] #globalFilters,
    .app-shell[data-view="planned-workout"] #globalFilters {
        display: none;
    }

    #view-activity > .metrics-grid,
    #view-planned-workout .planned-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #view-activity > .metrics-grid .metric-card,
    #view-planned-workout .planned-metrics .metric-card {
        min-height: 82px;
        padding: 10px 11px;
    }

    #view-activity > .metrics-grid .metric-label,
    #view-planned-workout .planned-metrics .metric-label {
        font-size: 9px;
    }

    #view-activity > .metrics-grid .metric-value,
    #view-planned-workout .planned-metrics .metric-value {
        margin-top: 4px;
        font-size: 19px;
        line-height: 1.15;
    }

    #view-activity > .metrics-grid .metric-card:first-child .metric-value {
        font-size: 15px;
    }

    #view-activity > .metrics-grid .metric-sub,
    #view-planned-workout .planned-metrics .metric-sub {
        margin-top: 2px;
        font-size: 10px;
        line-height: 1.25;
    }

    .activity-hero-navigation {
        min-width: 0;
    }

    .planned-workout-navigation {
        width: auto;
    }

    .activity-hero-navigation > #backToExplorer {
        display: none;
    }

    .planned-workout-navigation > #backToCalendar {
        display: none;
    }

    .goal-registry-heading {
        align-items: flex-end;
        flex-direction: row;
        gap: 10px;
    }

    .goal-registry-actions {
        position: relative;
        flex: 1 0 100%;
        width: 100%;
        gap: 5px;
    }

    .goal-add-button {
        width: auto;
        min-height: 36px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .goal-registry-intro {
        display: none;
    }

    .goal-registry-help {
        display: block;
        position: static;
    }

    .goal-registry-help > summary {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border: 1px solid var(--line);
        border-radius: 6px;
        color: var(--accent);
        background: rgba(7, 20, 39, 0.82);
        cursor: pointer;
        list-style: none;
    }

    .goal-registry-help > summary::-webkit-details-marker {
        display: none;
    }

    .goal-registry-help > summary svg {
        width: 18px;
        height: 18px;
    }

    .goal-registry-help > summary:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    .goal-registry-help > p {
        position: absolute;
        z-index: 20;
        top: 42px;
        right: 0;
        width: min(310px, calc(100vw - 32px));
        margin: 0;
        border: 1px solid var(--line);
        border-radius: 7px;
        padding: 11px;
        color: #cbd5e1;
        background: #071427;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
        font-size: 11px;
        line-height: 1.45;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.incident-center .settings-table { min-width: 0; }
.incident-center .settings-table th, .incident-center .settings-table td { white-space: normal; overflow-wrap: anywhere; }
/* Incidentcenter keeps facts visible without horizontal scrolling on small screens. */
.incident-center .incident-facts { min-width: 0; table-layout: fixed; }
.incident-center .incident-facts th { width: 44%; }
.incident-center .incident-facts th, .incident-center .incident-facts td { white-space: normal; overflow-wrap: anywhere; }
.incident-center .incident-mobile-category { display: none; }
.incident-center .inline-filters { margin-top: 12px; }
.incident-center p, .incident-center li { overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .incident-center .incident-list { min-width: 0; table-layout: fixed; }
    .incident-center .incident-list th, .incident-center .incident-list td { white-space: normal; overflow-wrap: anywhere; }
    .incident-center .incident-list th:nth-child(3), .incident-center .incident-list td:nth-child(3),
    .incident-center .incident-list th:nth-child(5), .incident-center .incident-list td:nth-child(5) { display: none; }
    .incident-center .incident-list th:nth-child(4), .incident-center .incident-list td:nth-child(4) { width: 23%; }
    .incident-center .incident-mobile-category { display: block; color: var(--muted); margin-top: 4px; }
}
.incident-center .settings-table th,
.incident-center .settings-table.incident-list th { overflow-wrap: normal; word-break: normal; }

/* Keep the login form inside the safe viewport, including standalone iOS. */
.login-shell {
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.login-content { min-width: 0; }
.login-panel { width: 100%; padding: clamp(20px, 5vw, 34px); }
.login-panel .field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 16px; }
.login-panel .field input { width: 100%; min-width: 0; font-size: 16px; }
.login-panel > .primary-button { width: 100%; min-height: 44px; }
.login-logo { margin-inline: auto; }
.sidebar { height: 100dvh; padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.calendar-day, .activity-chip, .activity-chip-main, .activity-chip .sport-label { min-width: 0; }
.calendar-grid .activity-chip-duration { max-width: 100%; white-space: normal; overflow-wrap: anywhere; padding-left: 0; }
.calendar-grid .activity-chip-main { flex-wrap: wrap; }
.calendar-grid .sport-label { max-width: 100%; overflow-wrap: anywhere; }

@media (min-width: 761px) and (max-width: 1180px) {
    .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
    .sidebar { padding-inline: 12px; gap: 18px; }
    .sidebar-foot { padding-inline: 0; }
    .sidebar-brand a { min-width: 0; width: 100%; }
    .sidebar-brand img { max-width: 100%; }
    .sidebar-account-actions { gap: 4px; flex-wrap: wrap; }
    .sidebar-account-actions .sidebar-icon-link { width: 40px; height: 40px; flex-basis: 40px; }
    .main { min-width: 0; }
    .calendar-day { padding: 6px; }
    .calendar-grid, .calendar-weekdays { gap: 5px; }
}
.calendar-grid .activity-chip-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.calendar-grid .sport-label { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.calendar-grid .sport-label > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) and (max-width: 900px) {
    .calendar-grid { grid-template-columns: 1fr; }
    .calendar-weekdays, .calendar-day.is-empty { display: none; }
    .calendar-day-weekday { display: inline; }
    .calendar-day { padding: 11px; }
}

/* Checkbox inputs keep their native shape inside the shared field wrapper. */
.field input[type="checkbox"] {
    min-height: 20px;
    width: 20px;
    height: 20px;
    padding: 0;
    accent-color: var(--accent);
}

/* Shared privacy link on the login screen and below dashboard content. */
.privacy-footer { margin-top: 24px; padding: 12px 0; text-align: center; font-size: 12px; }
.privacy-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.privacy-footer a:hover, .privacy-footer a:focus-visible { color: var(--accent); }

/* App connections share one settings section; workout transfers sit beside FIT export. */
.connected-app-list { display: grid; gap: 20px; }
.connected-app-list > * + * { border-top: 1px solid var(--line); padding-top: 20px; }
.connected-app-row { display: flex; align-items: center; gap: 16px; min-width: 0; }
.connected-app-logo { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; border: 2px solid rgba(34,211,238,.45); border-radius: 50%; background: var(--bg); box-shadow: 0 0 28px rgba(14,165,233,.16); overflow: hidden; }
.connected-app-logo img { width: 44px; height: 44px; object-fit: contain; }
.connected-app-copy { min-width: 0; flex: 1; }
.connected-app-copy h3 { margin: 0; color: var(--ink); font-size: 15px; }
.connected-app-copy .connected-app-status { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.connected-app-status.is-connected::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--good); vertical-align: middle; }
.connected-app-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ghost-button.app-connect-button { color: var(--good); border-color: rgba(45,212,191,.5); background: rgba(45,212,191,.09); }
.ghost-button.app-disconnect-button { color: var(--danger); border-color: rgba(251,113,133,.5); background: rgba(251,113,133,.09); }
.connected-app-actions .ghost-button { font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
.connected-app-open { color: var(--accent); font-size: 12px; white-space: nowrap; }
.connected-app-hint { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.connected-app-error { color: var(--danger); font-size: 12px; }
.connected-app-message { margin: 10px 0 0; font-size: 12px; }
.connected-app-message:empty { display: none; }
.planned-workout-delivery { margin: 18px 0; }
.workout-app-transfer { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.workout-app-transfer .connected-app-row { gap: 12px; }
.workout-app-transfer .connected-app-logo { flex-basis: 44px; width: 44px; height: 44px; border-width: 1px; box-shadow: none; }
.workout-app-transfer .connected-app-logo img { width: 32px; height: 32px; }
.transfer-details { margin-top: 12px; }
.transfer-details > summary { cursor: pointer; font-size: 13px; color: var(--accent); padding: 6px 0; }
.transfer-details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.transfer-preview .table-wrap { margin-top: 12px; }
.transfer-preview .transfer-ftp-confirm { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; }
.transfer-ftp-confirm input { flex: 0 0 20px; margin-top: 2px; }
.transfer-preview .transfer-ftp-confirm span { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 12px; line-height: 1.5; color: var(--text); }
.transfer-preview > button { margin-top: 10px; }
.transfer-remove { margin-top: 12px; font-size: 12px; }
@media (max-width: 480px) {
    .connected-apps .connected-app-row { flex-wrap: wrap; gap: 12px; }
    .connected-apps .connected-app-copy { flex-basis: calc(100% - 80px); }
    .connected-apps .connected-app-actions { margin-left: 76px; }
    .transfer-preview > button, .transfer-remove { max-width: 100%; white-space: normal; }
}

/* Transfer status icons supplement the live status text. */
.connected-app-status.has-icon { display: flex; align-items: center; gap: 7px; }
.connected-app-status.has-icon svg { width: 17px; height: 17px; flex: 0 0 17px; }
.connected-app-status.is-pending svg { color: var(--accent); }
.connected-app-status.is-sent svg { color: var(--good); }

/* Goal analysis uses shared panels and fields; details retain readable history. */
.goal-analysis-content { margin-block: 1rem; }
.goal-analysis-record { padding-block: .8rem; border-bottom: 1px solid var(--border, #334155); }
.goal-analysis-record h4 { margin: 0 0 .35rem; }
.goal-analysis-record p { overflow-wrap: anywhere; }
.goal-analysis-record pre { max-height: 24rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.goal-editor-form { display: grid; gap: .75rem; margin-block: 1rem; }
.goal-editor-form textarea { min-height: 5rem; width: 100%; box-sizing: border-box; }
.goal-tabs { flex-wrap: wrap; }
@media (max-width: 760px) {
    .goal-analysis-record .goal-registry-actions { flex-wrap: wrap; }
    .goal-tabs button { white-space: normal; }
}

.goal-analysis-view, .goal-analysis-view [data-detail], .goal-analysis-view [data-course], .goal-analysis-view .goal-analysis-content { min-width: 0; }
.goal-analysis-view { grid-template-columns: minmax(0, 1fr); }
.goal-analysis-view .goal-registry-actions, .goal-analysis-view .panel-head { flex-wrap: wrap; }
.goal-analysis-view button { max-width: 100%; white-space: normal; }
.goal-analysis-view summary { padding-block: .6rem; cursor: pointer; }
.goal-analysis-view .is-selected { background: rgba(34, 211, 238, .12); }
@media (max-width: 760px) {
    .goal-analysis-view .chart-grid { grid-template-columns: minmax(0, 1fr); }
    .goal-analysis-view .goal-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}

/* Real course titles can exceed a phone width; keep native selectors in their field. */
.goal-analysis-view .field { min-width: 0; max-width: 100%; }
.goal-analysis-view [data-course-select] { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }

/* Goal pathways: common presentation for cycling, running and requirement-led goals. */
.goal-pathway { min-width: 0; }
.pathway-intro { padding: 20px 0; max-width: 78ch; }
.pathway-intro h3 { font-size: clamp(21px, 2.1vw, 29px); line-height: 1.3; margin: 9px 0; }
.pathway-intro p, .pathway-next { line-height: 1.65; }
.pathway-metrics, .pathway-candidates { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap: 16px; margin: 12px 0 18px; }
.pathway-metric { display: grid; gap: 8px; border-left: 3px solid var(--accent); padding: 6px 16px; }
.pathway-metric strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.pathway-metric small { color: var(--muted); }
.pathway-candidate { padding: 20px; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.pathway-candidate.selected { border-color: var(--accent); background: rgba(34,211,238,.055); }
.pathway-candidate h4 { margin: 0; font-size: 24px; }
.pathway-candidate > strong { font-size: 20px; }
.pathway-candidate p { margin: 4px 0; }
.pathway-candidate button { margin-top: auto; align-self: flex-start; }
.pathway-time-chart { padding: 20px 0; }
.pathway-time-chart > div { display: grid; grid-template-columns: 180px minmax(0,1fr) 100px; gap: 12px; align-items: center; margin-bottom: 14px; }
.pathway-bar-track { height: 15px; background: rgba(255,255,255,.06); position: relative; border-radius: 4px; }
.pathway-bar { height: 100%; display: block; background: var(--accent); border-radius: 4px; opacity: .65; }
.pathway-target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.pathway-evidence { margin: 22px 0; padding: 16px 0; border-top: 1px solid var(--line); }
.pathway-evidence summary { cursor: pointer; font-weight: 600; }
.pathway-evidence pre { max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.pathway-next { padding-left: 24px; max-width: 80ch; }
.pathway-next li { padding: 6px; }
@media(max-width:760px) {
    .pathway-time-chart > div { grid-template-columns: minmax(0,1fr) 92px; }
    .pathway-time-chart > div > span { grid-column: 1/-1; }
}

#activityTable tfoot th, #activityTable tfoot td { border-top: 1px solid var(--line-strong); background: rgba(16, 45, 78, 0.48); font-weight: 650; }
#activityTable tfoot small { display: block; font-size: 11px; font-weight: 400; }
#activityTable tfoot tr:last-child td { white-space: normal; font-weight: 400; font-size: 12px; }

@media(max-width:760px) {
    .goal-pathway .pathway-splits { min-width: 0; }
    .goal-pathway .pathway-splits > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .goal-pathway .pathway-splits > tbody { display: block; }
    .goal-pathway .pathway-splits > tbody > tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .goal-pathway .pathway-splits > tbody > tr > th { grid-column: 1/-1; }
    .goal-pathway .pathway-splits > tbody > tr > td { white-space: normal; }
    .goal-pathway .pathway-splits > tbody > tr > td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
}

.pathway-section-list { border-top: 1px solid var(--line); }
.pathway-section { border-bottom: 1px solid var(--line); padding: 8px 0; }
.pathway-section > summary { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 8px; }
.pathway-section > summary::before { content: '+ '; color: var(--accent); }
.pathway-section[open] > summary::before { content: '− '; }
.pathway-section > summary::before { position: absolute; margin-left: -14px; }
.pathway-section > summary { position: relative; padding-left: 18px; }
.pathway-section > summary small { grid-column: 1/-1; color: var(--muted); }
.pathway-demand-critical > th { border-left: 3px solid var(--accent); }
.pathway-section .pathway-evidence-row > td { background: rgba(16,45,78,.18); padding: 14px; }
.pathway-section .pathway-evidence-row p { margin: 7px 0; }
.pathway-section .pathway-evidence-row table { min-width: 680px; }
@media(max-width:760px) {
    .pathway-section > summary { grid-template-columns: 1fr 1fr; font-size: 13px; }
    .pathway-section > summary > span:last-of-type { grid-column: 1/-1; }
    .goal-pathway .pathway-splits > tbody > .pathway-evidence-row { display: block; }
    .goal-pathway .pathway-splits > tbody > .pathway-evidence-row > td { display: block; }
    .goal-pathway .pathway-splits > tbody > .pathway-evidence-row > td::before { display: none; }
    .pathway-section .pathway-evidence-row { overflow: hidden; }
}

/* Embedded coach pilot keeps all existing mobile destinations available. */
@media (max-width: 760px) {
    .mobile-tabbar[data-coach-enabled="true"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.calendar-coach-link { display: inline-block; font-size: 11px; margin: 6px 0; text-decoration: underline; }

/* Shared explanatory copy: visually secondary, still readable. */
.help-text, p.muted, .panel-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
}
/* Framed analysis sections use flat inner charts/metrics instead of nested cards. */
.analysis-section { min-width: 0; padding: 22px; }
.analysis-section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 0; }
.analysis-section-heading > div { min-width: 0; }
.analysis-section-heading > .daily-checkin-icon { flex: 0 0 44px; }
.analysis-section-heading h2 { margin: 0; color: var(--ink); font-size: 20px; font-weight: 650; }
.analysis-section-heading .help-text { margin: 5px 0 0; }
.analysis-section-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.analysis-section-toolbar .view-filter-disclosure { margin-left: 0; }
.analysis-section-toolbar > .help-text { margin: 0 0 6px; }
.analysis-chart { min-width: 0; }
.analysis-chart h3 { margin: 0 0 12px; color: var(--ink); font-size: 14px; font-weight: 600; }
.analysis-section .table-wrap { min-width: 0; max-width: 100%; }
.analysis-section table { font-size: 12px; font-variant-numeric: tabular-nums; }
.analysis-section th { font-size: 10px; }
.analysis-section td { padding: 9px 10px; font-size: 12px; }
.analysis-section td:first-child { white-space: nowrap; }
.analysis-section .chart { min-width: 0; max-width: 100%; }
#view-wellbeing > .analysis-section { margin-top: 28px; }
#view-wellbeing .wellbeing-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#view-wellbeing .wellbeing-summary > .metric-card { min-width: 0; min-height: 100px; padding: 14px 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
#view-wellbeing .wellbeing-summary > .metric-card + .metric-card { border-left: 1px solid var(--line); }
#view-wellbeing .wellbeing-summary > .metric-card::after { display: none; }
#view-wellbeing .wellbeing-summary .metric-label { font-size: 10px; min-height: 26px; }
#view-wellbeing .wellbeing-summary .metric-value { margin-top: 4px; font-size: 26px; }
.recovery-history-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.recovery-history-section > p { margin: 0; }
[data-recovery-charts] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
[data-recovery-charts] > .analysis-chart + .analysis-chart { border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 760px) {
    .analysis-section { padding: 14px; }
    .analysis-section-heading { align-items: flex-start; gap: 10px; }
    .analysis-section-heading h2 { font-size: 17px; }
    .analysis-section-toolbar { align-items: stretch; flex-direction: column; }
    #view-wellbeing .wellbeing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #view-wellbeing .wellbeing-summary > .metric-card { min-height: 94px; padding: 12px; }
    #view-wellbeing .wellbeing-summary > .metric-card:nth-child(3) { border-left: 0; }
    #view-wellbeing .wellbeing-summary > .metric-card:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.analysis-data-disclosure { min-width: 0; }
.analysis-data-disclosure > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; padding: 10px 0; }
.analysis-data-disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.analysis-data-disclosure > .table-wrap { margin-top: 8px; }

/* Route alternatives are divided entities inside the shared analysis panel. */
.ride-planner .analysis-section-toolbar { margin-top: 18px; }
.ride-planner [data-ride-saved]:not(:empty) { margin: 20px 0; }
.ride-planner [data-ride-results] > .analysis-chart { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.ride-planner [data-ride-results] > .analysis-chart > .ghost-button { margin: 0 8px 8px 0; }

/* Shared map surface for start selection and generated-route review. */
.generated-route-map { height: 360px; min-width: 0; width: 100%; margin: 16px 0; border-radius: 10px; overflow: hidden; }
@media(max-width: 600px) { .generated-route-map { height: 300px; } }
.ride-planner .field { min-width: 0; max-width: 100%; }
.ride-planner .field select { max-width: 100%; }

/* Route editor: primary choices first, less-used controls in a disclosure. */
.route-builder-primary { display:grid;grid-template-columns:minmax(0,2fr) minmax(110px,0.7fr) minmax(150px,1fr);gap:16px;align-items:start;margin:16px 0; }
.ride-planner [data-place-search] { min-width:0; }
.ride-planner [data-place-search]>.field { display:block; }
.ride-planner [data-place-query] { width:100%;box-sizing:border-box; }
.ride-planner [data-place-results] button { display:block;text-align:left;white-space:normal;width:100%;margin-top:6px; }
.ride-planner [data-route-options] { margin:16px 0; }
.ride-planner [data-route-options]>.inline-filters { margin:16px 0; }
.ride-planner [data-route-options] [data-place-search] { max-width:600px;margin:12px 0; }
.ride-planner [data-start-map] { margin:16px 0; }
@media(max-width:760px) { .route-builder-primary { grid-template-columns:1fr;gap:12px; } }

/* Place autocomplete uses the same combobox interaction as segment quick search. */
.route-place-search { position:relative; }
.route-place-results { position:absolute;top:68px;left:0;right:0;z-index:1100;max-height:280px;overflow:auto;background:var(--panel, #0b192a);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 28px #0008;padding:4px; }
.ride-planner .route-place-results button { margin:0;border:0;border-radius:6px;padding:12px;font-size:13px; }
.route-place-results button[aria-selected="true"],.route-place-results button:hover { background:#19bde626; }
.route-result-heading { display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap; }
.route-result-heading h3,.route-result-heading p { margin:8px 0; }
.route-result-metrics { font-size:15px; }
.route-editor { border-top:1px solid var(--line);margin-top:16px;padding-top:16px; }
.route-editor > details { margin:8px 0; }
.route-map-key { display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin-top:12px; }
.route-map-key span { display:flex;align-items:center;gap:5px; }
.route-map-key i { width:26px;border-top:4px solid #19bde6; }
.route-map-key .route-line-unpaved { border-top:5px dashed #ffb65d; }
.route-map-key .route-line-path { border-top:2px dashed #ffb65d; }
.route-map-key .route-line-unknown { border-top:3px dotted #b6a4d5; }
.route-map-key .route-line-segment { border-top-color:#3fe1aa; }
.route-control-marker { display:grid;place-items:center;border:2px solid #fff;border-radius:50%;background:#092139;color:white;font:700 13px system-ui;box-shadow:0 1px 5px #0009; }
.route-control-marker:focus { outline:3px solid #19bde6;outline-offset:3px; }
.ride-planner .route-review-check { display:flex;flex-direction:row;align-items:center;gap:10px;margin:16px 0; }
.route-review-check input { width:20px;height:20px;flex:none; }
.route-review-check span { font-size:12px;text-transform:none;letter-spacing:normal; }
.route-saved-summary { border-top:1px solid var(--line);padding-top:16px; }
.route-saved-summary .panel-head { margin-bottom:8px; }
.route-saved-summary p { margin:8px 0; }
.route-history { border-top:1px solid var(--line);padding-top:16px;margin-top:20px; }
.route-history > button { margin-top:12px; }
.route-editor [data-edit-points] { padding-left:20px;font-size:12px; }
.route-editor [data-edit-points] li { margin:8px 0; }

.ride-planner button:disabled { opacity:.45;cursor:not-allowed;filter:saturate(.5); }
.route-editor [data-edit-points] { list-style:none;padding-left:0; }

/* Saved coaching records, presented as three flat, readable sections. */
.coaching-focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.coaching-focus-grid > section { min-width: 0; overflow-wrap: anywhere; }
.coaching-focus-grid h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 16px; }
.coaching-focus-grid h3 svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--accent); }
.coaching-focus-item + .coaching-focus-item { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.coaching-focus-item h4 { font-size: 15px; margin: 6px 0; }
.coaching-focus-item p { margin: 6px 0; }
.coaching-focus-details { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 1000px) {
    .coaching-focus-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .coaching-focus-grid > section + section { border-top: 1px solid var(--line); padding-top: 16px; }
}

/* Compact two-column chart alternatives must fit mobile, unlike wide settings tables. */
.chart-data-disclosure { margin: 12px 0 20px; }
.chart-data-disclosure summary { cursor: pointer; overflow-wrap: anywhere; }
.chart-data-disclosure .settings-table { width: 100%; min-width: 0; table-layout: fixed; }
.chart-data-disclosure th, .chart-data-disclosure td { white-space: normal; overflow-wrap: anywhere; }
.chart-data-disclosure caption { text-align: left; padding: 8px 10px; }
.chart-data-disclosure fieldset { margin: 12px 0; min-width: 0; }
.chart-data-disclosure fieldset label { display: block; }
.chart-data-disclosure input[type="range"] { display: block; width: 100%; }

/* Compact health summary on the overview; full health charts keep their layout. */
.overview-health-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.overview-health-grid > .panel { padding: 14px 10px; }
.overview-health-grid .panel-head { min-height: 38px; margin-bottom: 4px; }
.overview-health-grid .panel-head h2 { font-size: 14px; }
@media (max-width: 1199px) {
    .overview-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .overview-health-grid { grid-template-columns: minmax(0, 1fr); }
}
