/* ==========================================================================
   The offer for teams (front/partials/team-offer): what one course costs as
   an order grows. A card the page draws where a picture of the offer stood,
   so its prices are the catalogue's of the day.

   It stands inside .lp, in the picture column of the section that tells how
   a course works, and wears the language of the landing: white glass under
   a line of light, emerald for a saving, amber for a deal, royal blue for
   the way forward, the two faces through the tokens of the page. It measures
   its own width (a container query), never the window's: the column is 460px
   on a small computer, 620px on a tablet and 284px on the narrowest phone.

   A step of the offer is a radio button of the card, printed before the
   list and the plate it rules. The sheet reads which one is checked: it
   moves the light plate under the step (.tof__thumb) and shows, of every
   figure of the plate, the one printed for that step (.tof__v). Six steps
   are written out; the fleet has four (App\Support\VolumeTiers). No script.

   Nothing here runs for ever. A figure that changes rises into place once,
   by transform and opacity alone, and stands still for a reader who asked
   for less motion. No word is held on one line: a longer language wraps,
   and a pill of two lines is a rounded plate.
   ========================================================================== */

.lp .tof {
    --tof-s: var(--lp-scale, 1);
    --tof-ink: var(--lp-ink, #0b1220);
    --tof-ink-2: var(--lp-ink-2, #253247);
    --tof-ink-3: var(--lp-ink-3, #3f4d66);
    --tof-green: var(--lp-green, #059669);
    --tof-green-ink: var(--lp-green-ink, #047857);
    --tof-green-deep: #065f46;
    --tof-amber-ink: #92400e;
    --tof-hair: rgba(6, 95, 70, 0.13);
    --tof-ease: var(--lp-ease, cubic-bezier(0.22, 1, 0.36, 1));
    --tof-display: var(--lp-font-display, var(--sc-font-display));
    --tof-body: var(--lp-font-body, var(--sc-font-body));
    --tof-pad: calc(28px * var(--tof-s));
    --tof-rise: tof-rise 0.32s var(--tof-ease) both;
    container: tof / inline-size;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: calc(26px * var(--tof-s));
    width: 100%;
    box-sizing: border-box;
    padding: calc(32px * var(--tof-s)) var(--tof-pad) var(--tof-pad);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--lp-radius, 26px);
    background:
        radial-gradient(calc(360px * var(--tof-s)) calc(230px * var(--tof-s)) at 100% 0%, rgba(253, 230, 138, 0.42) 0%, rgba(253, 230, 138, 0) 72%),
        radial-gradient(calc(340px * var(--tof-s)) calc(260px * var(--tof-s)) at 0% 100%, rgba(167, 243, 208, 0.4) 0%, rgba(167, 243, 208, 0) 72%),
        rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--lp-shadow, 0 28px 60px -34px rgba(30, 58, 138, 0.45)), 0 0 0 1px var(--lp-line, rgba(30, 58, 138, 0.1));
    overflow: hidden;
    font-family: var(--tof-body);
    color: var(--tof-ink);
    text-align: left;
}

/* The card says more than the steps beside it, so on a computer it takes a little more of the row
   and its box opens wider than the box of a picture. A browser without :has() keeps the two halves. */
@media (min-width: 1025px) {
    .lp .howItWorksInner:has(.tof) {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    }
}

.lp .hiwImageBox:has(.tof) {
    max-width: calc(620px * var(--lp-scale, 1));
}

/* the line of light along its top edge */
.lp .tof::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, #059669 0%, #34d399 28%, #fbbf24 62%, #f59e0b 100%);
}

/* said to a screen reader, never drawn */
.lp .tof__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   What the offer is
   -------------------------------------------------------------------------- */
.lp .tof__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.lp .tof__chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 calc(16px * var(--tof-s));
    padding: 6px 15px 6px 7px;
    border: 1px solid rgba(5, 150, 105, 0.22);
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.96) 0%, rgba(254, 243, 199, 0.92) 100%);
    box-shadow: 0 10px 20px -16px rgba(5, 150, 105, 0.7);
    font-family: var(--tof-body);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tof-green-deep);
}

.lp .tof__chipMark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    box-shadow: 0 6px 14px -8px rgba(5, 150, 105, 0.9);
    color: #ffffff;
}

.lp .tof__chipMark svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
}

.lp .tof__title {
    margin: 0;
    font-family: var(--tof-display);
    font-size: calc(31px * var(--tof-s));
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.028em;
    color: var(--tof-ink);
}

.lp .tof__lead {
    margin: calc(12px * var(--tof-s)) 0 0;
    font-size: calc(16.5px * var(--tof-s));
    font-weight: 500;
    line-height: 1.6;
    color: var(--tof-ink-2);
    text-wrap: pretty;
}

/* the largest saving, a figure and one word: the pair stays together */
.lp .tof__lead strong {
    font-weight: 800;
    color: var(--tof-green-ink);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   The steps: a list a visitor chooses from
   -------------------------------------------------------------------------- */
.lp .tof__calc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(14px * var(--tof-s));
}

/* the radio button of a step: on the page for the keyboard and a screen reader, drawn by its row */
.lp .tof__pick {
    position: absolute;
    top: calc(40px * var(--tof-s));
    left: 12px;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.lp .tof__askName {
    margin: 0;
    font-family: var(--tof-display);
    font-size: calc(16.5px * var(--tof-s));
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--tof-ink);
}

/* what the figures of the list are the price of */
.lp .tof__askNote {
    margin: 3px 0 0;
    font-size: calc(15px * var(--tof-s));
    font-weight: 500;
    line-height: 1.5;
    color: var(--tof-ink-2);
}

.lp .tof__tiers {
    --tof-at: 0;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-auto-rows: 1fr;
    column-gap: calc(12px * var(--tof-s));
    padding: 5px;
    border-radius: calc(21px * var(--tof-s));
    background: rgba(6, 95, 70, 0.055);
    box-shadow: inset 0 0 0 1px rgba(6, 95, 70, 0.1), inset 0 2px 4px -2px rgba(6, 95, 70, 0.12);
}

/* the light plate under the step that is chosen */
.lp .tof__thumb {
    position: absolute;
    z-index: 0;
    top: 5px;
    left: 5px;
    right: 5px;
    height: calc((100% - 10px) / var(--tof-n, 4));
    border-radius: calc(16px * var(--tof-s));
    background: #ffffff;
    box-shadow: 0 0 0 1.5px rgba(5, 150, 105, 0.62), 0 14px 26px -16px rgba(5, 150, 105, 0.8), 0 1px 2px rgba(15, 23, 42, 0.06);
    transform: translateY(calc(100% * var(--tof-at)));
    transition: transform 0.34s var(--tof-ease);
}

.lp .tof__tier {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(5.4em, auto);
    align-items: center;
    column-gap: calc(12px * var(--tof-s));
    min-height: calc(52px * var(--tof-s));
    margin: 0;
    padding: 8px calc(16px * var(--tof-s)) 8px calc(13px * var(--tof-s));
    box-sizing: border-box;
    border-radius: calc(16px * var(--tof-s));
    font-size: calc(15px * var(--tof-s));
    font-weight: 600;
    line-height: 1.25;
    color: var(--tof-ink-2);
    transition: background-color 0.18s var(--tof-ease);
}

@supports (grid-template-columns: subgrid) {
    .lp .tof__tier {
        grid-template-columns: subgrid;
    }
}

/* the seats of a row are the label of its radio button: it reaches over the whole row, so the row is pressed anywhere */
.lp .tof__hand {
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: var(--tof-hand, pointer);
    -webkit-tap-highlight-color: transparent;
}

.lp .tof__hand::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.lp .tof__dot {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 2px solid var(--tof-dot-line, rgba(6, 95, 70, 0.66));
    border-radius: 50%;
    background: var(--tof-dot-fill, #ffffff);
    transition: border-color 0.18s var(--tof-ease), background-color 0.18s var(--tof-ease);
}

.lp .tof__dot::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #ffffff;
    transform: scale(var(--tof-dot-on, 0));
    transition: transform 0.22s var(--tof-ease);
}

/* a figure and its word: side by side on a wide card, the word under the figure on a narrow one */
.lp .tof__seats,
.lp .tof__each {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 6px;
}

.lp .tof__each {
    justify-content: flex-end;
    text-align: right;
}

.lp .tof__no {
    font-family: var(--tof-display);
    font-size: calc(18px * var(--tof-s));
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tof-ink);
    transition: color 0.18s var(--tof-ease);
}

.lp .tof__each .tof__no {
    color: var(--tof-each-ink, var(--tof-ink));
}

.lp .tof__off {
    padding: 4px 11px;
    border-radius: 14px;
    background: var(--tof-off-fill, rgba(5, 150, 105, 0.13));
    font-size: calc(14px * var(--tof-s));
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    color: var(--tof-off-ink, var(--tof-green-deep));
    transition: background-color 0.18s var(--tof-ease), color 0.18s var(--tof-ease);
}

/* the rules alone, where no course can be priced: a list, not a choice */
.lp .tof--rules .tof__tiers {
    grid-template-columns: minmax(0, 1fr) auto;
}

.lp .tof--rules .tof__tier {
    grid-template-columns: minmax(0, 1fr) auto;
}

/* --------------------------------------------------------------------------
   The plate of the step that is chosen
   -------------------------------------------------------------------------- */
.lp .tof__plate {
    margin-top: calc(4px * var(--tof-s));
    border: 1px solid rgba(5, 150, 105, 0.22);
    border-radius: calc(22px * var(--tof-s));
    background: linear-gradient(180deg, #ecfdf5 0%, #f7fefb 30%, #ffffff 62%);
    box-shadow: 0 24px 42px -34px rgba(5, 150, 105, 0.85), inset 0 1px 0 #ffffff;
    overflow: hidden;
}

/* a figure of the plate is printed once a step; the one of the checked step is shown (the rules at the end) */
.lp .tof__v {
    display: none;
}

.lp .tof__price {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "name deal"
        "now now"
        "spare spare";
    align-items: center;
    column-gap: 12px;
    padding: calc(22px * var(--tof-s)) calc(22px * var(--tof-s)) calc(20px * var(--tof-s));
    background: radial-gradient(62% 120% at 100% 0%, rgba(253, 230, 138, 0.34) 0%, rgba(253, 230, 138, 0) 70%);
}

.lp .tof__priceName {
    grid-area: name;
    margin: 0;
    font-size: calc(15.5px * var(--tof-s));
    font-weight: 700;
    line-height: 1.3;
    color: var(--tof-ink-2);
}

.lp .tof__deal {
    grid-area: deal;
    margin: 0;
    padding: 6px 14px;
    border-radius: 17px;
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 58%, #f59e0b 100%);
    box-shadow: 0 12px 22px -14px rgba(217, 119, 6, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    font-family: var(--tof-display);
    font-size: calc(15.5px * var(--tof-s));
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: #78350f;
}

.lp .tof__now {
    grid-area: now;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px calc(14px * var(--tof-s));
    margin: calc(8px * var(--tof-s)) 0 0;
    line-height: 1;
}

/* as large as the card allows: a fifth of its width on a phone, 76px on a computer */
.lp .tof__fig--now {
    font-family: var(--tof-display);
    font-size: calc(76px * var(--tof-s));
    font-size: min(calc(76px * var(--tof-s)), 21cqi);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
    color: var(--tof-ink);
}

.lp .tof__sign,
.lp .tof__cents {
    display: inline-block;
    font-size: 0.5em;
    letter-spacing: -0.02em;
    transform: translateY(-0.74em);
}

.lp .tof__sign {
    margin-right: 0.06em;
}

.lp .tof__cents {
    margin-left: 0.04em;
}

.lp .tof__was {
    font-family: var(--tof-display);
    font-size: calc(24px * var(--tof-s));
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tof-ink-3);
}

/* struck in red, as the cart strikes the price nobody pays; the line is drawn on the figure itself,
   a box of its own that a line of its parent would not reach */
.lp .tof__was .tof__v {
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    text-decoration-thickness: 2px;
}

.lp .tof__spare {
    grid-area: spare;
    margin: calc(10px * var(--tof-s)) 0 0;
    font-size: calc(16px * var(--tof-s));
    font-weight: 600;
    line-height: 1.4;
    color: var(--tof-green-ink);
}

.lp .tof__spare .tof__fig {
    font-weight: 800;
}

/* the three sums of the order: the count takes the room of its name, the two sums of money share the rest */
.lp .tof__sums {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr);
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--tof-hair);
    border-bottom: 1px solid var(--tof-hair);
    background: rgba(255, 255, 255, 0.66);
}

.lp .tof__sum {
    padding: calc(15px * var(--tof-s)) calc(18px * var(--tof-s)) calc(15px * var(--tof-s)) calc(22px * var(--tof-s));
}

.lp .tof__sum + .tof__sum {
    border-left: 1px solid var(--tof-hair);
    padding-left: calc(18px * var(--tof-s));
}

.lp .tof__sum dt {
    margin: 0;
    font-size: calc(14.5px * var(--tof-s));
    font-weight: 600;
    line-height: 1.3;
    color: var(--tof-ink-2);
}

.lp .tof__sum dd {
    margin: 5px 0 0;
    font-family: var(--tof-display);
    font-size: calc(25px * var(--tof-s));
    font-size: min(calc(25px * var(--tof-s)), 5.4cqi);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--tof-ink);
}

.lp .tof__sum--save dd {
    color: var(--tof-green-ink);
}

/* the courses of the example */
.lp .tof__order {
    padding: calc(18px * var(--tof-s)) calc(22px * var(--tof-s)) calc(22px * var(--tof-s));
}

.lp .tof__orderName {
    margin: 0 0 calc(12px * var(--tof-s));
    font-size: calc(15.5px * var(--tof-s));
    font-weight: 700;
    line-height: 1.35;
    color: var(--tof-ink);
}

.lp .tof__lines {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lp .tof__line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: calc(12px * var(--tof-s));
    margin: 0;
    padding: 6px calc(13px * var(--tof-s)) 6px 6px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    background-clip: padding-box;
    box-shadow: 0 0 0 1px rgba(30, 58, 138, 0.1), 0 10px 18px -16px rgba(30, 58, 138, 0.5);
}

.lp .tof__lineSeats {
    display: block;
    min-width: calc(66px * var(--tof-s));
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(5, 150, 105, 0.11);
    font-family: var(--tof-display);
    font-size: calc(15px * var(--tof-s));
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    color: var(--tof-green-deep);
}

.lp .tof__lineName {
    font-size: calc(16px * var(--tof-s));
    font-weight: 600;
    line-height: 1.35;
    color: var(--tof-ink);
    white-space: normal;
    overflow-wrap: anywhere;
}

.lp .tof__lineUnit {
    font-size: calc(15px * var(--tof-s));
    font-weight: 600;
    line-height: 1.35;
    text-align: right;
    color: var(--tof-ink-2);
}

.lp .tof__lineUnit .tof__fig {
    font-family: var(--tof-display);
    font-weight: 800;
    color: var(--tof-ink);
}

/* any other course joins the order */
.lp .tof__line--more {
    padding-top: 8px;
    padding-bottom: 8px;
    border: 1.5px dashed rgba(5, 150, 105, 0.45);
    background: none;
    box-shadow: none;
}

.lp .tof__line--more .tof__lineSeats {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.3);
    font-size: calc(19px * var(--tof-s));
    line-height: 1;
    color: var(--tof-green-ink);
}

.lp .tof__lineNote {
    grid-column: 2 / -1;
    font-size: calc(15px * var(--tof-s));
    font-weight: 500;
    line-height: 1.5;
    color: var(--tof-ink-2);
}

/* --------------------------------------------------------------------------
   The savings of a smaller order
   -------------------------------------------------------------------------- */
.lp .tof__moreName {
    margin: 0 0 calc(12px * var(--tof-s));
    font-family: var(--tof-display);
    font-size: calc(16.5px * var(--tof-s));
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--tof-ink);
}

.lp .tof__deals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(12px * var(--tof-s));
    margin: 0;
    padding: 0;
    list-style: none;
}

.lp .tof__dealCard {
    display: flex;
    align-items: center;
    gap: calc(12px * var(--tof-s));
    margin: 0;
    padding: calc(12px * var(--tof-s)) calc(14px * var(--tof-s));
    border-radius: calc(16px * var(--tof-s));
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.24), 0 12px 20px -18px rgba(180, 83, 9, 0.6);
}

.lp .tof__dealCard .spot {
    flex: 0 0 auto;
}

.lp .tof__dealWords {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lp .tof__dealValue {
    font-family: var(--tof-display);
    font-size: calc(20px * var(--tof-s));
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--tof-amber-ink);
}

.lp .tof__dealRule {
    font-size: calc(14.5px * var(--tof-s));
    font-weight: 600;
    line-height: 1.4;
    color: var(--tof-ink-2);
}

.lp .tof__small {
    margin: calc(10px * var(--tof-s)) 0 0;
    font-size: calc(14px * var(--tof-s));
    font-weight: 500;
    line-height: 1.5;
    color: var(--tof-ink-3);
}

/* --------------------------------------------------------------------------
   The way forward
   -------------------------------------------------------------------------- */
.lp .tof__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: calc(58px * var(--tof-s));
    box-sizing: border-box;
    padding: 10px calc(26px * var(--tof-s));
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: calc(29px * var(--tof-s));
    background: linear-gradient(135deg, var(--lp-navy, #1e3a5f) 0%, var(--lp-blue, #2563eb) 55%, var(--lp-blue-deep, #1d4ed8) 100%);
    background-size: 160% 100%;
    background-position: 0% 50%;
    box-shadow: 0 18px 34px -16px rgba(37, 99, 235, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    font-family: var(--tof-display);
    font-size: calc(16.5px * var(--tof-s));
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.005em;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s var(--tof-ease), box-shadow 0.2s var(--tof-ease), background-position 0.45s var(--tof-ease);
}

.lp .tof__button:hover,
.lp .tof__button:focus {
    color: #ffffff;
    text-decoration: none;
}

.lp .tof__button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.32), 0 18px 34px -16px rgba(37, 99, 235, 0.75);
}

.lp .tof__button:active {
    transform: translateY(0) scale(0.99);
}

.lp .tof__button svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.25s var(--tof-ease);
}

.lp .tof__notes {
    display: grid;
    gap: calc(10px * var(--tof-s));
    margin: calc(18px * var(--tof-s)) 0 0;
    padding: 0;
    list-style: none;
}

.lp .tof__note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 11px;
    margin: 0;
    font-size: calc(15px * var(--tof-s));
    font-weight: 500;
    line-height: 1.5;
    color: var(--tof-ink-2);
}

.lp .tof__note svg {
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    padding: 5px;
    border-radius: 50%;
    background: rgba(5, 150, 105, 0.14);
    fill: none;
    stroke: var(--tof-green-ink);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   The step that is checked: where the light plate stands, how its row is
   drawn, which figure of the plate is shown, and the ring of the keyboard
   -------------------------------------------------------------------------- */
.lp .tof__pick:nth-of-type(2):checked ~ .tof__tiers { --tof-at: 1; }
.lp .tof__pick:nth-of-type(3):checked ~ .tof__tiers { --tof-at: 2; }
.lp .tof__pick:nth-of-type(4):checked ~ .tof__tiers { --tof-at: 3; }
.lp .tof__pick:nth-of-type(5):checked ~ .tof__tiers { --tof-at: 4; }
.lp .tof__pick:nth-of-type(6):checked ~ .tof__tiers { --tof-at: 5; }

.lp .tof__pick:nth-of-type(1):checked ~ .tof__tiers .tof__tier:nth-of-type(1),
.lp .tof__pick:nth-of-type(2):checked ~ .tof__tiers .tof__tier:nth-of-type(2),
.lp .tof__pick:nth-of-type(3):checked ~ .tof__tiers .tof__tier:nth-of-type(3),
.lp .tof__pick:nth-of-type(4):checked ~ .tof__tiers .tof__tier:nth-of-type(4),
.lp .tof__pick:nth-of-type(5):checked ~ .tof__tiers .tof__tier:nth-of-type(5),
.lp .tof__pick:nth-of-type(6):checked ~ .tof__tiers .tof__tier:nth-of-type(6) {
    --tof-dot-line: var(--tof-green);
    --tof-dot-fill: var(--tof-green);
    --tof-dot-on: 1;
    --tof-off-fill: var(--tof-green-ink);
    --tof-off-ink: #ffffff;
    --tof-each-ink: var(--tof-green-ink);
    --tof-hand: default;
}

.lp .tof__pick:nth-of-type(1):checked ~ .tof__plate .tof__v:nth-child(1),
.lp .tof__pick:nth-of-type(2):checked ~ .tof__plate .tof__v:nth-child(2),
.lp .tof__pick:nth-of-type(3):checked ~ .tof__plate .tof__v:nth-child(3),
.lp .tof__pick:nth-of-type(4):checked ~ .tof__plate .tof__v:nth-child(4),
.lp .tof__pick:nth-of-type(5):checked ~ .tof__plate .tof__v:nth-child(5),
.lp .tof__pick:nth-of-type(6):checked ~ .tof__plate .tof__v:nth-child(6) {
    display: inline-block;
    animation: var(--tof-rise);
}

.lp .tof__pick:nth-of-type(1):focus-visible ~ .tof__tiers .tof__tier:nth-of-type(1),
.lp .tof__pick:nth-of-type(2):focus-visible ~ .tof__tiers .tof__tier:nth-of-type(2),
.lp .tof__pick:nth-of-type(3):focus-visible ~ .tof__tiers .tof__tier:nth-of-type(3),
.lp .tof__pick:nth-of-type(4):focus-visible ~ .tof__tiers .tof__tier:nth-of-type(4),
.lp .tof__pick:nth-of-type(5):focus-visible ~ .tof__tiers .tof__tier:nth-of-type(5),
.lp .tof__pick:nth-of-type(6):focus-visible ~ .tof__tiers .tof__tier:nth-of-type(6) {
    outline: 3px solid rgba(37, 99, 235, 0.6);
    outline-offset: 2px;
}

@keyframes tof-rise {
    from { opacity: 0; transform: translateY(0.16em); }
    to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
    .lp .tof__tier:hover {
        background-color: rgba(255, 255, 255, 0.62);
    }

    .lp .tof--rules .tof__tier:hover {
        background-color: transparent;
    }

    .lp .tof__button:hover {
        transform: translateY(-2px);
        background-position: 100% 50%;
        box-shadow: 0 26px 44px -16px rgba(37, 99, 235, 0.85), 0 0 0 6px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    .lp .tof__button:hover svg {
        transform: translateX(4px);
    }
}

/* --------------------------------------------------------------------------
   A narrow card: a phone, and the column of a small computer. A container
   is measured inside its padding: 429px here is a card of about 485px.
   -------------------------------------------------------------------------- */
@container tof (max-width: 429px) {
    .lp .tof__title {
        font-size: calc(27px * var(--tof-s));
    }

    .lp .tof__lead {
        font-size: calc(16px * var(--tof-s));
    }

    /* the word of a figure goes under it, so the three parts of a row keep one line */
    .lp .tof__tiers,
    .lp .tof__tier {
        column-gap: 10px;
    }

    .lp .tof__tier {
        min-height: 56px;
        padding: 7px 13px 7px 11px;
        font-size: 14px;
        line-height: 1.2;
    }

    .lp .tof__seats,
    .lp .tof__each {
        flex-direction: column;
        align-items: flex-start;
    }

    .lp .tof__each {
        align-items: flex-end;
    }

    .lp .tof__price {
        padding: 18px 16px 16px;
    }

    .lp .tof__was {
        font-size: 21px;
    }

    /* the sums stand one under another: the name on the left, the figure on the right */
    .lp .tof__sums {
        grid-template-columns: minmax(0, 1fr);
    }

    .lp .tof__sum,
    .lp .tof__sum + .tof__sum {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 11px 16px;
    }

    .lp .tof__sum + .tof__sum {
        border-left: 0;
        border-top: 1px solid var(--tof-hair);
    }

    .lp .tof__sum dd {
        margin: 0;
        font-size: 21px;
    }

    .lp .tof__order {
        padding: 16px 16px 18px;
    }

    /* the price of a course of the example goes under its name */
    .lp .tof__line {
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 1px;
    }

    .lp .tof__lineSeats {
        grid-row: 1 / span 2;
        min-width: 58px;
    }

    .lp .tof__line--more .tof__lineSeats {
        grid-row: auto;
    }

    .lp .tof__lineUnit {
        grid-column: 2;
        text-align: left;
    }

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

/* the narrowest phone: the row is told by its light plate alone */
@container tof (max-width: 269px) {
    .lp .tof__dot {
        display: none;
    }

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

    .lp .tof__tier {
        grid-template-columns: minmax(0, 1fr) auto minmax(4.6em, auto);
        padding-left: 13px;
    }

    @supports (grid-template-columns: subgrid) {
        .lp .tof__tier {
            grid-template-columns: subgrid;
        }
    }
}

/* a phone: the padding of a card of the page there (a container cannot ask its own width) */
@media (max-width: 640px) {
    .lp .tof {
        --tof-pad: 18px;
        gap: 24px;
        padding-top: 26px;
        padding-bottom: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp .tof {
        --tof-rise: none;
    }

    .lp .tof__thumb,
    .lp .tof__dot,
    .lp .tof__dot::after,
    .lp .tof__button,
    .lp .tof__button svg {
        transition: none;
    }
}
