/* Calculator pages (/tools/).
 *
 * Everything here is scoped under .tools-page or a .tool-/.plate-/.e1rm-/
 * .round-/.pct- prefix, so nothing collides with app.css -- tests/test_css_split.py
 * fails the build if two sheets claim the same selector.
 *
 * Colours come from the tokens in core.css rather than literals, so dark mode
 * works without a second copy of every rule.
 */

.tools-page {
    max-width: 1100px;
}

/* ---- Hub ---- */

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--border-radius);
    background: var(--bs-body-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tool-card:hover,
.tool-card:focus-visible {
    border-color: var(--brand-teal);
    box-shadow: var(--box-shadow);
    transform: translateY(-2px);
}

.tool-card-icon {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--brand-teal);
}

.tool-beta {
    font-size: 0.6em;
    font-weight: 600;
    letter-spacing: 0.04em;
    vertical-align: 0.2em;
}

@media print {
    .tool-beta,
    .tool-estimate-note { display: none; }
}

.tool-card-title {
    font-weight: 600;
}

.tool-card-blurb {
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* ---- Shared tool chrome ---- */

.tool-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--border-radius);
    box-shadow: none;
}

.tool-result-panel {
    background: color-mix(in srgb, var(--brand-teal) 6%, var(--bs-body-bg));
}

.tool-warning {
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--brand-brick);
    background: color-mix(in srgb, var(--brand-brick) 8%, transparent);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: 0.9rem;
}

.tools-footnote {
    font-size: 0.9rem;
}

.tools-notes code {
    font-size: 0.85em;
}

/* ---- Plate calculator ---- */

.plate-inventory {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.plate-row {
    display: grid;
    grid-template-columns: 1.25rem 3.5rem 1fr;
    align-items: center;
    gap: 0.6rem;
}

.plate-chip {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 1px solid var(--bs-border-color);
    flex: none;
}

.plate-weight {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.plate-total {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.plate-total span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
}

.plate-stack {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.plate-stack li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-variant-numeric: tabular-nums;
}

.plate-bar {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0.5rem 0 0.75rem;
}

.plate-bar-sleeve {
    fill: var(--brand-fog);
}

.plate-bar-collar {
    fill: var(--brand-navy);
}

.plate-bar-plate {
    stroke: rgba(0, 0, 0, 0.35);
    stroke-width: 1;
}

.plate-per-side-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.35rem;
}

/* ---- One-rep max ---- */

.e1rm-headline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.e1rm-effective {
    font-size: 0.875rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--border-radius);
    background: color-mix(in srgb, var(--brand-teal) 8%, transparent);
}

.e1rm-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.e1rm-row {
    display: grid;
    grid-template-columns: 6rem auto 1fr;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.e1rm-row-unavailable {
    opacity: 0.6;
}

.e1rm-name {
    font-weight: 600;
}

.e1rm-value {
    font-variant-numeric: tabular-nums;
    font-size: 1.1rem;
}

.e1rm-note {
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
}

.e1rm-confidence {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    background: color-mix(in srgb, var(--brand-fog) 30%, transparent);
}

.e1rm-confidence-low {
    background: color-mix(in srgb, var(--brand-brick) 10%, transparent);
}

.pct-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 1rem;
}

.pct-list li {
    display: flex;
    justify-content: space-between;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 0.2rem;
}

/* ---- Rounding ---- */

.round-headline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.round-brackets {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.round-brackets li {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-variant-numeric: tabular-nums;
}

/* ---- Points calculator ---- */

.points-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.points-row {
    display: grid;
    grid-template-columns: 1fr auto 5rem;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.points-row-primary .points-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-teal);
}

.points-name {
    font-weight: 600;
}

.points-value {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.points-coeff {
    text-align: right;
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
    font-variant-numeric: tabular-nums;
}

.points-headline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.points-headline span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
}

.points-reverse-detail {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.points-reverse-detail li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-variant-numeric: tabular-nums;
}

.points-gap {
    margin-top: 0.75rem;
    margin-bottom: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    background: color-mix(in srgb, var(--brand-teal) 8%, transparent);
    font-size: 0.9rem;
}

.points-gap-clear {
    background: color-mix(in srgb, var(--success-color) 12%, transparent);
}

/* ---- Attempt selection ---- */

.attempt-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attempt-lift {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    background: var(--bs-body-bg);
}

.attempt-lift-empty {
    opacity: 0.55;
}

.share-box {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.share-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.share-row input {
    flex: 1 1 16rem;
}

.share-qr {
    display: block;
    width: 8rem;
    height: 8rem;
    margin-top: 0.75rem;
    background: #fff;
    padding: 0.25rem;
    border-radius: var(--border-radius);
}

@media print {
    .share-box { display: none; }
}

.attempt-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.attempt-table th,
.attempt-table td {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid var(--bs-border-color);
    text-align: right;
}

.attempt-table thead th,
.attempt-table tbody th {
    text-align: left;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.attempt-table tr:last-child th,
.attempt-table tr:last-child td {
    border-bottom: 0;
}

.attempt-row-plan th,
.attempt-row-plan td {
    font-weight: 600;
    color: var(--bs-body-color);
}

.attempt-lift-name {
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.attempt-ladder {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: attempt;
}

.attempt-ladder li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-variant-numeric: tabular-nums;
}

.attempt-ladder li:last-child {
    border-bottom: none;
}

.attempt-ladder li:last-child strong {
    color: var(--brand-teal);
}

.attempt-ordinal {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bs-secondary-color, #6c757d);
}

.attempt-note {
    margin: 0.4rem 0 0;
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
}

.attempt-total {
    grid-column: 1 / -1;
    margin: 0.75rem 0 0;
    font-size: 1.05rem;
}

.attempt-score {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--bs-secondary-color, #6c757d);
}

.attempt-strain {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: color-mix(in srgb, var(--success-color) 12%, transparent);
}

.attempt-strain-stretch {
    background: color-mix(in srgb, var(--warning-color) 18%, transparent);
}

.attempt-strain-unrealistic {
    background: color-mix(in srgb, var(--brand-brick) 12%, transparent);
}

/* ---- Warmup planner ---- */

.warmup-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: warmup;
}

.warmup-row {
    display: grid;
    grid-template-columns: 4rem 1fr auto;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.warmup-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
}

.warmup-what {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.warmup-weight {
    font-variant-numeric: tabular-nums;
}

.warmup-plates {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    font-variant-numeric: tabular-nums;
}

.plate-bar-compact {
    width: auto;
    height: 26px;
    max-width: 150px;
    margin: 0;
    flex: none;
}

.warmup-cue {
    text-align: right;
    font-size: 0.85rem;
    color: var(--brand-teal);
    white-space: nowrap;
}

/* The moment the plan exists for. */
.warmup-cue-call {
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--brand-navy);
}

.warmup-row-attempt {
    border-top: 2px solid var(--brand-teal);
    border-bottom: none;
    padding-top: 0.75rem;
    font-size: 1.05rem;
}

.warmup-row-task .warmup-what strong {
    font-weight: 500;
    font-style: italic;
}

.warmup-state-done {
    opacity: 0.45;
}

.warmup-state-now {
    background: color-mix(in srgb, var(--brand-teal) 10%, transparent);
}

/* Live mode is read at arm's length in a loud warmup room. */
.warmup-live-panel .warmup-live-now strong,
.warmup-live-panel .warmup-live-next strong {
    font-size: 1.35rem;
    line-height: 1.2;
    display: block;
}

.warmup-live-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
}

.warmup-live-next {
    margin-top: 0.75rem;
}

.warmup-live-cue {
    color: var(--brand-teal);
    font-size: 0.95rem;
}

.warmup-live-confidence {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* ---- Warmup editors ---- */

.ladder-head,
.ladder-row {
    display: grid;
    grid-template-columns: 1.5rem 1fr 4rem 4.5rem 2rem;
    gap: 0.4rem;
    align-items: center;
}

.ladder-row {
    margin-bottom: 0.35rem;
}

.ladder-head {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.25rem;
}

.ladder-ordinal {
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.85rem;
}

.ladder-rest-fixed {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    text-align: center;
}

.task-row {
    display: grid;
    grid-template-columns: 1fr 4rem 8rem 2rem;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.break-head,
.break-row {
    display: grid;
    grid-template-columns: 1fr 3.5rem 6rem 6rem 6rem 4rem 2rem;
    gap: 0.4rem;
    align-items: center;
}

.break-row {
    margin-bottom: 0.35rem;
}

.break-head {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.25rem;
}

.warmup-gap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    /* Deliberately generous: this is the seam between two lifts, and the point
     * is that it reads as a break in the day rather than another row. */
    margin: 1.5rem 0;
    padding: 0.5rem 0.75rem;
    border-top: 2px solid var(--bs-border-color);
    border-bottom: 2px solid var(--bs-border-color);
    background: color-mix(in srgb, var(--brand-fog) 22%, transparent);
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
}

.warmup-gap-free {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--brand-navy);
    white-space: nowrap;
}

.warmup-gap-done,
.warmup-gap-next {
    font-variant-numeric: tabular-nums;
}

.warmup-gap-next {
    text-align: right;
}

.warmup-lift {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    background: var(--brand-fog);
    color: var(--brand-navy);
    vertical-align: middle;
    margin-right: 0.25rem;
}

.lift-tab {
    min-width: 4.5rem;
}

.warmup-row-attempt .warmup-what strong::before {
    content: '';
}

.warmup-live-idle {
    margin: 0;
    padding: 0.75rem 0.9rem;
    border-radius: var(--border-radius);
    background: color-mix(in srgb, var(--brand-fog) 35%, transparent);
    font-size: 0.9rem;
}

.tz-override summary {
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
    cursor: pointer;
}

.warmup-live-break {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--border-radius);
    background: color-mix(in srgb, var(--warning-color) 22%, transparent);
    font-weight: 600;
}

.attempt-foot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.attempt-manual {
    width: 100%;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* A number the handler typed, not one the maths produced. */
.attempt-manual-set {
    border-color: var(--brand-teal);
    font-weight: 700;
}

.attempt-derived {
    color: var(--brand-teal);
}

.print-card {
    display: none;
}

/* Print-only branding. Hidden on screen; see the print block below. */
.tools-print-header,
.tools-print-footer {
    display: none;
}

/* ---- Responsive and print, last so they cover every section above ---- */

@media (max-width: 575.98px) {
    .plate-total,
    .e1rm-headline,
    .round-headline,
    .points-headline {
        font-size: 1.75rem;
    }

    .points-row-primary .points-value {
        font-size: 1.35rem;
    }

    .points-row {
        grid-template-columns: 1fr auto;
    }

    .points-coeff {
        display: none;
    }

    .attempt-grid {
        grid-template-columns: 1fr;
    }

    .attempt-range {
        font-size: 0.85rem;
    }

    .warmup-row {
        grid-template-columns: 3.5rem 1fr;
    }

    .warmup-cue {
        grid-column: 2;
        text-align: left;
    }

    .ladder-head {
        display: none;
    }

    .ladder-row {
        grid-template-columns: 1.25rem 1fr 3rem 3.5rem 2rem;
    }

    .task-row {
        grid-template-columns: 1fr 3.5rem 2rem;
    }

    .task-row .task-after {
        grid-column: 1 / -1;
    }

    .break-head {
        display: none;
    }

    .break-row {
        grid-template-columns: 1fr 3.5rem 2rem;
    }

    .break-row .break-lift,
    .break-row .break-flight,
    .break-row .break-round,
    .break-row .break-lifter {
        grid-column: 1 / -1;
    }

    .pct-list {
        grid-template-columns: 1fr;
    }
}

/* Printed from home before a meet, which is the point of the print styles
 * here -- the interactive controls are noise on paper. */
@media print {
    /* Two inks, used for hierarchy and nothing else.
     *
     *   navy  #1E2A45  every structural rule and heading
     *   teal  #0E7F93  reserved for the lift name and the opener row
     *
     * Everything else is greyscale. Colour on a comp card has one job -- get
     * the eye to the opener -- and spreading it over clocks, labels and section
     * fills made the sheet louder without making it clearer. Literals rather
     * than tokens, because print must not depend on the active theme.
     *
     * Nothing depends on a background printing. Browsers default to background
     * graphics OFF, and the earlier filled bands vanished entirely when they
     * were: fills are now an enhancement over rules that carry the structure
     * on their own. */
    body,
    .tools-page {
        background: #fff !important;
    }

    .tool-root > *:not(.print-card),
    .tools-footnote,
    .tools-notes,
    .tool-card,
    nav[aria-label="breadcrumb"],
    footer,
    .navbar,
    .alert,
    .bg-warning,
    .bg-danger,
    .tools-print-header {
        display: none !important;
    }

    .tools-print-footer {
        display: block !important;
        margin-top: 0.4rem;
        padding-top: 0.2rem;
        border-top: 1px solid #C9D2D8;
        font-size: 6.5pt;
        color: #5B6675;
    }

    .print-card {
        display: block !important;
        font-size: 8pt;
        color: #1E2A45;
        background: #fff;
    }

    .card-head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 3px solid #1E2A45;
        padding-bottom: 0.3rem;
        margin-bottom: 0.45rem;
    }

    /* Findable in a pile: the athlete's name is the biggest thing on the page. */
    .card-name {
        font-size: 24pt;
        font-weight: 800;
        letter-spacing: -0.015em;
        margin: 0;
        line-height: 1;
    }

    .card-brand {
        text-align: right;
        line-height: 1.05;
        white-space: nowrap;
    }

    .card-brand img {
        height: 34px;
        width: auto;
        vertical-align: middle;
        margin-right: 0.3rem;
    }

    .card-wordmark {
        font-size: 18pt;
        font-weight: 800;
        letter-spacing: -0.01em;
        vertical-align: middle;
    }

    .card-vbt { color: #E24955; }

    .card-url {
        display: block;
        font-size: 7pt;
        color: #5B6675;
        margin-top: 0.1rem;
    }

    /* How a handler picks the right sheet out of a pile. */
    .card-facts {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 0.7fr 0.7fr 1fr;
        gap: 0.3rem;
        margin-bottom: 0.5rem;
    }

    .card-fact {
        border-left: 2px solid #C9D2D8;
        padding-left: 0.3rem;
    }

    .card-fact span {
        display: block;
        font-size: 5.5pt;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #6B7684;
        font-weight: 700;
    }

    .card-fact strong { font-size: 9.5pt; }

    /* Ruled, not filled: identical with background graphics on or off. */
    .card-section {
        font-size: 8.5pt;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.14em;
        color: #1E2A45;
        border-top: 2.5px solid #1E2A45;
        border-bottom: 1px solid #1E2A45;
        padding: 0.12rem 0 0.1rem;
        margin: 0.55rem 0 0.35rem;
    }

    .card-setup {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
    }

    .card-setup-item {
        border: 1px solid #C9D2D8;
        padding: 0.12rem 0.28rem;
        min-height: 1.7rem;
    }

    .card-setup-item > span:first-child {
        display: block;
        font-size: 5.5pt;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #6B7684;
        font-weight: 700;
    }

    .card-setup-value { font-size: 10pt; font-weight: 700; }

    .card-cols {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .card-col { break-inside: avoid; }

    /* One of the two things teal is spent on. */
    .card-col h4 {
        font-size: 10pt;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: #0E7F93;
        border-bottom: 2px solid #0E7F93;
        padding-bottom: 0.06rem;
        margin: 0 0 0.25rem;
    }

    .card-attempts {
        width: 100%;
        border-collapse: collapse;
        font-variant-numeric: tabular-nums;
    }

    .card-attempts th,
    .card-attempts td {
        padding: 0.16rem 0.24rem;
        text-align: right;
        font-size: 10.5pt;
        border-bottom: 1px solid #E7ECEF;
    }

    .card-attempts thead th {
        font-size: 6.5pt;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #6B7684;
        border-bottom: 1px solid #C9D2D8;
    }

    .card-attempts tbody th {
        text-align: left;
        font-weight: 400;
        font-size: 7.5pt;
        color: #6B7684;
    }

    /* Weight and rules, not a fill: the planned row has to stand out on a
     * photocopy and with background graphics switched off. */
    .card-attempts tr.card-plan td,
    .card-attempts tr.card-plan th {
        font-weight: 800;
        font-size: 12pt;
        color: #1E2A45;
        border-top: 1.5px solid #1E2A45;
        border-bottom: 1.5px solid #1E2A45;
    }

    .card-attempts tr.card-plan th { font-size: 7.5pt; }
    .card-attempts .card-declared th { font-weight: 700; color: #1E2A45; }
    .card-overridden { font-weight: 800; text-decoration: underline; }

    /* Every lift's list is padded to the same length, so the nth warmup sits on
     * the same line across all three columns. */
    .card-ladder {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .card-set {
        display: grid;
        grid-template-columns: 3.1em 1fr auto;
        grid-template-areas: "clock what plates" "cue cue cue";
        gap: 0 0.25rem;
        align-items: baseline;
        /* Faint rule and open space rather than a ruled box: the handler writes
         * in the gap, and a printed line beside every set was clutter. */
        border-bottom: 1px solid #E7ECEF;
        min-height: 2.9rem;
        padding: 0.16rem 0 0.12rem;
    }

    .card-set-blank { border-bottom: 1px solid #F2F5F6; }

    .card-clock { grid-area: clock; font-size: 8.5pt; color: #6B7684; font-weight: 600; }
    .card-what { grid-area: what; font-weight: 700; font-size: 11pt; white-space: nowrap; }
    .card-plates { grid-area: plates; }
    .card-cue { grid-area: cue; font-size: 7pt; color: #6B7684; }
    .card-reps { font-weight: 400; color: #6B7684; font-size: 8pt; margin-left: 0.1em; }

    .card-plates .plate-bar-compact {
        height: 13px;
        max-width: 52px;
        margin: 0;
        vertical-align: middle;
    }

    /* The other thing teal is spent on: the row the whole sheet exists for. */
    .card-set-opener {
        border-top: 2.5px solid #0E7F93;
        border-bottom: 2.5px solid #0E7F93;
    }

    .card-set-opener .card-what { font-size: 13pt; color: #0E7F93; }
    .card-set-opener .card-clock { color: #0E7F93; }
    .card-set-opener .card-cue {
        font-weight: 800;
        color: #0E7F93;
        font-size: 8pt;
        letter-spacing: 0.04em;
    }

    .card-lift-end {
        display: flex;
        justify-content: space-between;
        gap: 0.3rem;
        margin-top: 0.2rem;
        font-size: 7.5pt;
        color: #6B7684;
        min-height: 0.9rem;
    }

    .card-free { font-weight: 700; color: #1E2A45; }
    .card-empty { font-size: 8pt; color: #8A939F; margin: 0; }

    .card-notes {
        margin-top: 0.5rem;
        border: 1px solid #C9D2D8;
    }

    .card-notes-label {
        display: block;
        font-size: 5.5pt;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #6B7684;
        font-weight: 700;
        padding: 0.12rem 0.3rem 0;
    }

    .card-notes-space { height: 16mm; }

    /* One sheet, always: a second page defeats the point of a paper fallback. */
    .print-card,
    .card-cols,
    .card-col {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    @page {
        size: A4 portrait;
        margin: 9mm;
    }
}
