/* ==========================================================================
   One-page class checkout (S2): programs/checkout.html on
   layouts/checkout.html. The approved design is
   .claude/docs/design/checkout/checkout.src.html (DESIGN_SYSTEM.md); this
   file follows its section order. One centred container holds the header,
   both columns and the footer, so the outer margins are equal at every
   width. Four numbered section cards on desktop, flat sections on phone,
   a sticky Order Summary with a quiet blue glow; the red accent glow marks
   only the selected payment tile, focus and the primary button.

   Tokens only (_tokens.css; the Dark values are the :root defaults),
   except Zoho's own colours and the card-brand
   SVG fills. No gradient line on the top edge of any card, tile, box or
   dialog. Buttons, the spinner, the skeleton, chips and .linkbtn are shared
   (_components.css). Keyframes here carry a checkout- prefix.

   Hooks (the template renders them; static/js/pages/checkout.js keeps
   them current from #checkout-state):
   - .shop[data-state]: email, before, calc, ready, checking, paying,
     confirm, paid, ended or unavailable.
   - .shop[data-method] (card or ach): the picked tile, for the summary's
     [data-for] rows; .pay-tiles[data-method] holds the same value for the
     tiles and Zoho's mount.
   - .shop[data-card="intl"] (a card issued outside the US),
     .shop[data-terms] (the terms box: on or off), .shop[data-kind] (the
     pay_state kind, for example card-elsewhere) and
     .shop[data-pay-from="ours"] (our own Pay button started the charge).
   - .sec[data-status] (todo, active or done), .side.is-open (the phone
     summary), #pay-mount.is-open[data-form] (card or ach), and
     body.pay-embedded while Zoho's form is inside the page.
   ========================================================================== */

/* ── Site rules the checkout must not inherit ──────────────────────────
   main.css styles bare elements for the marketing pages (a 65ch measure
   and a bottom margin on every p, white links without underline, tight
   tracking and balanced lines on headings). These come first, so every
   class below wins. */
.shop [hidden] { display: none !important; }
.shop .nw { white-space: nowrap; }
.shop :where(p, h1, h2, h3, dl, dd, ul, figure) { margin: 0; max-width: none; }
.shop :where(h1, h2, h3) { letter-spacing: normal; text-wrap: wrap; }
.shop { line-height: var(--leading-body); color-scheme: dark; -moz-osx-font-smoothing: grayscale; }
/* Links: the same weight as the site's own `a` rules (this file loads
   later), so every class (.back, .btn, the footer) still wins. */
:where(.shop) a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
:where(.shop) a:hover { color: var(--link-hover); }
/* One focus ring for links, buttons, summaries and [tabindex]. Its
   radius has no weight at all, so a button keeps its own corners. */
:where(.shop) :where(a, button, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
:where(.shop :is(a, button, summary, [tabindex]):focus-visible) { border-radius: var(--radius-focus); }

/* ── Page ────────────────────────────────────────────────────────────── */
/* Very wide screens: the centred container widens (equal margins both
   sides) and the type steps up only a little, so Zoho's fixed-size form
   still sits close to our own labels. */
@media (min-width: 1800px) {
    .shop { --layout-container: 80rem; --layout-side: 27.5rem; }
    html:has(.shop) { font-size: 106.25%; }
}
@media (min-width: 2300px) {
    .shop { --layout-container: 89rem; --layout-side: 28rem; --layout-gap: 5rem; }
    html:has(.shop) { font-size: 115%; }
}
body.shop-page {
    background: var(--page-bg);
    overflow-x: hidden;
}
/* Zoho's embedded form hides the page's scroll; the page must still scroll. */
body.pay-embedded { overflow: visible !important; }

/* The page is an inline-size container, so the narrow layouts below are
   container queries (as in the approved mockup). */
.stage { container: page / inline-size; }

.shop {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background:
        radial-gradient(60rem 36rem at 12% -6rem, var(--page-glow-red), transparent 70%),
        radial-gradient(56rem 40rem at 90% 4rem, var(--page-glow-blue), transparent 70%),
        var(--page-bg);
    color: var(--text-primary);
}

.wrap {
    width: 100%;
    max-width: calc(var(--layout-container) + 2 * var(--layout-gutter));
    margin-inline: auto;
    padding-inline: var(--layout-gutter);
}

/* ── Header ──────────────────────────────────────────────────────────── */
.top { border-bottom: 1px solid var(--border-hairline); background: var(--header-bg); }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); min-height: 5.5rem; }
.logo { display: inline-flex; align-items: center; min-height: var(--tap-min); border-radius: var(--radius-focus); }
.logo img { width: 10.5rem; height: auto; }
.top__right { display: flex; align-items: center; gap: var(--space-6); }
.back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--tap-min);
    color: var(--text-subtle);
    font-size: var(--text-15);
    text-decoration: none;
}
.back:hover { color: var(--text-strong); }
.top__secure {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: calc(var(--space-2) - var(--space-px)) var(--space-4);
    border: 1px solid var(--border-rule);
    border-radius: var(--radius-full);
    color: var(--text-label);
    font-size: var(--text-14);
    font-weight: var(--weight-medium);
    white-space: nowrap;
}
.top__secure svg { color: var(--status-ok); }

/* ── Messages (includes/_checkout_messages.html) ─────────────────────── */
.shop-messages { margin-top: var(--space-8); }
.shop-messages .pay-alert { margin-top: 0; }

/* ── Two columns ─────────────────────────────────────────────────────── */
.layout {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--layout-side);
    column-gap: var(--layout-gap);
    align-items: start;
    padding-top: var(--space-14);
    padding-bottom: var(--space-20);
}
.col-main { min-width: 0; container: main / inline-size; }
.side { position: sticky; top: var(--space-8); min-width: 0; }

/* ── Page title ──────────────────────────────────────────────────────── */
.intro { margin-bottom: var(--space-10); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-13);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--text-secondary);
}
.eyebrow::before {
    content: "";
    width: var(--space-2);
    height: var(--space-2);
    border-radius: var(--radius-full);
    background: var(--color-cb-red-400);
    box-shadow: var(--glow-eyebrow-dot);
}
.intro h1 {
    margin-top: var(--space-3);
    font-size: var(--text-40);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-display);
    letter-spacing: var(--tracking-tight);
    color: var(--text-strong);
}
.intro__sub { margin-top: var(--space-3); font-size: var(--text-17); color: var(--text-subtle); }
.shop[data-state="paid"] .intro { display: none; }

/* ── Section cards ───────────────────────────────────────────────────── */
.form { margin: 0; }
.sec {
    padding: var(--space-8);
    border: 1px solid var(--border-section);
    border-radius: var(--radius-xl);
    background: var(--surface-section);
    box-shadow: var(--shadow-section);
    transition: opacity var(--duration-fade) var(--ease-default);
}
.sec + .sec { margin-top: var(--space-10); }
.sec__head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6); }
.sec__head--desc { align-items: flex-start; }
.sec__titles { flex: 1 1 0; min-width: 0; }
.sec__title {
    font-size: var(--text-lg);
    line-height: var(--space-8);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-title);
    color: var(--text-strong);
}
.sec__desc {
    margin-top: var(--space-0-5);
    font-family: var(--font-reading);
    font-size: var(--text-15);
    line-height: var(--leading-body);
    color: var(--text-secondary);
}
.sec__aside { flex: none; display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-15); color: var(--text-secondary); }
.sec__aside a { display: inline-flex; align-items: center; min-height: var(--tap-min); font-weight: var(--weight-medium); }
.sec__aside--secure { font-size: var(--text-14); }
.sec__aside--secure svg { color: var(--status-ok); }
/* No payment form to secure once online payment is not available or the hold ended. */
.shop:is([data-state="unavailable"], [data-state="ended"]):not([data-kind="card-elsewhere"]) .sec__aside--secure { display: none; }

/* Step badge: decorative (the h2 carries the status for screen readers). */
.step {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: var(--space-8);
    height: var(--space-8);
    border: 1.5px solid var(--step-border);
    border-radius: var(--radius-full);
    background: var(--step-bg);
    color: var(--step-text);
    font-size: var(--text-15);
    font-weight: var(--weight-semibold);
    font-variant-numeric: tabular-nums;
    transition:
        background-color var(--duration-normal) var(--ease-default),
        border-color var(--duration-normal) var(--ease-default),
        box-shadow var(--duration-normal) var(--ease-default);
}
.step svg { display: none; }
.sec[data-status="active"] .step {
    border-color: var(--color-cb-red-400);
    background: var(--step-active-bg);
    color: var(--color-white);
    box-shadow: var(--step-active-glow);
}
.sec[data-status="done"] .step { border-color: var(--color-success-600); background: var(--color-success-600); color: var(--color-white); }
.sec[data-status="done"] .step span { display: none; }
.sec[data-status="done"] .step svg { display: block; }

/* ── Fields ──────────────────────────────────────────────────────────── */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.fields--addr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 9.5rem; }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    font-size: var(--text-14);
    line-height: var(--space-5);
    font-weight: var(--weight-medium);
    color: var(--text-label);
}
.label .opt { font-weight: var(--weight-regular); color: var(--text-secondary); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--space-5); }
.input--verified { border-color: var(--status-ok-border); }
.verified {
    display: inline-flex;
    margin: calc(-1 * var(--space-1)) 0;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1) var(--space-2-5) var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    background: var(--status-ok-bg);
    border: 1px solid var(--status-ok-border);
    color: var(--status-ok);
    font-size: var(--text-13);
    font-weight: var(--weight-semibold);
}

/* Field errors (not drawn in the mockup; DESIGN_SYSTEM.md 6.4). The field
   gets a second pixel of edge in the error colour (an inset ring, so
   nothing moves), unlike the 1 px red border and glow of focus, and the
   sentence sits under it after an icon. A field with an error keeps its
   error edge while focused. */
.field--error .input {
    border-color: var(--field-error-border);
    box-shadow: inset 0 0 0 1px var(--field-error-border);
}
.field--error .input:focus {
    border-color: var(--field-error-border);
    box-shadow: inset 0 0 0 1px var(--field-error-border), var(--focus-glow);
}
.field__error {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-14);
    line-height: var(--leading-snug);
    color: var(--field-error-text);
}
.field__error:empty { display: none; }
.field__error svg { flex: none; margin-top: var(--space-px); color: var(--field-error-icon); }
/* A field's help line under its widget (lab time's Number of Hours and
   What Are You Practicing For?), in the section description's voice. */
.field__help {
    font-family: var(--font-reading);
    font-size: var(--text-15);
    line-height: var(--leading-body);
    color: var(--text-secondary);
    text-wrap: pretty;
}

/* Read-only Contact rows (a signed-in buyer's email and names): plain
   text under its label, never a box that looks like a field, since
   nothing here is typed. The label row keeps the Verified chip. */
.ro { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.ro__value {
    font-size: var(--text-base);
    line-height: var(--leading-body);
    color: var(--text-strong);
    overflow-wrap: anywhere;
}
.ro__note { font-size: var(--text-14); line-height: var(--leading-snug); color: var(--text-secondary); }
/* Change Them in Settings: a 44 px target, as the link beside a section
   title, without making its row taller (the footer's Contact Us does the same). */
.ro__note a { display: inline-flex; align-items: center; min-height: var(--tap-min); margin-block: calc(-1 * var(--space-3)); }

/* The reCAPTCHA box under Email (Google's fixed 304 by 78 frame), clear of the input.
   Hidden while the code panel is open (Resend Code needs no box); a new
   email closes the panel, and the box shows again. */
.captcha-box { margin-top: var(--space-2); }
#contact-email:has(> #code-panel:not([hidden])) > .captcha-box { display: none; }

/* Email code, inline under Email: the boxes and Resend Code share one row
   that spans the panel, so the panel never looks half empty. */
.code {
    margin-top: var(--space-4);
    padding: var(--space-5) var(--space-6);
    border: 1px solid var(--border-inset);
    border-radius: var(--radius-panel);
    background: var(--surface-inset);
}
.code__text { font-size: var(--text-15); color: var(--text-subtle); }
.code__text strong { color: var(--text-strong); font-weight: var(--weight-medium); }
.code__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--space-3) var(--space-8); margin-top: var(--space-4); }
.code__boxes { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.code__box {
    width: var(--space-14);
    height: var(--space-16);
    padding: 0;
    border: 1px solid var(--field-border);
    border-radius: var(--radius-control);
    background: var(--field-bg);
    color: var(--text-strong);
    font-size: var(--text-24);
    font-weight: var(--weight-semibold);
    text-align: center;
    caret-color: var(--color-cb-red-400);
    transition:
        border-color var(--duration-fast) var(--ease-default),
        box-shadow var(--duration-quick) var(--ease-default);
}
.code__box:hover { border-color: var(--field-border-hover); }
.code__box:focus { outline: none; border-color: var(--color-cb-red); box-shadow: var(--focus-glow); }
/* The red edge alone is 2.93:1 on the box: the page's focus ring goes around it. */
.code__box:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.code__box[aria-invalid="true"] { border-color: var(--field-error-border); box-shadow: inset 0 0 0 1px var(--field-error-border); }
.code__dash { flex: none; width: var(--space-3); height: var(--space-0-5); margin-inline: var(--space-1); border-radius: var(--radius-full); background: var(--text-secondary); }
.code .field__error { margin-top: var(--space-3); }

/* Optional extras, behind one quiet disclosure */
.more { margin-top: var(--space-4); }
/* In the fields grid, the row gap already counts: 16 px under the last field. */
.fields > .more { margin-top: calc(var(--space-4) - var(--space-6)); }
.more summary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--tap-min);
    color: var(--link);
    font-weight: var(--weight-medium);
    list-style: none;
    cursor: pointer;
}
.more summary::-webkit-details-marker { display: none; }
.more__icon {
    display: grid;
    place-items: center;
    width: var(--space-6);
    height: var(--space-6);
    border: 1.5px solid currentColor;
    border-radius: var(--radius-full);
}
.more__icon svg { transition: transform var(--duration-quick) var(--ease-default); }
.more[open] .more__icon svg { transform: rotate(45deg); }
.more__body { display: grid; gap: var(--space-6); margin-top: var(--space-4); }

/* ── Pick Your Time (lab time booked by the hour) ──────────────────────
   programs/partials/_slot_picker.html (unchanged markup), restyled for
   this page: chips on the field surface and radius, 14 and 12 px text,
   the 3 px focus ring, and the picked chip marked the way a tile is
   marked before the total is in (grey, never a red glow). The buyer's
   own booked hours (Yours) are teal, the colour of what is confirmed. */
.shop .checkout-slots__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.shop .slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}
.shop .slot-chip { position: relative; }
.shop .slot-chip__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.shop .slot-chip__face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-0-5);
    min-height: var(--tap-min);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--field-border);
    border-radius: var(--radius-control);
    background: var(--field-bg);
    text-align: center;
    transition:
        border-color var(--duration-fast) var(--ease-default),
        background-color var(--duration-fast) var(--ease-default),
        box-shadow var(--duration-fast) var(--ease-default);
}
.shop .slot-chip__time { font-size: var(--text-14); font-weight: var(--weight-semibold); line-height: var(--leading-snug); color: var(--text-strong); }
.shop .slot-chip__status { font-size: var(--text-12); line-height: var(--leading-snug); color: var(--text-subtle); }
.shop .slot-chip__input:enabled + .slot-chip__face { cursor: pointer; }
.shop .slot-chip__input:enabled + .slot-chip__face:hover { border-color: var(--field-border-hover); }
.shop .slot-chip__input:checked + .slot-chip__face {
    border-color: var(--text-secondary);
    background: var(--step-bg);
    box-shadow: inset 0 0 0 1px var(--text-secondary);
}
.shop .slot-chip__input:checked + .slot-chip__face .slot-chip__status { color: var(--text-strong); }
/* The picked chip carries a tick too: its edge and fill differ little
   from the other chips', so the pick is never told by colour alone. A
   small badge on the chip's corner, in the picked edge's grey (never red
   before the total), clear of the time whatever its length and 2 px short
   of the next chip. */
.shop .slot-chip__tick {
    display: none;
    box-sizing: content-box;
    position: absolute;
    top: calc(-1 * var(--space-1-5));
    right: calc(-1 * var(--space-1-5));
    padding: var(--space-0-5);
    border-radius: var(--radius-full);
    background: var(--text-secondary);
    color: var(--page-bg);
    pointer-events: none;
}
.shop .slot-chip__input:checked + .slot-chip__face .slot-chip__tick { display: block; }
.shop .slot-chip__input:focus-visible + .slot-chip__face { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.shop .slot-chip__input[aria-invalid="true"] + .slot-chip__face { border-color: var(--field-error-border); }
/* Full, closed, too short: still readable, plainly not a choice. */
.shop :is(.slot-chip--full, .slot-chip--closed, .slot-chip--short) .slot-chip__face {
    border-style: dashed;
    border-color: var(--tile-border);
    background: transparent;
}
.shop :is(.slot-chip--full, .slot-chip--closed, .slot-chip--short) :is(.slot-chip__time, .slot-chip__status) { color: var(--text-secondary); }
/* The buyer's own booked hours. */
.shop .slot-chip--mine .slot-chip__face { border-color: var(--status-ok-border); background: var(--status-ok-bg); }
.shop .slot-chip--mine .slot-chip__status { color: var(--status-ok); }
.shop .checkout-slots__none,
.shop .checkout-slots__notice:not(:empty) { margin-top: var(--space-3); font-size: var(--text-14); color: var(--text-label); }
/* An empty notice takes no grid row (no doubled gap above Number of
   Hours); the help keeps its room above the chips. */
.shop .checkout-slots__notice:empty { display: none; }
/* The pick said back under the chips ("6:00 PM to 8:00 PM MDT · 2 hours"). */
.shop .checkout-slots__summary { margin-top: var(--space-3); font-size: var(--text-15); font-weight: var(--weight-medium); color: var(--text-strong); }
.shop .checkout-slots__summary:empty { display: none; }
.shop .checkout-slots__group .sec__desc { margin-bottom: var(--space-3); }
.shop .checkout-slots__mine {
    margin: 0 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-inset);
    border-radius: var(--radius-control);
    background: var(--surface-inset);
    font-size: var(--text-14);
    color: var(--text-subtle);
}
.shop .checkout-slots__mine-title { margin-bottom: var(--space-1); font-weight: var(--weight-semibold); color: var(--text-strong); }
.shop .checkout-slots__mine-list { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; padding: 0; list-style: none; }

/* ── Payment section ─────────────────────────────────────────────────── */
/* One left line for the Payment card: the terms box (1 px border) pads 1 px
   more than the tiles (2 px border), so the checkbox, the radios, Zoho's
   form and our own button all start on the same x, and the labels share
   one too. */
.terms {
    padding: var(--space-2) calc(var(--space-6) + 1px);
    border: 1px solid var(--border-inset);
    border-radius: var(--radius-panel);
    background: var(--surface-inset);
}
.terms__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-6); }
.check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    min-height: var(--space-12);
    padding-block: var(--space-3);
    font-weight: var(--weight-medium);
    color: var(--text-strong);
    text-wrap: pretty;
    cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.check__box {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.375rem;
    height: 1.375rem;
    margin-top: var(--space-px);
    border: 2px solid var(--control-border);
    border-radius: var(--radius-focus);
    background: var(--control-bg);
    transition:
        background-color var(--duration-fast) var(--ease-default),
        border-color var(--duration-fast) var(--ease-default),
        box-shadow var(--duration-quick) var(--ease-default);
}
.check__box svg { opacity: 0; color: var(--color-white); transition: opacity var(--duration-fast) var(--ease-default); }
.check input:checked + .check__box { background: var(--color-cb-red); border-color: var(--color-cb-red); box-shadow: var(--glow-check); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.read__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    min-height: var(--tap-min);
    padding: 0;
    border: 0;
    background: none;
    color: var(--link);
    font-size: var(--text-15);
    font-weight: var(--weight-medium);
}
.read__toggle:hover { color: var(--link-hover); }
.read__toggle svg { transition: transform var(--duration-quick) var(--ease-default); }
.read__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.read__body {
    padding: var(--space-2) 0 var(--space-4) calc(1.375rem + var(--space-4));
    font-family: var(--font-reading);
    font-size: var(--text-15);
    line-height: var(--leading-normal);
    color: var(--text-subtle);
}
.read__body ul { margin: 0 0 var(--space-3); padding-left: 1.1rem; }
.read__body li + li { margin-top: var(--space-1); }

.methods { margin: var(--space-6) 0 0; padding: 0; border: 0; min-width: 0; }
.methods legend {
    padding: 0;
    margin-bottom: var(--space-3);
    font-size: var(--text-14);
    line-height: var(--space-5);
    font-weight: var(--weight-medium);
    color: var(--text-label);
}

/* Pay By: both tiles and Zoho's mount share one grid column. The mount
   (#pay-mount, the last child, never swapped or moved) sits in the grid
   area of the picked tile, .pay-tiles[data-method], over the bottom of
   that tile. minmax(0, 1fr) keeps a wide form from pushing the tiles past
   the gutter (the mockup's 2 px at 320). --pay-mount-h is the open form's
   height, by the form the mount holds. */
.pay-tiles {
    --pay-mount-h: var(--pay-mount-card-h);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "card" "ach";
    gap: var(--space-3);
}
.pay-tiles:has(> .pay-mount[data-form="ach"]) { --pay-mount-h: var(--pay-mount-bank-h); }
.pay-tiles > .tile[data-method="card"] { grid-area: card; }
.pay-tiles > .tile[data-method="ach"] { grid-area: ach; }

.tile {
    position: relative;
    min-width: 0;
    border: 2px solid var(--tile-border);
    border-radius: var(--radius-panel);
    background: var(--tile-bg);
    transition:
        border-color var(--duration-normal) var(--ease-default),
        box-shadow var(--duration-normal) var(--ease-default),
        opacity var(--duration-fade) var(--ease-default),
        background-color var(--duration-normal) var(--ease-default);
}
.tile:hover { border-color: var(--tile-border-hover); }
/* The picked tile is only marked (grey) until the total is in; it lights
   up red once the buyer can pay, and stays lit while the money moves. */
:is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) {
    border-color: var(--tile-border-hover);
}
.shop:is([data-state="ready"], [data-state="checking"], [data-state="paying"], [data-state="confirm"])
    :is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) {
    border-color: var(--color-cb-red);
    background: var(--tile-selected-bg);
    box-shadow: var(--glow-selected);
}
.tile:has(.tile__radio:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.tile__head {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-height: 4.75rem;
    padding: var(--space-3) var(--space-6);
    cursor: pointer;
}
.tile__radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.radio {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.375rem;
    height: 1.375rem;
    border: 2px solid var(--control-border);
    border-radius: var(--radius-full);
    background: var(--control-bg);
    transition:
        background-color var(--duration-fast) var(--ease-default),
        border-color var(--duration-fast) var(--ease-default);
}
.radio::after {
    content: "";
    width: var(--space-2);
    height: var(--space-2);
    border-radius: var(--radius-full);
    background: var(--color-white);
    transform: scale(0);
    transition: transform var(--duration-fast) var(--ease-default);
}
:is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) .radio {
    border-color: var(--text-secondary);
    background: var(--text-secondary);
}
:is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) .radio::after { transform: scale(1); }
.shop:is([data-state="ready"], [data-state="checking"], [data-state="paying"], [data-state="confirm"])
    :is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) .radio {
    border-color: var(--color-cb-red);
    background: var(--color-cb-red);
}
.tile__main { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.tile__name { font-size: var(--text-17); line-height: var(--leading-snug); font-weight: var(--weight-semibold); color: var(--text-strong); }
.tile__tag { margin-left: var(--space-0-5); font-size: var(--text-14); font-weight: var(--weight-medium); color: var(--text-secondary); }
.tile__sub { font-size: var(--text-14); line-height: var(--leading-snug); color: var(--text-secondary); }
.marks { display: flex; gap: var(--space-1-5); }
.shop[data-state="confirm"] .tile[data-method="card"] .marks { display: none; }
.mark-mc rect { fill: var(--card-mark-bg); stroke: var(--card-mark-edge); }
.tile__amt {
    margin-left: auto;
    padding-left: var(--space-2);
    text-align: right;
    font-size: var(--text-17);
    font-weight: var(--weight-semibold);
    color: var(--text-strong);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.tile__amt small { display: block; font-size: var(--text-13); font-weight: var(--weight-regular); color: var(--text-secondary); }
.tile__amt .skel { width: 4.5rem; }

/* A way to pay that is not offered for this date: dashed, with its reason. */
.tile--off { border-style: dashed; background: transparent; }
.tile--off:hover { border-color: var(--tile-border); }
.tile--off .tile__head { cursor: default; }
.tile--off .tile__name { color: var(--text-subtle); }
.tile--off .radio { border-style: dashed; border-color: var(--tile-border-hover); background: transparent; }

/* What shows inside the picked tile once the buyer can pay. */
.tile__body { display: none; padding: var(--space-2) var(--space-6) var(--space-6); }
.shop:is([data-state="ready"], [data-state="checking"], [data-state="paying"], [data-state="confirm"])
    :is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) .tile__body,
.shop[data-kind="card-elsewhere"]
    :is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) .tile__body {
    display: block;
}
.shop:is([data-state="ready"], [data-state="checking"], [data-state="paying"]) .pay-tiles[data-method="ach"] > .tile[data-method="ach"] .tile__sub {
    display: none;
}

/* Terms not ticked: the gate. Ticked: the bank's line and authorization,
   then the form (Zoho's, in the mount) or our own extra view. */
.gate, .tile__line, .tile__auth { display: none; }
.shop[data-terms="off"]:not([data-kind="card-elsewhere"]) .gate { display: flex; }
.shop[data-terms="on"]:is([data-state="ready"], [data-state="checking"], [data-state="paying"]) .tile__line { display: flex; }
.shop[data-terms="on"]:is([data-state="ready"], [data-state="checking"], [data-state="paying"]) .tile__auth { display: block; }
.shop[data-terms="off"]:not([data-kind="card-elsewhere"]) .tile__extra { display: none; }
.gate {
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border: 1px dashed var(--border-rule);
    border-radius: var(--radius-control);
    font-size: var(--text-15);
    color: var(--text-subtle);
}
.gate svg { flex: none; color: var(--text-secondary); }

/* Waiting line under the tiles, before the total is in */
.wait { display: none; align-items: flex-start; gap: var(--space-3); margin-top: var(--space-4); font-size: var(--text-15); color: var(--text-subtle); }
.wait svg { flex: none; margin-top: var(--space-0-5); color: var(--status-info-icon); }
.shop:is([data-state="email"], [data-state="before"], [data-state="calc"]) .wait { display: flex; }
/* While the page holds the seat (the reserve is on its way: .shop[data-reserving],
   set by checkout.js) the line turns its spinner in place of its icon. The
   summary's own spinner only comes with the answer, so it stays one spinner
   per wait. */
.wait .spin { display: none; margin-top: var(--space-0-5); }
.shop[data-reserving] .wait .spin { display: inline-block; }
.shop[data-reserving] .wait svg { display: none; }

/* Bank: the clock line (icon under the radio: 18 px icon + 20 px gap = 22 px
   radio + 16 px gap, so the text starts on the tile name's x), then the
   authorization sentence in muted text. */
.tile__line {
    align-items: flex-start;
    gap: var(--space-5);
    margin: 0 0 var(--space-3);
    font-size: var(--text-15);
    color: var(--text-label);
    text-wrap: pretty;
}
.tile__line svg { flex: none; margin-top: var(--space-0-5); color: var(--status-pending-icon); }
.tile__auth {
    margin: 0 0 var(--space-4);
    padding-left: calc(1.125rem + var(--space-5));
    font-size: var(--text-13);
    line-height: var(--leading-body);
    color: var(--text-secondary);
}

/* "Opening the secure card form." while Zoho's frame boots (shown and
   hidden by checkout.js with [hidden]). */
.tile__wait { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-15); color: var(--text-subtle); }

/* Form notices (a decline, 3-D Secure, the checking service down) sit in
   the tile above the form; page alerts go to #pay-alert. */
.tile__notice:not(:has(*)) { display: none; }
.tile__notice .notice { margin: 0 0 var(--space-4); }

/* ── Zoho Payments' own form inside the page (#pay-mount) ─────────────
   One mount for both forms, outside every htmx swap and never under
   inert. Collapsed it takes no room; open (.is-open, once Zoho's frame has
   booted) it is a white panel of the form's fixed height, inset from the
   tile's border by the tile's own padding, so the radios, the panel and
   our button share one left line. Zoho draws everything inside it. */
.pay-mount {
    grid-area: card;
    align-self: end;
    position: relative;
    z-index: var(--z-raised);
    min-width: 0;
    height: 0;
    margin: 0 calc(2px + var(--space-6)) calc(2px + var(--space-6));
    overflow: hidden;
    contain: layout paint;
    isolation: isolate;
    border-radius: var(--radius-control);
    background: var(--color-white);
    color-scheme: light;
}
.pay-tiles[data-method="ach"] > .pay-mount { grid-area: ach; }
.pay-mount.is-open {
    height: var(--pay-mount-h);
    box-shadow: 0 0 0 1px var(--zoho-edge), var(--shadow-pay-frame);
}
/* The picked tile keeps room for the open form under its own content, so
   the form never covers our text. */
.shop[data-state="ready"] .pay-tiles[data-method="card"]:has(> .pay-mount.is-open) > .tile[data-method="card"] .tile__body::after,
.shop[data-state="ready"] .pay-tiles[data-method="ach"]:has(> .pay-mount.is-open) > .tile[data-method="ach"] .tile__body::after {
    content: "";
    display: block;
    height: var(--pay-mount-h);
}

/* Checking and Paying: our busy panel takes the closed form's place. While
   the form was inside the page it keeps the form's height, so nothing
   jumps; one spinner and one line, centred. Our own Pay button (confirm)
   shows its own work instead. */
.pay-busy {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-8) var(--space-4);
    text-align: center;
    font-size: var(--text-15);
    color: var(--text-subtle);
}
.pay-embedded .pay-busy { height: var(--pay-mount-h); }
.shop:is([data-state="checking"], [data-state="paying"]):not([data-pay-from="ours"])
    :is(.pay-tiles[data-method="card"] > .tile[data-method="card"], .pay-tiles[data-method="ach"] > .tile[data-method="ach"]) .pay-busy {
    display: flex;
}
.shop:is([data-state="checking"], [data-state="paying"]):not([data-pay-from="ours"]) .tile__extra { display: none; }
.shop:not([data-state="checking"]) .pay-busy__checking,
.shop[data-state="checking"] .pay-busy__paying { display: none; }
/* A charge still open after two minutes (.shop[data-slow], from the state):
   under the spinner's line, that the bank is still at it and we email the
   buyer, so it is safe to leave the page. */
.pay-busy__slow { display: none; max-width: 34ch; text-wrap: pretty; }
.shop[data-state="paying"][data-slow] .pay-busy__slow { display: block; }

/* Page-level payment alerts (#pay-alert: unavailable, hold ended,
   cancelled, a refused address change) and the checkout's own messages:
   info styled, a title and a sentence, with any buttons under them. An
   alert with nothing in it takes no room. */
.pay-alert {
    margin-top: var(--space-5);
    padding: var(--space-5);
    border: 1px solid var(--status-info-border);
    border-radius: var(--radius-control);
    background: var(--status-info-bg);
    font-size: var(--text-15);
    color: var(--text-primary);
}
.pay-alert:not(:has(*)) { display: none; }
/* A failure (what the card processor said of a failed form, a request that
   got no answer): the field error colour for the edge on a red tint, so it
   never reads as blue information. */
.pay-alert--failed { border-color: var(--field-error-border); background: rgba(var(--accent-red-rgb), 0.1); }
.pay-alert__title { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text-strong); }
.pay-alert__title + .pay-alert__text { margin-top: var(--space-1); }
.pay-alert__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-4); }
.pay-alert__actions .btn--block { margin-top: 0; }
/* The page's own sentence (a request that got no answer), after anything
   the server put in the alert. */
.pay-alert > * + .pay-alert__text[data-own] { margin-top: var(--space-4); }
.pay-alert__list { margin: 0; padding: 0; list-style: none; }
.pay-alert__list li + li { margin-top: var(--space-2); }

/* Ended, cancelled or unavailable: no way to pay shows, except the tile
   whose form is open in another browser (with its Cancel This Payment). */
.shop:is([data-state="ended"], [data-state="unavailable"]):not([data-kind="card-elsewhere"]) .methods { display: none; }
.shop[data-kind="card-elsewhere"] .pay-tiles[data-method="card"] > .tile[data-method="ach"],
.shop[data-kind="card-elsewhere"] .pay-tiles[data-method="ach"] > .tile[data-method="card"] { display: none; }

/* No online payment for this date (free, pay later, or the payworker
   down): the terms, the instructions and one Reserve button. */
.pay-text { margin-top: var(--space-5); font-size: var(--text-15); color: var(--text-subtle); }
.pay-text + .pay-text { margin-top: var(--space-3); }

/* International card (and any total that changed): our page asks once
   more, with our own Pay button. */
.readcard {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--border-rule);
    border-radius: var(--radius-control);
}
.readcard__text { display: flex; flex-direction: column; min-width: 0; }
.readcard__text strong { font-weight: var(--weight-semibold); color: var(--text-strong); }
.readcard__text span { font-size: var(--text-14); color: var(--text-secondary); }
.readcard .linkbtn { margin-left: auto; text-align: right; }
.notice {
    margin-top: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--status-info-border);
    border-radius: var(--radius-control);
    background: var(--status-info-bg);
}
.notice__lead { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--text-15); color: var(--text-primary); }
.notice__lead svg { flex: none; margin-top: var(--space-0-5); color: var(--status-info-icon); }
/* A notice that says something went wrong (a decline, a processor error, a
   form that did not open, a charge not sent): the field error colour for
   its edge and its mark (an exclamation mark, not the i) on a red tint.
   Blue stays for information. */
.notice--failed { border-color: var(--field-error-border); background: rgba(var(--accent-red-rgb), 0.1); }
.notice--failed .notice__lead svg { color: var(--field-error-icon); }
/* Contact Us under a notice that says to contact us, on the text's edge: a
   44 px target whose spare height does not thicken the notice's foot (the
   site's p:last-child rule would win over one class). */
.notice .notice__more { margin-bottom: calc(-1 * var(--space-2-5)); padding-left: var(--space-7-5); font-size: var(--text-15); }
.notice__more a { display: inline-flex; align-items: center; min-height: var(--tap-min); font-weight: var(--weight-medium); }
.mini { margin-top: var(--space-4); padding-left: var(--space-7-5); }
.mini__row { display: flex; justify-content: space-between; gap: var(--space-4); font-size: var(--text-15); color: var(--text-subtle); }
.mini__row + .mini__row { margin-top: var(--space-2); }
.mini__row dd { color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini__row--total {
    margin-top: var(--space-3) !important;
    padding-top: var(--space-3);
    border-top: 1px solid var(--status-info-border);
    font-weight: var(--weight-semibold);
    font-size: var(--text-base);
}
.mini__row--total dt, .mini__row--total dd { color: var(--text-strong); }

/* ── Phone-only lines just above the tiles ───────────────────────────── */
.ph-line {
    display: none;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-control);
    font-size: var(--text-15);
    color: var(--text-primary);
}
.ph-hold { border: 1px solid var(--status-pending-border); background: var(--status-pending-bg); }
.ph-hold svg { flex: none; color: var(--status-pending-icon); }
.ph-calc { margin-top: var(--space-4); padding: 0; color: var(--text-subtle); }
.ph-hold + .ph-calc { margin-top: var(--space-3); }
/* Five minutes or fewer on the hold (checkout.js sets data-hold="soon" and
   writes the time left after the hold line): the hold line also shows above
   the tiles at every width, where the buyer is paying, with the time left
   in strong text. */
.shop[data-hold="soon"]:is([data-state="calc"], [data-state="ready"], [data-state="checking"], [data-state="paying"], [data-state="confirm"]) .ph-hold { display: flex; }
.shop[data-hold="soon"] .hold__left { font-weight: var(--weight-semibold); color: var(--text-strong); }
/* The email check of a held booking: the page waits for the buyer's code,
   not for the sales tax, so no spinner says Calculating (the waiting line
   under the tiles says what to do, on a phone too: see the one-column rules). */
.shop[data-kind="confirm-email"] .ph-calc { display: none; }

/* ── Checking and Paying: our page steps back (checkout.js also makes these
   inert, never an ancestor of #pay-mount). ──────────────────────────── */
.dim { transition: opacity var(--duration-fade) var(--ease-default); }
.shop:is([data-state="checking"], [data-state="paying"]) .dim { opacity: 0.4; pointer-events: none; }
.shop:is([data-state="checking"], [data-state="paying"]) .pay-tiles[data-method="card"] > .tile[data-method="ach"],
.shop:is([data-state="checking"], [data-state="paying"]) .pay-tiles[data-method="ach"] > .tile[data-method="card"] {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Paid ────────────────────────────────────────────────────────────── */
.done { display: none; }
.shop[data-state="paid"] .done { display: block; }
.shop[data-state="paid"] .form { display: none; }
.done__card {
    padding: var(--space-12);
    border: 1px solid var(--border-section);
    border-radius: var(--radius-xl);
    background: var(--surface-section);
    box-shadow: var(--shadow-section);
}
.done__mark {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border: 2px solid var(--color-success-600);
    border-radius: var(--radius-full);
    background: var(--done-mark-bg);
    color: var(--status-ok);
    box-shadow: var(--glow-done);
    animation:
        checkout-mark-in var(--duration-enter) var(--ease-default) both,
        checkout-mark-glow 3s ease-in-out var(--duration-enter) infinite;
}
.done.is-bank .done__mark {
    border-color: var(--color-gold-500);
    color: var(--status-pending);
    box-shadow: var(--glow-done-bank);
    animation: checkout-mark-in var(--duration-enter) var(--ease-default) both;
}
@keyframes checkout-mark-in {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes checkout-mark-glow {
    0%, 100% { transform: scale(1); box-shadow: var(--glow-done); }
    50% { transform: scale(1.06); box-shadow: var(--glow-done-pulse); }
}
.done__title {
    margin-top: var(--space-6);
    font-size: var(--text-36);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-heading);
    letter-spacing: var(--tracking-tight);
    color: var(--text-strong);
}
.done__title:focus { outline: none; }
.done__text {
    margin-top: var(--space-3);
    max-width: 62ch;
    text-wrap: pretty;
    font-family: var(--font-reading);
    font-size: var(--text-17);
    line-height: var(--leading-normal);
    color: var(--text-subtle);
}
.done__facts {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: var(--space-4) var(--space-6);
    max-width: 62ch;
    margin-top: var(--space-8);
    padding: var(--space-6) var(--space-7);
    border: 1px solid var(--border-inset);
    border-radius: var(--radius-panel);
    background: var(--surface-inset);
}
.done__facts dt { font-size: var(--text-15); color: var(--text-secondary); }
.done__facts dd { color: var(--text-strong); overflow-wrap: anywhere; }
.done__facts dd span { color: var(--text-secondary); }
.done__ref { font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-code); }
.done__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border-hairline); }
.foot__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0 var(--space-6);
    min-height: var(--space-20);
    font-size: var(--text-14);
    color: var(--text-secondary);
}
.foot__contact a { display: inline-flex; align-items: center; min-height: var(--tap-min); }
.foot__links { display: flex; flex-wrap: wrap; justify-self: end; gap: 0 var(--space-6); }
.foot__links a { display: inline-block; line-height: var(--tap-min); color: var(--text-secondary); text-decoration: none; }
.foot__links a:hover { color: var(--text-strong); text-decoration: underline; }

/* ── Order Summary ───────────────────────────────────────────────────── */
.sumbar { display: none; }
.sum {
    padding: var(--space-7);
    border: 1px solid var(--summary-border);
    border-radius: var(--radius-xl);
    background: var(--summary-bg);
    box-shadow: var(--glow-summary);
}
.sum__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.sum__title { font-size: var(--text-lg); line-height: var(--space-7); font-weight: var(--weight-semibold); color: var(--text-strong); }
.sum__seat { font-size: var(--text-14); color: var(--text-secondary); }

/* Headline total: what do I pay, answered first */
.due { margin-top: var(--space-4); }
.due__line { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.due__amt {
    font-size: var(--text-44);
    line-height: var(--leading-display);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
}
.due__amt .skel { width: 9rem; height: 2.25rem; border-radius: var(--radius-md); vertical-align: -0.2em; }
.due__cur { font-size: var(--text-14); font-weight: var(--weight-medium); color: var(--text-secondary); }
.due__sub { margin-top: var(--space-2); font-size: var(--text-15); color: var(--text-subtle); }

.course { display: flex; align-items: center; gap: var(--space-4); }
.course__art {
    flex: none;
    display: grid;
    place-items: center;
    width: var(--space-14);
    height: var(--space-14);
    border: 1px solid var(--border-course-art);
    border-radius: var(--radius-panel);
    background: var(--course-art-bg);
    box-shadow: var(--glow-course-art);
}
/* An online course's own picture in the box, in place of the ECG line (#246). */
.course__art--image { overflow: hidden; }
.course__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* The ECG line's gradient stops (the inline SVG names them by class). */
.ecg-stop--red { stop-color: var(--ecg-red); }
.ecg-stop--purple { stop-color: var(--ecg-purple); }
.ecg-stop--blue { stop-color: var(--color-cb-blue-400); }
.course__name { font-size: var(--text-md); line-height: var(--leading-compact); font-weight: var(--weight-semibold); color: var(--text-strong); }
.course__org { margin-top: var(--space-0-5); font-size: var(--text-14); color: var(--text-secondary); }

/* Labels as wide as the course art, so the values start on the course name's x;
   a longer label (lab time's Lab Hours) widens the column rather than wrapping. */
.facts { display: grid; grid-template-columns: minmax(var(--space-14), max-content) minmax(0, 1fr); gap: var(--space-3) var(--space-4); margin-top: var(--space-5); font-size: var(--text-15); }
.facts dt { color: var(--text-secondary); }
.facts dd { color: var(--text-primary); }
.facts dd span { display: block; color: var(--text-subtle); }

.rule { height: 1px; margin: var(--space-5) 0; border: 0; background: var(--border-rule); }

.lines { display: grid; gap: var(--space-3-5); font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--space-6); }
.row dt { display: flex; align-items: center; color: var(--text-subtle); }
.row dd { color: var(--text-primary); text-align: right; white-space: nowrap; }
.row .muted { font-size: var(--text-14); color: var(--text-secondary); white-space: normal; }
.row--calc { flex-wrap: wrap; }
.row__note {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: calc(-1 * var(--space-0-5));
    font-size: var(--text-14);
    line-height: var(--leading-snug);
    color: var(--text-subtle);
}
.tip {
    display: inline-grid;
    place-items: center;
    width: var(--tap-min);
    height: var(--tap-min);
    margin: calc(-1 * var(--space-2-5)) calc(-1 * var(--space-3)) calc(-1 * var(--space-2-5)) calc(-1 * var(--space-1-5));
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-secondary);
}
.tip:hover { color: var(--text-strong); }
.tip[aria-expanded="true"] { color: var(--link); }
.tipline {
    margin-top: calc(-1 * var(--space-1));
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-control);
    background: var(--status-info-bg);
    font-family: var(--font-reading);
    font-size: var(--text-14);
    line-height: var(--leading-body);
    color: var(--text-label);
}

.total { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.total__label { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-17); font-weight: var(--weight-semibold); color: var(--text-strong); }
.total__value { display: flex; align-items: baseline; gap: var(--space-2); }
.total__cur { font-size: var(--text-13); color: var(--text-secondary); }
.total__amt {
    font-size: var(--text-22);
    line-height: var(--leading-tight);
    font-weight: var(--weight-semibold);
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
}
.total__amt .skel { width: 5.5rem; height: 1.25rem; border-radius: var(--radius-focus); }

.hold {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--status-pending-border);
    border-radius: var(--radius-control);
    background: var(--status-pending-bg);
    font-size: var(--text-15);
    color: var(--text-primary);
}
.hold svg { flex: none; color: var(--status-pending-icon); }
.hold--ok { border-color: var(--status-ok-border); background: var(--status-ok-bg); }
.hold--ok svg { color: var(--status-ok); }

/* One figure per way to pay: the summary carries a card, a bank and an
   international card version of a line where they differ ([data-for]) and
   shows the one for the picked tile. */
.shop:not([data-method="ach"]) [data-for="ach"],
.shop[data-method="ach"] :is([data-for="card"], [data-for="intl"]),
.shop:not([data-card="intl"]) [data-for="intl"],
.shop[data-card="intl"]:not([data-method="ach"]) [data-for="card"] { display: none; }

/* Calculating: no currency beside a skeleton total. */
.shop[data-state="calc"] :is(.due__cur, .total__cur) { display: none; }

/* Paid: the confirmation card is the receipt, so the summary keeps only the
   money (class details and, for a card, the second "confirmed" line go). */
.shop[data-state="paid"] :is(.course, .facts, .facts + .rule) { display: none; }
.shop[data-state="paid"]:not([data-method="ach"]) #hold-ok { display: none; }

/* ── Narrow main column (about 1000 to 1100 px): stack City over State and ZIP */
@container main (max-width: 600px) {
    .fields--addr { grid-template-columns: minmax(0, 1fr) 8.5rem; }
    .fields--addr .f-city { grid-column: 1 / -1; }
}

/* ── Medium widths ───────────────────────────────────────────────────── */
@container page (max-width: 1239px) {
    .wrap { --layout-gutter: 2rem; }
    .layout { --layout-side: 23.75rem; --layout-gap: 3rem; }
    .hold { padding-inline: var(--space-3); font-size: var(--text-14); gap: var(--space-2); }
}

/* ── One column: tablets and phones ──────────────────────────────────── */
@container page (max-width: 999px) {
    .wrap { --layout-gutter: 1.5rem; --layout-container: 40rem; }
    .layout { display: flex; flex-direction: column; align-items: stretch; padding-top: 0; padding-bottom: var(--space-16); }
    .top__inner { min-height: 4.5rem; }
    .side {
        order: -1;
        position: sticky;
        top: 0 !important;
        z-index: var(--z-sticky);
        width: 100cqi;
        margin-inline: calc(50% - 50cqi);
    }
    .sumbar {
        display: block;
        width: 100%;
        padding: 0;
        border: 0;
        border-bottom: 1px solid var(--border-rule);
        background: var(--summary-bar-bg);
        backdrop-filter: blur(8px);
        color: var(--text-primary);
        text-align: left;
    }
    .sumbar__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-4);
        max-width: calc(var(--layout-container) + 2 * var(--layout-gutter));
        min-height: 3.75rem;
        margin-inline: auto;
        padding-inline: var(--layout-gutter);
    }
    .sumbar__label { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--link); font-weight: var(--weight-medium); white-space: nowrap; }
    .sumbar__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .sumbar__label svg.chev { transition: transform var(--duration-quick) var(--ease-default); }
    .side.is-open .sumbar__label svg.chev { transform: rotate(180deg); }
    .sumbar__amt {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        color: var(--text-strong);
        font-size: var(--text-19);
        font-weight: var(--weight-semibold);
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }
    .sumbar__amt small { font-size: var(--text-13); font-weight: var(--weight-regular); color: var(--text-secondary); }
    .sumbar__amt .skel { width: 4.5rem; height: 1rem; }
    /* Open, the panel fits the space left under the bar: checkout.js sets
       --sum-open-h (the window height less the bar's bottom); until then
       it leaves room for the header and the bar. */
    .sum {
        display: none;
        max-height: var(--sum-open-h, calc(100vh - 8.25rem));
        overflow: auto;
        border: 0;
        border-bottom: 1px solid var(--summary-border);
        border-radius: 0;
        box-shadow: var(--shadow-summary-open);
        padding: 0;
    }
    .sum__inner { max-width: calc(var(--layout-container) + 2 * var(--layout-gutter)); margin-inline: auto; padding: var(--space-5) var(--layout-gutter) var(--space-6); }
    .side.is-open .sum { display: block; }
    .sum__head, .due, .due + .rule { display: none; }
    .intro { margin: var(--space-8) 0 var(--space-8); }
    .intro h1 { font-size: var(--text-32); margin-top: var(--space-2); }
    .intro__sub { margin-top: var(--space-2); font-size: var(--text-base); }
    .ph-line { display: flex; }
    .shop[data-state="paid"] .done { margin-top: var(--space-6); }
    .shop-messages { margin-top: var(--space-6); }
    .shop:not([data-state="calc"]) .ph-calc { display: none; }
    .shop:not(:is([data-state="calc"], [data-state="ready"], [data-state="checking"], [data-state="paying"], [data-state="confirm"])) .ph-hold { display: none; }
    .shop[data-state="calc"] .wait { display: none; }
    .shop[data-state="calc"][data-kind="confirm-email"] .wait { display: flex; }
    .hold { padding-inline: var(--space-4); font-size: var(--text-15); gap: var(--space-3); }
    .sumbar:focus-visible { outline-offset: -3px; border-radius: 0; }
}

/* ── Phone: flat sections, full-width fields ─────────────────────────── */
@container page (max-width: 639px) {
    .wrap { --layout-gutter: 1rem; }
    .layout { padding-bottom: var(--space-12); }
    /* Header: Back to Course takes the pill's place (Payment says who secures it). */
    .logo img { width: 8.5rem; }
    .top__inner { min-height: 4rem; gap: var(--space-3); }
    .top__secure { display: none; }
    /* Title: no eyebrow, tighter margins, so Email shows sooner. */
    .eyebrow { display: none; }
    .intro { margin: var(--space-5) 0 var(--space-6); }
    .intro h1 { margin-top: 0; }
    .sec { padding: var(--space-8) 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .sec + .sec { margin-top: 0; border-top: 1px solid var(--border-rule); }
    .form > .sec:first-child { padding-top: 0; }
    .form > .sec:last-child { padding-bottom: 0; }
    /* Header text runs flush at the gutter under the step row: no hanging indent. */
    .sec__head { flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-5); }
    .sec__titles { display: contents; }
    .sec__title { flex: 1 1 0; min-width: 0; }
    .sec__desc { order: 3; width: 100%; margin-top: 0; text-wrap: pretty; }
    .sec__aside { order: 3; width: 100%; margin-top: calc(-1 * var(--space-2)); padding-left: 0; }
    .sec__aside--secure { min-height: 0; margin-top: 0; }
    /* Number of Hours and What Are You Practicing For? stack: the second label wraps. */
    #pick-your-time > .field { grid-column: 1 / -1; }
    .fields { gap: var(--space-5) var(--space-4); }
    .fields > .more { margin-top: calc(var(--space-4) - var(--space-5)); }
    .fields--addr { grid-template-columns: minmax(0, 1fr) 7.5rem; }
    .fields--addr .f-city { grid-column: 1 / -1; }
    /* Terms: one indent, the label text's edge. */
    .terms { padding: 0; border: 0; background: none; }
    .terms__row { display: block; }
    .read__toggle { margin-left: calc(1.375rem + var(--space-4)); }
    .methods { margin-top: var(--space-5); }
    /* Tiles: head and body share one 12 px inset, so the radio, Zoho's form
       and our button line up, and Zoho's form keeps as much width as it can. */
    .tile__head { padding: var(--space-3); gap: var(--space-3); min-height: 4.5rem; }
    .tile__name { font-size: var(--text-base); }
    .tile__amt { font-size: var(--text-base); }
    .tile__body { padding: 0 var(--space-3) var(--space-3); }
    .tile__line { gap: var(--space-4); text-wrap: pretty; }
    .tile__auth { padding-left: calc(1.125rem + var(--space-4)); }
    .pay-mount { margin: 0 calc(2px + var(--space-3)) calc(2px + var(--space-3)); }
    /* International card: a plain row, the link under the card text. */
    .readcard {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 0 var(--space-4);
        padding: var(--space-2) 0 0;
        border: 0;
        border-radius: 0;
    }
    .readcard .linkbtn { grid-column: 2; justify-self: start; margin-left: 0; text-align: left; }
    .notice { margin-top: var(--space-3); padding: var(--space-4); }
    .notice__lead svg { display: none; }
    .notice .notice__more { padding-left: 0; }
    /* A failure keeps its mark here too, so it never differs from a note by colour alone. */
    .notice--failed .notice__lead svg { display: block; }
    .notice--failed .notice__more { padding-left: var(--space-7-5); }
    .mini { padding-left: 0; }
    .mini__row:not(.mini__row--total) { font-size: var(--text-14); }
    .mini__row dt { text-wrap: balance; }
    /* Paid: flat like the sections, one plain list between two rules. */
    .done__card { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .done__title { font-size: var(--text-28); }
    .done__facts {
        grid-template-columns: 1fr;
        gap: var(--space-0-5);
        margin-top: var(--space-6);
        padding: var(--space-5) 0;
        border-width: 1px 0;
        border-color: var(--border-rule);
        border-radius: 0;
        background: none;
    }
    .done__facts dd + dt { margin-top: var(--space-3); }
    .done__ref { white-space: nowrap; }
    .done__actions { margin-top: var(--space-6); }
    .done__actions .btn { flex: 1 1 100%; }
    .shop .btn { padding-inline: var(--space-5); text-align: center; }
    .foot__inner { display: flex; flex-direction: column; justify-content: center; text-align: center; padding-block: var(--space-5); }
    .foot__links { justify-content: center; justify-self: auto; }
    /* Contact Us keeps a 44 px target without making its line taller, so the three lines sit evenly. */
    .foot__contact a { display: inline-block; min-height: 0; padding-block: var(--space-3); margin-block: calc(-1 * var(--space-3)); }
}
/* Small phones: the code boxes use the full width, Resend Code goes under them,
   and the bar keeps the amount only (the done card shows Paid or Processing). */
@container page (max-width: 419px) {
    .code { padding: 0; border: 0; background: none; margin-top: var(--space-4); }
    .code__row { gap: var(--space-1) var(--space-4); }
    .code__boxes { flex: 1 1 100%; gap: var(--space-1-5); }
    .code__box { flex: 1 1 0; width: auto; min-width: 0; max-width: var(--space-14); height: var(--space-14); font-size: var(--text-22); }
    .code__dash { width: var(--space-2); margin-inline: 0; }
    .sumbar__amt .chip { display: none; }
}
@container page (max-width: 359px) {
    .fields:not(.fields--addr) { grid-template-columns: minmax(0, 1fr); }
    .fields--addr { grid-template-columns: minmax(0, 1fr) 6.75rem; }
    .f-zip .input { padding-inline: var(--space-3); }
    select.input { padding-right: 2.25rem; background-position: right var(--space-3) center; }
    .logo img { width: 7.5rem; }
    .marks svg:nth-child(4) { display: none; }
    .tile__name { font-size: var(--text-15); }
    .tile__tag { font-size: var(--text-13); }
    .tile__sub-lead { display: none; }
    .tile__amt .skel { width: var(--space-12); }
    .sumbar__label > svg:first-child { display: none; }
    .sumbar__label { font-size: var(--text-15); gap: var(--space-1-5); }
    .sumbar__amt { font-size: var(--text-17); gap: var(--space-1-5); }
    .code__boxes { gap: var(--space-1); }
    .code__dash { display: none; }
    .code__box { height: var(--field-height); }
    /* The boxes are 4 px apart here: the ring stays inside that gap. */
    .code__box:focus-visible { outline-offset: 0; }
    /* Google's 304 px frame, scaled to the 288 px column inside the gutters. */
    .captcha-box { height: calc(78px * 0.947); }
    .captcha-box > div { transform: scale(0.947); transform-origin: 0 0; }
    .hold, .ph-hold { padding-inline: var(--space-2-5); gap: var(--space-2); font-size: var(--text-14); }
    .hold svg, .ph-hold svg { width: var(--space-4); height: var(--space-4); }
    .foot__links { gap: 0 var(--space-5); }
    /* Short names keep the three links on one row; the full name stays in the link text for screen readers. */
    .foot__more { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Reduced motion: transitions finish at once (the site reset does the
   same), the confirmation mark does not animate; the spinner's fade and
   the stopped skeletons are in _components.css. !important beats the
   reset's own !important rules. */
@media (prefers-reduced-motion: reduce) {
    .shop *, .shop *::before, .shop *::after { transition-duration: 0.01ms !important; }
    .done__mark, .done.is-bank .done__mark { animation: none !important; }
}
