/* ==========================================================================
   Global tokens -- the only ones in this file, and the bar for joining them
   is deliberately high. A value belongs here when it is a property of the
   *viewport* rather than of a page: something every shell would set to the
   same number for the same physical reason. Page appearance -- the colour
   ramps, the type clamps, .num, :focus-visible -- stays duplicated per shell
   on purpose, so that editing one page cannot restyle another. See
   docs/adr/0013-page-shell-css-is-duplicated-per-page-only-viewport-tokens-are-shared.md.

   A shell may override --shell-max locally, but only with a comment saying
   why: the rule is that a deviation is justified, not that there are none.
   ========================================================================== */
:root {
    /* The width at which a full-bleed page stops growing (#398; hoisted here in #408, once nine
       shells had copied the same number verbatim and one of them had already drifted). 2400px
       covers a 32" 4K at 150% scaling -- past it the layouts gain nothing further and only the
       whitespace grows, so every clamp() in this file maxes out at or below the size it reaches
       here. A shell opts in by writing `max-width: var(--shell-max)`; a page that should not be
       capped simply does not. */
    --shell-max: 2400px;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Dashboard loading animation */
.dashboard-loading-overlay {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
}

.dashboard-loader {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.dashboard-loader-bar {
    width: 8px;
    border-radius: 4px;
    animation: dashboard-loader-pulse 1.2s ease-in-out infinite;
}

.dashboard-loader-bar:nth-child(1) {
    height: 32px;
    background: linear-gradient(180deg, #064E3B, #065F46);
    animation-delay: 0s;
}

.dashboard-loader-bar:nth-child(2) {
    height: 48px;
    background: linear-gradient(180deg, #065F46, #047857);
    animation-delay: 0.15s;
}

.dashboard-loader-bar:nth-child(3) {
    height: 64px;
    background: linear-gradient(180deg, #047857, #059669);
    animation-delay: 0.3s;
}

.dashboard-loader-bar:nth-child(4) {
    height: 56px;
    background: linear-gradient(180deg, #059669, #10B981);
    animation-delay: 0.45s;
}

.dashboard-loader-bar:nth-child(5) {
    height: 40px;
    background: linear-gradient(180deg, #10B981, #34D399);
    animation-delay: 0.6s;
}

.dashboard-loader-bar:nth-child(6) {
    height: 52px;
    background: linear-gradient(180deg, #34D399, #6EE7B7);
    animation-delay: 0.75s;
}

.dashboard-loader-bar:nth-child(7) {
    height: 36px;
    background: linear-gradient(180deg, #6EE7B7, #A7F3D0);
    animation-delay: 0.9s;
}

@keyframes dashboard-loader-pulse {
    0%, 100% {
        transform: scaleY(0.4);
        opacity: 0.5;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.dashboard-loading-text {
    font-size: 0.875rem;
    font-weight: 500;
    background: linear-gradient(90deg, #064E3B, #059669, #10B981, #34D399, #6EE7B7);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: dashboard-text-shimmer 2s linear infinite;
}

@keyframes dashboard-text-shimmer {
    to {
        background-position: 200% center;
    }
}

/* ==========================================================================
   Dashboard calendar — design tokens (#322)
   ========================================================================== */

.dash-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --on-brand: #FFFFFF;
    --card-bg: #FFFFFF;
    --card-completed-bg: linear-gradient(105deg, rgba(5, 150, 105, .13) 0%, rgba(5, 150, 105, .045) 46%, rgba(5, 150, 105, 0) 100%), #FFFFFF;
    --card-completed-border: #D8EAE1;
    --card-completed-border-hover: #B9DBCC;
    --card-unmatched-border: #F3DCB4;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);
    --shadow-drag: 0 12px 24px rgba(9, 32, 25, .22);

    /* Sticky calendar chrome (#329). MudBlazor's fixed app bar overlays the top of the viewport, so
       anything sticky beneath it has to start below it. MudMainContent's own padding-top is the source
       of truth for how tall that bar is, and it is not a single number -- the cascade further down
       mirrors it rather than hardcoding 64px, which is only the >=600px case. */
    --dash-chrome-top: calc(var(--mud-appbar-height, 64px) - var(--mud-appbar-height, 64px) / 8);

    /* One definition of the calendar's columns. The sticky weekday header and the grid below it now
       live in separate boxes and no longer align by being siblings, so they share this instead. */
    --cal-cols: repeat(7, minmax(0, 1fr)) var(--cal-rail);

    /* #405 -- the week rail is the one non-fr track, so left at a flat 190px it would fall from a
       fifth of a row's width to a fourteenth as the day columns grow. It holds a fixed set of
       readouts, so it wants a little more room at width without tracking the days. The floor is
       exactly today's 190px, so nothing moves until the viewport passes ~1830px. */
    --cal-rail: clamp(190px, 10.4vw, 250px);

    /* #405 -- and the library gets the same treatment: a wider template list is easier to drag
       from, but it must not eat width the calendar still needs, so it holds at today's 266px
       until there is genuine surplus. */
    --lib-width: clamp(266px, 13.75vw, 330px);

    /* #405 -- the ceiling the calendar itself stops at: 7 day columns capped at 240px, the rail at
       its own 250px maximum, plus gaps and the wrapper's padding. Past this the grid centres and
       the surplus becomes margin, because a seven-column week does not read better at 310px per
       day -- it just spreads. The library then costs the calendar nothing on a wide screen: it is
       drawn from margin that was already going spare, which is what "docked" means here.
       7x240 + 250 rail + 7 gaps + 24 wrapper padding. */
    --cal-max: 1960px;

    /* #405 -- the page runs full-bleed (MudContainer MaxWidth.False) and takes the shared ceiling
       rather than borrowing MudBlazor's 1920px xl container, so the calendar can actually use a
       32" monitor. --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-tint: #10241C;
    --on-brand: #05170F;
    --card-bg: #1A1A1A;
    --card-completed-bg: linear-gradient(105deg, rgba(16, 185, 129, .16) 0%, rgba(16, 185, 129, .055) 46%, rgba(16, 185, 129, 0) 100%), #101010;
    --card-completed-border: #1E2C26;
    --card-completed-border-hover: #2A3E35;
    --amber-tint: #241B0E;
    --card-unmatched-border: #3D2E14;
}

/* Mirrors MudBlazor's own .mud-main-content cascade, in its order: the base case is shorter than the
   full bar, landscape shorter still, and >=600px overrides both back to the full height. Only the
   last case fires on this desktop-only page, but mirroring all three keeps the two from drifting. */
@media (orientation: landscape) {
    .dash-shell {
        --dash-chrome-top: calc(var(--mud-appbar-height, 64px) - var(--mud-appbar-height, 64px) / 4);
    }
}

@media (min-width: 600px) {
    .dash-shell {
        --dash-chrome-top: var(--mud-appbar-height, 64px);
    }
}

.dash-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.dash-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Sticky calendar chrome (#329) -- the toolbar and the weekday header row travel together. Reaching
   the template-library toggle used to mean scrolling back to the top of the month and then down again;
   the library panel itself has always been sticky, only the button that opens it scrolled away.
   The z-index is the first one in this file: the calendar paints later in the DOM and would otherwise
   cover the bar, while every MudBlazor layer (drawer, popover, app bar, dialog) sits at 1100+. */
.cal-sticky-head {
    position: sticky;
    top: var(--dash-chrome-top);
    z-index: 5;
    background: var(--bg);
}

/* Horizontal padding matches .cal-grid-wrap so the header columns line up with the grid columns. The
   two cannot share a scroll container -- .cal-grid-wrap is one, and a sticky child sticks to its
   scrollport rather than to the viewport -- so their alignment rests on this padding plus --cal-cols.
   The day columns are minmax(0, 1fr) and compress rather than overflow, so that horizontal scroll
   effectively never engages here; if it ever did, the header would not follow it. */
.cal-head-row-wrap {
    padding: 12px 12px 0;
    /* Capped and centred in lockstep with .cal-grid-wrap (#405). These two align by sharing this
       padding and --cal-cols rather than by being siblings in one grid, so a ceiling applied to
       only one of them would slide the weekday header off its columns. */
    max-width: var(--cal-max);
    margin-inline: auto;
}

/* Top bar */
.dash-topbar {
    height: 60px;
    padding: 0 18px;
    gap: 13px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.dash-topbar-btn {
    height: 34px;
    border-radius: 8px !important;
}

.dash-topbar-btn.mud-button-root,
.dash-topbar .mud-button-root {
    font-size: 13px;
    font-weight: 500;
}

.dash-title {
    /* #398's ramp: minimum is the size shipping today, maximum lands at the shell ceiling, so type
       stops growing when the layout does. Small uppercase label text stays fixed on purpose. */
    font-size: clamp(21px, 1.05vw, 25px);
    font-weight: 620;
    letter-spacing: -0.02em;
    text-transform: capitalize;
    min-width: 200px;
}

.dash-readout {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 8px;
}

.dash-readout-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-readout-value {
    font-size: clamp(13.5px, 0.68vw, 16px);
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text);
}

.dash-readout-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.dash-readout-track {
    width: 120px;
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
    overflow: hidden;
}

.dash-readout-track-fill {
    height: 100%;
    background: var(--brand-deep);
    border-radius: 3px;
}

.dash-density-toggle .mud-button-root {
    font-size: 11px;
}

/* Calendar grid */
.cal-grid-wrap {
    overflow-x: auto;
    /* Was the pa-3 utility in markup; the top half of that padding now belongs to .cal-head-row-wrap. */
    padding: 0 12px 12px;
    /* See .cal-head-row-wrap: the two carry the same ceiling or they stop lining up. */
    max-width: var(--cal-max);
    margin-inline: auto;
}

.cal-head-row,
.cal-grid {
    display: grid;
    grid-template-columns: var(--cal-cols);
}

.cal-head-row {
    gap: 1px;
    margin-bottom: 6px;
}

.cal-head-cell {
    text-align: center;
    padding: 4px 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-3);
}

.cal-grid {
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.cal-cell {
    background: var(--surface);
    min-height: 154px;
    padding: 0 6px 8px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.12s, box-shadow 0.12s;
    /* #405 -- the enrichment rows below are revealed per cell, not per viewport. A cell's real width
       depends on the viewport AND the nav drawer AND whether the template library is open, so a
       media query would get it wrong in exactly the case that matters: library open on a laptop,
       where the cell is at its narrowest while the viewport still looks wide. This is the only
       containment the page introduces; every size elsewhere stays a continuous clamp() per #398. */
    container-type: inline-size;
}

.dash-shell--compact .cal-cell {
    min-height: 112px;
}

.cal-cell--out {
    background: var(--surface-2);
    opacity: 0.55;
}

.cal-cell--drop {
    background: var(--brand-tint);
    box-shadow: inset 0 0 0 2px var(--brand);
}

.cal-cell:hover .cal-add-btn,
.cal-cell--today .cal-add-btn,
.cal-cell--drop .cal-add-btn {
    opacity: 1;
}

.cal-cell:hover .cal-empty-hint,
.cal-cell--drop .cal-empty-hint {
    opacity: 1;
}

/* Phase stripe — bleeds to the cell edges */
.cal-phase-row {
    display: flex;
    gap: 2px;
    height: 4px;
    margin: 0 -6px 4px;
}

.cal-phase-seg {
    flex: 1;
    min-height: 4px;
}

/* Cell header: day number + add button */
.cal-cell-head {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-shell--compact .cal-cell-head {
    height: 26px;
}

.cal-day-number {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-3);
}

.cal-cell--today .cal-day-number {
    color: var(--text);
}

.cal-today-disc {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 600;
}

.cal-add-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    font: inherit;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    color: var(--text-2);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s;
}

.cal-add-btn:hover {
    background: var(--brand-tint);
    color: var(--brand-deep);
    border-color: var(--brand);
}

/* Event pills */
.cal-events {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 2px 0;
}

.cal-event-pill {
    height: 18px;
    border-radius: 999px;
    padding: 0 6px 0 5px;
    font-size: 10px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event-pill--race-a {
    color: #DC2626;
    background: rgba(220, 38, 38, .12);
}

.cal-event-pill--race-b,
.cal-event-pill--race-c {
    color: var(--amber);
    background: var(--amber-tint);
}

.cal-event-pill--holiday {
    color: #2563EB;
    background: rgba(37, 99, 235, .12);
}

.cal-event-pill--nonsport {
    color: var(--text-2);
    background: var(--surface-3);
}

/* Session stack. Spacing between rows/insertion-points is margin-bottom, not gap, so a zero-height
   insertion point at rest contributes no extra space (#324). */
.cal-sessions {
    display: flex;
    flex-direction: column;
    margin-top: 2px;
    flex: 1;
}

.cal-session-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 4px;
}

/* One of a day's N+1 drop targets, rendered between/around its cards while more than one session is
   scheduled (#324). Zero height at rest so a drag starting elsewhere never shifts this cell's layout — but
   a truly zero-area box can never receive the dragenter that is supposed to expand it, so ::before paints
   an invisible, unclipped hit-area straddling the gap above and below it (overflow must stay visible, or
   it clips its own hit-area to nothing). */
.cal-insertion-point {
    position: relative;
    height: 0;
    overflow: visible;
    transition: height 0.12s;
    /* .calendar-dragging .cal-cell > * disables pointer events on every child of the cell during a drag,
       unifying it into one drop target — everything except this one still falls through to that
       cell-level fallback. Re-enabled here so an insertion point can actually receive its own
       dragenter/drop instead of the event reaching only the cell. */
    pointer-events: auto;
}

.cal-insertion-point::before {
    content: "";
    position: absolute;
    inset: -6px 0;
}

.cal-insertion-point--active {
    height: 34px;
    margin-bottom: 4px;
}

.dash-shell--compact .cal-insertion-point--active {
    height: 28px;
}

.cal-insertion-point--active .cal-drop-preview {
    margin-top: 0;
    height: 100%;
}

/* Session / activity card */
.cal-card {
    flex: 1;
    min-width: 0;
    display: flex;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--card-bg);
    cursor: pointer;
    overflow: hidden;
    box-shadow: var(--shadow-rest);
    transition: box-shadow 0.12s, border-color 0.12s;
}

.cal-card:hover {
    box-shadow: var(--shadow-hover);
}

.cal-card--planned {
    cursor: grab;
}

.cal-card--completed {
    background: var(--card-completed-bg);
    border-color: var(--card-completed-border);
}

.cal-card--completed:hover {
    border-color: var(--card-completed-border-hover);
}

.cal-card--unmatched {
    background: var(--amber-tint);
    border-color: var(--card-unmatched-border);
    cursor: pointer;
}

.cal-card--dragging {
    box-shadow: var(--shadow-drag);
    border-color: var(--brand);
    transform: rotate(-1.6deg);
}

.cal-card-spine {
    width: 5px;
    flex-shrink: 0;
    cursor: grab;
}

.cal-card-spine--unmatched {
    background-image: repeating-linear-gradient(180deg, var(--amber) 0 4px, transparent 4px 8px);
}

.cal-card-body {
    flex: 1;
    min-width: 0;
    padding: 5px 7px 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dash-shell--compact .cal-card-body {
    padding: 4px 6px 5px;
}

.cal-card-sport {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
}

.cal-card-title {
    font-size: 12px;
    font-weight: 580;
    line-height: 1.28;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-shell--compact .cal-card-title {
    font-size: 11.5px;
}

.cal-card-title--completed {
    font-weight: 520;
    color: var(--text-2);
}

.cal-card-metrics {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-2);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1px;
}

.dash-shell--compact .cal-card-metric--distance {
    display: none;
}

.cal-card-hover {
    display: none;
    font-size: 10.5px;
    font-weight: 400;
    color: var(--text-2);
    gap: 6px;
    margin-top: 1px;
}

/* Card enrichment (#405). A day column runs from ~115px at the 1025 floor to ~240px at the ceiling,
   and at the wide end a card carrying a title and two numbers is mostly empty. These rows spend that
   width on what the athlete came to the calendar to read: what the session actually asks for, and
   what it actually cost. One threshold for all of them rather than a staggered reveal -- this page
   is verified by hand, so every extra band is another state someone has to remember to look at. */
.cal-card-plan {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 10.5px;
    margin-top: 2px;
}

.cal-card-plan-target {
    font-weight: 620;
    color: var(--brand-deep);
}

.cal-card-plan-steps {
    color: var(--text-3);
}

.cal-card-goal {
    display: none;
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@container (min-width: 200px) {
    .cal-card-hover,
    .cal-card-plan {
        display: flex;
    }

    .cal-card-goal {
        display: block;
    }
}

/* Compact wins over width, always (#405). Compact means "I want the whole month on screen" -- 154px
   rows overflow a 1080p viewport and 112px ones do not -- and every row above adds height back. On a
   wide-and-short screen (a 32" at 2400x1000) both would otherwise fire at once and fight. Placed
   ahead of the :hover rule below so the hover row keeps behaving exactly as it does today in compact:
   what is suppressed here is the always-visible promotion, not the pre-existing reveal. */
.dash-shell--compact .cal-card-hover,
.dash-shell--compact .cal-card-plan,
.dash-shell--compact .cal-card-goal {
    display: none;
}

.cal-card:hover .cal-card-hover {
    display: flex;
}

.cal-card-medal {
    font-size: 13px;
    line-height: 1;
}

/* Who planned the session, when it was not the Athlete (ADR-0033, #642): the Coach's initials, "JM·AI" through
   their AI Coach. Pushed to the right end of the sport row; the same for every viewer. */
.cal-card-author {
    margin-left: auto;
    padding: 0 4px;
    border-radius: 4px;
    border: 1px solid currentColor;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 13px;
    color: var(--text-2);
    white-space: nowrap;
}

/* ADR-0031 (#642): "Geplant von … · geändert … von …" in a record's details. */
.authorship-line {
    font-size: 12px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-unmatched-btn {
    font-family: inherit;
    font-size: 10px;
    font-weight: 650;
    color: var(--amber);
    background: var(--surface);
    border: 1px solid var(--card-unmatched-border);
    border-radius: 999px;
    padding: 1px 7px;
    cursor: pointer;
    white-space: nowrap;
}

.cal-unmatched-btn:hover {
    background: var(--amber-tint);
}

/* Drop preview ghost + empty-day hint */
.cal-drop-preview {
    border: 1.5px dashed var(--brand);
    background: rgba(5, 150, 105, .08);
    border-radius: 7px;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 7px;
    font-size: 11px;
    color: var(--brand-deep);
    margin-top: 2px;
}

.dash-shell--compact .cal-drop-preview {
    height: 28px;
}

.cal-empty-hint {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1.5px dashed transparent;
    border-radius: 7px;
    color: var(--text-3);
    font-size: 10.5px;
    opacity: 0;
    transition: opacity 0.12s, border-color 0.12s;
}

.cal-cell:hover .cal-empty-hint,
.cal-cell--drop .cal-empty-hint {
    border-color: var(--line-strong);
}

/* Week ramp cell */
.cal-week-cell {
    background: var(--surface-2);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cal-week-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.cal-week-kw {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-3);
}

.cal-week-phase-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 999px;
    color: var(--on-brand);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-week-delta {
    font-size: 11.5px;
    font-weight: 550;
}

.cal-week-delta--up {
    color: var(--brand-deep);
}

.cal-week-delta--down {
    color: #DC2626;
}

.cal-week-delta--flat {
    color: var(--text-3);
}

.cal-week-hours-row {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.cal-week-hours {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.035em;
    color: var(--text);
}

.dash-shell--compact .cal-week-hours {
    font-size: 19px;
}

.cal-week-hours-suffix {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

.cal-week-bar-track {
    height: 9px;
    border-radius: 5px;
    background: var(--surface-3);
    overflow: hidden;
    display: flex;
}

.cal-week-bar-endurance {
    background: var(--brand);
    height: 100%;
}

.cal-week-bar-strength {
    background: var(--amber);
    height: 100%;
}

.cal-week-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-week-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.cal-week-row-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
}

.cal-week-row-value {
    font-size: 11.5px;
    font-weight: 550;
    color: var(--text);
}

.cal-legend {
    display: flex;
    gap: 8px;
    font-size: 10.5px;
    font-weight: 400;
    color: var(--text-2);
    margin-top: 1px;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.cal-legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Calendar drag-and-drop */
.calendar-dragging .cal-cell > * {
    pointer-events: none;
}

/* Shared with the Training Plan editor's day cells (PlanDayCell.razor), outside this ticket's scope. */
.calendar-drop-target {
    background-color: rgba(16, 185, 129, 0.08);
    outline: 2px dashed #10B981;
    outline-offset: -2px;
    transition: background-color 0.15s, outline 0.15s;
}

/* Template library panel */
.lib-panel {
    width: var(--lib-width);
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--line);
    position: sticky;
    /* Offset by the fixed app bar (#329): at top: 0 the panel's title and close button sat behind it
       and its last 64px fell below the fold. */
    top: var(--dash-chrome-top);
    height: calc(100vh - var(--dash-chrome-top));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.lib-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 8px;
}

.lib-title {
    font-size: 13.5px;
    font-weight: 680;
    letter-spacing: -0.01em;
    color: var(--text);
}

.lib-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-2);
}

.lib-search {
    margin: 0 10px 8px;
}

.lib-body {
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lib-group-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 5px;
}

.lib-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lib-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px 7px 5px;
    border-radius: 7px;
    background: var(--surface-2);
    border: 1px solid transparent;
    cursor: grab;
    transition: box-shadow 0.12s, border-color 0.12s;
}

.lib-row:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-rest);
}

.lib-row--dragging {
    box-shadow: var(--shadow-drag);
    border-color: var(--brand);
    transform: rotate(-1.8deg);
}

.lib-grip {
    color: var(--text-3);
    flex-shrink: 0;
    display: flex;
}

.lib-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lib-name {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 550;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lib-duration {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-2);
    flex-shrink: 0;
}

.lib-delete {
    opacity: 0;
    transition: opacity 0.12s;
    flex-shrink: 0;
}

.lib-row:hover .lib-delete {
    opacity: 1;
}

/* ==========================================================================
   Strength set sheet — the strength session/template editor (#326)
   Same design tokens as the calendar (#322); duplicated under its own shell
   class rather than sharing .dash-shell so this page does not couple to the
   dashboard's markup/behaviour.
   ========================================================================== */

.set-sheet-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --on-brand: #FFFFFF;

    background: var(--bg);
    color: var(--text);
}

.set-sheet-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-tint: #10241C;
    --on-brand: #05170F;
}

.set-sheet-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.set-sheet-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Two-column shell: a fixed rail on the left, the sheet filling the rest. */
/* The page itself: capped at --shell-max (2400px, #404) rather than MudBlazor's MaxWidth.Large
   (~1280px), which would leave no room for the rail+sheet+library three-column layout at 1440px+
   (#331). Extra width beyond the cap goes to margin, not to stretching the sheet's fixed eight
   columns further apart. Shared by both pages under this shell (StrengthSessionDetail,
   StrengthTemplateEditor, #404) so the two-page shell scales identically.

   This is the one shell that caps an inner element rather than itself, because two pages share it;
   left that way deliberately in #408. It carried its own 1680px cap until #404 raised it to match
   the other shells -- the drift that #408 then removed the possibility of. Every clamp() in this
   shell maxes out at or below the ceiling. --shell-max is defined in :root (#408). */
.ss-page-container {
    max-width: var(--shell-max);
    margin-inline: auto;
}

/* Three-tier layout (#331): a single sheet column under 1100px, rail+sheet from 1100px, and
   rail+sheet+library from 1440px. Named grid areas (rather than column order) so the middle "main" track
   always lands in the same place whether the rail is rendered (Entries.Count > 1) or not. */
.ss-layout {
    display: grid;
    grid-template-areas: "main";
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.ss-main {
    grid-area: main;
    min-width: 0;
}

/* Top bar */
.ss-topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
}

/* #404 -- fluid type, same recipe as .act-title/.act-readout-value (#399): floor is the size this
   page shipped with, ceiling lands at the --shell-max cap. */
.ss-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
}

/* Readout bar */
.ss-readout {
    min-height: 62px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 560;
}

.ss-readout-stat {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: var(--text-2);
}

.ss-readout-stat .num {
    font-size: clamp(15px, 0.8vw, 19px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.ss-readout-incomplete {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--amber);
    font-weight: 620;
}

.ss-muscle-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ss-muscle-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 6px;
    border-radius: 5px;
    background: var(--surface-2);
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-left: 3px solid var(--text-3);
    font: inherit;
    font-size: 11.5px;
    color: var(--text-2);
    cursor: pointer;
}

.ss-muscle-chip:hover {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.ss-muscle-chip--active {
    background: var(--brand-tint);
    color: var(--brand-ink);
    outline: 1.5px solid var(--brand);
    outline-offset: -1.5px;
}

.ss-muscle-hidden-growing {
    font-size: 11px;
    color: var(--text-3);
    font-style: italic;
}

.ss-muscle-chip .num {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text);
}

.ss-muscle-chip--t1 {
    border-left-color: #047857;
}

.ss-muscle-chip--t2 {
    border-left-color: #059669;
}

.ss-muscle-chip--t3 {
    border-left-color: #34D399;
}

.ss-muscle-chip--t4 {
    border-left-color: #A7DDC8;
}

.ss-muscle-more {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 11.5px;
    cursor: pointer;
    padding: 3px 4px;
}

.ss-muscle-more:hover {
    color: var(--text);
}

/* Running-order rail: hidden below 1100px per the breakpoint table (#331) — only the sheet remains. */
.ss-rail {
    display: none;
    grid-area: rail;
    width: 236px;
}

@media (min-width: 1100px) {
    .ss-layout {
        grid-template-areas: "rail main";
        grid-template-columns: 236px minmax(0, 1fr);
    }

    .ss-rail {
        display: block;
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
}

.ss-rail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: grab;
    margin-bottom: 2px;
}

.ss-rail-item:hover {
    background: var(--surface-2);
}

.ss-rail-item--dragging {
    opacity: 0.4;
}

.ss-rail-grip {
    color: var(--text-3);
    flex-shrink: 0;
    cursor: grab;
}

.ss-rail-spine {
    width: 4px;
    align-self: stretch;
    border-radius: 2px;
    flex-shrink: 0;
}

.ss-rail-body {
    min-width: 0;
    flex: 1;
}

.ss-rail-name {
    font-size: 12.5px;
    font-weight: 560;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-rail-sub {
    font-size: 11px;
    color: var(--text-2);
}

.ss-rail-superset {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--brand-deep);
    background: var(--brand-tint);
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.ss-rail-insertion {
    height: 0;
    overflow: visible;
    position: relative;
    transition: height 0.12s;
    pointer-events: auto;
}

.ss-rail-insertion::before {
    content: "";
    position: absolute;
    inset: -6px 0;
}

.ss-rail-insertion--active {
    height: 6px;
    margin: 2px 0;
    background: var(--brand);
    border-radius: 2px;
}

/* Exercise card */
.ss-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(9, 32, 25, .05);
    margin-bottom: 14px;
    overflow: hidden;
}

.ss-card--dragging {
    opacity: 0.5;
}

.ss-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.ss-card-grip {
    color: var(--text-3);
    cursor: grab;
    flex-shrink: 0;
}

.ss-card-name {
    font-size: 15px;
    font-weight: 620;
    letter-spacing: -0.01em;
}

.ss-card-totals {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ss-card-totals .num {
    color: var(--text);
    font-weight: 600;
}

.ss-card-superset {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--brand-deep);
    background: var(--brand-tint);
    border-radius: 4px;
    padding: 2px 6px;
}

/* Reference row */
.ss-reference {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--surface-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 620;
    color: var(--text-2);
    flex-wrap: wrap;
}

.ss-reference-date {
    color: var(--text);
}

.ss-reference-status {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.ss-reference-summary {
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-reference-empty {
    color: var(--text-3);
    font-style: italic;
}

.ss-reference-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ss-reference-btn {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 11px;
    font-weight: 620;
    padding: 4px 8px;
    cursor: pointer;
}

.ss-reference-btn:first-child {
    border-radius: 5px 0 0 5px;
    border-right: none;
}

.ss-reference-btn:last-child {
    border-radius: 0 5px 5px 0;
}

.ss-reference-btn:hover {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-ink);
}

.ss-reference-switch {
    background: none;
    border: none;
    color: var(--brand-deep);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    text-decoration: underline;
}

/* The set sheet grid itself */
.set-sheet-grid {
    display: grid;
    grid-template-columns: 44px 108px minmax(100px, 1.15fr) minmax(88px, 1fr) minmax(96px, 1fr) 108px 108px 28px;
    column-gap: 10px;
    padding: 0 14px 8px 14px;
}

.ss-head {
    height: 28px;
    display: flex;
    align-items: center;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
}

.ss-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    min-height: 40px;
    border-bottom: 1px solid var(--surface-3);
}

.ss-row:hover {
    background: var(--surface-2);
}

.ss-row--incomplete {
    background: var(--amber-tint);
}

.ss-num-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ss-cell-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.ss-num-marker {
    width: 3px;
    height: 18px;
    border-radius: 2px;
    flex-shrink: 0;
}

.ss-type-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
}

/* The cell: 30px, 6px-radius box, transparent border at rest — the single biggest density gain over the
   old permanently-outlined fields. */
.ss-cell {
    height: 30px;
    border-radius: 6px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
}

.ss-input {
    width: 100%;
    height: 30px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: background-color 0.1s, border-color 0.1s;
}

.ss-input:hover {
    background: var(--surface-2);
    border-color: var(--line);
}

.ss-input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}

.ss-input--incomplete {
    background: var(--amber-tint);
}

.ss-derived {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    padding: 0 8px;
}

.ss-derived--muted {
    color: var(--text-3);
}

.ss-target {
    display: block;
    font-size: 11px;
    color: var(--text-3);
}

.ss-row-delete {
    opacity: 0;
    transition: opacity 0.12s;
}

.ss-row:hover .ss-row-delete {
    opacity: 1;
}

/* Add row: a dashed ghost sharing the sheet's first five columns, showing exactly what a new set will
   inherit. The whole row is the primary target; the preview colouring through on hover is the affordance. */
.ss-add-row {
    grid-column: 1 / 6;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 8px;
    padding: 0 10px;
    margin-top: 6px;
    cursor: pointer;
    background: none;
    color: var(--text-2);
    font-size: 12.5px;
    text-align: left;
}

.ss-add-row:hover {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.ss-add-row-ghost {
    display: flex;
    gap: 10px;
    color: var(--text-3);
    font-size: 12.5px;
}

.ss-add-row:hover .ss-add-row-ghost {
    color: var(--brand-ink);
}

.ss-add-empty {
    grid-column: 6 / 9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 6px;
}

.ss-add-empty-btn {
    height: 40px;
    border: none;
    border-left: 1px solid var(--line);
    background: none;
    color: var(--text-3);
    font-size: 11px;
    padding: 0 10px;
    cursor: pointer;
}

.ss-add-empty-btn:hover {
    color: var(--text-2);
}

.ss-card-notes {
    padding: 0 14px 10px 14px;
}

/* Exercise library column (#331): a third grid track, hidden below 1440px so the sheet keeps the two-column
   layout it already had. The "lib" area's own track shrinks (rather than the panel unmounting) when
   collapsed, so a single click can restore it without reloading catalog/filter state. */
.ss-exlib {
    display: none;
    grid-area: lib;
}

@media (min-width: 1440px) {
    .ss-layout {
        grid-template-areas: "rail main lib";
        grid-template-columns: 236px minmax(0, 1fr) 340px;
    }

    .ss-layout--library-collapsed {
        grid-template-columns: 236px minmax(0, 1fr) 44px;
    }

    .ss-exlib {
        display: flex;
        flex-direction: column;
        gap: 8px;
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        min-width: 0;
    }
}

.ss-exlib-collapsed {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.ss-exlib-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
    flex-shrink: 0;
}

.ss-exlib-title {
    font-size: 13px;
    font-weight: 620;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ss-exlib-filters {
    flex-shrink: 0;
}

/* MudBlazor's own .mud-input-control carries "flex: 1 1 auto" — harmless (even wanted) when an input's
   immediate flex parent is a row, but .ss-exlib-search's immediate parent is this column, where it
   instead lets the search field's own box grow to swallow whatever vertical space .ss-exlib-list isn't
   currently using, opening a blank gap between the search bar and the filter row below it. */
.ss-exlib-search {
    flex: 0 0 auto !important;
}

.ss-exlib-count {
    font-size: 11px;
    color: var(--text-3);
    flex-shrink: 0;
}

.ss-exlib-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border-top: 1px solid var(--line);
}

.ss-exlib-empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    padding: 12px 4px;
    font-size: 12.5px;
    color: var(--text-2);
}

.ss-exlib-group-header {
    height: 24px;
    display: flex;
    align-items: center;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 0 2px;
}

.ss-exlib-row {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

.ss-exlib-row:hover {
    background: var(--surface-2);
}

.ss-exlib-row--selected {
    background: var(--brand-tint);
}

.ss-exlib-row--focused {
    outline: 1.5px solid var(--brand);
    outline-offset: -1.5px;
}

.ss-exlib-row--dragging {
    opacity: 0.5;
}

.ss-exlib-row-check {
    flex-shrink: 0;
    margin: 0 -6px;
}

.ss-exlib-row-name {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 560;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-exlib-row-badge {
    flex-shrink: 0;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}

.ss-exlib-row-type {
    flex-shrink: 0;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--surface-2);
    border-radius: 4px;
    padding: 2px 5px;
}

.ss-exlib-row-dragcount {
    position: absolute;
    left: 2px;
    top: 2px;
    background: var(--brand);
    color: var(--brand-contrast, #fff);
    font-size: 9.5px;
    font-weight: 700;
    border-radius: 999px;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.ss-exlib-row-right {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
    min-width: 32px;
    text-align: right;
}

.ss-exlib-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 0 4px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--text-2);
}

/* The list body shared by the docked column (#331) and the picker dialog (#332, ExerciseLibraryList) —
   search, filters, count, list and footer, laid out as a column so the list's own flex:1 fills whatever
   height the frame around it gives. The docked column gets that height from .ss-exlib's flex:1; the
   dialog below sets an explicit height instead, since a dialog has no ambient flex ancestor. */
.ss-exlib-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

/* Exercise picker dialog (#332): the same list body as the library column, in a modal frame instead of
   a docked one. A fixed height keeps the dialog's size stable as filters change the hit count; 42px rows
   (vs. 40px in the docked column) because the dialog has room to spare and no neighbouring rail for the
   pointer to line up against. Sets its own flex/gap rather than composing with .ss-exlib-body — the
   dialog has no ambient flex ancestor to inherit height from, unlike the docked column's .ss-exlib. */
.ss-picker-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 420px;
}

.ss-picker-body .ss-exlib-row {
    height: 42px;
}

/* ==========================================================================
   Activity detail — design tokens, metric icon set (#333)
   Same neutral/brand ramp as the calendar (#322); duplicated under its own
   shell class rather than sharing .dash-shell, same reasoning as the strength
   set sheet's .set-sheet-shell above — this page does not couple to the
   dashboard's markup/behaviour. Values are copied verbatim: do not edit one
   ramp without checking whether the other two drifted out of sync.
   ========================================================================== */

.act-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;
    --on-brand: #FFFFFF;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);

    /* Metric-family colour ramp — an icon carries the colour its measure has in the analysis
       chart, so this is the one key used everywhere on the page. Only the icon takes the family
       colour; the figure itself stays --text. Every dark value is the same hue lightened. */
    --m-time: #059669;
    --m-dist: #2563EB;
    --m-speed: #2563EB;
    --m-elev: #6C7C76;
    --m-power: #7C68DE;
    --m-load: #D97706;
    --m-hr: #EF4444;
    --m-cadence: #EC4899;
    --m-temp: #F97316;
    --m-medal: #D4A017;
    --m-neutral: var(--text-3);

    /* Bestleistungen curve/table (#371) — Zeitraum 1's fill and cap. --brand itself is too close to
       --brand-tint's background in dark mode, so this holds contrast against #1C1C1C there instead
       of reusing --brand directly (see .act-shell--dark below). */
    --zt1-fill: var(--brand);

    /* #399 -- the page runs full-bleed (MudContainer MaxWidth.False) and takes the shared ceiling
       instead of borrowing MudBlazor's 1920px xl container. Every clamp() below maxes out at or
       below the size it reaches here, so nothing keeps growing after the layout stops.
       --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.act-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --red: #F87171;
    --on-brand: #05170F;

    --m-time: #10B981;
    --m-dist: #60A5FA;
    --m-speed: #60A5FA;
    --m-elev: #8A9A93;
    --m-power: #A392F0;
    --m-load: #F59E0B;
    --m-hr: #F87171;
    --m-cadence: #F472B6;
    --m-temp: #FB923C;
    --m-medal: #E3B341;

    --zt1-fill: var(--brand-deep);
}

.act-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.act-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ActivityIcon (#333) — a 24x24 stroke glyph rendered from one <symbol> sprite per page. Colour
   comes from `color` on the element, so swapping in a --m-* family token is a one-attribute change.
   Sized at 13px next to a metric label, bumped to 14px in a band row or section title via
   .act-i--band. .act-i--fill is the one filled variant (Max HF reuses the Ø HF heart, filled). */
.act-i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.act-i--band {
    width: 14px;
    height: 14px;
}

.act-i--fill {
    fill: currentColor;
}

/* Activity detail — header: intensity band, top bar, readout strip, tab rail (#334) */

.act-body {
    padding: 16px 20px 24px;
}

.act-band {
    height: 4px;
}

.act-topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.act-topbar-btn.mud-button-root {
    height: 34px;
    width: 34px;
    border-radius: 8px !important;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    transition: background-color 0.12s;
}

.act-topbar-btn.mud-button-root:hover {
    background: var(--brand-tint) !important;
}

.act-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* #399 -- fluid type, same recipe as .home-title/.home-ro-value/.home-rd-val (#398): the minimum
   is exactly the size this page shipped with, so nothing below ~1900px viewport changes, and the
   maximum is reached at roughly the 2400px shell ceiling so type stops growing when the layout
   does. Three declarations only -- the page has no readout hero and everything else (labels, tab
   text, table figures) is left fixed on purpose, same as the uppercase labels in #398. */
.act-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.act-date {
    font-size: 11.5px;
    color: var(--text-2);
    white-space: nowrap;
}

.act-readout {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.act-readout-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 18px 0 0;
    min-width: 88px;
}

.act-readout-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.act-readout-value {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    color: var(--text);
}

.act-readout-value--empty {
    color: var(--text-3);
    font-weight: 500;
}

.act-readout-feel {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    align-items: flex-end;
}

.act-feel-dots {
    display: flex;
    gap: 4px;
    padding-top: 3px;
}

.act-feel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
}

.act-feel-dot--filled {
    /* --feel-dot-color lets a caller (Fuelling-Konsole, #391) recolour a whole dot row by the day's
       own Gefühl value instead of the flat brand green below, which stays the Activity-Detail default. */
    background: var(--feel-dot-color, var(--brand));
    border-color: var(--feel-dot-color, var(--brand));
}

.act-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.act-tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.act-tab:hover {
    background: var(--surface-3);
}

.act-tab--active {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-ink);
    font-weight: 600;
}

.act-tab-count {
    font-size: 11.5px;
    color: inherit;
    opacity: 0.75;
}

/* Activity detail — Übersicht metric sheet (#335). Same hairline-grid construction as the
   calendar (#322): the grid itself is painted --line and gap:1px, every cell is opaque, so the
   1px gaps become the mesh. */

.act-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.act-pill-group-label {
    width: 100%;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 4px 0 -2px;
}

.act-pill {
    height: 30px;
    padding: 0 10px 0 4px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.act-pill-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--on-brand);
    flex-shrink: 0;
}

.act-pill-key {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
}

.act-pill-value {
    font-size: 12.5px;
    font-weight: 620;
    color: var(--text);
}

.act-sheet {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.act-band-row {
    grid-column: 1 / -1;
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
}

.act-band-row-spacer {
    margin-left: auto;
}

.act-tile {
    background: var(--surface);
    padding: 10px 13px 12px;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.act-tile--empty {
    background: var(--surface-2);
}

.act-tile-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.act-tile-value {
    font-size: clamp(17px, 0.9vw, 22px);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
}

.act-tile-value--empty {
    color: var(--text-3);
    font-weight: 500;
}

.act-tile-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 3px;
}

.act-notes-tile {
    grid-column: 1 / -1;
    background: var(--surface);
    padding: 10px 13px 13px;
}

.act-notes-field {
    margin-top: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 60px;
    padding: 10px 12px;
    cursor: text;
    transition: border-color 0.12s, background-color 0.12s;
}

.act-notes-field:hover {
    border-color: var(--line-strong);
    background: var(--surface);
}

/* A Coach tab reads the Athlete's notes only (ADR-0024). */
.act-notes-field--readonly,
.act-notes-field--readonly:hover {
    cursor: default;
    border-color: var(--line);
    background: var(--surface-2);
}

.act-notes-field--saving {
    opacity: 0.6;
}

.act-notes-text {
    font-size: 13px;
    color: var(--text);
    white-space: pre-wrap;
}

.act-notes-empty {
    font-size: 13px;
    font-style: italic;
    color: var(--text-3);
}

/* Notizen — editing state (#342): a real field in the tile's own geometry, not a modal. */

.act-notes-field--editing {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
    cursor: default;
}

.act-notes-textarea {
    display: block;
    width: 100%;
    min-height: 60px;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    resize: vertical;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    white-space: pre-wrap;
}

.act-notes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.act-notes-footer-hint {
    font-size: 10.5px;
    color: var(--text-3);
}

.act-notes-footer-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.act-notes-save-btn {
    color: var(--brand-ink);
    border-color: var(--brand);
}

/* Belastung tile — inline numeric editor (#342): same mono face and geometry as the static
   value, no MudBlazor chrome, so the sheet does not reflow while editing. */

.act-tile-value--editable {
    cursor: pointer;
}

.act-tile--saving {
    opacity: 0.6;
}

.act-tile-input {
    width: 100%;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--brand);
    outline: none;
    background: transparent;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
}

/* Gefühl dots — clickable in place of the read-only header indicator (#342). The button gives
   the 8px dot a real hit target; the visual dot itself keeps its original size. */

.act-feel-dot-btn {
    all: unset;
    display: flex;
    padding: 4px;
    margin: -4px;
    cursor: pointer;
    border-radius: 4px;
}

.act-feel-dot-btn:hover .act-feel-dot {
    border-color: var(--brand);
}

.act-feel-dot-btn--saving {
    opacity: 0.6;
    cursor: default;
}

/* Activity detail — Zonen tab (#336): a stacked distribution bar per metric, then one hairline
   row per zone on the fixed ladder, scaled to the strongest zone in this activity rather than
   to 100% so a small zone stays visible next to a large one. */

.act-zone-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px 4px;
    margin-bottom: 16px;
}

.act-zone-title {
    font-size: 13px;
    font-weight: 620;
    color: var(--text);
    margin-bottom: 10px;
}

.act-zone-stack {
    display: flex;
    height: 18px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--surface-3);
    margin-bottom: 14px;
}

.act-zone-stack-seg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.act-zone-stack-seg span {
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
}

.act-zone-rows {
    display: flex;
    flex-direction: column;
}

.act-zone-row {
    display: grid;
    grid-template-columns: 30px 176px 104px 1fr 84px 60px;
    align-items: center;
    gap: 8px;
    height: 36px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.12s;
}

.act-zone-row:last-child {
    border-bottom: none;
}

.act-zone-row:hover {
    background: var(--surface-3);
}

.act-zone-row--empty {
    opacity: 0.42;
}

.act-zone-tag {
    width: 27px;
    height: 19px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
}

.act-zone-name {
    font-size: 12px;
    font-weight: 550;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-zone-range {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
}

.act-zone-bar-track {
    height: 7px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
    display: block;
}

.act-zone-bar-fill {
    height: 100%;
    display: block;
}

.act-zone-time {
    font-size: 12.5px;
    font-weight: 620;
    color: var(--text);
    text-align: right;
}

.act-zone-share {
    font-size: 11.5px;
    color: var(--text-2);
    text-align: right;
}

/* Sweet Spot overlay row (#338) — sits below the Z1-Z7 ladder on --amber-tint, its bar striped
   rather than solid so it reads as an annotation over Z3/Z4, not a rung on the ladder. */

.act-zone-ss-divider {
    border-top: 1px solid var(--line-strong);
    margin: 6px 0 8px;
}

.act-zone-ss-row {
    display: grid;
    grid-template-columns: 30px 176px 104px 1fr 84px 60px;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 6px;
    background: var(--amber-tint);
    border-radius: 6px;
}

.act-zone-ss-tag {
    width: 27px;
    height: 19px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--amber);
    background: transparent;
    border: 1.5px dashed var(--amber);
}

.act-zone-bar-fill--striped {
    background: repeating-linear-gradient(
        45deg,
        var(--amber) 0,
        var(--amber) 4px,
        transparent 4px,
        transparent 8px
    );
}

.act-zone-ss-note {
    font-size: 11px;
    color: var(--text-3);
    padding: 8px 6px 4px;
}

/* Distribution readout (#338) — Z1-Z2 / Z3 / Z4+ against the corrected Z1-Z7 denominator, plus a
   one-word characterisation of the session's shape. */

.act-zone-readout {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 12px 0 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.act-zone-readout-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.act-zone-readout-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    white-space: nowrap;
}

.act-zone-readout-value {
    font-size: 15px;
    font-weight: 620;
    color: var(--text);
}

.act-zone-readout-tag {
    margin-left: auto;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Activity detail — Übersicht best-effort tables (#337): hairline rows, a share bar scaled to
   the strongest effort in this table, and — power only — a zone colour on that bar. Velocity and
   distance drop the zone column; there is no zone concept for pace. */

.act-eff-section {
    margin-top: 16px;
}

.act-eff-title {
    font-size: 13px;
    font-weight: 620;
    color: var(--text);
    margin-bottom: 8px;
}

.act-eff-table {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.act-eff-head,
.act-eff-row {
    display: grid;
    grid-template-columns: 20px 74px 1fr 92px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
}

.act-eff-head--zoned,
.act-eff-row--zoned {
    grid-template-columns: 20px 74px 1fr 74px 92px;
}

.act-eff-head {
    height: 30px;
    background: var(--surface-2);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
}

.act-eff-row {
    height: 33px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.12s;
}

.act-eff-table .act-eff-row:last-child {
    border-bottom: none;
}

.act-eff-row:hover {
    background: var(--surface-3);
}

.act-eff-rank {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--on-brand);
}

.act-eff-key {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}

.act-eff-bar-track {
    height: 7px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
    display: block;
}

.act-eff-bar-fill {
    height: 100%;
    display: block;
}

.act-eff-zone {
    font-size: 11px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-eff-value {
    font-size: 12.5px;
    font-weight: 620;
    color: var(--text);
    text-align: right;
}

.act-eff-collapse {
    height: 42px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 550;
    color: var(--text);
    transition: background-color 0.12s;
}

.act-eff-collapse:hover {
    background: var(--surface-2);
}

.act-eff-collapse-count {
    font-size: 11.5px;
    color: var(--text-3);
    margin-left: auto;
}

/* Activity analytics — Bestleistungen tab (#371). Reuses .act-eff-table/.act-eff-bar-track/
   .act-eff-bar-fill/.act-eff-key/.act-eff-value as-is; this adds only the pieces that are new:
   a 9-column grid widened for three scopes (Zeitraum 1/2 + Gesamt), the power-duration curve, a
   generic bordered panel for chart cards, a small range chip, and the bucket dialog. */

.act-micro {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.act-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.act-range-chip {
    height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text);
}

.act-range-chip-swatch {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
}

.act-eff-head--best,
.act-eff-row--best {
    grid-template-columns: 26px 62px 104px 92px 92px 1fr 210px 58px 18px;
}

.act-eff-sub {
    font-size: 10.5px;
    color: var(--text-3);
    margin-left: 4px;
}

.act-eff-value2 {
    font-size: 12px;
    color: var(--text-2);
    text-align: right;
}

.act-eff-tick {
    position: absolute;
    top: -1px;
    bottom: -1px;
    width: 2px;
    background: var(--m-dist);
}

.act-eff-act {
    font-size: 11px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-eff-pct {
    font-size: 11.5px;
    color: var(--text-2);
    text-align: right;
}

.act-eff-row--empty-scope {
    background: var(--surface-2);
}

.act-eff-empty-note {
    color: var(--text-3);
    font-style: italic;
}

/* Personal-best chip — reuses the readout-tag pill shape (#338) rather than minting a new one. */
.act-pb-chip {
    height: 17px;
    padding: 0 6px;
    border-radius: 5px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
}

/* Shared area+cap column-chart idiom: the power-duration curve (3 series) and the Verteilung
   training-load chart (1 series) are drawn with the same construction, only the colour differs. */

.act-curve {
    display: flex;
    gap: 10px;
}

.act-curve-yaxis {
    width: 34px;
    position: relative;
    flex-shrink: 0;
}

.act-curve-track {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.act-curve-gridline {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line);
}

.act-curve-gridline--base {
    background: var(--line-strong);
}

.act-curve-ylabel {
    position: absolute;
    right: 0;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-3);
    transform: translateY(-50%);
}

.act-curve-col {
    position: relative;
    flex-grow: 1;
    flex-basis: 0;
    height: 100%;
}

.act-curve-area {
    position: absolute;
    left: 0;
    right: 1px;
    bottom: 0;
}

.act-curve-cap {
    position: absolute;
    left: 0;
    right: 1px;
    height: 2px;
}

.act-curve-xlabels {
    display: flex;
    margin-top: 7px;
}

.act-curve-xlabel {
    flex-grow: 1;
    flex-basis: 0;
    text-align: center;
}

/* Bucket dialog (#371) — top-3 efforts plus the all-time reference, opened from an effort row. */

.act-bucket-row {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px 0;
    overflow: hidden;
}

.act-bucket-row--top {
    background: var(--surface);
    border-color: var(--line-strong);
}

.act-bucket-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--surface-3);
    color: var(--text-2);
}

.act-bucket-rank--top {
    background: var(--brand);
    color: var(--on-brand);
}

.act-bucket-track {
    position: relative;
    height: 7px;
    border-radius: 4px 4px 0 0;
    background: var(--surface-3);
    overflow: hidden;
    margin: 10px -12px 0;
}

.act-bucket-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
}

.act-bucket-reference {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 11px;
}

/* Activity detail — Runden & Splits (#339): laps drop from a MudTable to a hairline grid with
   deviation bars centred on the activity average; splits render as a column-chart shape rather
   than two hundred unreadable rows. */

.act-laps-table {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.act-laps-head,
.act-laps-row,
.act-laps-totals {
    display: grid;
    grid-template-columns: 32px 1fr 82px 78px 84px 132px 74px 132px 74px 84px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
}

/* Pieces (#553): a RowSight Activity's PM5 Pieces, one hairline row each, in the laps table's dress.
   The grid keeps its widths on a phone and scrolls sideways instead of crushing the figures. */

.act-pieces-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.act-pieces-table {
    min-width: 560px;
    background: var(--surface);
}

.act-pieces-head,
.act-pieces-row {
    display: grid;
    grid-template-columns: 28px 1fr 72px 78px 92px 56px 56px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
}

.act-pieces-head {
    height: 30px;
    background: var(--surface-2);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.act-pieces-row {
    height: 34px;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--text);
}

.act-pieces-row:last-child {
    border-bottom: none;
}

.act-laps-head--no-power,
.act-laps-row--no-power {
    grid-template-columns: 32px 1fr 82px 78px 84px 132px 74px 84px;
}

.act-laps-head {
    height: 30px;
    background: var(--surface-2);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.act-laps-row {
    height: 34px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.12s;
    font-size: 12.5px;
    color: var(--text);
}

.act-laps-row:hover {
    background: var(--surface-3);
}

.act-laps-index {
    color: var(--text-3);
    font-weight: 600;
}

.act-laps-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-laps-dev-track {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: var(--surface-3);
    display: block;
}

.act-laps-dev-track::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -3px;
    bottom: -3px;
    width: 1px;
    background: var(--line-strong);
}

.act-laps-dev-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 3px;
}

.act-laps-dev-fill--pos {
    left: 50%;
    background: var(--brand);
}

.act-laps-dev-fill--neg {
    right: 50%;
    background: var(--text-3);
}

.act-laps-totals {
    height: 34px;
    background: var(--surface-2);
    border-top: 1.5px solid var(--line-strong);
    font-size: 12.5px;
    font-weight: 620;
    color: var(--text);
}

.act-laps-toggle,
.act-splits-table-toggle {
    height: 34px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 550;
    color: var(--text-2);
    transition: background-color 0.12s;
    margin-bottom: 16px;
}

.act-laps-toggle:hover,
.act-splits-table-toggle:hover {
    background: var(--surface-2);
}

.act-seg.mud-toggle-group {
    border-radius: 8px;
    border-color: var(--line-strong);
}

.act-splits-plot {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 104px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px 10px 0 0;
    padding: 8px 8px 0;
}

.act-splits-col {
    flex: 1;
    min-width: 1px;
    border-radius: 2px 2px 0 0;
}

.act-splits-col--clearly-faster {
    background: var(--brand-deep);
}

.act-splits-col--faster {
    background: var(--brand);
}

.act-splits-col--slower {
    background: #B7C4BE;
}

.act-splits-col--clearly-slower {
    background: var(--text-3);
}

.act-splits-axis {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 10px 10px;
    margin-bottom: 16px;
    font-size: 10px;
    color: var(--text-3);
}

/* Activity detail — Analyse stream rail, named actions and states (#340). A ghost button idiom
   shared with the plan card (#341): height 28-34px, hairline border, no fill, quiet hover. */

.act-ghost-btn {
    height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
    font: inherit;
    font-size: 12.5px;
    font-weight: 550;
    cursor: pointer;
    transition: background-color 0.12s;
}

.act-ghost-btn:hover {
    background: var(--surface-2);
}

.act-ghost-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.act-ghost-btn--danger {
    color: var(--red);
    border-color: var(--red);
}

/* Stream toggle rail: fixed 28px-tall pills whose geometry never changes between states — only the
   icon's opacity and the label's weight/colour flip. The icon always carries the stream's own
   colour (retinted onto the app palette; PANEL_CONFIG in RideTimelineChart.razor.js matches). */

.rtc-toggle-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.rtc-toggle {
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 550;
    color: var(--text-2);
    transition: color 0.12s;
}

.rtc-toggle--on {
    font-weight: 620;
    color: var(--text);
}

.rtc-toggle-icon {
    display: inline-flex;
    opacity: 0.45;
    transition: opacity 0.12s;
}

.rtc-toggle--on .rtc-toggle-icon {
    opacity: 1;
}

/* Loading skeleton — replaces the centred MudProgressCircular while streams are (re)loading. */

.act-analyse-loading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0 8px;
}

.act-analyse-loading-row {
    height: 64px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
    background-size: 400% 100%;
    animation: act-analyse-shimmer 1.4s ease infinite;
}

@keyframes act-analyse-shimmer {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* Empty state — no streams available; carries the existing German copy and a retry action. */

.act-analyse-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 24px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 10px;
    text-align: center;
    color: var(--text-2);
    font-size: 13px;
}

/* Activity detail — TrainingSessionOverview as a plan-against-actual card (#341). Same spined-card
   recipe as .cal-card (#322): a 5px session-type spine, the body on --surface. */

.act-plan-card {
    display: flex;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-rest);
    overflow: hidden;
    margin-bottom: 16px;
}

.act-plan-card-spine {
    width: 5px;
    flex-shrink: 0;
}

.act-plan-card-body {
    flex: 1;
    min-width: 0;
    padding: 11px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.act-plan-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.act-plan-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.act-plan-title {
    font-size: 14px;
    font-weight: 620;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-plan-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.act-plan-columns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.act-plan-bars {
    flex: 1 1 260px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.act-plan-target {
    flex: 1 1 220px;
    min-width: 180px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-2);
}

.act-plan-chart {
    flex: 1 1 260px;
    min-width: 220px;
}

.act-plan-target-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    display: block;
    margin-bottom: 3px;
}

.act-plan-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.act-plan-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11px;
    color: var(--text-2);
}

.act-plan-bar-track {
    position: relative;
    height: 9px;
    border-radius: 5px;
    background: var(--surface-3);
    display: block;
}

.act-plan-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 5px;
    background: var(--brand);
}

.act-plan-bar-tick {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--line-strong);
}

.act-plan-bar-dev {
    align-self: flex-end;
    font-size: 11.5px;
    font-weight: 620;
}

.act-plan-bar-dev--pos {
    color: var(--brand-deep);
}

.act-plan-bar-dev--neg {
    color: var(--red);
}

/* Workout-Schritte table — the hairline idiom shared with the Übersicht best-effort tables (#337). */

.act-steps-toggle {
    height: 34px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
}

.act-steps-table {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    /* Fixed-width columns (the ergometer/splits variant especially) can outgrow a narrow viewport —
       scroll horizontally rather than clip, the same safety net the MudSimpleTable it replaces had
       via its own Style="overflow-x: auto". */
    overflow-x: auto;
    margin-top: 4px;
}

.act-steps-head,
.act-steps-row {
    display: grid;
    grid-template-columns: 28px 90px 1fr 70px 90px 1fr;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    min-width: 520px;
}

.act-steps-head--splits,
.act-steps-row--splits {
    grid-template-columns: 28px 1fr 70px 90px 1fr 110px;
}

.act-steps-head {
    height: 30px;
    background: var(--surface-2);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
}

.act-steps-row {
    height: 34px;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--text);
    transition: background-color 0.12s;
}

.act-steps-table .act-steps-row:last-child {
    border-bottom: none;
}

.act-steps-row:hover {
    background: var(--surface-3);
}

.act-steps-index {
    color: var(--text-3);
    font-weight: 600;
}

/* ==========================================================================
   Session dialogs — design tokens (#359)
   Same neutral/brand ramp as the calendar/activity detail/strength sheet;
   duplicated under its own shell class rather than sharing .act-shell, same
   reasoning recorded above .act-shell and .set-sheet-shell: this surface must
   not couple to their markup. Values are copied verbatim — do not edit one
   ramp without checking whether the others drifted out of sync.
   ========================================================================== */

.sess-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;
    --on-brand: #FFFFFF;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);

    --m-hr: #EF4444;
    --m-power: #7C68DE;
    --m-speed: #2563EB;
    --m-load: #D97706;

    /* Gefühl ramp — see .dt-shell for the rationale; duplicated verbatim per the standing convention. */
    --feel-1: #059669;
    --feel-2: #65A30D;
    --feel-3: #D97706;
    --feel-4: #EA580C;
    --feel-5: #DC2626;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.sess-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --red: #F87171;
    --on-brand: #05170F;

    --m-hr: #F87171;
    --m-power: #A392F0;
    --m-speed: #60A5FA;
    --m-load: #F59E0B;

    --feel-1: #10B981;
    --feel-2: #A3E635;
    --feel-3: #F59E0B;
    --feel-4: #FB923C;
    --feel-5: #F87171;
}

.sess-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.sess-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Header — 4px session-type band, 64px topbar, eyebrow + inline title field (.act-band/.act-topbar/
   .act-eyebrow/.act-title recipe; the title field additionally borrows .ss-input's interaction states
   since it is editable at title scale, not a static heading). */

.sess-band {
    height: 4px;
}

.sess-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sess-head {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.sess-head-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.sess-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.sess-title-field {
    width: 100%;
    font-size: 21px;
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    padding: 1px 6px;
    margin-left: -6px;
    transition: background-color 0.1s, border-color 0.1s;
}

.sess-title-field:hover {
    background: var(--surface-2);
    border-color: var(--line);
}

.sess-title-field:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}

.sess-close.mud-button-root {
    height: 34px;
    width: 34px;
    border-radius: 8px !important;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    transition: background-color 0.12s;
}

.sess-close.mud-button-root:hover {
    background: var(--brand-tint) !important;
}

/* Sheets — the hairline grid shared by the Umfang/Ziel tiles (.act-sheet/.act-tile/.act-band-row
   recipe), auto-fit rather than a fixed 6 columns: every .sess-sheet in the session dialogs holds a
   handful of tiles (2-3 for Umfang, 1 for Zielnotizen, 2 for a step's Von/Bis), never six, and a fixed
   6-column track left the unused columns showing raw grid background as a dead grey box next to the
   real tiles. auto-fit collapses empty tracks, so the tiles it does have share the row's full width. */
.sess-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.sess-band-row {
    grid-column: 1 / -1;
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
}

.sess-tile {
    background: var(--surface);
    padding: 10px 13px 12px;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.sess-tile--empty {
    background: var(--surface-2);
}

.sess-tile-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.sess-tile-val {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
}

.sess-tile-val--empty {
    color: var(--text-3);
    font-weight: 500;
}

.sess-tile-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 3px;
}

.sess-tile-hint {
    font-size: 11px;
    color: var(--text-3);
}

/* Inline tile inputs (.ss-input recipe). */

.sess-tile-in {
    width: 100%;
    height: 30px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: background-color 0.1s, border-color 0.1s;
    appearance: textfield;
    -moz-appearance: textfield;
}

.sess-tile-in::-webkit-outer-spin-button,
.sess-tile-in::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sess-tile-in:hover {
    background: var(--surface-2);
    border-color: var(--line);
}

.sess-tile-in:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}

.sess-tile-in:disabled {
    color: var(--text-3);
    cursor: default;
}

/* Chip rails — sport rail, intensity rail (.sess-mini), measurement/Bereich toggles. .ss-muscle-chip
   recipe: 3px accent border-left, brand tint + outline when active. */

.sess-chip-rail {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sess-sport-chip,
.sess-mini {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 8px;
    border-radius: 5px;
    background: var(--surface-2);
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-left: 3px solid var(--text-3);
    font: inherit;
    font-size: 11.5px;
    color: var(--text-2);
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
}

.sess-sport-chip:hover,
.sess-mini:hover {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.sess-sport-chip--active,
.sess-mini--active {
    background: var(--brand-tint);
    color: var(--brand-ink);
    outline: 1.5px solid var(--brand);
    outline-offset: -1.5px;
}

.sess-sport-chip:disabled,
.sess-mini:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Zone ramp — new, no existing twin. Segment colour is set inline per-zone from
   ActivityZoneRamp.ColorFor/HrColorFor so it stays in sync with the calendar spine and the Zonen tab. */

.sess-ramp {
    display: flex;
    gap: 2px;
}

.sess-ramp-seg {
    flex: 1;
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border-radius: 4px;
    opacity: 0.3;
    cursor: pointer;
    transition: opacity 0.12s;
    border: none;
    color: var(--on-brand);
    overflow: hidden;
}

.sess-ramp-seg-num {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.sess-ramp-seg-range {
    font-size: 8.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.sess-ramp-seg:hover {
    opacity: 0.6;
}

.sess-ramp-seg--active {
    opacity: 1;
    outline: 2px solid var(--text);
    outline-offset: -2px;
}

.sess-ramp-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--text-2);
}

/* Steps table — own column template (Nr. / Schritt / Dauer / Ziel / ⋯), the .act-steps-table hairline
   idiom otherwise (30px uppercase head on --surface-2, 34px rows, overflow-x safety net). */

.sess-tbl {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow-x: auto;
}

.sess-tbl-head,
.sess-tbl-row {
    display: grid;
    grid-template-columns: 28px 1fr 90px 130px 32px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    min-width: 460px;
}

.sess-tbl-head {
    height: 30px;
    background: var(--surface-2);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
}

.sess-tbl-row {
    height: 34px;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--text);
    transition: background-color 0.12s;
}

.sess-tbl .sess-tbl-row:last-child {
    border-bottom: none;
}

.sess-tbl-row:hover {
    background: var(--surface-3);
}

.sess-tbl-row[draggable="true"] {
    cursor: grab;
}

.sess-tbl-row--group {
    background: var(--surface-2);
    font-weight: 600;
}

.sess-tbl-row--nested {
    padding-left: 28px;
    font-size: 12px;
    color: var(--text-2);
}

.sess-marker {
    width: 3px;
    align-self: stretch;
    border-radius: 2px;
    margin: 6px 0;
}

/* Buttons — .act-ghost-btn recipe. Primary is filled brand, danger is outline red (not filled), quiet
   is the bare ghost with no accent. */

.sess-btn {
    height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
    font: inherit;
    font-size: 12.5px;
    font-weight: 550;
    cursor: pointer;
    transition: background-color 0.12s;
}

.sess-btn:hover {
    background: var(--surface-2);
}

.sess-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.sess-btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
}

.sess-btn--primary:hover {
    background: var(--brand-deep);
}

.sess-btn--danger {
    color: var(--red);
    border-color: var(--red);
    background: var(--surface);
}

.sess-btn--danger:hover {
    background: var(--amber-tint);
}

.sess-btn--amber {
    background: var(--amber);
    border-color: var(--amber);
    color: var(--on-brand);
}

.sess-btn--amber:hover {
    filter: brightness(0.94);
}

.sess-btn--quiet {
    border-color: transparent;
    background: none;
}

.sess-btn--quiet:hover {
    background: var(--surface-2);
}

/* Add rows — .ss-add-row recipe: dashed ghost previewing what the new step inherits. */

.sess-add {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 8px;
    padding: 0 10px;
    margin-top: 6px;
    cursor: pointer;
    background: none;
    color: var(--text-2);
    font-size: 12.5px;
    text-align: left;
    width: 100%;
}

.sess-add:hover {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-ink);
}

/* Empty / notice panels — .act-analyse-empty recipe for the dashed empty state; .sess-notice is the
   solid --brand-tint idiom used elsewhere for "here is why this is disabled" messages. */

.sess-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 24px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 10px;
    text-align: center;
    color: var(--text-2);
    font-size: 13px;
}

.sess-notice {
    padding: 10px 13px;
    border-radius: 8px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 12.5px;
}

/* Footer */

.sess-foot {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.sess-foot-spacer {
    margin-left: auto;
}

/* Why the primary button is disabled — sits right before it so the eye lands on the reason. */
.sess-foot-hint {
    font-size: 12px;
    color: var(--text-3);
    margin-right: 4px;
}


/* ==========================================================================
   Saisonplanung — design tokens, Jahresband, Listen (#383)
   Same neutral/brand ramp as the calendar (#322), activity detail (#333/#334),
   the strength set sheet and the session dialogs (#359); duplicated under its
   own shell class rather than sharing .act-shell, same reasoning recorded
   above .act-shell and .sess-shell: this page must not couple to their markup.
   Values are copied verbatim — do not edit one ramp without checking whether
   the others drifted out of sync.
   ========================================================================== */

.season-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;
    --on-brand: #FFFFFF;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);

    /* #406 -- track lane geometry. Only the day grid grows (it holds the scaling type); the phase
       and event lanes keep their pixel heights and are pushed down by it. Every offset below is
       derived here so the three lanes cannot drift apart as the track grows -- at the minimum these
       resolve to exactly the 11 / 20 / 32 / 57 / 76 / 82 the page shipped with. */
    --sp-kw-h: 11px;
    --sp-day-h: clamp(20px, 1.12vw, 26px);
    --sp-phase-top: calc(var(--sp-kw-h) + var(--sp-day-h) + 1px);
    --sp-evt-top: calc(var(--sp-phase-top) + 25px);
    /* #409 -- the weekly volume lane, below the events. Like the phase and event lanes it keeps a fixed
       pixel height: only the day grid scales, because only the day grid carries scaling type. */
    --sp-week-top: calc(var(--sp-evt-top) + 19px);
    --sp-week-h: 24px;
    --sp-track-h: calc(var(--sp-week-top) + var(--sp-week-h));
    --sp-monthrow-h: calc(var(--sp-track-h) + 6px);

    /* Event colour key — the one thing this page owns beyond the shared ramp. Phase colours come
       from the database (PhaseColorMap) and are the same hex in both themes; the five event kinds
       are ours, so they get tokens and dark mode stays a pure variable swap. */
    --evt-a: #DC2626;
    --evt-a-tint: rgba(220, 38, 38, .12);
    --evt-b: var(--amber);
    --evt-b-tint: var(--amber-tint);
    --evt-c: var(--text-2);
    --evt-c-tint: var(--surface-3);
    --evt-holiday: #2563EB;
    --evt-holiday-tint: rgba(37, 99, 235, .12);
    --evt-other: var(--text-2);
    --evt-other-tint: var(--surface-3);

    /* #406 -- unlike the other shells this page never had a MudContainer to escape: MainLayout drops
       @Body straight into MudMainContent, so the band ran edge to edge with no ceiling at all. Here
       the shared cap *narrows* the page above 2400 rather than freeing anything, and it is taken so
       every shell agrees. --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.season-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --red: #F87171;
    --on-brand: #05170F;

    --evt-a: #F87171;
    --evt-a-tint: rgba(248, 113, 113, .16);
    --evt-b: #F59E0B;
    --evt-b-tint: rgba(245, 158, 11, .16);
    --evt-holiday: #60A5FA;
    --evt-holiday-tint: rgba(96, 165, 250, .16);
}

.season-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.season-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Header — year band, top bar, readout strip, filter rail */

.sp-band {
    position: relative;
    height: 4px;
    display: flex;
}

/* Today on the window ribbon. Overhangs the 4px band top and bottom so it stays findable against a
   phase colour, and is centred on its own day rather than its left edge. */
.sp-band-today {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    margin-left: -1px;
    background: var(--text);
    border-radius: 1px;
    pointer-events: none;
}

/* min-height, not height: the bar carries title + four nav buttons + Heute + a five-item readout +
   two add buttons, which does not fit the 1025px content box a 13" laptop leaves with the drawer
   open. It wraps there instead of overflowing, and the readout moves as one unit. #410 widened both
   ends of this row — a month range where a bare year used to sit, and a coarse step either side of
   the fine one — so it wraps a little sooner than it did. */
.sp-top {
    min-height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.sp-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sp-title {
    font-size: 21px;
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text);
}

.sp-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.sp-navbtn {
    height: 34px;
    width: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    color: var(--text-2);
    cursor: pointer;
    transition: background-color 0.12s;
}

.sp-navbtn:hover {
    background: var(--brand-tint);
}

.sp-btn {
    height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
    font: inherit;
    font-size: 12.5px;
    font-weight: 550;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.12s;
}

.sp-btn:hover {
    background: var(--surface-2);
}

.sp-btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
}

.sp-btn--primary:hover {
    background: var(--brand-deep);
}

.sp-sep {
    width: 1px;
    align-self: stretch;
    margin: 14px 0;
    background: var(--line);
    flex-shrink: 0;
}

.sp-readout {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 8px;
    overflow-x: auto;
}

.sp-ro-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-ro-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.sp-ro-value {
    font-size: 13.5px;
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
}

.sp-ro-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 2px;
}

.sp-body {
    padding: 14px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* A window step keeps the band on screen and dims it, rather than blanking the body to a spinner the
   way the first load does (#410): at one month per click the spinner would flash away the very thing
   being read. The dim is the affordance that keeps a slow query distinguishable from a dead button. */
.sp-body--stepping {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.12s;
}

/* Filter rail — .sess-mini recipe (3px accent border-left, tint + outline when active) */

.sp-rail {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sp-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 8px;
    border-radius: 5px;
    background: var(--surface-2);
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-left: 3px solid var(--text-3);
    font: inherit;
    font-size: 11.5px;
    color: var(--text-2);
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
}

.sp-chip:hover {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.sp-chip--on {
    background: var(--brand-tint);
    color: var(--brand-ink);
    outline: 1.5px solid var(--brand);
    outline-offset: -1.5px;
}

/* A phase type or event kind the year does not use at all — visible so the key stays complete,
   dimmed so it does not read as a filter that was switched off. */
.sp-chip--unused {
    opacity: 0.45;
}

.sp-chip-n {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
}

.sp-chip-swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Sheets — the hairline surface the band and both lists sit on (.act-sheet recipe) */

.sp-sheet {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.sp-bandrow {
    background: var(--surface-2);
    padding: 7px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
    border-bottom: 1px solid var(--line);
}

/* The year band itself — twelve month rows of month name, day-exact track, Umfang */

/* #406 -- the side columns scale, gently. Floors are exactly the pinned widths this page shipped
   with, so the 1025px case is unchanged to the pixel; the weights are small so the track still takes
   ~85% of every pixel gained. Without this the track goes 709 -> ~2000px while a 172px column sits
   next to it as a stranded sliver. */
.sp-monthrow {
    display: grid;
    grid-template-columns: minmax(54px, 0.04fr) 1fr minmax(172px, 0.13fr);
    gap: 12px;
    align-items: stretch;
    height: var(--sp-monthrow-h);
    padding: 0 13px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.sp-monthrow:last-child {
    border-bottom: none;
}

.sp-monthrow--current {
    background: var(--surface-2);
}

.sp-month-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.sp-month-name {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text);
}

/* Only the rows where the year changes carry it, so it reads as a marker rather than a column. */
.sp-month-year {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
}

.sp-month-days {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--text-3);
}

/* The track: four lanes measured from its top edge — 0-10 week strip, 11-30 day grid,
   32-55 phases, 57-75 events. Every child positions itself absolutely against this box. */
.sp-track {
    position: relative;
    height: var(--sp-track-h);
    align-self: center;
    overflow: hidden;
    cursor: pointer;
}

.sp-kw {
    position: absolute;
    top: 0;
    padding-left: 4px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-3);
    white-space: nowrap;
}

.sp-day {
    position: absolute;
    top: var(--sp-kw-h);
    height: var(--sp-day-h);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    overflow: hidden;
}

/* #406 -- content, not chrome: .sp-dow and .sp-daynum are the only data in the track, and at a
   64px-wide day cell 7.5px weekday text reads as a rendering bug. The uppercase label texture
   (.sp-kw, .sp-bandrow, .sp-umfang-note, .sp-eyebrow, .sp-ro-label) stays fixed, per #398. */
.sp-dow {
    font-size: clamp(7.5px, 0.42vw, 10px);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--text-3);
}

.sp-daynum {
    font-size: clamp(9.5px, 0.53vw, 13px);
    font-weight: 600;
    line-height: 1;
    color: var(--text);
}

.sp-daynum--weekend {
    color: var(--text-2);
}

/* 15/20 of the day lane; the ratio is kept so the wide end is the narrow end, scaled. */
.sp-daynum--today {
    width: calc(var(--sp-day-h) * 0.75);
    height: calc(var(--sp-day-h) * 0.75);
    border-radius: 50%;
    background: var(--brand);
    color: var(--on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(9px, 0.5vw, 12px);
    font-weight: 700;
}

.sp-weekend {
    position: absolute;
    top: var(--sp-kw-h);
    bottom: 0;
    background: var(--surface-3);
}

.sp-dayline {
    position: absolute;
    top: var(--sp-kw-h);
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.sp-dayline--monday {
    background: var(--line-strong);
}

/* A transparent per-day hit area, above the tinted lanes but below the phase and event blocks, so an
   empty day opens the phase dialog on its Mo-So week while a click on a block still reaches the block. */
.sp-dayhit {
    position: absolute;
    top: var(--sp-kw-h);
    bottom: 0;
    z-index: 2;
    cursor: pointer;
}

.sp-dayhit:hover {
    background: rgba(5, 150, 105, .07);
}

.sp-today {
    position: absolute;
    top: calc(var(--sp-kw-h) + var(--sp-day-h));
    bottom: 0;
    width: 2px;
    transform: translateX(-1px);
    background: var(--brand);
    z-index: 4;
}

/* Its own container (#406): whether the name and hours fit is a fact about *this block's* width,
   which differs per phase, so it cannot be a query on the track. This replaces the server-side
   ShowsPhaseName / ShowsPhaseHours pair, which measured against a hardcoded nominal track width
   (980px) that matched neither the 709px floor nor the ~2000px ceiling. */
.sp-phase {
    container-type: inline-size;
    position: absolute;
    top: var(--sp-phase-top);
    height: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 7px;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 3;
}

.sp-phase-name {
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-phase-hours {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.72;
    white-space: nowrap;
    margin-left: auto;
}

/* A phase block carries its name once it is wide enough to hold one, and its weekly hours once
   name and figure both fit. These two numbers were PhaseNameMinWidthPx / PhaseHoursMinWidthPx in
   SeasonBandLayout.cs until #406; they now live here because the query reads the block's real
   width, which is the whole point -- C# only ever had a guess at it. */
@container (max-width: 56px) {
    .sp-phase-name {
        display: none;
    }
}

@container (max-width: 132px) {
    .sp-phase-hours {
        display: none;
    }
}

@container (max-width: 56px) {
    .sp-evt-name {
        display: none;
    }
}

.sp-evt-pill {
    container-type: inline-size;
    position: absolute;
    top: var(--sp-evt-top);
    height: 19px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 3;
}

.sp-evt-name {
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* #409 -- the weekly volume lane. Its own container, for the same reason .sp-phase is one: whether the
   numbers fit is a fact about this week's block, which is ~160px at the 1025px floor and ~450px at the
   ceiling, and no server-side guess can know which. */
.sp-week {
    container-type: inline-size;
    position: absolute;
    top: var(--sp-week-top);
    height: var(--sp-week-h);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0 3px;
    box-sizing: border-box;
    overflow: hidden;
    /* Above .sp-dayhit (z 2), which spans the whole track: underneath it the block would never receive
       a hover and its tooltip -- the only place the full week reads out -- could not open. The click it
       therefore takes is handed straight back to the same Mo-So phase dialog, so the control behaves
       exactly as it did before the lane existed. */
    z-index: 5;
    cursor: pointer;
}

.sp-week:hover {
    background: rgba(5, 150, 105, .07);
}

.sp-week-row {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 8px;
}

/* The empty track is drawn for every week, trained or not: a missed week has to read as a hole in the
   lane rather than as an element that failed to render. */
.sp-week-bar {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: flex;
    background: var(--surface-3);
    border-radius: 2px;
    overflow: hidden;
}

.sp-week-hours {
    height: 100%;
    background: var(--text-2);
    border-radius: 2px;
}

/* The one coloured element in the lane, so the eye reads load and not decoration. Strength is the same
   hue at lower weight rather than a second colour: the two numbers sit on one scale by construction
   (StrengthLoadEstimator), and a new hue here would fight the event pills directly above. */
.sp-week-load {
    height: 100%;
    background: var(--brand);
}

.sp-week-load--strength {
    opacity: .45;
}

.sp-week-tick {
    position: absolute;
    top: -1px;
    bottom: -1px;
    width: 1px;
    background: var(--line-strong);
}

/* A week past the scale: the segments keep their ratio and fill the bar, and this marks that the bar is
   no longer measuring -- better than two segments clipping at an arbitrary point. */
.sp-week-notch {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: repeating-linear-gradient(
        135deg,
        var(--surface) 0 1px,
        transparent 1px 3px
    );
}

.sp-week-label {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-3);
    white-space: nowrap;
}

/* Below this the block is all bar: two rows of numbers in less than ~200px would crowd out the thing
   they annotate, and the tooltip still carries every figure. */
@container (max-width: 200px) {
    .sp-week-label {
        display: none;
    }
}

/* A one-day event tints its whole day column from the grid down, so the marker is readable as a date
   rather than as a floating icon. */
.sp-evt-col {
    position: absolute;
    top: var(--sp-kw-h);
    height: calc(var(--sp-track-h) - var(--sp-kw-h) - 1px);
    border-radius: 3px;
    /* Behind the day grid: the tint marks the column, the date on top of it stays readable — that
       recoloured, bolded date is how a race day is found without hunting for its marker. */
    z-index: 0;
}

.sp-evt-mark {
    position: absolute;
    top: var(--sp-evt-top);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 3;
}

.sp-evt-mark--flipped {
    flex-direction: row-reverse;
}

.sp-evt-disc {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-umfang {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.sp-umfang-head {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.sp-umfang-val {
    font-size: 14px;
    font-weight: 620;
    letter-spacing: -0.02em;
}

/* #409 -- the plan, second and quieter: the big number is now what was actually trained. */
.sp-umfang-plan {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
}

.sp-umfang-unit {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-3);
}

/* Fills the column rather than sitting at a pinned 120px: it is a proportion readout against
   VolumeBarScaleHours, so a longer bar resolves finer differences between months (#406). */
.sp-umfang-track {
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
    overflow: hidden;
}

.sp-umfang-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--brand-deep);
}

.sp-umfang-note {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--text-3);
}

/* The two lists under the band */

/* #406 -- this was the page's one @media breakpoint (max-width: 1100px -> single column). Replaced
   with an intrinsic track so the mechanism matches #398 and reads the space the lists actually have
   rather than the viewport: with the drawer open those differ by 240px. The 420px floor reproduces
   the old breakpoint's behaviour at the widths that matter. */
.sp-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 14px;
    align-items: start;
}

/* Each list is its own container so the description column below can key off the list's real
   width. .sp-sheet is also the band sheet, hence the descendant selector. */
.sp-lists .sp-sheet {
    container-type: inline-size;
}

.sp-row {
    display: grid;
    gap: 10px;
    align-items: center;
    height: 36px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background-color 0.1s;
}

.sp-row:hover {
    background: var(--surface-2);
}

.sp-row--phase {
    grid-template-columns: 3px 1fr 104px 92px 54px;
    padding: 0 13px 0 0;
}

.sp-row--event {
    grid-template-columns: 17px 1fr 96px 92px;
    padding: 0 13px;
}

/* #406 -- Description is authored in the phase/race/Termin dialogs and, until now, displayed
   nowhere: not in the row, not in the tooltip. It is what the width bought.
   display:none keeps the row honest below the threshold -- a hidden grid item takes no track, so
   the narrow template stays a 1:1 match for its item count.
   720px is where adding the track stops costing the name column: at that width the phase name gets
   202px and the event name 224px, which are the widths they have at the 1025px floor. Below it the
   description would take room the name still needs. */
.sp-row-desc {
    display: none;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@container (min-width: 720px) {
    .sp-row--phase {
        grid-template-columns: 3px 1fr 1fr 104px 92px 54px;
    }

    .sp-row--event {
        grid-template-columns: 17px 1fr 1fr 96px 92px;
    }

    .sp-row-desc {
        display: block;
    }
}

.sp-row-spine {
    align-self: stretch;
    margin: 7px 0;
    border-radius: 2px;
}

.sp-row-name {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-row-kind {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.sp-row-dates {
    font-size: 11.5px;
    color: var(--text-2);
    white-space: nowrap;
}

.sp-row-hours {
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}

.sp-row-disc {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-row-more {
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 13px;
    font-size: 11.5px;
    color: var(--text-3);
    background: var(--surface-2);
}

.sp-empty {
    padding: 20px 13px;
    font-size: 12.5px;
    color: var(--text-3);
}

/* Dialog-only: the day-exact month strip the phase, race and commitment dialogs show, so the athlete
   can see where the date being typed actually lands. */

.sp-strip-row {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 8px;
    align-items: start;
}

.sp-strip-month {
    font-size: 10px;
    font-weight: 650;
    color: var(--text-3);
    padding-top: 5px;
}

.sp-strip {
    position: relative;
    height: 20px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
}

.sp-strip-phase {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 3px;
    z-index: 1;
    opacity: 0.35;
}

.sp-strip-phase--focus {
    opacity: 1;
    z-index: 5;
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.sp-strip-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    z-index: 3;
    background: var(--line);
    opacity: 0.5;
}

.sp-strip-line--monday {
    background: var(--line-strong);
    opacity: 0.9;
}

.sp-strip-pin {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 2px;
    z-index: 4;
}

/* Above every phase block on the strip (which run at z-index 1, the edited one at 5) and inside the
   strip's own overflow box — the pin exists to be read, so it must not paint under a block or hang
   past the clip. */
.sp-strip-pin-label {
    position: absolute;
    bottom: 1px;
    z-index: 6;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 0 2px var(--surface-3), 0 0 2px var(--surface-3);
}

.sp-strip-scale {
    position: relative;
    height: 13px;
    margin-top: 1px;
}

.sp-strip-tick {
    position: absolute;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 650;
    color: var(--text-3);
}

/* Textarea inside a .sess-sheet section (description fields) */

.sp-textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
    padding: 7px 8px;
    font: inherit;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text);
    box-sizing: border-box;
    transition: background-color 0.1s, border-color 0.1s;
}

.sp-textarea:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}

/* Day-count stepper (commitment dialog) — a commitment is day-based, never week-based. */

.sp-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-stepper-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    color: var(--text-2);
    font: inherit;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sp-stepper-btn:hover {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.sp-stepper-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Toggle (Mehrtägig / Eintägig) */

.sp-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.sp-toggle-track {
    width: 32px;
    height: 18px;
    border-radius: 999px;
    background: var(--line-strong);
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.12s;
}

.sp-toggle-track--on {
    background: var(--brand);
}

.sp-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(9, 32, 25, .2);
    transition: left 0.12s;
}

.sp-toggle-track--on .sp-toggle-knob {
    left: 16px;
}

/* .sess-close is written for MudBlazor's icon button (.sess-close.mud-button-root). These three
   dialogs close with a plain <button> around an inline SVG, so the same recipe is restated for it. */

button.sess-close {
    height: 34px;
    width: 34px;
    border-radius: 8px;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color 0.12s;
}

button.sess-close:hover {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

/* Stroke glyphs on a 16px grid. The shared ActivityIcon sprite is drawn on a 24px grid, so these
   cannot join it without every path being redrawn; they live here instead, same technique. */

.sp-i {
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   Einstellungen — console shell, rail, panels (#384)
   Same neutral/brand ramp as the calendar (#322), activity detail (#333/#334),
   the strength set sheet, the session dialogs (#359) and Saisonplanung (#383);
   duplicated under its own shell class for the same reason recorded above
   .act-shell/.sess-shell/.season-shell: this page must not couple to their
   markup. Values are copied verbatim — do not edit one ramp without checking
   whether the others drifted out of sync. Prefix is cfg- (not set-, which the
   strength set sheet already owns).
   ========================================================================== */

.cfg-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;
    --on-brand: #FFFFFF;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);

    /* #403 -- MudContainer now runs full-bleed and the shell takes the shared ceiling, replacing
       .cfg-layout's own 1440px cap below. --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.cfg-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --red: #F87171;
    --on-brand: #05170F;
}

.cfg-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.cfg-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Header — 4px band, 64px topbar, readout strip (wortgleich the activity page, #334) */

.cfg-body {
    padding: 16px 20px 24px;
}

.cfg-band {
    height: 4px;
    background: var(--brand);
}

.cfg-topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.cfg-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* #403 -- fluid type, same recipe as .act-title/.act-readout-value (#399): floor is the size this
   page shipped with, ceiling lands at the 2400px shell max. Only these two -- panel titles, rail
   text and every other size on this page are left fixed on purpose. */
.cfg-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text);
}

.cfg-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.cfg-warn-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: none;
    background: var(--amber-tint);
    color: #7C4A05;
    font-size: 11.5px;
    font-weight: 550;
    cursor: pointer;
}

.cfg-warn-chip-icon {
    width: 12px;
    height: 12px;
}

.cfg-readout {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.cfg-readout-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 18px;
    min-width: 88px;
}

.cfg-readout-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.cfg-readout-value {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    color: var(--text);
}

.cfg-readout-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 3px;
}

.cfg-readout-connections {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    padding-left: 18px;
}

.cfg-readout-chips {
    display: flex;
    gap: 6px;
}

.cfg-conn-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-2);
}

.cfg-conn-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line-strong);
}

.cfg-conn-chip-dot--on {
    background: var(--brand);
}

/* Layout — rail + panel. #403 -- dropped the 1440px cap this carried on its own: the shell's
   --shell-max above is now the single ceiling, so .cfg-panel's flex:1 (below) actually reaches it. */

.cfg-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cfg-rail {
    width: 236px;
    flex: 0 0 auto;
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.cfg-rail-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--line);
    background: none;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font: inherit;
}

.cfg-rail-item:last-child {
    border-bottom: none;
}

.cfg-rail-item--active {
    background: var(--brand-tint);
    border-left: 3px solid var(--brand);
    padding-left: 9px;
}

.cfg-rail-item--sports {
    background: var(--surface-2);
}

.cfg-rail-icon {
    width: 15px;
    height: 15px;
    color: var(--text-3);
}

.cfg-rail-item--active .cfg-rail-icon {
    color: var(--brand-ink);
}

.cfg-rail-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.cfg-rail-name {
    font-size: 13px;
    font-weight: 550;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cfg-rail-item--active .cfg-rail-name {
    font-weight: 620;
    color: var(--brand-ink);
}

.cfg-rail-sub {
    font-size: 11px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cfg-rail-item--active .cfg-rail-sub {
    color: var(--brand-ink);
    opacity: 0.8;
}

.cfg-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
}

.cfg-dot--ok {
    background: var(--brand);
}

.cfg-dot--warn {
    background: var(--amber);
}

.cfg-dot--inactive {
    background: var(--line-strong);
}

.cfg-rail-chevron {
    color: var(--text-3);
    flex-shrink: 0;
}

/* Panel */

.cfg-panel {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cfg-panel-head {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
}

.cfg-panel-title {
    font-size: 15px;
    font-weight: 620;
    letter-spacing: -0.015em;
    color: var(--text);
}

.cfg-panel-sub {
    font-size: 11.5px;
    color: var(--text-2);
    margin-top: 2px;
}

.cfg-panel-content {
    padding: 14px 16px;
}

.cfg-panel-foot {
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.cfg-panel-foot-note {
    font-size: 11.5px;
    color: var(--text-3);
    margin-right: auto;
}

/* Profil panel — reuses .act-sheet/.act-tile/.act-band-row/.act-tile-label/.act-tile--empty verbatim */

/* #403 -- the 700px breakpoint below is dropped: it sits well under the 1025px floor this shell
   targets (mobile/tablet is the MAUI apps' job), and the base 3-column rule already holds up fine
   down to the floor. */
.cfg-profile-sheet {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Herzfrequenzzonen panel */

.cfg-mode-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cfg-mode-hint {
    font-size: 11.5px;
    color: var(--text-3);
}

.cfg-empty-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* #403 -- the 760px breakpoint below (dropping three columns entirely) is removed: it sits well
   under the 1025px floor this shell targets, and the base 8-track row -- already one flexible 1fr
   among fixed pixel tracks -- holds up fine down to the floor without hiding anything. */
.cfg-zone-grid {
    display: grid;
    grid-template-columns: 28px 122px 74px 74px 82px 1fr 108px 54px;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border-bottom: 1px solid var(--line);
}

.cfg-zone-grid--head {
    min-height: 28px;
    background: var(--surface-2);
}

.cfg-zone-grid:last-of-type {
    border-bottom: none;
}

.cfg-zone-pct {
    font-size: 11px;
    color: var(--text-3);
}

.cfg-zone-axis {
    position: relative;
    height: 9px;
}

.cfg-zone-axis-fill {
    position: absolute;
    height: 7px;
    top: 0;
    border-radius: 4px;
}

.cfg-zone-axis-gap {
    position: absolute;
    height: 11px;
    top: -2px;
    border-radius: 2px;
    background: repeating-linear-gradient(135deg, transparent 0 2px, var(--amber) 2px 3px);
}

.cfg-zone-axis-max {
    position: absolute;
    width: 1.5px;
    top: -3px;
    bottom: -3px;
    background: var(--text-2);
}

.cfg-zone-calc {
    font-size: 12.5px;
    color: var(--text-3);
    border-left: 1px solid var(--line);
    padding-left: 10px;
}

.cfg-zone-delta {
    font-size: 11.5px;
    color: var(--text-3);
    text-align: right;
}

.cfg-zone-delta--warn {
    color: var(--amber);
}

.cfg-zone-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 8px 0 12px;
    font-size: 11px;
    color: var(--text-3);
}

.cfg-legend-max {
    display: inline-block;
    width: 1.5px;
    height: 11px;
    background: var(--text-2);
    vertical-align: middle;
}

.cfg-legend-gap {
    display: inline-block;
    width: 11px;
    height: 9px;
    border-radius: 2px;
    background: repeating-linear-gradient(135deg, transparent 0 2px, var(--amber) 2px 3px);
    vertical-align: middle;
}

.cfg-legend-domain {
    margin-left: auto;
}

.cfg-notice-action {
    margin-left: 8px;
    border: none;
    background: none;
    padding: 0;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.cfg-notice--warn {
    background: var(--amber-tint);
    color: #7C4A05;
}

.cfg-notice--info {
    background: var(--surface-2);
    color: var(--text-2);
}

.cfg-reset-btn {
    margin-top: 10px;
}

/* Verbindungen panel — one card per provider, replacing the old two-cards-that-overlap layout */

.cfg-provider-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.cfg-provider-card:last-child {
    margin-bottom: 0;
}

.cfg-provider-head {
    padding: 11px 13px;
    gap: 11px;
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.cfg-provider-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--surface-3);
    color: var(--text-3);
}

.cfg-provider-logo--on {
    color: #FFFFFF;
}

.cfg-provider-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.cfg-provider-name {
    font-size: 14px;
    font-weight: 620;
    color: var(--text);
}

.cfg-provider-state {
    font-size: 11.5px;
    color: var(--text-3);
}

.cfg-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.cfg-switch input {
    position: absolute;
    opacity: 0;
    width: 34px;
    height: 19px;
    margin: 0;
    cursor: pointer;
}

.cfg-switch-track {
    width: 34px;
    height: 19px;
    border-radius: 999px;
    background: var(--line-strong);
    position: relative;
    display: inline-block;
    transition: background-color 0.12s;
}

.cfg-switch input:checked + .cfg-switch-track {
    background: var(--brand);
}

.cfg-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(9, 32, 25, .2);
    transition: left 0.12s;
}

.cfg-switch input:checked ~ .cfg-switch-track .cfg-switch-knob {
    left: 17px;
}

.cfg-switch--disabled {
    opacity: 0.45;
    cursor: default;
}

.cfg-switch--disabled input {
    cursor: default;
}

/* #403 -- the 760px breakpoint below is dropped, same reasoning as .cfg-zone-grid above: below the
   1025px floor this shell targets, and the base 4-column rule already holds up fine down to it. */
.cfg-provider-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
}

.cfg-provider-fact {
    background: var(--surface);
    padding: 9px 13px 11px;
}

.cfg-provider-fact-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.cfg-provider-fact-value--empty {
    color: var(--text-3);
}

.cfg-provider-hint {
    padding: 9px 13px;
    background: var(--surface-2);
    border-top: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--text-2);
}

/* #635 — the guided cards: what to do, the terms, the form */
.cfg-provider-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 13px;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--text-2);
}

.cfg-provider-badge {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--brand);
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 600;
    vertical-align: middle;
}

.cfg-provider-terms {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

.cfg-provider-terms ul {
    margin: 0;
    padding-left: 18px;
}

.cfg-provider-terms-title {
    font-weight: 650;
}

.cfg-provider-steps {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cfg-provider-copy {
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--surface-2);
    font-size: 12px;
}

.cfg-provider-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.cfg-provider-form .act-tile {
    flex: 1 1 200px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

/* A secret's field with its show/hide eye (#660). Edge draws an eye of its own; one is enough. */

.cfg-secret {
    position: relative;
}

.cfg-secret-in {
    padding-right: 34px;
}

.cfg-secret-in::-ms-reveal {
    display: none;
}

.cfg-secret-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: none;
    padding: 0;
    color: var(--text-3);
    cursor: pointer;
}

.cfg-secret-toggle:hover {
    color: var(--text);
}

.cfg-secret-toggle .act-i {
    width: 16px;
    height: 16px;
}

/* Wartung panel */

.cfg-maint-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 13px;
    background: var(--surface);
}

.cfg-maint-row + .cfg-maint-row {
    border-top: 1px solid var(--line);
}

.cfg-maint-text {
    flex: 1;
    min-width: 0;
}

.cfg-maint-title {
    font-size: 13.5px;
    font-weight: 620;
    color: var(--text);
}

.cfg-maint-desc {
    font-size: 11.5px;
    color: var(--text-2);
    line-height: 1.45;
    max-width: 640px;
    margin-top: 4px;
}

.cfg-maint-result {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 7px;
}

.cfg-maint-progress {
    width: 96px;
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
    overflow: hidden;
    margin-top: 8px;
}

.cfg-maint-progress-fill {
    height: 100%;
    width: 40%;
    background: var(--brand);
    border-radius: 3px;
    animation: cfg-maint-indeterminate 1.1s ease-in-out infinite;
}

@keyframes cfg-maint-indeterminate {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(240%);
    }
}

/* #403 -- the rail's own 236px width (.cfg-rail above) already clears the 1025px floor with room
   to spare (236 + 16px gap + 40px .cfg-body padding = 292, leaving 733px for .cfg-panel's flex:1
   at the narrowest real state), so the 1100px breakpoint that used to fold it into a horizontal
   chip bar is dropped rather than replaced -- the vertical rail now holds across the whole 1025-
   2400px range. */

/* ==========================================================================
   Sportarten — Schwellenwerkstatt: design tokens, Sportleiste, CP/W'-Kurve,
   Zonen-Ramp (#385)
   Same neutral/brand ramp as the calendar (#322), activity detail (#333/#334),
   the strength set sheet, session dialogs (#359) and Saisonplanung (#383);
   duplicated under its own shell class rather than sharing .act-shell, same
   reasoning recorded above .act-shell: this page must not couple to their
   markup. Values are copied verbatim — do not edit one ramp without checking
   whether the others drifted out of sync.

   The recipe classes below (.act-band, .act-band-row, .act-tile*, .act-readout*,
   .sess-btn*, .cfg-switch*) ARE the shared, page-agnostic ones and are reused
   directly rather than duplicated — only page-owned structure gets the sw-
   prefix. sw- (not sp-) because .sp-* already belongs to Saisonplanung.
   ========================================================================== */

.sports-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;
    --on-brand: #FFFFFF;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);

    --m-time: #059669;
    --m-dist: #2563EB;
    --m-speed: #2563EB;
    --m-elev: #6C7C76;
    --m-power: #7C68DE;
    --m-load: #D97706;
    --m-hr: #EF4444;
    --m-cadence: #EC4899;
    --m-temp: #F97316;
    --m-medal: #D4A017;
    --m-neutral: var(--text-3);

    /* #400 -- the page already rendered full-bleed (no MudContainer wraps it), but .sw-layout's own
       1440px cap below left everything above that width as a left-aligned dead gutter rather than
       actually using a 32" monitor. --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.sports-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    /* .act-shell--dark does not override --amber-tint and inherits the light #FDF2E2 — here the
       suggestion band and the Sweet Spot track sit on it at full width, so this corrects it to the
       value the calendar ramp already uses (app.css ~line 195). */
    --amber-tint: #241B0E;
    --red: #F87171;
    --on-brand: #05170F;

    --m-time: #10B981;
    --m-dist: #60A5FA;
    --m-speed: #60A5FA;
    --m-elev: #8A9A93;
    --m-power: #A392F0;
    --m-load: #F59E0B;
    --m-hr: #F87171;
    --m-cadence: #F472B6;
    --m-temp: #FB923C;
    --m-medal: #E3B341;
}

.sports-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.sports-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Layout — 268px Sportleiste + detail column (.cfg-layout pattern, page-owned).
   #400 -- dropped the 1440px cap this carried on its own: the shell's --shell-max above is now the
   single ceiling, so .sw-detail's flex:1 (below) actually reaches it instead of stopping at 1440. */

.sw-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px 24px;
}

.sw-rail {
    width: 268px;
    flex: 0 0 auto;
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.sw-rail-row {
    width: 100%;
    display: grid;
    grid-template-columns: 3px 18px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    height: 56px;
    padding: 0 12px;
    border: none;
    border-bottom: 1px solid var(--line);
    background: none;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font: inherit;
    transition: background-color 0.1s;
}

.sw-rail-row:last-child {
    border-bottom: none;
}

.sw-rail-row:hover {
    background: var(--surface-2);
}

.sw-rail-row--active {
    background: var(--brand-tint);
    outline: 1.5px solid var(--brand);
    outline-offset: -1.5px;
}

.sw-rail-spine {
    width: 3px;
    height: 30px;
    border-radius: 2px;
    justify-self: center;
}

.sw-rail-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sw-rail-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sw-rail-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 620;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-rail-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-rail-sub--pending {
    color: var(--amber);
}

.sw-rail-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--amber);
    flex-shrink: 0;
}

.sw-rail-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.sw-rail-watt {
    font-size: 13px;
    font-weight: 620;
    color: var(--text);
}

.sw-rail-none {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
}

.sw-rail-pill {
    height: 14px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sw-rail-pill--cp {
    background: var(--brand);
    color: var(--on-brand);
}

.sw-rail-pill--ftp {
    background: var(--surface-3);
    color: var(--text-2);
}

/* Detail column */

.sw-detail {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sw-sheet {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.sw-band-row-note {
    margin-left: auto;
    text-transform: none;
    font-weight: 500;
    font-size: 11px;
    color: var(--text-3);
}

.sw-empty-note {
    padding: 13px;
    font-size: 12.5px;
    color: var(--text-2);
}

/* Critical Power & W' — curve + fit tiles */

.sw-cp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 392px;
    gap: 1px;
    background: var(--line);
}

.sw-curve-pane {
    background: var(--surface);
    padding: 12px 13px 10px;
    min-width: 0;
}

.sw-curve-title {
    font-size: 11.5px;
    font-weight: 620;
    color: var(--text);
}

.sw-curve-subtitle {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 2px;
}

.sw-curve-svg {
    display: block;
    width: 100%;
    height: 190px;
    margin-top: 6px;
}

.sw-fit-pane {
    background: var(--surface);
    display: flex;
    flex-direction: column;
}

.sw-fit-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border-bottom: 1px solid var(--line);
}

.sw-fit-head {
    height: 26px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    padding: 0 13px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.sw-fit-row {
    display: grid;
    grid-template-columns: 92px 96px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    height: 36px;
    padding: 0 13px;
    border-top: 1px solid var(--line);
}

.sw-fit-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
}

.sw-fit-input {
    width: 100%;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    padding: 0 8px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    transition: background-color 0.1s, border-color 0.1s;
}

.sw-fit-input:hover {
    background: var(--surface);
    border-color: var(--line-strong);
}

.sw-fit-input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}

.sw-fit-role {
    font-size: 10.5px;
    color: var(--text-3);
}

.sw-fit-switch-row {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 13px;
    border-top: 1px solid var(--line);
    margin-top: auto;
}

.sw-fit-switch-label {
    font-size: 11.5px;
    color: var(--text-2);
}

/* Suggestion band — sits above the CP & W' sheet's band-row while a candidate is pending. */

.sw-suggestion-band {
    padding: 10px 13px;
    background: var(--amber-tint);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
}

.sw-suggestion-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--amber);
}

/* Leistungszonen — Ramp statt Matrix */

.sw-ramp {
    display: flex;
    gap: 2px;
    height: 28px;
}

.sw-ramp-seg {
    border-radius: 4px;
}

.sw-ramp-labels {
    display: flex;
    gap: 2px;
    margin-top: 7px;
}

.sw-ramp-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.sw-ramp-zone {
    font-size: 10.5px;
    font-weight: 650;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-ramp-range {
    font-size: 11px;
    font-weight: 620;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sweet Spot overlay — same striped-track recipe as the Zonen tab (#338, app.css ~line 2575),
   positioned by fraction instead of a fixed grid row since it floats over the ramp. */

.sw-sweetspot {
    position: relative;
    height: 30px;
    margin-top: 12px;
    background: var(--amber-tint);
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.sw-sweetspot-pill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 14px;
    min-width: 27px;
    border-radius: 999px;
    border: 1.5px dashed var(--amber);
    background: repeating-linear-gradient(135deg, var(--amber) 0 3px, transparent 3px 7px);
}

.sw-sweetspot-note {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    color: var(--amber);
    white-space: nowrap;
}

/* Manual zone override table */

.sw-zone-table-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 104px 104px 86px;
    gap: 12px;
    align-items: center;
    height: 40px;
    padding: 0 13px;
}

.sw-zone-table-row + .sw-zone-table-row {
    border-top: 1px solid var(--line);
}

.sw-zone-index {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text);
}

.sw-zone-name {
    font-size: 11.5px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-zone-input {
    width: 100%;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    padding: 0 8px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    transition: background-color 0.1s, border-color 0.1s;
}

.sw-zone-input:hover {
    background: var(--surface);
    border-color: var(--line-strong);
}

.sw-zone-input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}

.sw-zone-pct {
    font-size: 11px;
    color: var(--text-3);
    text-align: right;
}

/* Performance-Tests sheet (#462, ADR-0015) */

.sw-pt-row {
    display: grid;
    grid-template-columns: 78px 60px 58px 56px 90px 52px minmax(0, 1fr) 28px;
    gap: 10px;
    align-items: center;
    min-height: 36px;
    padding: 6px 13px;
    font-size: 11.5px;
}

.sw-pt-row + .sw-pt-row {
    border-top: 1px solid var(--line);
}

.sw-pt-row--linked {
    cursor: pointer;
}

.sw-pt-row--linked:hover {
    background: var(--surface-2);
}

.sw-pt-head {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
}

.sw-pt-notes {
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-pt-delete {
    border: none;
    background: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 4px;
}

.sw-pt-delete:hover {
    color: var(--m-load);
}

.sw-pt-estimate-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px 90px;
    gap: 10px;
    align-items: center;
    padding: 7px 13px;
    font-size: 11.5px;
}

.sw-pt-estimate-row + .sw-pt-estimate-row {
    border-top: 1px solid var(--line);
}

.sw-pt-stale {
    opacity: 0.5;
}

.sw-pt-empty {
    padding: 13px;
    font-size: 12px;
    color: var(--text-3);
}

/* Bestleistungen chips */

.sw-chip-rail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 13px;
}

.sw-chip-divider {
    width: 1px;
    height: 24px;
    background: var(--line);
    flex-shrink: 0;
}

.sw-chip {
    height: 24px;
    padding: 0 6px 0 9px;
    border-radius: 5px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sw-chip--fit {
    border-color: var(--m-power);
    color: var(--m-power);
}

.sw-chip-remove {
    all: unset;
    color: var(--text-3);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.sw-chip-remove:hover {
    color: var(--red);
}

.sw-chip-add {
    height: 24px;
    padding: 0 9px;
    border-radius: 5px;
    border: 1px dashed var(--line-strong);
    background: none;
    color: var(--text-3);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.1s, border-color 0.1s, color 0.1s;
}

.sw-chip-add:hover {
    color: var(--brand-ink);
    border-color: var(--brand);
    background: var(--brand-tint);
}

/* Save bar */

.sw-savebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.sw-savebar-status {
    font-size: 11px;
    color: var(--text-3);
}

/* ==========================================================================
   Templates page — card grid with profile chart (#389)
   Same neutral/brand ramp as .act-shell/.sess-shell; duplicated under its own
   .tpl- prefix rather than shared, same reasoning recorded above those two —
   this surface must not couple to their markup. Values copied verbatim: do
   not edit one ramp without checking whether the others drifted out of sync.
   ========================================================================== */

.tpl-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;
    --on-brand: #FFFFFF;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);
    --strength: #D97706;

    /* #402 -- this page has no MudContainer, so the 1440px cap it shipped with (below, now folded in
       here) was the only ceiling it had, and it never let the card grid use a 32" monitor. Raised to
       the shared ceiling; --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.tpl-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --red: #F87171;
    --on-brand: #05170F;
}

.tpl-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.tpl-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Header — 4px band, 64px topbar, eyebrow + title, search, readout strip (.act-band/.act-topbar/
   .act-eyebrow/.act-title/.act-readout* recipe). */

.tpl-band {
    height: 4px;
    background: var(--brand);
}

.tpl-topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.tpl-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* #402 -- fluid type, same recipe as .act-title/.act-readout-value (#399): floor is the size this
   page shipped with, ceiling lands at the 2400px shell max. Only these two -- everything else on
   this page (labels, tile values, chip text) is left fixed on purpose. */
.tpl-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tpl-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.tpl-topbar-spacer {
    flex: 1;
}

.tpl-search {
    height: 32px;
    min-width: 230px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    padding: 0 10px;
    font-size: 12.5px;
    color: var(--text);
    font: inherit;
}

.tpl-search::placeholder {
    color: var(--text-3);
}

.tpl-search:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}

.tpl-readout {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.tpl-readout-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 18px 0 0;
    min-width: 88px;
}

.tpl-readout-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.tpl-readout-value {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    color: var(--text);
}

.tpl-readout-value .tpl-readout-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    margin-left: 2px;
}

/* Filter/sort chip rail — .sess-mini recipe reused directly in markup. */

.tpl-chip-rail {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.tpl-chip-count {
    font-size: 10.5px;
    color: var(--text-3);
}

.tpl-chip-spacer {
    flex: 1;
}

/* Body / card grid */

.tpl-body {
    padding: 16px 20px 24px;
}

.tpl-group {
    margin-bottom: 20px;
}

.tpl-group-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 620;
    color: var(--text);
}

.tpl-group-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

/* #402 -- intrinsic track, no media queries: replaces the fixed repeat(3, 1fr) and its two
   breakpoints (1180px -> 2 cols, 820px -> 1 col plus a topbar/search reflow). 300px is roughly the
   narrowest a card holds up at (four .tpl-tiles--4 tiles plus the chart), so auto-fit adds columns
   as the shell grows past --shell-max's floor instead of stretching three cards very wide, and
   collapses smoothly toward one column at the narrow end without a hard jump. The 820px topbar/
   search reflow is dropped along with it -- both breakpoints sat below the 1025px floor this shell
   targets, and .tpl-topbar's existing flex-wrap already degrades reasonably below that. */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

/* Card */

.tpl-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-rest);
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.tpl-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-hover);
}

.tpl-card:hover .tpl-actions {
    opacity: 1;
}

.tpl-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px 9px;
}

.tpl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tpl-name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 620;
    letter-spacing: -0.01em;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tpl-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px 0 6px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.tpl-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.12s;
    flex-shrink: 0;
}

.tpl-action-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tpl-action-btn svg,
.tpl-action-btn .mud-icon-root {
    font-size: 14px !important;
    width: 14px;
    height: 14px;
}

.tpl-action-btn:hover {
    background: var(--surface-2);
}

.tpl-action-btn--brand:hover {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.tpl-action-btn--danger:hover {
    background: var(--amber-tint);
    color: var(--red);
}

/* Profile chart — reused at 48px on the card, 96px in editor/save-dialog previews. */

.tpl-chart-block {
    padding: 0 12px 2px;
}

.tpl-chart-caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11px;
    color: var(--text-2);
    margin-bottom: 6px;
}

.tpl-chart-caption .tpl-chart-target {
    font-size: 12px;
}

.tpl-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 1px;
}

.tpl-bar {
    background: var(--bar-color, var(--brand));
    border-radius: 1px 1px 0 0;
}

.tpl-bar--highlight {
    outline: 1.5px solid var(--brand);
    outline-offset: -1.5px;
}

.tpl-baseline {
    height: 2px;
    background: var(--line-strong);
}

.tpl-axis {
    display: flex;
    justify-content: space-between;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: var(--text-3);
    padding-top: 4px;
}

.tpl-chart-empty {
    background: repeating-linear-gradient(135deg, var(--surface-3) 0 5px, var(--surface-2) 5px 10px);
    border-bottom: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-3);
}

/* Tiles — hairline grid (.act-sheet recipe). */

.tpl-tiles {
    display: grid;
    background: var(--line);
    gap: 1px;
    margin-top: 6px;
}

.tpl-tiles--4 {
    grid-template-columns: repeat(4, 1fr);
}

.tpl-tiles--2 {
    grid-template-columns: repeat(2, 1fr);
}

.tpl-tile {
    background: var(--surface);
    padding: 8px 10px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tpl-tile-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
}

.tpl-tile-value {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tpl-foot {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-3);
    border-top: 1px solid var(--line);
}

/* Loading skeleton — card-shaped shimmer, not a spinner, so the grid does not jump. */

.tpl-skeleton {
    height: 220px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
    background-size: 200% 100%;
    animation: tpl-shimmer 1.4s ease-in-out infinite;
}

@keyframes tpl-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Empty / no-results states */

.tpl-empty {
    border: 1.5px dashed var(--line-strong);
    border-radius: 10px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.tpl-empty--compact {
    padding: 26px 24px;
}

.tpl-empty-icon {
    font-size: 24px !important;
    width: 24px;
    height: 24px;
    color: var(--text-3);
}

.tpl-empty-title {
    font-size: 13px;
    font-weight: 550;
    color: var(--text);
}

.tpl-empty-text {
    font-size: 11.5px;
    color: var(--text-3);
    max-width: 400px;
    line-height: 1.55;
}

.tpl-empty-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* Unresolvable-sport warning banner */

.tpl-warn-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border-radius: 8px;
    background: var(--amber-tint);
    color: var(--text);
    font-size: 12.5px;
    margin-bottom: 12px;
}

.tpl-warn-banner strong {
    color: var(--amber);
}

/* ==========================================================================
   Fuelling-Konsole — design tokens (#391)
   Same neutral/brand ramp as the calendar/activity detail/session dialogs;
   duplicated under its own shell class per the standing convention (see the
   comment above .act-shell) rather than coupling to any of them. Values are
   copied verbatim — do not edit one ramp without checking the others.
   ========================================================================== */

.dt-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;
    --on-brand: #FFFFFF;
    --shadow-rest: 0 1px 1.5px rgba(9, 32, 25, .05);
    --shadow-hover: 0 3px 10px rgba(9, 32, 25, .11);

    /* Macro-family colours — read off the existing metric ramp rather than invented: carbs take the
       load amber, protein the power violet, fat the distance blue. */
    --m-carb: #D97706;
    --m-protein: #7C68DE;
    --m-fat: #2563EB;

    /* Gefühl ramp — 1 (sehr gut) to 5 (sehr schlecht), a green-to-red traffic light. Matches
       Feeling's own enum values (VeryGood=1 … VeryBad=5), so a lookup is always "--feel-{n}". */
    --feel-1: #059669;
    --feel-2: #65A30D;
    --feel-3: #D97706;
    --feel-4: #EA580C;
    --feel-5: #DC2626;

    /* #401 -- the page runs full-bleed (MudContainer MaxWidth.False) and takes the shared ceiling
       instead of borrowing MudBlazor's 1920px xl container. --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dt-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;

    --feel-1: #10B981;
    --feel-2: #A3E635;
    --feel-3: #F59E0B;
    --feel-4: #FB923C;
    --feel-5: #F87171;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --red: #F87171;
    --on-brand: #05170F;

    --m-carb: #F59E0B;
    --m-protein: #A392F0;
    --m-fat: #60A5FA;
}

.dt-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.dt-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Header carbs-per-kg tint band — the page-level equivalent of .act-band, but one segment per day
   instead of one flat session-type colour. Tint step comes from FuellingBand.Layout (0 lightest .. 4
   richest); no step (unknown bodyweight) renders as --surface-3. */

.dt-head-band {
    height: 4px;
    display: flex;
}

.dt-head-band-seg {
    flex: 1 1 0;
    background: var(--surface-3);
}

.dt-head-band-seg[data-tint="0"] {
    background: var(--m-carb);
    opacity: 0.22;
}

.dt-head-band-seg[data-tint="1"] {
    background: var(--m-carb);
    opacity: 0.42;
}

.dt-head-band-seg[data-tint="2"] {
    background: var(--m-carb);
    opacity: 0.62;
}

.dt-head-band-seg[data-tint="3"] {
    background: var(--m-carb);
    opacity: 0.82;
}

.dt-head-band-seg[data-tint="4"] {
    background: var(--m-carb);
    opacity: 1;
}

/* Panel head — title, hover hint and legend above the band/sheets (.act-panel body). */

.dt-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.dt-panel-title {
    font-size: 13.5px;
    font-weight: 620;
    color: var(--text);
    margin-right: auto;
}

.dt-panel-hint {
    font-size: 11px;
    color: var(--text-3);
}

.dt-legend {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dt-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-2);
}

.dt-legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
}

/* The band itself — one SVG per Section 391 (#391): weight line up top, stacked macro intake in the
   middle, hanging load bars underneath, weekend/week-boundary/today marks the full column height.
   Horizontal scroll is the narrow-viewport fallback below ~1100px rather than collapsing the period,
   so the 84-column view never silently changes what the athlete is looking at. */

.dt-band-wrap {
    padding: 12px 16px 8px;
    overflow-x: auto;
}

.dt-band-svg {
    display: block;
    width: 100%;
    min-width: 640px;
    height: auto;
}

.dt-mark-weekend {
    fill: var(--surface-3);
}

.dt-mark-boundary {
    stroke: var(--line-strong);
    stroke-width: 1;
}

.dt-mark-today {
    stroke: var(--brand);
    stroke-width: 1.5;
}

.dt-mark-axis {
    stroke: var(--line);
    stroke-width: 1;
}

.dt-mark-axis-label {
    fill: var(--text-3);
    font-size: 7.5px;
}

.dt-weight-line {
    fill: none;
    stroke: var(--text-2);
    stroke-width: 1.75;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.dt-weight-dot {
    fill: var(--surface);
    stroke: var(--text-3);
    stroke-width: 1.25;
}

.dt-bar-carb {
    fill: var(--m-carb);
}

.dt-bar-protein {
    fill: var(--m-protein);
}

.dt-bar-fat {
    fill: var(--m-fat);
}

.dt-bar-neutral {
    fill: var(--text-3);
}

.dt-bar-empty {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1;
    stroke-dasharray: 2 2;
}

.dt-bar-load {
    fill: var(--brand-deep);
    opacity: 0.55;
}

/* The coach's kcal Fuelling Target for the day, on the bars' own scale (#485). One neutral colour —
   the band shows the target, it never judges the bar against it. */
.dt-bar-target {
    stroke: var(--text);
    stroke-width: 2;
    stroke-linecap: round;
}

.dt-legend-target {
    height: 2px;
    border-radius: 1px;
    background: var(--text);
}

/* Hover groups — rendered after every bar so a tooltip always paints on top. Hit target spans the
   band's full height (see .dt-hover-hit) so a ~16px-wide column with no bar at all is still
   reachable. Everything reveals together off one :hover on the group — no script involved. */

.dt-hover-col {
    cursor: pointer;
}

.dt-hover-hit {
    fill: transparent;
}

.dt-hover-fill {
    fill: var(--brand);
    opacity: 0;
    transition: opacity 0.1s;
    pointer-events: none;
}

.dt-hover-marker {
    stroke: var(--brand);
    stroke-width: 1;
    opacity: 0;
    transition: opacity 0.1s;
    pointer-events: none;
}

.dt-hover-col:hover .dt-hover-fill {
    opacity: 0.07;
}

.dt-hover-col:hover .dt-hover-marker {
    opacity: 0.9;
}

.dt-hover-col:hover .dt-tooltip {
    opacity: 1;
    visibility: visible;
}

.dt-tooltip {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    padding: 7px 9px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text);
    pointer-events: none;
}

.dt-tooltip-date {
    font-weight: 700;
    font-size: 10.5px;
    margin-bottom: 2px;
    white-space: nowrap;
}

.dt-tooltip-row {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.dt-tooltip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dt-tooltip-empty {
    color: var(--text-3);
    font-style: italic;
    white-space: nowrap;
}

/* Calendar-week strip below the band. */

.dt-kw-strip {
    display: flex;
    padding: 0 16px 12px;
}

.dt-kw-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-3);
    white-space: nowrap;
}

/* The week's average weigh-in under its KW label (#508). Clipped rather than
   spilling into the next slot when a year of weeks leaves too little room. */
.dt-kw-weight {
    max-width: 100%;
    overflow: hidden;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-2);
}

/* Week paging above the running-week cards — lets the athlete browse and input values for a past
   week rather than only the current one (#395). */

.dt-week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dt-week-nav-btn {
    height: 30px;
    width: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-2);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.12s, border-color 0.12s;
}

.dt-week-nav-btn:hover:not(:disabled) {
    background: var(--surface-3);
    border-color: var(--line-strong);
}

.dt-week-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.dt-week-nav-label {
    font-size: 13px;
    font-weight: 620;
    color: var(--text);
    margin-right: auto;
}

.dt-week-nav-today {
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--brand);
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Shown instead of the week grid while paging past the already-loaded band (NavigateToSelectedWeekAsync)
   — scoped to this area so the rest of the page (band chart, readout) stays visible and untouched. */

.dt-week-grid-loading {
    min-height: 132px;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dt-week-grid-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--line);
    border-top-color: var(--brand);
    animation: dt-week-grid-spin 0.7s linear infinite;
}

@keyframes dt-week-grid-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Running-week cards (Section 391, "die laufende Woche"). */

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

.dt-week-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
    transition: border-color 0.12s, background-color 0.12s;
}

.dt-week-card:hover {
    border-color: var(--line-strong);
}

.dt-week-card--today {
    background: var(--brand-tint);
    border-color: var(--brand);
}

.dt-week-card--future {
    background: var(--surface-2);
    color: var(--text-2);
}

.dt-week-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.dt-week-card-day {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
}

.dt-week-card-date {
    font-size: 10.5px;
    color: var(--text-3);
}

.dt-week-card-load {
    font-size: 10px;
    color: var(--text-3);
}

.dt-week-card-kcal {
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text);
}

.dt-week-card-kcal--empty {
    color: var(--text-3);
    font-weight: 500;
    font-size: 13px;
}

.dt-split-bar {
    display: flex;
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--surface-3);
}

.dt-split-seg--carb {
    background: var(--m-carb);
}

.dt-split-seg--protein {
    background: var(--m-protein);
}

.dt-split-seg--fat {
    background: var(--m-fat);
}

.dt-week-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-2);
}

.dt-week-card-note {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-3);
}

.dt-week-card-cta {
    margin-top: auto;
    height: 32px;
    border: 1.5px dashed var(--brand);
    border-radius: 7px;
    background: none;
    color: var(--brand-ink);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.12s;
}

.dt-week-card-cta:hover {
    background: var(--brand-tint);
}

.dt-week-card-hint {
    font-size: 10px;
    color: var(--text-3);
    line-height: 1.4;
}

/* Two panels side by side — fuel-for-the-work tiles and the weekly notes column.
   #401 -- intrinsic track, no media query: the 300px floor is roughly where the old 900px
   breakpoint collapsed to one column (900 viewport minus the 240px drawer and 40px .act-body
   padding leaves ~620 for the two panels, ~300 each once the 16px gap is subtracted), so auto-fit
   wraps at about the same point the fixed breakpoint used to while also letting both panels grow
   past 1fr's old ceiling on wide screens, same idiom as .sess-sheet's auto-fit tile grid above. */
.dt-cols-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    align-items: start;
}

.dt-sparse-notice {
    margin: 0 16px 16px;
    padding: 10px 13px;
    border-radius: 8px;
    background: var(--amber-tint);
    color: var(--amber);
    font-size: 12px;
}

.dt-notes-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.dt-notes-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 13px;
    background: var(--surface);
    cursor: pointer;
    transition: background-color 0.12s;
}

.dt-notes-row:hover {
    background: var(--surface-2);
}

.dt-notes-day {
    flex-shrink: 0;
    width: 64px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    padding-top: 1px;
}

.dt-notes-text {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.45;
}

.dt-notes-empty {
    font-size: 12.5px;
    color: var(--text-3);
    font-style: italic;
}

/* Quick-entry stepper and Gefühl targets — new, no existing twin (.sess-ramp precedent above): the
   spec's own numbers (34px buttons around a 46px/26px field, 44px Gefühl targets) don't match any
   existing size in .sp-stepper-btn (26px) or .sess-mini, so this is a new pattern, not a reuse. */

.dt-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dt-stepper-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.12s, color 0.12s;
}

.dt-stepper-btn:hover {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.dt-stepper-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.dt-stepper-field {
    height: 46px;
    min-width: 110px;
    flex: 1;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dt-stepper-value {
    width: 100%;
    text-align: center;
    border: none;
    outline: none;
    background: transparent;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    appearance: textfield;
    -moz-appearance: textfield;
}

/* The dt-stepper-btn pair is the only up/down control — the browser's own spin arrows would give
   every number input a second, redundant (and for a decimal step, float-glitchy) pair. */
.dt-stepper-value::-webkit-outer-spin-button,
.dt-stepper-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dt-stepper-hint {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
}

/* The coach's Fuelling Target — read-only "Ziel …" next to a value the athlete enters. */

.dt-target {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand);
}

.dt-target-note {
    font-size: 12px;
    color: var(--text-2);
    border-left: 2px solid var(--brand);
    padding: 2px 0 2px 8px;
}

.dt-tooltip-target {
    color: var(--brand);
    font-weight: 600;
    white-space: nowrap;
}

/* Feel — five 44px touch targets, .sess-mini's bigger sibling for the quick-entry dialog. */

.dt-feel-rail {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Each target carries its own Gefühl colour via --feel-color (set inline per button, from
   DailyTrackingFormatting.FeelColorVar) — the dot always shows it at rest, so the rail itself reads
   like a green-to-red legend; the selected target fills solid with it instead of the flat brand tint. */

.dt-feel-target {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s;
}

.dt-feel-target:hover {
    background: color-mix(in srgb, var(--feel-color, var(--brand)) 16%, var(--surface-2));
}

.dt-feel-target--active {
    background: var(--feel-color, var(--brand));
    border-color: var(--feel-color, var(--brand));
    outline: 1.5px solid var(--feel-color, var(--brand));
    outline-offset: -1.5px;
}

.dt-feel-target-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--feel-color, var(--text-3));
    opacity: 0.55;
}

.dt-feel-target--active .dt-feel-target-dot {
    background: var(--on-brand);
    opacity: 1;
}

.dt-feel-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--feel-label-color, var(--brand-ink));
}

/* Tag-im-Kontext dialog — the week strip and read-only Belastung tiles. */

.dt-dlg-week-strip {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 46px;
}

.dt-dlg-week-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.dt-dlg-week-bar {
    width: 100%;
    max-width: 20px;
    border-radius: 3px 3px 0 0;
    background: var(--surface-3);
}

.dt-dlg-week-bar--active {
    background: var(--brand);
}

.dt-dlg-week-bar--empty {
    border: 1.5px dashed var(--line-strong);
    background: none;
}

.dt-dlg-week-label {
    font-size: 9px;
    color: var(--text-3);
}

.dt-readonly-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* ==========================================================================
   Home — design tokens, chrome, readout bar, Tagesblatt/Bereitschaft/Form (#387)
   Same neutral/brand ramp as the calendar (#322) and activity detail (#333);
   duplicated under its own shell class rather than sharing .act-shell, same
   reasoning recorded above .act-shell: this page must not couple to another
   page's markup/behaviour. Values are copied verbatim: do not edit one ramp
   without checking whether the others drifted out of sync.

   Two deviations from .act-shell, both deliberate:
   - --amber-tint is defined in the dark block below. .act-shell--dark does not
     override it and so inherits the light value, which is wrong under any
     amber-tinted field in dark mode -- fixing that on .act-shell itself is
     out of this ticket's scope.
   - --m-sleep is new: the --m-* ramp has no sleep colour anywhere else in the
     app, so this page introduces it once here for its own readiness rows.
   ========================================================================== */

.home-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;

    --m-hr: #EF4444;
    --m-sleep: #5C6BC0;
    --m-dist: #2563EB;
    --m-power: #7C68DE;
    --m-load: #D97706;

    /* Wochenbrett (#388) -- same completed-card treatment as the calendar (#322), copied verbatim
       rather than shared for the same reason .home-shell itself is not coupled to .dash-shell. */
    --card-completed-bg: linear-gradient(105deg, rgba(5, 150, 105, .13) 0%, rgba(5, 150, 105, .045) 46%, rgba(5, 150, 105, 0) 100%), #FFFFFF;
    --card-completed-border: #D8EAE1;

    /* One definition of the Wochenbrett's seven day columns plus its 210px sidebar, mirroring
       --cal-cols in .dash-shell. */
    --week-cols: repeat(7, minmax(0, 1fr)) 210px;

    /* #398 -- the page runs full-bleed (MudContainer MaxWidth.False) and takes the shared ceiling
       instead of borrowing MudBlazor's 1920px xl container, so the Wochenbrett can actually use a
       32" monitor. This is where the 2400px number was first chosen: past it the seven 1fr day
       columns and the readout strip gain nothing further and only the whitespace grows. Every
       clamp() in this block maxes out at or below the size it reaches here, so nothing keeps growing
       after the layout stops. --shell-max is defined in :root (#408). */
    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.home-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --amber-tint: #241B0E;

    --m-hr: #F87171;
    --m-sleep: #8C97E0;
    --m-dist: #60A5FA;
    --m-power: #A392F0;
    --m-load: #F59E0B;

    --card-completed-bg: linear-gradient(105deg, rgba(16, 185, 129, .16) 0%, rgba(16, 185, 129, .055) 46%, rgba(16, 185, 129, 0) 100%), #101010;
    --card-completed-border: #1E2C26;
}

.home-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.home-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.home-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
}

/* Chrome -- 4px band, 64px topbar */

.home-band {
    height: 4px;
    background: var(--brand);
}

.home-topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.home-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand-tint);
    border: 1px solid var(--brand);
    color: var(--brand-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-i-lg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-i {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* #398 -- fluid type. Seven declarations, all of the form clamp(<today's px>, <vw>, <max>): the
   minimum is exactly the size this page shipped with, so nothing below ~1280px viewport changes at
   all, and the maximum is reached at roughly the 2400px shell ceiling so type stops growing when
   the layout does (this matters -- vw tracks the viewport, which on an unscaled 32" 4K keeps going
   to 3840 long after --shell-max has stopped it).
   Deliberately absent: the 9.5px uppercase .home-ro-label / .home-eyebrow / .home-band-row labels.
   They are small-caps texture rather than reading text, and scaling them makes the page shout. */
.home-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
}

.home-topbar-spacer {
    flex-grow: 1;
}

.home-sync-note {
    font-size: 11.5px;
    color: var(--text-2);
    text-align: right;
    line-height: 1.45;
}

.home-sync-note-warn {
    color: var(--amber);
    font-weight: 620;
}

.home-sync-note-ok {
    color: var(--text-2);
    font-weight: 500;
}

.home-topbar-btn.mud-button-root {
    height: 34px;
    width: 34px;
    border-radius: 8px !important;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    transition: background-color 0.12s;
}

.home-topbar-btn.mud-button-root:hover {
    background: var(--brand-tint) !important;
}

/* Readout bar */

.home-readout {
    display: flex;
    align-items: stretch;
    /* #398 -- was overflow-x: auto, which hid the tail of the strip behind a scrollbar nobody
       looks for on a row meant to be read at a glance. Wrapping is the better narrow-end failure;
       space-between spreads the seven items over a 2400px shell instead of clumping them left. */
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 14px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.home-ro-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 18px 0 0;
    min-width: 92px;
}

.home-ro-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.home-ro-value {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.home-ro-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

.home-ro-sub {
    font-size: 10.5px;
    color: var(--text-2);
}

.home-ro-hero {
    min-width: 128px;
}

.home-ro-hero .home-ro-value {
    font-size: clamp(27px, 1.5vw, 38px);
    letter-spacing: -0.03em;
}

.home-ro-sep {
    width: 1px;
    background: var(--line);
    margin: 2px 18px 2px 0;
}

.home-ro-track {
    width: 138px;
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
    overflow: hidden;
}

.home-ro-track-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--brand);
}

/* Layout -- Tagesblatt / Bereitschaft / Form, three columns */

.home-main {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-top {
    display: grid;
    /* #398 -- intrinsic tracks, no media queries anywhere in this block. Two numbers per track:
       a floor that must survive the narrow end, and a weight that decides who absorbs the width
       above it.

       Floors are sized against 1025px -- the content box a 13" 1280px laptop leaves once the nav
       drawer (240px, ClipMode.Always) is open, which is the narrowest real state this page has.
       280 + 380 + 260 + 32 gap + 40 .home-main padding = 992, clearing it by 33px.
       Bereitschaft still needs the largest floor for the reason recorded before: narrower than
       that its "14-Tage-Ø" second line wraps against .home-rd-val/.home-spark instead of staying
       on one line. It is 380 rather than the old 340 because .home-rd's fourth track is no longer
       a fixed 104px and now has to win its floor against the label column.

       Weights are deliberately unequal. Tagesblatt holds real card content and takes the most;
       Form takes 0.6 because its chart is a 96x28 viewBox at preserveAspectRatio="none" -- past
       roughly 450px it does not show more of the 14 points, it just flattens them. At the 2400px
       ceiling that lands the three at about 1105 / 947 / 436. */
    grid-template-columns: minmax(280px, 1.4fr) minmax(380px, 1.2fr) minmax(260px, 0.6fr);
    gap: 16px;
    align-items: start;
}

.home-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Sheets -- the hairline grid shared by all three columns */

.home-sheet {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.home-band-row {
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
}

.home-band-row-sp {
    margin-left: auto;
}

.home-band-row--warn {
    background: var(--amber-tint);
    color: var(--amber);
}

.home-band-row-plain {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-3);
}

.home-row {
    background: var(--surface);
    padding: 11px 13px;
}

/* Bereitschaft's five readiness rows -- shorter than a Tagesblatt/Form row so the card doesn't
   run taller than its neighbours just because it holds more rows. */
.home-row--tight {
    padding: 6px 13px;
}

/* A readiness row that opens its detail page (/sleep or /health) -- same hover idiom as
   .home-wk-card, minus the border, since these rows sit flush inside the sheet. */
.home-row--link {
    cursor: pointer;
    transition: background 0.12s;
}

.home-row--link:hover {
    background: var(--surface-3);
}

.home-empty-note {
    font-size: 11.5px;
    color: var(--text-3);
}

.home-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 620;
    background: var(--surface-3);
    color: var(--text-2);
    font-family: inherit;
    letter-spacing: 0;
    text-transform: none;
}

.home-chip--warn {
    background: var(--amber-tint);
    color: var(--amber);
}

/* Tagesblatt -- session cards */

.home-sess {
    display: grid;
    grid-template-columns: 3px 26px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
}

.home-sess-accent {
    align-self: stretch;
    border-radius: 2px;
    min-height: 40px;
}

.home-sess-ico {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-sess-name {
    font-size: 14.5px;
    font-weight: 620;
    letter-spacing: -0.012em;
}

.home-sess-meta {
    font-size: 11.5px;
    color: var(--text-2);
    margin-top: 3px;
}

.home-sess-right {
    text-align: right;
}

.home-sess-load {
    font-size: 16px;
    font-weight: 620;
}

.home-sess-load-lab {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-top: 2px;
}

/* Bereitschaft -- readiness rows */

.home-rd {
    display: grid;
    /* max-content, not 0, on the label/avg column: with a 0 floor the track was free to shrink
       .home-rd-avg's "14-Tage-Ø ..." line below its own width and wrap it. */
    /* #398 -- the fourth track was a fixed 104px, so widening Bereitschaft moved the sparkline
       around without ever growing it. It now flexes 1:1 with the label column, keeping its 104px
       floor. Equal weights matter for more than taste: all five rows are separate grids, so the
       74px value column only lines up between them while the flexible tracks resolve to the same
       width in every row -- which holds as long as the fr share clears each row's max-content. */
    grid-template-columns: 18px minmax(max-content, 1fr) 74px minmax(104px, 1fr);
    gap: 10px;
    align-items: center;
}

.home-rd-icon {
    display: flex;
}

.home-rd-lab {
    font-size: clamp(12.5px, 0.65vw, 15px);
    font-weight: 560;
}

.home-rd-avg {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 2px;
    white-space: nowrap;
}

.home-rd-val {
    text-align: right;
    font-size: clamp(15px, 0.8vw, 19px);
    font-weight: 620;
}

.home-rd-unit {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 2px;
}

.home-rd-note {
    font-size: 11px;
    color: var(--text-3);
    text-align: right;
}

.home-spark {
    overflow: visible;
    display: block;
}

/* #398 -- the dot marking the newest reading cannot live inside the stretched SVG: under
   preserveAspectRatio="none" a <circle> is scaled non-uniformly and flattens into a lozenge.
   BuildSparkline always places the last point at x=96 (the right edge), so the dot is pinned
   right and only travels vertically, from an inline top:% the component writes. Sizes mirror
   the circle it replaces -- r=2.6 becomes 5.2px across, its 1.6px --surface stroke a ring. */
.home-spark-wrap {
    position: relative;
    display: block;
    min-width: 0;
    line-height: 0;
}

.home-spark-dot {
    position: absolute;
    right: 0;
    width: 5.2px;
    height: 5.2px;
    margin-top: -2.6px;
    margin-right: -2.6px;
    border-radius: 50%;
    box-shadow: 0 0 0 1.6px var(--surface);
}

/* Form 14 Tage */

.home-note {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.home-form-link.mud-link {
    font-size: 11.5px;
    color: var(--brand-deep);
    font-weight: 600;
}

/* Wochenbrett (#388) -- read-only week board under the Tagesblatt/Bereitschaft/Form row. Same
   hairline-sheet idiom as .home-sheet above, but its own grid: seven day columns plus a 210px
   sidebar, one row tall, rather than a single stacked column. */

.home-week {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.home-week-band {
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
}

.home-chip--brand {
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.home-week-grid {
    display: grid;
    grid-template-columns: var(--week-cols);
    gap: 1px;
    background: var(--line);
}

.home-week-col {
    background: var(--surface);
    display: flex;
    flex-direction: column;
    min-height: 226px;
}

.home-week-col--future {
    background: var(--surface-2);
}

/* 1.5px inner ring rather than a border, so it doesn't shift the column's width against its
   neighbours in the shared grid track. */
.home-week-col--today {
    box-shadow: inset 0 0 0 1.5px var(--brand);
}

.home-week-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 9px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-2);
    border-bottom: 1px solid var(--line);
}

.home-week-col-head--today {
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.home-week-today-disc {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--brand);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.home-week-cards {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    flex: 1;
}

.home-wk-card {
    display: grid;
    grid-template-columns: 3px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    padding: 5px 7px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.12s;
}

.home-wk-card:hover {
    border-color: var(--line-strong);
}

.home-wk-card-accent {
    align-self: stretch;
    border-radius: 2px;
    min-height: 24px;
}

.home-wk-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.home-wk-card-title {
    font-size: clamp(11.5px, 0.6vw, 14px);
    font-weight: 620;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-wk-card-meta {
    font-size: clamp(10px, 0.52vw, 12px);
    color: var(--text-2);
    margin-top: 1px;
}

.home-wk-card-meta--note {
    color: var(--text-3);
}

.home-wk-card-icon {
    width: 9px;
    height: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -1px;
    margin-right: 2px;
}

.home-wk-card-load {
    font-size: 12px;
    font-weight: 620;
}

.home-wk-card--completed {
    background: var(--card-completed-bg);
    border-color: var(--card-completed-border);
}

.home-wk-card--completed .home-wk-card-meta {
    color: var(--brand-deep);
}

.home-wk-card--open {
    background: var(--amber-tint);
    border-color: var(--amber);
}

.home-wk-card--open .home-wk-card-title,
.home-wk-card--open .home-wk-card-meta,
.home-wk-card--open .home-wk-card-load {
    color: var(--amber);
}

.home-wk-card--planned {
    border-style: dashed;
    border-color: var(--line-strong);
}

.home-wk-card--today {
    box-shadow: 0 0 0 1.5px var(--brand);
}

.home-week-night {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 9px;
    border-top: 1px dashed var(--line);
    font-size: 10.5px;
    color: var(--text-2);
}

.home-week-night-item {
    display: flex;
    align-items: center;
}

.home-week-night-val {
    margin-right: 4px;
}

.home-week-night-empty {
    color: var(--text-3);
}

.home-week-sidebar {
    background: var(--surface-2);
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-week-sb-block .home-week-sb-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 8px;
}

.home-week-sb-bar {
    display: flex;
    height: 9px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--surface-3);
    margin-bottom: 8px;
}

.home-week-sb-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 2px 0;
}

.home-week-sb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.home-week-sb-name {
    flex: 1;
    min-width: 0;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-week-sb-val {
    font-weight: 620;
}

.home-week-sb-row--warn .home-week-sb-val {
    color: var(--amber);
}

.home-week-sb-note {
    font-size: 10.5px;
    color: var(--text-3);
    line-height: 1.4;
}

/* ============================================================================================
   Schlaf -- Nächte-Raster (#431). Own shell block per ADR-0013: the ramp, the metric colours and
   the week tracks are copied from .home-shell rather than shared, so a change to Home never
   restyles this page. Only --shell-max comes from :root.
   ============================================================================================ */

.sleep-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --red: #EF4444;

    --m-hr: #EF4444;
    --m-sleep: #5C6BC0;

    /* Seven weekday columns plus the 210px sidebar -- mirrors --week-cols on .home-shell by copy. */
    --night-cols: repeat(7, minmax(0, 1fr)) 210px;

    max-width: var(--shell-max);
    margin-inline: auto;
    min-height: 100vh;

    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.sleep-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --amber-tint: #241B0E;
    --red: #F87171;

    --m-hr: #F87171;
    --m-sleep: #8C97E0;
}

.sleep-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.sleep-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.sleep-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 20px;
}

/* Chrome -- 4px band in the sleep colour (band-by-type, as Activity Detail), 64px topbar */

.sleep-band {
    height: 4px;
    background: var(--m-sleep);
}

.sleep-topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.sleep-topbar-btn.mud-button-root {
    height: 34px;
    width: 34px;
    border-radius: 8px !important;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    transition: background-color 0.12s;
}

.sleep-topbar-btn.mud-button-root:hover {
    background: var(--brand-tint) !important;
}

.sleep-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--surface-3);
    color: var(--m-sleep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sleep-i-lg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sleep-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sleep-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.sleep-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
}

.sleep-topbar-spacer {
    flex-grow: 1;
}

.sleep-sync-note {
    font-size: 11.5px;
    color: var(--text-2);
    text-align: right;
    line-height: 1.45;
}

.sleep-sync-note-warn {
    color: var(--amber);
    font-weight: 620;
}

.sleep-sync-note-ok {
    color: var(--text-2);
    font-weight: 500;
}

/* Range switch -- the .act-tab pill idiom, copied. */

.sleep-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.sleep-tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.sleep-tab:hover {
    background: var(--surface-3);
}

.sleep-tab:disabled {
    cursor: default;
}

.sleep-tab--active {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-ink);
    font-weight: 600;
}

/* Sheets -- hairline construction as .home-sheet */

.sleep-main {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sleep-sheet {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.sleep-band-row {
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
}

.sleep-band-row-sp {
    margin-left: auto;
}

.sleep-band-row-plain {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-3);
}

.sleep-row {
    background: var(--surface);
    padding: 11px 13px;
}

.sleep-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 620;
    background: var(--surface-3);
    color: var(--text-2);
    font-family: inherit;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.sleep-chip--brand {
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.sleep-chip--warn {
    background: var(--amber-tint);
    color: var(--amber);
}

.sleep-empty-note {
    font-size: 11px;
    color: var(--text-3);
}

/* Nächte-Raster -- seven weekday columns plus the sidebar; the grid is painted --line with 1px
   gaps and every cell is opaque, so the gaps become the mesh (same as the Wochenbrett). */

.sleep-grid {
    display: grid;
    grid-template-columns: var(--night-cols);
    gap: 1px;
    background: var(--line);
}

.sleep-grid-head {
    background: var(--surface);
    padding: 7px 9px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-2);
}

.sleep-cell {
    background: var(--surface);
    min-height: 84px;
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

/* Days before the range and days after today: quiet, on --surface-2 like the Wochenbrett future columns. */
.sleep-cell--quiet {
    background: var(--surface-2);
}

/* 1.5px inner ring rather than a border, so the cell keeps its width in the shared track. */
.sleep-cell--last {
    box-shadow: inset 0 0 0 1.5px var(--brand);
}

.sleep-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 10.5px;
    color: var(--text-3);
    min-height: 18px;
}

.sleep-cell-val {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    letter-spacing: -0.01em;
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.sleep-cell-unit {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-3);
}

.sleep-track {
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
    position: relative;
    overflow: hidden;
}

.sleep-track-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
}

.sleep-track-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--text-2);
}

.sleep-cell-meta {
    font-size: 10.5px;
    color: var(--text-2);
}

.sleep-cell-empty {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 12px;
}

/* Sidebar -- Bilanz, Längste · Kürzeste, Ø nach Wochentag */

.sleep-sidebar {
    background: var(--surface-2);
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sleep-sb-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 8px;
}

.sleep-sb-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 2px 0;
}

.sleep-sb-name {
    flex: 1;
    min-width: 0;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sleep-sb-val {
    font-weight: 620;
    white-space: nowrap;
}

.sleep-sb-wd {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 40px;
    gap: 6px;
    align-items: center;
    font-size: 11px;
    padding: 2px 0;
}

.sleep-sb-wd .sleep-sb-val {
    text-align: right;
}

.sleep-sb-bar {
    height: 7px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
}

.sleep-sb-bar > span {
    display: block;
    height: 100%;
    border-radius: 4px;
}

.sleep-sb-note {
    font-size: 10.5px;
    color: var(--text-3);
    line-height: 1.4;
}

/* Schlaf & Erholung -- three strips on one shared time axis. Each strip is an HTML grid row
   (label | plot | latest value) so the plots share a column and their x mappings coincide; the
   SVG inside is stretched to the plot column, every stroke non-scaling. */

.sleep-strips {
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sleep-strip-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 56px;
    gap: 10px;
    align-items: center;
}

.sleep-strip-row--axis {
    margin-top: -2px;
}

.sleep-strip-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sleep-strip-name {
    font-size: 12px;
    font-weight: 560;
}

.sleep-strip-scale {
    font-size: 10px;
    color: var(--text-3);
}

.sleep-strip-plot {
    min-width: 0;
}

.sleep-strip-svg {
    display: block;
    width: 100%;
    height: 44px;
    overflow: visible;
}

.sleep-strip-base {
    stroke: var(--line);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.sleep-strip-line {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.sleep-strip-dot {
    stroke-width: 6;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.sleep-strip-end-ring {
    stroke: var(--surface);
    stroke-width: 9.6;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.sleep-strip-end {
    stroke-width: 6.4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.sleep-strip-val {
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.sleep-strip-axis {
    position: relative;
    height: 14px;
    font-size: 10px;
    color: var(--text-3);
}

.sleep-strip-axis > span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.sleep-strip-axis > span:first-child {
    transform: none;
}

.sleep-note {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.sleep-link-row {
    background: var(--surface-2);
    text-align: center;
}

.sleep-link.mud-link {
    font-size: 11.5px;
    color: var(--brand-deep);
    font-weight: 600;
}

/* ==========================================================================
   Gesundheit — Kontrollblatt in the Home shell (#430)
   The detail view of Home's Bereitschaft column: same neutral/brand ramp,
   band, topbar, readout strip and hairline sheets as .home-shell, copied
   under its own shell class per ADR-0013 rather than referencing Home's
   classes — this page must not restyle when Home does. Values are copied
   verbatim: do not edit one ramp without checking whether the others
   drifted out of sync. The range pills copy .act-tab, the back button
   .act-topbar-btn, for the same reason.
   ========================================================================== */

.health-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;

    --m-hr: #EF4444;
    --m-sleep: #5C6BC0;

    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.health-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --amber-tint: #241B0E;

    --m-hr: #F87171;
    --m-sleep: #8C97E0;
}

.health-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.health-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.health-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
}

.health-body {
    padding: 16px 20px 24px;
}

/* Chrome -- 4px band, 64px topbar */

.health-band {
    height: 4px;
    background: var(--brand);
}

.health-topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.health-topbar-btn.mud-button-root {
    height: 34px;
    width: 34px;
    border-radius: 8px !important;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    transition: background-color 0.12s;
}

.health-topbar-btn.mud-button-root:hover {
    background: var(--brand-tint) !important;
}

/* The HRV glyph in the HR colour on a plain --surface-3 square, not Home's bordered brand-tint
   logo box: this is a marker's detail page, and the marker's own colour says which one. */
.health-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--surface-3);
    color: var(--m-hr);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.health-logo .act-i {
    width: 17px;
    height: 17px;
}

.health-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.health-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.health-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
}

.health-topbar-spacer {
    flex-grow: 1;
}

.health-sync-note {
    font-size: 11.5px;
    color: var(--text-2);
    text-align: right;
    line-height: 1.45;
}

.health-sync-note-warn {
    color: var(--amber);
    font-weight: 620;
}

.health-sync-note-ok {
    color: var(--text-2);
    font-weight: 500;
}

/* Range switch -- 7 / 30 / 90 Tage as .act-tab-style pills */

.health-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.health-tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.health-tab:hover {
    background: var(--surface-3);
}

.health-tab--active {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-ink);
    font-weight: 600;
}

/* Readout strip */

.health-readout {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 14px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.health-ro-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 18px 0 0;
    min-width: 92px;
}

.health-ro-item--track {
    min-width: 156px;
}

.health-ro-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.health-ro-value {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.health-ro-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

.health-ro-sub {
    font-size: 10.5px;
    color: var(--text-2);
    white-space: nowrap;
}

.health-ro-hero {
    min-width: 128px;
}

.health-ro-hero .health-ro-value {
    font-size: clamp(27px, 1.5vw, 38px);
    letter-spacing: -0.03em;
}

.health-ro-sep {
    width: 1px;
    background: var(--line);
    margin: 2px 18px 2px 0;
}

.health-ro-track {
    width: 138px;
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
    overflow: hidden;
}

.health-ro-track-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--brand);
}

/* Layout -- charts left, Subjektiv + Statistik right */

.health-main {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.health-cols {
    display: grid;
    /* 1.6fr / 1fr per the canvas. The right column's floor is sized against 1025px (13" laptop,
       nav drawer open): 1025 - 40 padding - 16 gap = 969, of which 1fr takes ~373 -- the four
       Subjektiv rows need ~330 (18 + "30-Tage-Ø 3,6" + 74 + 104 + gaps + 26 padding) to keep
       their second line and sparkline on one row. */
    grid-template-columns: minmax(0, 1.6fr) minmax(330px, 1fr);
    gap: 16px;
    align-items: start;
}

.health-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Sheets -- the hairline grid */

.health-sheet {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.health-band-row {
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
    white-space: nowrap;
}

.health-band-row-sp {
    margin-left: auto;
}

.health-band-row-plain {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-3);
}

.health-legend-hr {
    color: var(--m-hr);
    margin-right: 3px;
}

.health-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 620;
    background: var(--surface-3);
    color: var(--text-2);
    font-family: inherit;
    letter-spacing: 0;
    text-transform: none;
}

.health-row {
    background: var(--surface);
    padding: 11px 13px;
}

.health-row--tight {
    padding: 6px 13px;
}

.health-row--note {
    background: var(--surface-2);
}

.health-row--link {
    background: var(--surface-2);
    text-align: center;
}

.health-chart-row {
    padding: 13px;
}

.health-empty-note {
    font-size: 11.5px;
    color: var(--text-3);
}

.health-note {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.health-link.mud-link {
    font-size: 11.5px;
    color: var(--brand-deep);
    font-weight: 600;
}

/* Charts -- inline SVG on a fixed 823-wide viewBox; the axis text scales with the frame */

.health-chart {
    display: block;
    overflow: visible;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-size: 10px;
}

.health-chart-grid {
    stroke: var(--line);
    stroke-width: 1;
}

.health-chart-avg {
    stroke: var(--line-strong);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.health-chart-tick {
    fill: var(--text-3);
}

.health-chart-end {
    fill: var(--text);
    font-weight: 600;
}

/* Hover -- one invisible column per day; the tooltip group inside it is shown by :hover on the
   column's group. `fill: transparent` (not `none`) so the rect actually catches the pointer. */
.health-chart-hit-col {
    fill: transparent;
}

.health-chart-tip {
    display: none;
    pointer-events: none;
}

.health-chart-hit:hover .health-chart-tip {
    display: block;
}

.health-chart-guide {
    stroke: var(--line-strong);
    stroke-width: 1;
    stroke-dasharray: 2 3;
}

.health-chart-tip-dot {
    fill: var(--m-hr);
    stroke: var(--surface);
    stroke-width: 1.6;
}

.health-chart-tip-box {
    fill: var(--surface);
    stroke: var(--line-strong);
    stroke-width: 1;
}

.health-chart-tip-text {
    fill: var(--text-2);
}

.health-chart-tip-value {
    fill: var(--text);
    font-weight: 600;
}

/* Subjektiv -- four readiness-shaped rows on a fixed 1-5 sparkline scale */

.health-rd {
    display: grid;
    grid-template-columns: 18px minmax(max-content, 1fr) 74px minmax(104px, 1fr);
    gap: 10px;
    align-items: center;
}

.health-rd-icon {
    display: flex;
}

.health-rd-glyph {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
    flex-shrink: 0;
}

.health-rd-lab {
    font-size: clamp(12.5px, 0.65vw, 15px);
    font-weight: 560;
}

.health-rd-avg {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 2px;
    white-space: nowrap;
}

.health-rd-val {
    text-align: right;
    font-size: clamp(15px, 0.8vw, 19px);
    font-weight: 620;
}

.health-rd-unit {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 2px;
}

.health-rd-note {
    font-size: 11px;
    color: var(--text-3);
    text-align: right;
}

.health-spark {
    overflow: visible;
    display: block;
}

/* Same construction as .home-spark-dot: the end dot cannot ride inside a stretched
   (preserveAspectRatio="none") SVG without flattening into a lozenge, so it is a positioned span
   pinned to the right edge, where the index-based sparkline always puts its last point. */
.health-spark-wrap {
    position: relative;
    display: block;
    min-width: 0;
    line-height: 0;
}

.health-spark-dot {
    position: absolute;
    right: 0;
    width: 5.2px;
    height: 5.2px;
    margin-top: -2.6px;
    margin-right: -2.6px;
    border-radius: 50%;
    box-shadow: 0 0 0 1.6px var(--surface);
}

/* Statistik -- hairline table, Marker | Ø | Min | Max */

.health-stat-head {
    background: var(--surface-2);
    padding: 7px 13px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.health-row--stat {
    padding: 8px 13px;
}

.health-stat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px 56px 56px;
    gap: 8px;
    align-items: baseline;
    font-size: 12.5px;
}

.health-stat-label {
    font-weight: 560;
}

.health-stat-unit {
    font-size: 10.5px;
    color: var(--text-3);
    font-weight: 500;
}

.health-stat-num {
    text-align: right;
    color: var(--text-2);
}

.health-stat-avg {
    font-weight: 620;
    color: var(--text);
}

/* ==========================================================================
   Kraft — Wochen-Cockpit in the Home shell (#466)
   The strength page: same neutral/brand ramp, band, topbar, readout strip
   and hairline sheets as .home-shell, copied under its own shell class per
   ADR-0013 rather than referencing Home's classes. Values are copied
   verbatim: do not edit one ramp without checking whether the others
   drifted out of sync. --red / --red-tint and --gold are new: the Hauptübungen
   table's Rückgang chip and the records panel's medal need them, and no other
   shell carries them.
   ========================================================================== */

.str-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --brand-soft: #7FCBA8;
    --amber: #D97706;
    --amber-ink: #9A5B06;
    --amber-tint: #FDF2E2;
    --red: #DC2626;
    --red-ink: #B42318;
    --red-tint: #FDECEC;
    --gold: #A67C00;
    --gold-tint: #FBF3DC;

    max-width: var(--shell-max);
    margin-inline: auto;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.str-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --brand-soft: #1F6B4D;
    --amber-ink: #F59E0B;
    --amber-tint: #241B0E;
    --red: #F87171;
    --red-ink: #F87171;
    --red-tint: #2A1414;
    --gold: #E0B84A;
    --gold-tint: #2A2312;
}

.str-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.str-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.str-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
}

/* Chrome -- 4px band, 64px topbar */

.str-band {
    height: 4px;
    background: var(--brand);
}

.str-topbar {
    min-height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.str-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand-tint);
    border: 1px solid var(--brand);
    color: var(--brand-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.str-i-lg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.str-i {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.str-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.str-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.str-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
}

.str-topbar-spacer {
    flex-grow: 1;
}

.str-btn.mud-button-root {
    height: 36px;
    border-radius: 8px;
    text-transform: none;
    font-weight: 600;
}

/* Readout strip */

.str-readout {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 14px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.str-ro-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 18px 0 0;
    min-width: 92px;
}

.str-ro-item--track {
    min-width: 156px;
}

.str-ro-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.str-ro-value {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.str-ro-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    font-family: inherit;
}

.str-ro-sub {
    font-size: 10.5px;
    color: var(--text-2);
    white-space: nowrap;
}

.str-ro-hero {
    min-width: 128px;
}

.str-ro-hero .str-ro-value {
    font-size: clamp(27px, 1.5vw, 38px);
    letter-spacing: -0.03em;
    color: var(--brand-deep);
}

.str-ro-sep {
    width: 1px;
    background: var(--line);
    margin: 2px 18px 2px 0;
}

.str-ro-track {
    width: 138px;
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
    overflow: hidden;
}

.str-ro-track-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--brand);
}

/* Layout -- three panels over the Hauptübungen table */

.str-main {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.str-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    align-items: start;
}

/* Sheets -- hairline construction as .home-sheet */

.str-sheet {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.str-band-row {
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
}

.str-band-row-sp {
    margin-left: auto;
}

.str-row {
    background: var(--surface);
    padding: 10px 13px;
}

.str-row-foot {
    display: block;
    background: var(--surface-2);
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-deep);
    text-decoration: none;
}

.str-row-foot:hover {
    color: var(--brand-ink);
}

.str-empty-note {
    font-size: 12px;
    color: var(--text-3);
}

.str-empty-note a {
    color: var(--brand-deep);
    font-weight: 600;
}

.str-note {
    font-size: 11.5px;
    color: var(--text-2);
    line-height: 1.45;
}

.str-note-warn {
    color: var(--amber-ink);
    font-weight: 600;
}

.str-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 620;
    background: var(--surface-3);
    color: var(--text-2);
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.str-chip--brand {
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.str-chip--amber {
    background: var(--amber-tint);
    color: var(--amber-ink);
}

.str-chip--red {
    background: var(--red-tint);
    color: var(--red-ink);
}

/* Neue Bestleistungen */

.str-pr {
    display: flex;
    align-items: center;
    gap: 11px;
}

.str-pr-medal {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gold-tint);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.str-pr-body {
    flex-grow: 1;
    min-width: 0;
}

.str-pr-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.str-pr-meta {
    font-size: 11.5px;
    color: var(--text-2);
}

.str-pr-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.str-pr-value {
    font-size: 15px;
    font-weight: 620;
}

/* Sätze je Muskelgruppe -- a 0..24 track with the 10-20 band drawn in */

.str-muscles {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 13px;
}

.str-muscle {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
}

.str-muscle-name {
    font-size: 12.5px;
}

.str-muscle-track {
    position: relative;
    height: 10px;
    border-radius: 5px;
    background: var(--surface-3);
}

.str-muscle-band {
    position: absolute;
    top: -3px;
    bottom: -3px;
    border-left: 1px dashed var(--brand-soft);
    border-right: 1px dashed var(--brand-soft);
    background: rgba(5, 150, 105, .07);
}

.str-muscle-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 5px;
    background: var(--brand);
}

.str-muscle-fill--low {
    background: var(--amber);
}

.str-muscle-val {
    font-size: 12.5px;
    font-weight: 620;
    text-align: right;
}

.str-muscle-val--low {
    color: var(--amber-ink);
}

/* Tonnage · 12 Wochen */

.str-ton-chart {
    height: 150px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding-top: 4px;
}

.str-ton-bar {
    flex: 1 1 0;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: var(--brand-soft);
}

.str-ton-bar--current {
    background: var(--brand-deep);
}

.str-ton-bar--deload {
    background: var(--line-strong);
}

/* A week with nothing logged: an empty dashed frame rather than a missing bar, so the gap reads as a
   pause and not as a rendering fault. */
.str-ton-bar--pause {
    background: transparent;
    border: 1px dashed var(--line-strong);
    border-bottom: none;
}

.str-ton-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10.5px;
    color: var(--text-3);
}

/* Hauptübungen · Progression */

.str-lifts {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow-x: auto;
}

.str-lift {
    display: grid;
    grid-template-columns: minmax(160px, 1.5fr) 100px 80px 150px minmax(170px, 1.4fr) 70px 170px;
    gap: 16px;
    align-items: center;
    min-width: 980px;
}

.str-lift--head {
    padding-top: 8px;
    padding-bottom: 8px;
}

.str-lift--link {
    color: var(--text);
    text-decoration: none;
    transition: background 0.12s;
}

.str-lift--link:hover {
    background: var(--surface-3);
}

.str-th {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.str-num-col {
    text-align: right;
}

.str-lift-name {
    font-size: 13.5px;
    font-weight: 600;
}

.str-lift-e1rm {
    font-size: 14px;
    font-weight: 620;
}

.str-lift-meta {
    font-size: 12.5px;
    color: var(--text-2);
}

.str-delta {
    font-size: 12.5px;
    color: var(--text-2);
}

.str-delta--up {
    color: var(--brand-deep);
}

.str-delta--down {
    color: var(--red-ink);
}

.str-spark {
    display: block;
    width: 150px;
    height: 28px;
}

.str-spark polyline {
    fill: none;
    stroke: var(--text-3);
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.str-spark--brand polyline {
    stroke: var(--brand);
}

.str-spark--amber polyline {
    stroke: var(--amber);
}

.str-spark--red polyline {
    stroke: var(--red);
}

/* ==========================================================================
   Kraft — Übungen: Liste + Detail and the edit side panel (#465)
   Lives inside .str-shell (the strength page tokens, #466) rather than a
   shell of its own: it is the same area, and the approved board draws it
   with the same band, topbar, hairline sheets and chips. Only the list,
   detail and panel pieces are new here.
   ========================================================================== */

.exl-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.exl-icon-btn:hover {
    background: var(--surface-3);
}

.exl-main {
    padding: 16px 20px 20px;
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

/* List column -- scrolls on its own so the detail stays in view */

.exl-list {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 88px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.exl-list-head {
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid var(--line);
}

.exl-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text-3);
}

.exl-search:focus-within {
    border-color: var(--brand);
}

.exl-search input {
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 13px;
    flex-grow: 1;
    min-width: 0;
    color: var(--text);
    background: transparent;
}

.exl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exl-tagtoggle {
    height: 28px;
    padding: 0 6px 0 2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 11.5px;
    color: var(--text-2);
    cursor: pointer;
}

.exl-tagtoggle:hover {
    color: var(--text);
}

.exl-tagtoggle-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.exl-tagtoggle-caret {
    transition: transform 0.15s;
}

.exl-tagtoggle-caret--open {
    transform: rotate(180deg);
}

.exl-fchip {
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.exl-fchip--on {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-deep);
}

.exl-count {
    display: flex;
    align-items: center;
    font-size: 11.5px;
    color: var(--text-2);
}

.exl-sort {
    margin-left: auto;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 11.5px;
    color: var(--text-2);
    cursor: pointer;
    padding: 0;
}

.exl-sort b {
    color: var(--text);
}

.exl-list-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 6px;
}

.exl-empty {
    padding: 24px 14px;
    font-size: 12.5px;
    color: var(--text-3);
    text-align: center;
}

.exl-group {
    padding: 12px 14px 4px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.exl-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: var(--text);
    text-decoration: none;
    box-shadow: inset 3px 0 0 transparent;
}

.exl-row:hover {
    background: var(--surface-2);
}

.exl-row--on,
.exl-row--on:hover {
    background: var(--brand-tint);
    box-shadow: inset 3px 0 0 var(--brand);
}

.exl-row-main {
    flex-grow: 1;
    min-width: 0;
}

.exl-row-name {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.exl-star {
    color: var(--gold);
    font-size: 12px;
}

.exl-row-sub {
    font-size: 11px;
    color: var(--text-3);
}

.exl-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.exl-tagchip {
    padding: 1px 6px;
}

.exl-row--on .exl-tagchip {
    background: var(--surface);
}

.exl-chip-gold {
    background: var(--gold-tint);
    color: var(--gold);
}

.exl-row-right {
    text-align: right;
    flex-shrink: 0;
}

.exl-row-figure {
    font-size: 13px;
    font-weight: 620;
}

.exl-row-trend {
    font-size: 10.5px;
    color: var(--text-3);
}

.exl-row-trend--up,
.exl-trend--up {
    color: var(--brand-deep);
}

.exl-row-trend--down,
.exl-trend--down {
    color: var(--red-ink);
}

/* Detail column */

.exl-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.exl-back {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-deep);
    text-decoration: none;
}

.exl-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.exl-head {
    padding: 14px 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.exl-head-main {
    flex-grow: 1;
    min-width: 0;
}

.exl-name {
    margin: 0;
    font-size: 22px;
    font-weight: 620;
    letter-spacing: -0.02em;
}

.exl-head-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
}

.exl-chip-key {
    background: var(--gold-tint);
    color: var(--gold);
}

.exl-chip-type {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.exl-loads {
    font-size: 11.5px;
    color: var(--text-2);
    margin-left: 4px;
}

.exl-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.exl-btn:hover {
    background: var(--surface-3);
}

.exl-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.exl-btn--primary {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
    color: #FFFFFF;
}

.exl-btn--primary:hover {
    background: var(--brand-ink);
}

.exl-btn--danger {
    border-color: transparent;
    color: var(--red-ink);
    padding: 0 8px;
}

.exl-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 14px;
    padding: 14px 16px 12px;
}

.exl-ro {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 110px;
    padding-right: 12px;
}

.exl-ro-value {
    font-size: 21px;
    font-weight: 620;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.exl-ro-value--hero {
    font-size: 28px;
    color: var(--brand-deep);
}

.exl-tabs {
    padding: 0 16px;
    display: flex;
    gap: 22px;
    border-top: 1px solid var(--line);
    overflow-x: auto;
}

.exl-tab {
    height: 40px;
    padding: 0 2px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    white-space: nowrap;
}

.exl-tab--on {
    color: var(--brand-deep);
    border-bottom-color: var(--brand-deep);
}

.exl-link-btn {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--brand-deep);
    cursor: pointer;
}

.exl-band-note {
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
    font-size: 11.5px;
}

/* Verlauf chart -- e1RM line, dashed top set, gold records, grey Tonnage bars */

.exl-legend {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 14px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
    font-size: 11.5px;
}

.exl-legend-line,
.exl-legend-dash,
.exl-legend-dot,
.exl-legend-bar {
    display: inline-block;
    vertical-align: middle;
}

.exl-legend-line {
    width: 14px;
    height: 0;
    border-top: 2.4px solid var(--brand);
}

.exl-legend-dash {
    width: 14px;
    height: 0;
    border-top: 2px dashed #7C68DE;
}

.exl-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E0A800;
}

.exl-legend-bar {
    width: 7px;
    height: 10px;
    border-radius: 2px;
    background: var(--line-strong);
}

.exl-chart-row {
    padding: 10px 13px 6px;
}

.exl-chart {
    display: block;
    width: 100%;
    height: auto;
}

.exl-chart-bars rect {
    fill: var(--line);
}

.exl-chart-grid line {
    stroke: var(--surface-3);
    stroke-width: 1;
}

.exl-chart-axis text {
    font-size: 10.5px;
    fill: var(--text-3);
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

.exl-chart-line,
.exl-chart-topset {
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.exl-chart-line {
    stroke: var(--brand);
    stroke-width: 2.4;
}

.exl-chart-topset {
    stroke: #7C68DE;
    stroke-width: 1.8;
    stroke-dasharray: 5 4;
}

.exl-chart-records circle {
    fill: #E0A800;
    stroke: var(--surface);
    stroke-width: 1.5;
}

.exl-chart-latest {
    font-size: 11px;
    font-weight: 600;
    fill: var(--brand-deep);
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

.exl-split {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 14px;
    align-items: start;
}

.exl-muted {
    font-size: 12px;
    color: var(--text-2);
}

/* Rekorde nach Wiederholungen */

.exl-rr {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 70px 64px;
    gap: 10px;
    align-items: center;
    padding: 8px 13px;
}

.exl-rr--head {
    padding: 7px 13px;
}

.exl-rr-weight {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 620;
}

/* Podiums -- Gold/Silver/Bronze rows */

.exl-podiums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    align-items: start;
}

.exl-placing {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.exl-placing--link {
    color: var(--text);
    text-decoration: none;
}

.exl-placing--link:hover {
    background: var(--surface-2);
}

.exl-medal {
    display: inline-flex;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 620;
}

.exl-medal--gold {
    background: var(--gold-tint);
    color: var(--gold);
}

.exl-medal--silver {
    background: var(--surface-3);
    color: var(--text-2);
}

.exl-medal--bronze {
    background: var(--amber-tint);
    color: var(--amber-ink);
}

/* Letzte Einheiten / Einheiten -- one row per session, each set a small tag */

.exl-session {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 70px;
    gap: 12px;
    align-items: center;
    color: var(--text);
    text-decoration: none;
}

.exl-session:hover {
    background: var(--surface-2);
}

.exl-session-date {
    font-size: 12.5px;
    font-weight: 620;
}

.exl-session-title {
    font-size: 11px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exl-session-sets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.exl-set {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 7px;
    border-radius: 5px;
    font-size: 11.5px;
    background: var(--surface-3);
    color: var(--text);
}

.exl-set--warmup {
    background: var(--surface-2);
    color: var(--text-3);
}

.exl-set--record {
    background: var(--gold-tint);
    box-shadow: inset 0 0 0 1px #E0A800;
}

.exl-session-figure {
    text-align: right;
    font-size: 13px;
    font-weight: 620;
}

.exl-session-unit {
    font-size: 10.5px;
    font-weight: 400;
    color: var(--text-3);
}

.exl-set-legend {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-3);
}

.exl-set-legend .exl-set {
    height: 16px;
    padding: 0 5px;
    font-size: 10.5px;
}

.exl-pager {
    display: flex;
    justify-content: center;
}

/* Details tab */

.exl-prose {
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
}

.exl-link {
    font-size: 13px;
    color: var(--brand-deep);
    word-break: break-all;
}

.exl-load {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) 40px;
    gap: 10px;
    align-items: center;
    font-size: 12.5px;
}

.exl-load-track {
    height: 8px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
}

.exl-load-track span {
    display: block;
    height: 100%;
    background: var(--brand);
}

.exl-note {
    font-size: 11.5px;
    color: var(--text-2);
}

/* Narrow: list and detail are separate views, the id in the URL picks one. */

@media (max-width: 899.98px) {
    .exl-main {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px 16px 16px;
    }

    .exl-list {
        position: static;
        max-height: none;
    }

    .exl-main:not(.exl-main--routed) .exl-detail {
        display: none;
    }

    .exl-main--routed .exl-list {
        display: none;
    }

    .exl-back {
        display: inline-block;
    }

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

    .exl-session {
        grid-template-columns: 76px minmax(0, 1fr) 56px;
    }
}

/* Edit side panel -- slides in over the dimmed library. The drawer hosts it,
   ExerciseEditDialog frames the same panel for the session sheet. Kept below
   the MudBlazor popover and dialog layers so confirmations open on top. */

.exl-scrim {
    position: fixed;
    inset: 0;
    background: rgba(9, 20, 16, .38);
    z-index: 1290;
}

.exl-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(620px, 100vw);
    z-index: 1300;
    box-shadow: -12px 0 32px rgba(9, 32, 25, .18);
    animation: exl-slide-in 0.18s ease-out;
}

@keyframes exl-slide-in {
    from {
        transform: translateX(40px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .exl-drawer {
        animation: none;
    }
}

.exl-drawer .exl-panel {
    height: 100%;
}

.exl-dialog-content.mud-dialog-content {
    padding: 0;
}

.exl-dialog-content .exl-panel {
    max-height: 85vh;
}

.exl-panel {
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    color: var(--text);
}

.exl-panel-head {
    padding: 14px 20px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.exl-panel-title-col {
    flex-grow: 1;
    min-width: 0;
}

.exl-panel-title {
    font-size: 20px;
    font-weight: 620;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exl-panel-body {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.exl-panel-band {
    padding: 8px 20px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.exl-panel-section {
    padding: 14px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exl-panel-section--tight {
    padding-top: 4px;
}

.exl-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.exl-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.exl-hint {
    font-size: 11.5px;
    color: var(--text-2);
}

.exl-input {
    height: 38px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font: inherit;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    width: 100%;
}

.exl-input:focus {
    outline: none;
    border-color: var(--brand);
}

.exl-textarea {
    height: auto;
    padding: 9px 11px;
    resize: vertical;
}

.exl-seg {
    display: flex;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow: hidden;
}

.exl-seg-btn {
    flex: 1 1 0;
    min-height: 36px;
    padding: 4px 6px;
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
}

.exl-seg-btn:last-child {
    border-right: 0;
}

.exl-seg-btn--on {
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.exl-increment {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.exl-increment-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.exl-pill,
.exl-tag {
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.exl-pill {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
}

.exl-pill--on {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.exl-tag-box {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 38px;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.exl-tag-box:focus-within {
    border-color: var(--brand);
}

.exl-tag--selected {
    height: 26px;
    border: 0;
    background: var(--surface-3);
    color: var(--text);
}

.exl-tag-x {
    width: 12px;
    height: 12px;
}

.exl-tag-input {
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 13px;
    flex-grow: 1;
    min-width: 160px;
    color: var(--text);
    background: transparent;
}

.exl-tag-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.exl-tag--suggest {
    border: 1px dashed var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
}

.exl-tag--create {
    border: 1px solid var(--brand);
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.exl-sliders {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 12px;
    padding-bottom: 6px;
}

.exl-slider {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-3);
}

.exl-slider--set {
    color: var(--text);
    font-weight: 600;
}

.exl-slider input[type=range] {
    accent-color: var(--brand);
    width: 100%;
    margin: 0;
}

.exl-slider-val {
    text-align: right;
}

.exl-key {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.exl-key--on {
    border-color: #E9C46A;
    background: var(--gold-tint);
}

.exl-key input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
    margin: 0;
}

.exl-key-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exl-preview {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.exl-preview-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    gap: 2px;
}

.exl-preview-text {
    font-size: 12px;
}

.exl-video-row {
    display: flex;
    gap: 8px;
}

.exl-panel-foot {
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
}

.exl-dirty {
    flex-grow: 1;
    text-align: right;
    margin-right: 6px;
}

/* "Tags verwalten" (TagManagerDialog) -- the edit panel's head, band rows and
   inputs, with a plain hairline list of renameable rows. */

.tgm-new {
    display: flex;
    gap: 8px;
}

.tgm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tgm-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--line);
}

.tgm-row:last-child {
    border-bottom: 0;
}

.tgm-name {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tgm-input {
    height: 34px;
    border-color: transparent;
    background: transparent;
    font-weight: 600;
}

.tgm-row:hover .tgm-input {
    border-color: var(--line);
}

.tgm-input:focus,
.tgm-row:hover .tgm-input:focus {
    border-color: var(--brand);
    background: var(--surface);
}

.tgm-input--bad,
.tgm-input--bad:focus {
    border-color: var(--red);
}

.tgm-problem {
    color: var(--red-ink);
}

.tgm-delete {
    color: var(--text-2);
    border-color: transparent;
    background: transparent;
}

.tgm-delete:hover {
    color: var(--red-ink);
    background: var(--red-tint);
}

.tgm-delete:disabled {
    opacity: 0.55;
    cursor: default;
}

@media (max-width: 599.98px) {
    .exl-sliders {
        grid-template-columns: minmax(0, 1fr);
    }

    .exl-seg {
        flex-wrap: wrap;
    }

    .exl-seg-btn {
        flex-basis: 33%;
        border-bottom: 1px solid var(--line);
    }
}

/* ==========================================================================
   Roster -- the Coach's Athleten page (ADR-0033 § The look, #641)
   Built from Home's parts: the .home-shell tokens, 4px band, 64px topbar,
   readout strip, hairline sheets with band rows, chips and monospace numbers,
   copied verbatim under .roster-shell rather than shared (ADR-0013). Do not
   edit one ramp without checking whether the other drifted. One addition:
   --danger, for a missed Key Session and the overtraining-risk light.
   ========================================================================== */

.roster-shell {
    --bg: #F5F7F6;
    --surface: #FFFFFF;
    --surface-2: #FAFBFA;
    --surface-3: #F0F3F1;
    --line: #E4E8E6;
    --line-strong: #CBD4CF;
    --text: #12211C;
    --text-2: #5C6B65;
    --text-3: #93A09A;
    --brand: #059669;
    --brand-deep: #047857;
    --brand-ink: #064E3B;
    --brand-tint: #E7F5EF;
    --amber: #D97706;
    --amber-tint: #FDF2E2;
    --danger: #DC2626;
    --danger-tint: #FDECEC;

    max-width: var(--shell-max);
    margin-inline: auto;
    min-height: 100%;

    background: var(--bg);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.roster-shell--dark {
    --bg: #0A0A0A;
    --surface: #141414;
    --surface-2: #101010;
    --surface-3: #1C1C1C;
    --line: #232323;
    --line-strong: #303030;
    --text: #E0E0E0;
    --text-2: #9E9E9E;
    --text-3: #6C6C6C;
    --brand-deep: #10B981;
    --brand-ink: #6EE7B7;
    --brand-tint: #10241C;
    --amber-tint: #241B0E;
    --danger: #F87171;
    --danger-tint: #2A1414;
}

.roster-shell .num {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.roster-shell :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.roster-band {
    height: 4px;
    background: var(--brand);
}

.roster-topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.roster-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand-tint);
    border: 1px solid var(--brand);
    color: var(--brand-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.roster-i-lg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.roster-i {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.roster-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.roster-eyebrow {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
}

.roster-title {
    font-size: clamp(21px, 1.1vw, 28px);
    font-weight: 620;
    letter-spacing: -0.02em;
}

.roster-topbar-spacer {
    flex-grow: 1;
}

.roster-topbar-btn.mud-button-root {
    height: 34px;
    width: 34px;
    border-radius: 8px !important;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    transition: background-color 0.12s;
}

.roster-topbar-btn.mud-button-root:hover {
    background: var(--brand-tint) !important;
}

.roster-readout {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 14px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.roster-ro-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 18px 0 0;
    min-width: 92px;
}

.roster-ro-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.roster-ro-value {
    font-size: clamp(18px, 0.95vw, 24px);
    font-weight: 620;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.roster-ro-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

.roster-ro-sub {
    font-size: 10.5px;
    color: var(--text-2);
}

.roster-ro-hero {
    min-width: 128px;
}

.roster-ro-hero .roster-ro-value {
    font-size: clamp(27px, 1.5vw, 38px);
    letter-spacing: -0.03em;
}

.roster-ro-sep {
    width: 1px;
    background: var(--line);
    margin: 2px 18px 2px 0;
}

.roster-main {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.roster-sheet {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.roster-band-row {
    background: var(--surface-2);
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-2);
}

.roster-band-row-sp {
    margin-left: auto;
}

.roster-band-row--warn {
    background: var(--amber-tint);
    color: var(--amber);
}

.roster-band-row-plain {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-3);
}

.roster-row {
    background: var(--surface);
    padding: 11px 13px;
}

.roster-empty-note {
    font-size: 11.5px;
    color: var(--text-3);
}

.roster-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 620;
    background: var(--surface-3);
    color: var(--text-2);
    font-family: inherit;
    letter-spacing: 0;
    text-transform: none;
}

.roster-chip--warn {
    background: var(--amber-tint);
    color: var(--amber);
}

/* Roster -- topbar action, avatars, the dense Athletes grid */

.roster-propose-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--brand);
    background: var(--surface);
    color: var(--brand-deep);
    font: inherit;
    font-size: 12.5px;
    font-weight: 620;
    cursor: pointer;
    transition: background-color 0.12s;
}

.roster-propose-btn:hover {
    background: var(--brand-tint);
}

.roster-ro-hero .roster-ro-value {
    color: var(--amber);
}

.roster-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.roster-request {
    display: flex;
    align-items: center;
    gap: 11px;
}

.roster-request-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex-grow: 1;
}

.roster-name {
    font-size: 13px;
    font-weight: 620;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-sub {
    font-size: 11px;
    color: var(--text-2);
}

.roster-btn {
    height: 28px;
    padding: 0 11px;
    border-radius: 7px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.roster-btn:hover:not(:disabled) {
    background: var(--surface-3);
}

.roster-btn--filled {
    background: var(--brand);
    border-color: var(--brand);
    color: #FFFFFF;
}

.roster-btn--filled:hover:not(:disabled) {
    background: var(--brand-deep);
}

.roster-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.roster-filter {
    cursor: pointer;
    border: 1px solid transparent;
}

.roster-filter--on {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--text);
}

.roster-filter--warn.roster-filter--on {
    border-color: var(--amber);
    background: var(--amber-tint);
    color: var(--amber);
}

.roster-cols,
.roster-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) 92px minmax(200px, 1.2fr) minmax(140px, 0.9fr) minmax(130px, 1fr) minmax(130px, 1fr) 18px;
    gap: 14px;
    align-items: center;
}

.roster-athlete {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-left: 16px;
    cursor: pointer;
    transition: background 0.12s;
}

.roster-athlete:hover {
    background: var(--surface-3);
}

.roster-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.roster-who {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.roster-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: var(--text);
    min-width: 0;
}

.roster-cell-sub {
    font-size: 10.5px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-warn {
    color: var(--amber);
    font-weight: 620;
}

.roster-days {
    display: flex;
    gap: 3px;
}

.roster-day {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    box-sizing: border-box;
}

.roster-day--done {
    background: var(--brand);
    border-color: var(--brand);
}

.roster-day--missed {
    border-color: var(--danger);
}

.roster-day--rest {
    border-style: dashed;
}

.roster-day--key {
    border-width: 2.5px;
}

.roster-day--key.roster-day--missed {
    background: var(--danger);
}

.roster-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.roster-chevron {
    color: var(--text-3);
}

.roster-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-left: -16px;
    padding: 5px 0 1px 16px;
    background: var(--amber-tint);
    border-radius: 0 0 4px 0;
}

.roster-skel {
    display: block;
    height: 10px;
    border-radius: 4px;
    background: var(--surface-3);
    animation: roster-pulse 1.2s ease-in-out infinite;
}

@keyframes roster-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.roster-tip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
}
