/* ── Design tokens ───────────────────────────────────────── */
/*
 * Color tokens are split into dark (default) and light (prefers-color-scheme)
 * variants. Non-color tokens (spacing, radii, transitions, shadows, type
 * scale) sit on a single :root block at the bottom — they don't change
 * between themes.
 *
 * Semantic category colors (mood/energy/ed/gi) intentionally do NOT flip
 * between dark and light; they're brand accents, not surfaces.
 */

:root {
    /* Surfaces & text (dark) */
    --bg:          #0f1117;
    --surface:     #1e2130;
    --surface-2:   #13162a;
    --surface-3:   #242840;
    --border:      #2d3148;
    --border-sub:  #181b29;
    --text:        #e2e8f0;
    --text-bright: #f1f5f9;
    --text-head:   #f8fafc;
    --text-muted:  #94a3b8;
    --text-dim:    #64748b;
    --text-dimmer: #475569;
    --text-table:  #cbd5e1;
    --zero-line:   #475569;

    /* Status colors */
    --color-pos:   #4ade80;
    --color-neg:   #f87171;
    --color-warn:  #f59e0b;

    /* Category accents (mood / energy / ed / gi) — theme-independent */
    --color-mood:   #818cf8;
    --color-energy: #34d399;
    --color-ed:     #fb923c;
    --color-gi:     #f472b6;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg:          #f1f5f9;
        --surface:     #ffffff;
        --surface-2:   #f1f5f9;
        --surface-3:   #e8edf5;
        --border:      #e2e8f0;
        --border-sub:  #f1f5f9;
        --text:        #1e293b;
        --text-bright: #0f172a;
        --text-head:   #0f172a;
        --text-muted:  #475569;
        --text-dim:    #64748b;
        --text-dimmer: #94a3b8;
        --text-table:  #334155;
        --zero-line:   #94a3b8;
        --color-pos:   #16a34a;
        --color-neg:   #dc2626;
        --color-warn:  #d97706;
    }
}

:root {
    /* Spacing scale (4px base) — see footprint counts in CSS for reference */
    --space-1: 0.25rem;   /*  4px */
    --space-2: 0.5rem;    /*  8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */

    /* Radius scale (3px stays inline — used only on small bar visuals) */
    --radius-xs:   2px;
    --radius-sm:   4px;
    --radius-md:   6px;
    --radius-lg:   8px;
    --radius-xl:   10px;
    --radius-2xl:  12px;
    --radius-pill: 999px;

    /* Type scale */
    --fs-xs:   0.7rem;
    --fs-sm:   0.8rem;
    --fs-base: 0.85rem;
    --fs-md:   0.9rem;
    --fs-lg:   1rem;
    --fs-xl:   1.25rem;
    --fs-2xl:  1.5rem;

    /* Motion */
    --transition-fast: 0.15s;

    /* Elevation (prepared for Polish step — not yet applied) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Keyboard focus — visible accent ring on any interactive element.
 * Uses :focus-visible so mouse clicks don't show the ring. */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--color-pos);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
/* Pill/round elements deserve a matching focus shape */
.back-button:focus-visible,
.subnav a:focus-visible,
.kpi-delta:focus-visible {
    outline-offset: 3px;
}

/* Default link colour — browser default (blue) is unreadable on the dark
 * surface. Contexts that want inherited colour (tables, insight cards)
 * override with `color: inherit` and remain unaffected. */
a {
    color: var(--text-bright);
    text-decoration-color: var(--border);
    text-underline-offset: 2px;
}
a:hover { text-decoration-color: currentColor; }

/* ── Layout ──────────────────────────────────────────────── */

body {
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 1.5rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 600px) { body { padding: 1rem; } }

/* Supplement-detail links inherit colour and only underline on hover, so
 * lists/tables don't suddenly turn blue. .nav a has its own rule. */
.insight-card-name a,
.cooccur-name a,
.stack-checklist-list a,
.heatmap-label a,
.stats-table td a,
.ranking-table td a,
.lag-table td a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--border);
}
.insight-card-name a:hover,
.cooccur-name a:hover,
.stack-checklist-list a:hover,
.heatmap-label a:hover,
.stats-table td a:hover,
.ranking-table td a:hover,
.lag-table td a:hover {
    color: var(--text-bright);
    border-bottom-color: currentColor;
}

h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-head);
}

/* ── Navigation ──────────────────────────────────────────── */

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    position: relative;
}

/* On desktop, .nav-links collapses so its children flex-lay-out next to the
 * (hidden) toggle, just like the old flat link list. */
.nav-links { display: contents; }

.nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}

.nav a:hover  { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--text-bright); background: var(--surface); }
.nav a.nav-logout { margin-left: auto; color: var(--text-muted); }
.nav a.nav-logout:hover { color: var(--color-neg); }

/* Hamburger toggle — hidden on desktop */
.nav-toggle             { display: none; }
.nav-toggle-icon,
.nav-toggle-chevron     { display: none; }

@media (max-width: 600px) {
    .nav {
        flex-direction: column;
        gap: 0;
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 1rem;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        width: 100%;
        padding: 0.7rem 0.9rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-xl);
        color: var(--text-bright);
        font-size: 0.92rem;
        font-weight: 600;
        cursor: pointer;
        line-height: 1.2;
        transition: border-color var(--transition-fast), background var(--transition-fast);
        -webkit-tap-highlight-color: transparent;
    }
    .nav-toggle:active   { background: var(--surface-2); }
    .nav-toggle-icon     { display: inline; color: var(--text-muted); font-size: 1rem; }
    .nav-toggle-label    { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
    /* Chevron pointing down; rotates 180° when menu opens */
    .nav-toggle-chevron  {
        display: inline-block;
        width: 8px; height: 8px;
        border-right: 2px solid var(--text-muted);
        border-bottom: 2px solid var(--text-muted);
        transform: rotate(45deg) translate(-2px, -2px);
        transition: transform .2s ease;
        margin-left: .15rem;
    }
    .nav--open .nav-toggle               { border-color: var(--border-sub); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
    .nav--open .nav-toggle-chevron       { transform: rotate(-135deg) translate(-2px, -2px); }

    /* Mobile menu sheet — sits attached to the toggle, distinct surface */
    .nav-links {
        display: none;
        flex-direction: column;
        margin-top: -1px;             /* fuse with the toggle's bottom edge */
        background: var(--surface);
        border: 1px solid var(--border-sub);
        border-top-color: var(--border);
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
        padding: .35rem;
        overflow: hidden;
    }
    .nav--open .nav-links { display: flex; }

    .nav-links a {
        display: flex;
        align-items: center;
        padding: 0.7rem 0.85rem;
        font-size: 0.92rem;
        color: var(--text);
        border-radius: var(--radius-md);
        border-left: 3px solid transparent;
        white-space: normal;
    }
    .nav-links a + a    { margin-top: 1px; }
    .nav-links a:hover  { background: var(--surface-2); color: var(--text-bright); }
    .nav-links a.active {
        color: var(--text-bright);
        background: var(--surface-2);
        border-left-color: var(--color-pos);
        font-weight: 600;
    }
}

/* ── Sub-navigation (tabs within a section) ──────────────── */

.subnav {
    display: flex;
    gap: 0.25rem;
    margin-top: -1rem;       /* pull up to sit close to the main nav border */
    margin-bottom: 1.75rem;
    padding-bottom: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }

.subnav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    white-space: nowrap;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}
.subnav a:hover  { color: var(--text); background: var(--surface); }
.subnav a.active {
    color: var(--text-bright);
    background: var(--surface);
    border-color: var(--border);
}

@media (max-width: 600px) {
    .subnav { margin-top: 0.75rem; }
}

/* ── Cards ───────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.card--flush { padding: 0; overflow: hidden; }
.card--flush .card-header { padding: 1.25rem 1.5rem 0.75rem; }

.card-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

/*
 * Two h2 styles inside cards:
 *   - default (eyebrow): tiny uppercase label, used for most section cards
 *   - .card-title--prominent: real headline, used where the card title is
 *     the dominant heading (Heute-Verdicts, Stack-Status, Highlights-Hero)
 * The three legacy class selectors stay as compound selectors so existing
 * markup keeps working without an HTML change.
 */
.card h2 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.card-header h2 { margin-bottom: 0; }

.card-title--prominent,
.verdicts-card h2,
.highlights-card--hero h2,
.stack-status-head h2 {
    font-size: 1.05rem;
    color: var(--text-bright);
    text-transform: none;
    letter-spacing: normal;
}

/* ── Buttons ─────────────────────────────────────────────── */
/*
 * Single button system. Variants:
 *   .btn            — default ghost-on-surface (used for back-button, etc.)
 *   .btn--ghost     — transparent, dim text; for "reset"/secondary actions
 *   .btn--solid     — filled accent surface; primary actions
 *   .btn--pill      — fully rounded (use with arrows / chip-like actions)
 *   .btn--sm        — compact size (e.g. inline reset next to a slider)
 *
 * Special cases that don't fit the system stay on their own classes:
 *   .lag-btn        — segmented control inside .lag-toggle
 *   .nav-toggle     — mobile-only menu header (full-width sheet)
 */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast);
}
.btn:hover {
    border-color: var(--text-dim);
    background: var(--surface-2);
    color: var(--text-bright);
}

.btn--ghost {
    background: transparent;
    color: var(--text-dim);
}
.btn--ghost:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--text-muted);
}

.btn--solid {
    background: var(--surface-3);
    color: var(--text-bright);
}
.btn--solid:hover {
    background: var(--surface-2);
    border-color: var(--text-muted);
}

.btn--pill { border-radius: var(--radius-pill); }

.btn--sm {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
}

/* Touch-friendly on mobile: enlarge tap targets */
@media (max-width: 600px) {
    .btn {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }
    .btn--sm {
        padding: 0.5rem 0.85rem;
        font-size: 0.9rem;
    }
}

/* ── KPI Cards ───────────────────────────────────────────── */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.25rem;
}

.kpi-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1;
}

.kpi-unit {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-dim);
}

.kpi-delta {
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.kpi-delta.pos { color: var(--color-pos); }
.kpi-delta.neg { color: var(--color-neg); }
.kpi-delta.neu { color: var(--text-dim); }

/* ── Charts ──────────────────────────────────────────────── */

.chart-container         { position: relative; height: 260px; }
.chart-container--tall   { height: 340px; }
.chart-container--auto   { height: clamp(220px, 30vh, 360px); }

.chart-row {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.chart-row--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) { .chart-row--3 { grid-template-columns: 1fr; } }

/* ── Hint text ───────────────────────────────────────────── */

.hint {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    line-height: 1.65;
}

.hint-pos { color: var(--color-pos); font-weight: 600; }
.hint-neg { color: var(--color-neg); font-weight: 600; }

/* ── Lag toggle ──────────────────────────────────────────── */

.chart-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.chart-section-header h2 { margin-bottom: 0; }

.lag-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3px;
}

.lag-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}

.lag-btn:hover  { color: var(--text); background: var(--surface); }
.lag-btn.active { color: var(--text-bright); background: var(--surface-3); }

/* ── Chart sub-labels ────────────────────────────────────── */

.chart-sublabel {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}

.chart-sublabel--mood   { color: var(--color-mood); }
.chart-sublabel--energy { color: var(--color-energy); }
.chart-sublabel--ed     { color: var(--color-ed); }

/* ── Tables (shared) ─────────────────────────────────────── */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    white-space: nowrap;
}

.stats-table th {
    text-align: left;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border);
    user-select: none;
    background: var(--surface);
}

.stats-table th[data-col] { cursor: pointer; }
.stats-table th[data-col]:hover { color: var(--text-muted); }
.stats-table th.sorted-asc::after  { content: ' ↑'; }
.stats-table th.sorted-desc::after { content: ' ↓'; }

.stats-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border-sub);
    color: var(--text-table);
}

/* Subtler row-hover: half-strength surface-3 blended over the row. */
.stats-table tbody tr:hover td { background: var(--surface-2); }
.stats-table tbody tr:hover .th-sticky { background: var(--surface-2); }

.align-right { text-align: right !important; }

.th-sticky {
    position: sticky;
    left: 0;
    background: var(--surface);
    z-index: 1;
    border-right: 1px solid var(--border);
}

/* (Sticky-name-column hover handled in the consolidated rule above.) */

/* ── Correlation table ───────────────────────────────────── */

.group-header {
    text-align: center !important;
    font-size: 0.65rem;
    padding-bottom: 0.3rem;
    border-bottom: none;
}

.group-header.group-mood   { border-top: 2px solid rgba(129,140,248,0.5); color: var(--color-mood); }
.group-header.group-energy { border-top: 2px solid rgba(52,211,153,0.5);  color: var(--color-energy); }
.group-header.group-ed     { border-top: 2px solid rgba(251,146,60,0.5);  color: var(--color-ed); }
.group-header.group-gi     { border-top: 2px solid rgba(244,114,182,0.5); color: var(--color-gi); }

.corr-table th.group-mood   { border-top: 1px solid rgba(129,140,248,0.25); }
.corr-table th.group-energy { border-top: 1px solid rgba(52,211,153,0.25); }
.corr-table th.group-ed     { border-top: 1px solid rgba(251,146,60,0.25); }
.corr-table th.group-gi     { border-top: 1px solid rgba(244,114,182,0.25); }

td.delta     { font-weight: 600; font-variant-numeric: tabular-nums; }
td.delta-pos { color: var(--color-pos); }
td.delta-neg { color: var(--color-neg); }

/* ── Diverging bars (score & Z) ──────────────────────────── */

.score-bar-wrap,
.z-bar-wrap {
    position: relative;
    height: 8px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.score-bar-center,
.z-bar-center {
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 1px;
    background: var(--border);
}

.score-bar-fill,
.z-bar-fill {
    position: absolute;
    top: 0; bottom: 0;
    border-radius: var(--radius-sm);
}

.score-pos, .z-pos { background: var(--color-pos); }
.score-neg, .z-neg { background: var(--color-neg); }

/* ── Supplement bar cells (supplements page) ─────────────── */

.bar-cell {
    position: relative;
    height: 18px;
    width: 120px;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bar-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: #4f46e5;
    opacity: 0.55;
    border-radius: 3px;
}

.bar-fill--dim {
    background: var(--text-muted, #64748b);
    opacity: 0.35;
}

.bar-label {
    position: relative;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding-left: 0.4rem;
    z-index: 1;
}

/* ── Ranking page ────────────────────────────────────────── */

/* Weight sliders */
.weight-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) { .weight-controls { grid-template-columns: 1fr; } }

.weight-control { display: flex; flex-direction: column; gap: 0.4rem; }

.weight-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.weight-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.weight-label--mood   { color: var(--color-mood); }
.weight-label--energy { color: var(--color-energy); }
.weight-label--ed     { color: var(--color-ed); }

.weight-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-bright);
    font-variant-numeric: tabular-nums;
    min-width: 3rem;
    text-align: right;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: var(--radius-xs);
    background: var(--border);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-bright);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 2px var(--border);
    cursor: pointer;
    transition: box-shadow var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 3px var(--text-muted);
}

/* .weight-reset uses .btn.btn--ghost.btn--sm in markup; only positional override here. */
.weight-reset { align-self: flex-end; }

/* ── Top-10 ranking cards ────────────────────────────────── */
.top10-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 1100px) { .top10-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .top10-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .top10-grid { grid-template-columns: repeat(2, 1fr); } }

.top10-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.top10-card.rank-1 { border-color: rgba(250,204,21,0.5); }
.top10-card.rank-2 { border-color: rgba(148,163,184,0.45); }
.top10-card.rank-3 { border-color: rgba(180,120,60,0.45); }

.top10-rank {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dimmer);
}

.top10-card.rank-1 .top10-rank { color: #fbbf24; }
.top10-card.rank-2 .top10-rank { color: var(--text-muted); }
.top10-card.rank-3 .top10-rank { color: #b06020; }

.top10-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-bright);
    line-height: 1.3;
    flex: 1;
}

.top10-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-pos);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.top10-score.neg { color: var(--color-neg); }

.top10-meta {
    font-size: 0.68rem;
    color: var(--text-dim);
}

.top10-zpills {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.top10-zpill {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: var(--surface-2);
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.top10-zpill.pos { color: var(--color-pos); }
.top10-zpill.neg { color: var(--color-neg); }

/* ── Dashboard summary sections ──────────────────────────── */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 700px) { .summary-grid { grid-template-columns: 1fr; } }

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.25rem;
    text-decoration: none;
    display: block;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.summary-card:hover {
    border-color: var(--text-dim);
    box-shadow: var(--shadow-md);
}

.summary-card-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.trend-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.trend-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    font-variant-numeric: tabular-nums;
}

.trend-delta {
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.trend-delta.pos { color: var(--color-pos); }
.trend-delta.neg { color: var(--color-neg); }
.trend-delta.neu { color: var(--text-dim); }

.trend-label {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.supp-preview-list { display: flex; flex-direction: column; gap: 0.5rem; }

.supp-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.supp-preview-name {
    font-size: 0.82rem;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supp-preview-score {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.insight-badges { display: flex; flex-direction: column; gap: 0.5rem; }

.insight-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.insight-badge-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-bright);
}

.rank-num {
    font-size: 0.8rem;
    color: var(--text-dimmer);
    font-variant-numeric: tabular-nums;
    min-width: 2rem;
}

/* ── Mobile table overrides ──────────────────────────────── */

/* On small screens: prefer horizontal scrolling over hiding data — even
 * the name column scrolls along, otherwise the numeric columns get
 * squashed into the remaining width. .table-scroll handles the swipe;
 * here we just unstick the name column and tighten paddings. */
@media (max-width: 700px) {
    /* Name column scrolls with the rest of the row */
    .th-sticky {
        position: static;
        background: transparent;
        border-right: none;
    }
    .stats-table tbody tr:hover .th-sticky { background: transparent; }

    /* Tighten padding so the table actually fits a few columns before scroll */
    .stats-table th,
    .stats-table td { padding-left: .5rem; padding-right: .5rem; }

    /* Faint hint that the table scrolls — subtle right shadow */
    .table-scroll {
        background:
            linear-gradient(to right, transparent 0, transparent 90%, rgba(0,0,0,0.18) 100%) right / 12px 100% no-repeat;
    }

    /* Podium: single column on mobile */
    .podium { grid-template-columns: 1fr !important; }

    /* Heatmap: limit label column width */
    .heatmap-label { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
}

/* ── Insights page ───────────────────────────────────────── */

.insight-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.insight-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    border-left: 4px solid transparent;
}

.insight-header--promising  { border-left-color: var(--color-pos); }
.insight-header--inconsistent { border-left-color: var(--color-warn); }
.insight-header--stop       { border-left-color: var(--color-neg); }
.insight-header--early      { border-left-color: #94a3b8; }
.insight-header--cooccur    { border-left-color: var(--color-mood); }

.insight-icon {
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.insight-header--promising  .insight-icon { color: var(--color-pos); }
.insight-header--inconsistent .insight-icon { color: var(--color-warn); }
.insight-header--stop       .insight-icon { color: var(--color-neg); }
.insight-header--early      .insight-icon { color: #94a3b8; }
.insight-header--cooccur    .insight-icon { color: var(--color-mood); }

.insight-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.2rem;
}

.insight-subtitle {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.55;
}

.insight-count {
    margin-left: auto;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    align-self: center;
}

.insight-empty {
    padding: 1rem 1.5rem;
    font-size: 0.82rem;
    color: var(--text-dim);
}

.insight-cleared, .insight-allclear {
    margin-top: 1.25rem;
    padding: 0.85rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.82rem;
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.insight-allclear {
    color: var(--color-pos);
    border-color: var(--color-pos);
    background: rgba(52, 211, 153, 0.06);
}

.insight-cleared-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    background: var(--surface-3, rgba(255,255,255,0.04));
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Insight cards grid */
.insight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
}

.insight-card {
    background: var(--surface);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-bright);
}

.insight-card-score {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.insight-card-score.promising { color: var(--color-pos); }
.insight-card-score.negative  { color: var(--color-neg); }

.insight-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.tag--warn {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.3);
    color: var(--color-warn);
}

.tag--dim {
    color: var(--text-dim);
    border-color: var(--border-sub);
}

.insight-card-action {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.55;
}

.insight-card-zscores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.1rem;
}

.zscore-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}

.zscore-pill--mood   { border-color: rgba(129,140,248,0.3); }
.zscore-pill--energy { border-color: rgba(52,211,153,0.3); }
.zscore-pill--ed     { border-color: rgba(251,146,60,0.3); }
.zscore-pill.pos     { color: var(--color-pos); }
.zscore-pill.neg     { color: var(--color-neg); }

/* Co-occurrence list */
.cooccur-list {
    display: flex;
    flex-direction: column;
}

.cooccur-row {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border-sub);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

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

.cooccur-names {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.cooccur-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-bright);
}

.cooccur-sep {
    font-size: 0.8rem;
    color: var(--color-mood);
    font-weight: 700;
}

.cooccur-stats {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.cooccur-row .insight-card-action {
    width: 100%;
    margin-top: 0.1rem;
}

/* ── Heatmap ─────────────────────────────────────────────── */

.heatmap-wrap { overflow-x: auto; padding-bottom: 0.5rem; }

.heatmap { border-collapse: collapse; min-width: 100%; }
.heatmap th, .heatmap td { padding: 0; }

.heatmap-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    padding-right: 0.75rem !important;
    text-align: right;
    min-width: 160px;
}

.heatmap thead .heatmap-date {
    font-size: 0.6rem;
    color: var(--text-dimmer);
    width: 10px;
    min-width: 10px;
    vertical-align: bottom;
    padding-bottom: 4px;
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    height: 48px;
}

.heatmap-cell {
    width: 10px;
    min-width: 10px;
    height: 10px;
    background: var(--surface-2);
    border: 1px solid var(--bg);
    border-radius: var(--radius-xs);
}

.heatmap-cell.taken { background: #6366f1; }
.heatmap tbody tr:hover .heatmap-cell  { opacity: 0.8; }
.heatmap tbody tr:hover .heatmap-label { color: var(--text-bright); }

.stack-config {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin: 0 0 1.25rem 0;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.stack-config label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.stack-config select,
.stack-config input[type="number"] {
    background: var(--surface-2);
    color: var(--text-bright);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.4rem 0.5rem;
    font: inherit;
    min-width: 9rem;
}
.stack-config input[type="number"] { min-width: 6rem; }
.stack-config select:focus,
.stack-config input[type="number"]:focus {
    outline: none;
    border-color: var(--text-muted);
}
/* Form-submit button uses .btn.btn--solid; no override needed here. */
.stack-config-reset {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: underline;
}
.stack-config-reset:hover { color: var(--text-bright); }

.stack-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.25rem;
}

.stack-checklist-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.25rem;
}

.stack-checklist-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.6rem;
}

.stack-checklist-icon { font-size: 1rem; }

.stack-checklist-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-dim);
    background: var(--bg);
    border-radius: var(--radius-pill);
    padding: 0.1rem 0.55rem;
}

.stack-checklist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.stack-checklist-list li {
    font-size: 0.85rem;
    color: var(--text-bright);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.3rem 0.6rem;
}

.stack-checklist-list--pause li {
    color: var(--color-neg);
    border-color: rgba(239, 68, 68, 0.3);
}

.stack-checklist-empty {
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* ── Mobile sweep ────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Reclaim horizontal space — body padding is already 1rem outside */
    .insight-header { padding: 0.9rem 1rem; gap: 0.75rem; flex-wrap: wrap; }
    .insight-card   { padding: 0.9rem 1rem; }
    .insight-empty  { padding: 0.9rem 1rem; }

    /* Count moves below title on narrow widths instead of fighting for the row */
    .insight-count {
        font-size: 1.1rem;
        margin-left: auto;
        align-self: flex-start;
    }

    /* Slightly larger tag/pill text — 0.7rem is borderline on small screens */
    .tag         { font-size: 0.75rem; padding: 0.22rem 0.55rem; }
    .zscore-pill { font-size: 0.72rem; padding: 0.18rem 0.5rem; }

    /* Stack-config: full-width controls + 44px touch targets */
    .stack-config {
        gap: 0.75rem;
        padding: 0.75rem;
    }
    .stack-config label { width: 100%; }
    .stack-config select,
    .stack-config input[type="number"] {
        width: 100%;
        min-width: 0;
        padding: 0.6rem 0.65rem;
        font-size: 1rem;  /* prevents iOS zoom-on-focus */
    }
    /* .btn mobile-size comes from the global @media in the Buttons section;
     * only width override is layout-specific to .stack-config. */
    .stack-config .btn { width: 100%; justify-content: center; }
    .stack-config-reset { align-self: center; }

    /* Insight-card score: was 1.3rem next to 0.9rem name — softer on mobile */
    .insight-card-score { font-size: 1.15rem; }
}

/* ── Stack-card symptom context ───────────────────────────── */
.card-symptom-ctx {
    font-size: .76rem;
    line-height: 1.45;
    color: var(--text-dim);
    padding: .35rem 0 0;
    border-top: 1px dashed var(--border);
    margin-top: .2rem;
}
.card-symptom-ctx .ctx-label {
    font-weight: 600;
    margin-right: .15rem;
}
.card-symptom-ctx .ctx-label--pos { color: var(--color-pos); }
.card-symptom-ctx .ctx-label--neg { color: var(--color-neg); }
.card-symptom-ctx .ctx-syms       { color: var(--text); }
.card-symptom-ctx .ctx-sep        { margin: 0 .45rem; color: var(--text-dim); }

/* ── Dashboard Highlights ─────────────────────────────────── */
.highlights-card { margin-bottom: 1.25rem; }
.highlights-list {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.highlights-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .55rem .8rem;
    background: var(--surface-2);
    border-left: 3px solid var(--border);
    border-radius: var(--radius-md);
    font-size: .88rem;
    line-height: 1.5;
    color: var(--text);
}
.highlights-item--pos  { border-left-color: var(--color-pos); }
.highlights-item--neg  { border-left-color: var(--color-neg); }
.highlights-item--warn { border-left-color: var(--color-warn); }
.highlights-item--neu  { border-left-color: var(--text-dim); }
.highlights-icon {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
}
.highlights-item--pos  .highlights-icon { color: var(--color-pos); }
.highlights-item--neg  .highlights-icon { color: var(--color-neg); }
.highlights-item--warn .highlights-icon { color: var(--color-warn); }
.highlights-supp {
    color: var(--text-bright);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted var(--border);
}
.highlights-supp:hover {
    border-bottom-color: currentColor;
}

/* ── Verdicts (Klares Urteil) ────────────────────────────── */

.verdicts-card { margin-bottom: 1.25rem; }
.verdicts-card h2 { margin: 0 0 0.25rem; }
/* font/color come from the shared .card-title--prominent rule */

.verdict-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.verdict-item {
    background: var(--surface-2, var(--bg));
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-dim);
    border-radius: var(--radius-lg);
    padding: 0.7rem 0.9rem;
}
.verdict-item--pos { border-left-color: var(--color-pos); }
.verdict-item--neg { border-left-color: var(--color-neg); }

.verdict-head {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.verdict-glyph {
    font-size: 0.9rem;
    line-height: 1;
}
.verdict-item--pos .verdict-glyph { color: var(--color-pos); }
.verdict-item--neg .verdict-glyph { color: var(--color-neg); }

.verdict-name {
    color: var(--text-bright);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted var(--border);
}
.verdict-name:hover { border-bottom-color: currentColor; }

.verdict-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.verdict-reasons {
    list-style: none;
    padding-left: 1.4rem;       /* aligns under the name */
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text);
}
.verdict-reasons li {
    position: relative;
}
.verdict-reasons li::before {
    content: '·';
    position: absolute;
    left: -0.85rem;
    color: var(--text-dim);
}

.verdict-missing {
    margin-top: 1rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.verdict-missing strong { color: var(--text); font-weight: 600; }
.verdict-missing--pos { border-left: 2px dashed var(--color-pos); }
.verdict-missing--neg { border-left: 2px dashed var(--color-neg); }

.verdict-missing-list {
    list-style: none;
    margin: 0.4rem 0 0;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.verdict-missing-list li::before {
    content: '·';
    color: var(--text-dim);
    margin-left: -0.7rem;
    margin-right: 0.4rem;
}
.verdict-missing-score {
    font-variant-numeric: tabular-nums;
    color: var(--text);
    font-weight: 500;
}
.verdict-missing-reason { color: var(--text-muted); }

/* ── Back-Button (PWA navigation) ────────────────────────── */
/* Uses .btn.btn--pill in markup; only the page-relative margin is custom. */
.back-button { margin-bottom: 1rem; }
.back-button-arrow { font-size: 1rem; line-height: 1; }

/* ── Highlights "Mehr anzeigen" (Aufklapp) ───────────────── */

.highlights-more {
    margin-top: 0.85rem;
    border-top: 1px dashed var(--border);
    padding-top: 0.75rem;
}
.highlights-more > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    user-select: none;
    padding: 0.25rem 0;
}
.highlights-more > summary::-webkit-details-marker { display: none; }
.highlights-more > summary::before {
    content: '▸';
    display: inline-block;
    color: var(--text-muted);
    transition: transform var(--transition-fast) ease;
    width: 1ch;
}
.highlights-more[open] > summary::before { transform: rotate(90deg); }
.highlights-more > summary:hover { color: var(--text); }
.highlights-more-toggle { font-weight: 600; color: var(--text); }
.highlights-more-count {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.highlights-more-content {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.highlights-group { }
.highlights-group-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}
.highlights-more-content .highlights-list { margin: 0; }

/* ── Page header + footer (Heute) ────────────────────────── */

.page-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
}
.page-header h1 {
    margin: 0;
    line-height: 1.1;
}
.page-header-meta {
    color: var(--text-dim);
    font-size: 0.85rem;
}
.page-header-meta strong { color: var(--text); font-weight: 600; }

.page-footer-hint {
    margin: 2rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
    text-align: center;
}
.page-footer-hint a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dotted var(--border);
    margin: 0 0.15rem;
}
.page-footer-hint a:hover { color: var(--text-bright); border-bottom-color: currentColor; }

/* ── Highlights "hero" placement ─────────────────────────── */

.highlights-card--hero h2 { margin-top: 0; }
/* font/color come from the shared .card-title--prominent rule */

/* ── KPI deltas (7T + 30T inline) ────────────────────────── */

.kpi-deltas {
    display: flex;
    gap: 1rem;
    margin-top: 0.55rem;
    flex-wrap: wrap;
}
.kpi-delta-row {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
}
.kpi-delta-tag {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.kpi-deltas .kpi-delta { margin-left: 0; font-size: 0.85rem; }

/* ── Stack-Status-Karte ──────────────────────────────────── */

.stack-status-card { margin-bottom: 1.25rem; }
.stack-status-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.stack-status-head h2 { margin: 0; }
/* font/color come from the shared .card-title--prominent rule */
.stack-status-link {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-decoration: none;
}
.stack-status-link:hover { color: var(--text-bright); }

.stack-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.stack-status-col {
    background: var(--surface-2, var(--bg));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.9rem;
}
.stack-status-col-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}
.stack-status-col-title--pos { color: var(--color-pos); }
.stack-status-col-title--neg { color: var(--color-neg); }

.stack-status-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.stack-status-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.stack-status-list a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}
.stack-status-list a:hover { color: var(--text-bright); border-bottom-color: var(--border); }
.stack-status-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Two-column summary variant (Heute) ──────────────────── */

.summary-grid--two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) {
    .summary-grid--two { grid-template-columns: 1fr; }
}
