/* ══ Workout plan generator ══ */
.tool {
    margin-bottom: 72px;
    scroll-margin-top: calc(var(--header-h) + 16px);
}

.plan-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 820px) {
    .plan-form {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr) minmax(0, 0.9fr);
        gap: 24px;
    }
}

/* Three to four options per row: let long labels wrap instead of overflowing on phones */
.plan-form .seg span {
    padding: 6px 8px;
    text-align: center;
    line-height: 1.2;
    font-size: 0.92rem;
}

.f-hint {
    margin-top: 8px;
    min-height: 1.4em;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
}

/* Reference tables with sentences, not numbers: left-aligned and wrapping */
.std--text {
    min-width: 0;
}

.std--text th,
.std--text td,
.std--text thead th {
    padding-right: 14px;
    text-align: left;
    white-space: normal;
    vertical-align: top;
}

/* Phones: each row becomes a short block instead of three cramped columns */
@media (max-width: 619px) {
    .std--text thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .std--text tr {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .std--text tbody th,
    .std--text td {
        display: block;
        padding: 0;
        border: none;
    }

    .std--text td {
        margin-top: 2px;
        color: var(--muted);
    }

    .std--text td:nth-child(2) {
        color: #e6e9eb;
    }
}

/* ── Result ────────────────────────────────────────── */
.plan-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 26px;
}

.plan-title {
    margin: 4px 0 0;
    font-family: inherit;
    font-weight: 800;
    font-size: clamp(1.7rem, 5.6vw, 2.5rem);
    line-height: 1.12;
    letter-spacing: -0.8px;
    color: #fff;
}

.plan-title .accent {
    color: var(--gold);
}

.plan-sum {
    margin-top: 8px;
    color: #e6e9eb;
    font-variant-numeric: tabular-nums;
}

.plan-sum span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
}

.plan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
}

.warmup {
    margin-top: 22px;
    padding: 12px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.9rem;
    color: var(--body);
}

.days {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 34px 28px;
    margin-top: 30px;
}

@media (min-width: 820px) {
    .days {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.day-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.day-num {
    font-weight: 800;
    font-size: 3rem;
    line-height: 0.9;
    letter-spacing: -1.5px;
    color: transparent;
    -webkit-text-stroke: 1.3px var(--gold);
    font-variant-numeric: tabular-nums;
}

.content .day-head h3 {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-transform: none;
    color: #fff;
}

.day-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.84rem;
    color: var(--muted);
}

.day .session {
    width: 100%;
}

.day .session td {
    width: 1%;
    white-space: nowrap;
    vertical-align: top;
}

.session .nx {
    display: block;
    margin-top: 3px;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--muted);
}

.plan-note {
    margin-top: 22px;
    font-size: 0.88rem;
    color: var(--muted);
}

.tool [hidden] {
    display: none !important;
}

/* Updating the plan: a short fade so the change is noticed */
.days.is-new {
    animation: planIn 0.35s ease;
}

@keyframes planIn {
    from {
        opacity: 0.25;
        transform: translateY(6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .days.is-new {
        animation: none;
    }
}

/* ── Print: the plan only, black on white ──────────── */
@media print {
    @page {
        margin: 14mm;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .site-header,
    .hero,
    .plan-form,
    .plan-actions,
    .app-cta,
    .content>section:not(.tool),
    .promo,
    .related,
    .site-footer {
        display: none !important;
    }

    .single {
        padding-top: 0;
    }

    .plan-top {
        padding-top: 0;
    }

    .plan-title,
    .plan-title .accent,
    .plan-sum,
    .content .day-head h3,
    .session th,
    .session td,
    .warmup,
    .plan-note {
        color: #000 !important;
    }

    .day-num {
        -webkit-text-stroke: 1px #000;
    }

    .session,
    .session caption {
        background: none;
    }

    .session th,
    .session td {
        padding: 7px 4px;
        border-bottom: 1px solid #ccc;
    }

    .session th a {
        color: #000;
        text-decoration: none;
    }

    .day {
        break-inside: avoid;
    }

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