/* Cancel Assist, "Have Chip In do it" (CancelAgentPanel.razor, CancelAssistPracticePage.razor).
   Built on the Recurring area's cards, tags and buttons (recurring-area.css); this file only adds the layout those
   don't have. Colors come from the area's variables, so light and dark follow the site theme. */

.ca-panel { display: flex; flex-direction: column; gap: 12px; }

/* The practice page: the run (offer, or the stage and its log) then "What to look for". Stacked with the stage's own 16px
   rhythm; on very wide screens the notes move beside the run so they stay in view next to the log. The run column
   stops at the stage's 1280px so the two cards share edges instead of leaving a gutter between them. */
.ca-area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ca-area > * { min-width: 0; }
.ca-area > .ca-panel,
.ca-area > .ca-notes-card { max-width: 1280px; }

@media (min-width: 1680px) {
    .ca-area { grid-template-columns: minmax(0, 1280px) minmax(340px, 440px); justify-content: start; }
    .ca-area > .ca-notes-card { position: sticky; top: 16px; max-width: none; }
    .ca-notes-card .ca-notes { gap: 12px; font-size: 13px; }
}
.ca-body { display: flex; flex-direction: column; gap: 14px; }

.ca-statement {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--rc-card-border);
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.55;
}

.ca-accept { align-self: flex-start; }

/* The offer: what will happen, step by step, then the sentence the member agrees to. */
.ca-plan { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.ca-plan-step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.ca-plan-step:last-child { padding-bottom: 0; }

/* The line that joins one step to the next. */
.ca-plan-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 38px;
    bottom: 2px;
    left: 17px;
    width: 2px;
    border-radius: 2px;
    background: var(--rc-card-border);
}

.ca-plan-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--ci-icon-pill);
    color: var(--tx-primary);
    font-size: 14px;
}

.ca-plan-step.by-member .ca-plan-mark { background: var(--ci-icon-pill); color: var(--tx-caution); }
.ca-plan-body { min-width: 0; padding-top: 2px; }
.ca-plan-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; }

.ca-plan-who {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--rc-neutral-soft);
    color: var(--rc-muted, inherit);
    font-size: 11px;
    font-weight: 700;
}

.ca-plan-step.by-member .ca-plan-who { background: var(--rc-caution-soft); color: var(--tx-caution); }
.ca-plan-text { margin: 2px 0 0; max-width: 62ch; color: var(--rc-muted, inherit); font-size: 13px; line-height: 1.5; }

.ca-agree { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--rc-card-border); border-radius: 12px; background: var(--rc-row); }
.ca-agree .ca-statement { padding: 0; border: 0; border-radius: 0; }
.ca-start { min-height: 38px; padding: 6px 18px; }
.ca-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ca-actions a { text-decoration: none; }
.ca-foot { justify-content: flex-end; }

.ca-step { display: flex; flex-direction: column; gap: 8px; }
.ca-step-hold { padding: 12px 14px; border: 1px solid var(--rc-card-border); border-radius: 12px; }
.ca-step-title { margin: 0; font-size: 14px; font-weight: 600; }
.ca-step-text { margin: 0; font-size: 13.5px; line-height: 1.5; }
.ca-hint { margin: 0; font-size: 12.5px; color: var(--rc-muted, inherit); }

.ca-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    line-height: 1.45;
}

.ca-event { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; }
.ca-event time { color: var(--rc-muted, inherit); font-variant-numeric: tabular-nums; }
.ca-event-held span, .ca-event-submitted span, .ca-event-finished span { font-weight: 600; }

.ca-notes { margin: 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 10px; }
.ca-note { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.ca-note > span:last-child { padding-top: 4px; }

.ca-note-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ci-icon-pill);
    color: var(--rc-muted, inherit);
    font-size: 12px;
}

.ca-note.is-chipin .ca-note-mark { background: var(--ci-icon-pill); color: var(--tx-primary); }
.ca-note.is-member .ca-note-mark,
.ca-note.is-caution .ca-note-mark { background: var(--ci-icon-pill); color: var(--tx-caution); }

@media (max-width: 520px) {
    .ca-event { grid-template-columns: 1fr; gap: 0; }
    .ca-actions > * { flex: 1 1 100%; justify-content: center; }
}

/* Admin > Cancel Assist (CancelAssistAdmin.razor). The page is built on the AI usage kit (admin-ai-usage.css) and
   reads its variables; these rules add only what the kit doesn't have: the practice toggle, the member chip, the
   event list, and a run's saved session and timeline. */

.caa-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .32rem .65rem;
    border: 1px solid var(--adu-card-border);
    border-radius: 12px;
    color: var(--adu-muted);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}

.caa-toggle input { margin: 0; accent-color: var(--adu-violet); }
.caa-toggle:focus-within { box-shadow: var(--adu-focus); }

.caa-member { gap: .4rem; }
.caa-member a { display: inline-flex; margin-left: .15rem; color: inherit; opacity: .75; }
.caa-member a:hover { opacity: 1; }
.caa-member a:focus-visible { outline: none; box-shadow: var(--adu-focus); border-radius: 6px; }

.caa-events { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; font-size: .84rem; }

.caa-events li {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
    padding: .38rem .2rem;
    border-bottom: 1px solid var(--aiu-grid);
}

.caa-events li:last-child { border-bottom: 0; }
.caa-events i { color: var(--adu-light); text-align: center; }
.caa-events b { font-variant-numeric: tabular-nums; }

.caa-section { margin: 1.1rem 0 .5rem; font-size: .92rem; font-weight: 800; }

.caa-viewer { display: grid; gap: .6rem; }
.caa-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.caa-viewer-bar .aiu-muted { margin-left: auto; }
.caa-frames { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 10px; background: var(--aiu-plane); }

.caa-frames button {
    min-width: 1.9rem;
    padding: .25rem .4rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--adu-muted);
    font-size: .76rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.caa-frames button:hover { color: var(--adu-text); }
.caa-frames button:focus-visible { outline: none; box-shadow: var(--adu-focus); }
.caa-frames button.is-active { background: var(--aiu-surface); color: var(--adu-text); box-shadow: 0 1px 2px rgba(17, 24, 39, .1); }

.caa-shot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--adu-card-border);
    border-radius: 12px;
    background: var(--aiu-plane);
}

.caa-page { border: 1px solid var(--adu-card-border); border-radius: 12px; background: var(--aiu-raised); }
.caa-page summary { padding: .55rem .8rem; color: var(--adu-muted); font-size: .8rem; font-weight: 700; cursor: pointer; }
.caa-page summary:focus-visible { outline: none; box-shadow: var(--adu-focus); border-radius: 12px; }

.caa-page pre {
    max-height: 18rem;
    margin: 0;
    padding: .2rem .8rem .8rem;
    overflow: auto;
    color: var(--adu-text);
    font-size: .76rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.caa-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; font-size: .84rem; }

.caa-timeline li {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr) auto;
    align-items: start;
    gap: .55rem;
    padding: .45rem .2rem;
    border-bottom: 1px solid var(--aiu-grid);
}

.caa-timeline li:last-child { border-bottom: 0; }
.caa-timeline i { margin-top: .15rem; color: var(--adu-light); text-align: center; }
.caa-timeline strong { display: block; font-weight: 700; }
.caa-timeline span { display: block; color: var(--adu-muted); font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
.caa-timeline time { color: var(--adu-light); font-size: .76rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* A run as the member follows it (CancelAgentStage.razor): the progress strip, what is happening, the one question at
   the last step, the result, and the hosted browser inside the page. Built on the Recurring area's variables, so light
   and dark follow the site theme. The member's two turns (sign in, confirm) read amber wherever they appear. */

/* Never wider than the hosted page itself (1280px), so the words and the browser share one edge. */
.cas {
    --cas-danger: #DC2626;
    --cas-danger-deep: #B91C1C;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1280px;
}

.cas-top { display: flex; align-items: center; gap: 12px; }
.cas-help { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }

/* The strip: every step in order, joined by a line that fills in as the run moves. */
.cas-steps { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.cas-step { display: flex; flex: 0 1 auto; align-items: center; gap: 8px; min-width: 0; color: var(--rc-muted, inherit); font-weight: 600; }
.cas-step:not(:last-child) { flex: 1 1 auto; }

.cas-step:not(:last-child)::after {
    content: "";
    flex: 1 1 14px;
    min-width: 14px;
    height: 2px;
    margin: 0 8px 0 2px;
    border-radius: 2px;
    background: var(--rc-card-border);
}

.cas-step.is-done:not(:last-child)::after { background: var(--tx-positive); }

.cas-step-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid var(--rc-card-border);
    border-radius: 50%;
    background: var(--rc-card);
    font-size: 11px;
}

.cas-step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cas-step.by-member .cas-step-mark { border-color: var(--tx-caution); color: var(--tx-caution); }
.cas-step.is-done { color: var(--rc-text, inherit); }
.cas-step.is-done .cas-step-mark { border-color: var(--tx-positive); background: var(--tx-positive); color: #fff; }
.cas-step.is-current { color: var(--rc-text, inherit); font-weight: 700; }
.cas-step.is-current .cas-step-mark { border-color: var(--tx-primary); background: var(--rc-accent-soft); color: var(--tx-primary); box-shadow: 0 0 0 4px var(--rc-accent-soft); }
.cas-step.is-current.by-member .cas-step-mark { border-color: var(--tx-caution); background: var(--rc-caution-soft); color: var(--tx-caution); box-shadow: 0 0 0 4px var(--rc-caution-soft); animation: cas-turn 1.8s ease-in-out infinite; }

@keyframes cas-turn {
    50% { box-shadow: 0 0 0 8px transparent; }
}

/* Whose turn it is, in two words. */
.cas-turn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--rc-accent-soft);
    color: var(--tx-primary);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.6;
}

.cas-turn.is-member { background: var(--rc-caution-soft); color: var(--tx-caution); }

.cas-guide,
.cas-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--rc-card-border);
    border-radius: 18px;
    background: var(--rc-card);
    box-shadow: var(--rc-shadow, none);
}

.cas-guide.is-member { border-color: var(--tx-caution); box-shadow: 0 0 0 4px var(--rc-caution-soft), var(--rc-shadow, 0 0 0 transparent); }

.cas-guide-icon,
.cas-result-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--ci-icon-pill);
    color: var(--tx-primary);
    font-size: 18px;
}

.cas-guide.is-member .cas-guide-icon { background: var(--ci-icon-pill); color: var(--tx-caution); }
.cas-guide-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cas-headline { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.cas-guidance { margin: 0; max-width: 68ch; font-size: 14px; line-height: 1.55; }
.cas-hint { margin: 0; font-size: 13px; font-weight: 600; }
.cas-inline-help { align-self: flex-start; margin-left: -6px; }
.cas-guide-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cas-guide-actions a { text-decoration: none; }

/* How it ended. */
.cas-result-mark { width: 52px; height: 52px; border-radius: 50%; font-size: 21px; }
.cas-result.is-positive { border-color: var(--tx-positive); }
.cas-result.is-positive .cas-result-mark { background: var(--tx-positive); color: #fff; }
.cas-result.is-neutral .cas-result-mark { background: var(--rc-neutral-soft); color: var(--rc-muted, inherit); }
.cas-result.is-caution { border-color: var(--tx-caution); }
.cas-result.is-caution .cas-result-mark { background: var(--rc-caution-soft); color: var(--tx-caution); }
.cas-result .cas-headline { font-size: 22px; }
.cas-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.cas-facts div { min-width: 150px; padding: 8px 12px; border-radius: 12px; background: var(--rc-row); }
.cas-facts dt { color: var(--rc-muted, inherit); font-size: 11.5px; font-weight: 600; }
.cas-facts dd { margin: 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cas-note { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; color: var(--rc-muted, inherit); font-size: 13px; }

/* The one question, at the last step. The run waits here; nothing is clicked until the member chooses. */
.cas-decide {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "head terms" "actions terms" "foot terms";
    grid-template-rows: auto auto 1fr;
    gap: 16px 28px;
    align-items: start;
    padding: 24px 26px;
    border: 1px solid var(--tx-caution);
    border-radius: 20px;
    background: var(--rc-card);
    box-shadow: 0 0 0 4px var(--rc-caution-soft), var(--rc-shadow, 0 0 0 transparent);
}

.cas-decide.is-charge { border-color: var(--cas-danger); box-shadow: 0 0 0 4px var(--rc-critical-soft), var(--rc-shadow, 0 0 0 transparent); }
.cas-decide-head { grid-area: head; display: flex; flex-direction: column; gap: 8px; }
.cas-decide .cas-headline { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.cas-decide .cas-guidance { font-size: 14.5px; }

/* The merchant's own sentences: set apart, and never mistaken for Chip In's. */
.cas-terms { grid-area: terms; align-self: stretch; padding: 16px 18px; border-radius: 14px; background: var(--rc-row); }
.cas-terms-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0 0 8px; color: var(--rc-muted, inherit); font-size: 12px; font-weight: 700; }
.cas-terms-label i { color: var(--tx-caution); }
.cas-terms-source { font-weight: 500; }
.cas-terms-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cas-terms-list li { max-width: 72ch; padding-left: 12px; border-left: 3px solid var(--tx-caution); font-size: 15.5px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.cas-decide.is-charge .cas-terms-list li { border-left-color: var(--cas-danger); }
.cas-decide.is-charge .cas-terms-label i { color: var(--cas-danger); }
.cas-terms-none { margin: 0; max-width: 68ch; font-size: 14px; line-height: 1.5; }

.cas-decide-actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.cas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 24px;
    border: 1px solid var(--rc-line);
    border-radius: 999px;
    background: var(--rc-card);
    color: var(--rc-text);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.cas-btn:active:not(:disabled) { transform: translateY(1px); }
.cas-btn:disabled { opacity: .55; cursor: default; }
.cas-btn:focus-visible { outline: 3px solid var(--tx-primary); outline-offset: 2px; }
.cas-btn-cancel { border-color: var(--cas-danger); background: var(--cas-danger); color: #fff; }
.cas-btn-cancel:hover:not(:disabled) { border-color: var(--cas-danger-deep); background: var(--cas-danger-deep); }
.cas-btn-keep:hover:not(:disabled) { border-color: var(--tx-primary); color: var(--tx-primary); }
.cas-decide-foot { grid-area: foot; display: flex; flex-direction: column; gap: 2px; margin: 0; color: var(--rc-muted, inherit); font-size: 12.5px; line-height: 1.5; }

.cas-browser { overflow: hidden; border: 1px solid var(--rc-card-border); border-radius: 16px; background: var(--rc-card); box-shadow: var(--rc-shadow, none); }

.cas-browser.is-yours {
    border-color: var(--tx-caution);
    box-shadow: 0 0 0 4px var(--rc-caution-soft);
}

.cas-browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--rc-card-border);
    font-size: 12.5px;
}

.cas-browser-dots { display: inline-flex; gap: 5px; }
.cas-browser-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rc-card-border); }
.cas-browser-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cas-browser-mode { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--rc-neutral-soft); color: var(--rc-muted, inherit); font-weight: 600; text-align: right; }
.cas-browser.is-yours .cas-browser-mode,
.cas-browser.is-paused .cas-browser-mode { background: var(--rc-caution-soft); color: var(--tx-caution); }

/* The hosted page is 16:9; the picture fills the frame and the frame never grows past the page's own size. */
.cas-screen-wrap { position: relative; aspect-ratio: 16 / 9; background: var(--rc-surface, #f4f5f8); }
.cas-screen { position: absolute; inset: 0; outline: none; }
.cas-browser.is-yours .cas-screen { cursor: default; }
.cas-browser.is-yours .cas-screen:focus-visible { box-shadow: inset 0 0 0 3px var(--tx-caution); }
.cas-browser.is-watching .cas-screen,
.cas-browser.is-paused .cas-screen { cursor: not-allowed; }
.cas-picture { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }

.cas-screen-note {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    pointer-events: none;
}

.cas-screen-note p { margin: 0; max-width: 46ch; }
.cas-screen-note a { pointer-events: auto; text-decoration: none; }

.cas-foot { margin: 0; font-size: 12.5px; color: var(--rc-muted, inherit); }

.cas-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--tx-primary);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.cas-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
.cas-link:disabled { opacity: .55; cursor: default; }

/* The run's record: a card with a heading (day, start, how long) and one row per entry on a rail. */
.cas-log {
    border: 1px solid var(--rc-card-border);
    border-radius: 16px;
    background: var(--rc-card);
    box-shadow: var(--rc-shadow, 0 0 0 transparent);
    overflow: hidden;
}

.cas-log-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.cas-log-head::-webkit-details-marker { display: none; }
.cas-log-head:focus-visible { outline: 2px solid var(--tx-primary); outline-offset: -2px; border-radius: 16px; }
.cas-log[open] > .cas-log-head { border-bottom: 1px solid var(--rc-card-border); }

.cas-log-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--ci-icon-pill);
    color: var(--tx-primary);
    font-size: 13px;
}

.cas-log-title { flex: 0 0 auto; }
.cas-log-meta { display: flex; flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }

.cas-log-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--rc-row, var(--rc-neutral-soft));
    color: var(--rc-muted, inherit);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cas-log-chip i { font-size: 11px; opacity: .8; }
.cas-log-caret { flex: 0 0 auto; color: var(--rc-muted, inherit); font-size: 12px; transition: transform .18s ease; }
.cas-log[open] .cas-log-caret { transform: rotate(180deg); }

.cas-tl { margin: 0; padding: 14px 16px 16px; list-style: none; }

.cas-tl-row {
    position: relative;
    display: grid;
    grid-template-columns: 84px 28px minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
    padding-bottom: 14px;
}

.cas-tl-row:last-child { padding-bottom: 0; }

/* The rail joins one mark to the next. */
.cas-tl-row:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 0;
    left: calc(84px + 12px + 13px);
    width: 2px;
    border-radius: 2px;
    background: var(--rc-card-border);
}

.cas-tl-time {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    padding-top: 4px;
    color: var(--rc-text, inherit);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cas-tl-clock { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.cas-tl-sec { color: var(--rc-muted, inherit); font-size: 11.5px; font-weight: 600; }
.cas-tl-ampm { margin-left: 4px; color: var(--rc-muted, inherit); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }

.cas-tl-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ci-icon-pill);
    color: var(--rc-muted, inherit);
    font-size: 12px;
}

.cas-tl-row.is-chipin .cas-tl-mark { background: var(--ci-icon-pill); color: var(--tx-primary); }
.cas-tl-row.is-member .cas-tl-mark,
.cas-tl-row.is-caution .cas-tl-mark { background: var(--ci-icon-pill); color: var(--tx-caution); }
.cas-tl-row.is-positive .cas-tl-mark { background: var(--tx-positive); color: #fff; }
.cas-tl-row.is-critical .cas-tl-mark { background: var(--ci-icon-pill); color: var(--cas-danger); }
.cas-tl-row.is-strong .cas-tl-mark { box-shadow: 0 0 0 3px var(--rc-card), 0 0 0 4px currentColor; }

.cas-tl-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; padding-top: 4px; }
.cas-tl-text { margin: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.cas-tl-row.is-strong .cas-tl-text { font-weight: 650; }
.cas-tl-tags { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

.cas-tl-who,
.cas-tl-gap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cas-tl-who { background: var(--rc-caution-soft); color: var(--tx-caution); }
.cas-tl-who i { font-size: 9px; }
.cas-tl-gap { background: var(--rc-row, var(--rc-neutral-soft)); color: var(--rc-muted, inherit); font-weight: 600; }

@media (max-width: 900px) {
    /* One column, in reading order: the question, the merchant's words, the two answers. */
    .cas-decide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "terms" "actions" "foot"; grid-template-rows: none; }

    /* Only the step in hand keeps its words; the others stay as marks. */
    .cas-step:not(.is-current) .cas-step-label { display: none; }
    .cas-step.is-current { flex-shrink: 0; }
    .cas-step:not(:last-child)::after { flex-basis: 6px; min-width: 6px; margin: 0 4px; }
}

@media (max-width: 640px) {
    .cas-top { flex-wrap: wrap; }
    .cas-steps { flex: 1 1 100%; }
    .cas-help { margin-left: 0; }
    .cas-guide,
    .cas-result { grid-template-columns: auto minmax(0, 1fr); }
    .cas-guide-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .cas-decide { padding: 18px 16px; }
    .cas-decide .cas-headline { font-size: 22px; }
    .cas-decide-actions { flex-direction: column; align-items: stretch; }
    .cas-browser-mode span { display: none; }
    .cas-log-head { flex-wrap: wrap; }
    .cas-log-meta { flex: 1 1 100%; order: 3; justify-content: flex-start; }
    .cas-log-count { display: none; }
    .cas-tl-row { grid-template-columns: 64px 26px minmax(0, 1fr); column-gap: 10px; }
    .cas-tl-row:not(:last-child)::before { left: calc(64px + 10px + 12px); }
    .cas-tl-mark { width: 26px; height: 26px; }
    .cas-tl-sec { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cas-log-caret { transition: none; }
    .cas-step.is-current.by-member .cas-step-mark { animation: none; }
    .cas-btn { transition: none; }
}

/* What is left before a run starts (the month and the day), above the plan. */
.ca-limits { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.ca-limit { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ca-limit i { color: var(--rc-muted, inherit); }
.ca-limit-note { flex-basis: 100%; color: var(--rc-muted, inherit); font-size: 12.5px; }

/* The clock on the member's turn: time left, what happens when it runs out, and the one extension. */
.cas-clock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 10px 16px;
    border: 1px solid var(--rc-card-border);
    border-radius: 14px;
    font-size: 13.5px;
}
.cas-clock-time { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cas-clock-text { flex: 1 1 260px; min-width: 0; color: var(--rc-muted, inherit); line-height: 1.45; }
.cas-clock.is-warn { border-color: var(--tx-caution); }
.cas-clock.is-warn .cas-clock-time { color: var(--tx-caution); }
.cas-clock.is-warn .cas-clock-text { color: inherit; font-weight: 600; }

/* "What happens now" under a confirmed cancellation. */
.cas-next { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cas-next-label { margin: 0; color: var(--rc-muted, inherit); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cas-next-list { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.cas-next-list li { display: flex; align-items: baseline; gap: 8px; }
.cas-next-list i { color: var(--tx-positive); font-size: 12px; }

/* The hub: pick a subscription, see what is left, get back to a run that is going. */
/* It leads the page on its own row, also where the practice run and its notes sit side by side. */
.ca-area > .cah-card { grid-column: 1 / -1; }
.cah-card { max-width: 1280px; }
.cah-body { display: flex; flex-direction: column; gap: 14px; }
.cah-pick { display: grid; grid-template-columns: minmax(0, 520px) auto; gap: 6px 10px; align-items: center; justify-content: start; }
.cah-label { grid-column: 1 / -1; color: var(--rc-muted, inherit); font-size: 12.5px; font-weight: 600; }
.cah-running {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--tx-caution);
    border-radius: 14px;
}
.cah-running-text { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.cah-running a { text-decoration: none; }

@media (max-width: 640px) {
    .cah-pick { grid-template-columns: minmax(0, 1fr); }
    .cah-go { justify-self: start; }
}

/* ---------------------------------------------------------------------------------------------------------------
   The Cancel Assist hub (chb-): two lists of cards (what Chip In can cancel, what has a guide) beside History, and
   the drawer a past run opens in. Wide screens use the room: the lists fill it and History sits in a rail. Under
   1200px History drops below. No tinted tiles: borders and one accent mark carry the difference.
   --------------------------------------------------------------------------------------------------------------- */
.chb-area { margin-bottom: 16px; }
.chb { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.chb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chb-running {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 16px; border: 1px solid var(--tx-caution); border-radius: 14px;
}
.chb-notice {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 16px; border: 1px solid var(--rc-card-border); border-left: 3px solid var(--tx-positive); border-radius: 14px;
}
.chb-notice-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.chb-running-text { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.chb-running a { text-decoration: none; }
/* The line under a card's title on the Cancel Assist pages. */
.rc-card-sub { margin: 2px 0 0; max-width: 78ch; color: var(--rc-muted, inherit); font-size: 12.5px; line-height: 1.4; }
.chb-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.chb-stats { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.chb-stat { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.chb-stat-mark {
    grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid var(--rc-card-border); border-radius: 14px; color: var(--rc-muted, inherit); font-size: 17px;
}
.chb-stat.is-chipin .chb-stat-mark { border-color: var(--tx-positive); color: var(--tx-positive); }
.chb-stat-num { font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.chb-stat-label { color: var(--rc-muted, inherit); font-size: 12.5px; font-weight: 600; }
.chb-hero-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 12px; }
.chb-limits { display: flex; flex-wrap: wrap; gap: 8px; }
.chb-limit {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--rc-card-border);
    border-radius: 999px; font-size: 13px; font-weight: 600;
}
.chb-limit i { color: var(--rc-muted, inherit); font-size: 12px; }
.chb-search {
    display: inline-flex; align-items: center; gap: 8px; min-width: min(360px, 100%); padding: 0 12px; height: 38px;
    border: 1px solid var(--rc-card-border); border-radius: 12px; color: var(--rc-muted, inherit);
}
.chb-search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--rc-text, inherit); font: inherit; font-size: 14px; }
.chb-search:focus-within { border-color: var(--rc-text, currentColor); }

.chb-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 16px; align-items: start; }
.chb-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.chb-side { min-width: 0; position: sticky; top: 16px; }
.chb-section .rc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chb-count {
    flex: none; min-width: 30px; padding: 3px 10px; border: 1px solid var(--rc-card-border); border-radius: 999px;
    font-size: 12.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
}
.chb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.chb-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chb-empty-text { margin: 0; max-width: 70ch; color: var(--rc-muted, inherit); font-size: 13.5px; line-height: 1.5; }

.chb-item {
    display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--rc-card-border);
    border-radius: 14px; transition: border-color .15s ease, transform .15s ease;
}
.chb-item:hover { border-color: var(--rc-text, currentColor); }
.chb-item.is-chipin { border-left: 3px solid var(--tx-positive); }
.chb-item-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.chb-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; grid-row: span 2; }
.chb-logo-glyph { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--rc-card-border); color: var(--rc-muted, inherit); }
.chb-item-titles { min-width: 0; }
.chb-item-name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chb-item-plan { margin: 2px 0 0; color: var(--rc-muted, inherit); font-size: 13px; }
.chb-badge {
    grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px;
    border: 1px solid var(--rc-card-border); border-radius: 999px; color: var(--rc-muted, inherit); font-size: 11.5px; font-weight: 700;
}
.chb-badge.is-chipin { border-color: var(--tx-positive); color: var(--tx-positive); }
.chb-badge i { font-size: 10.5px; }
.chb-item-facts { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--rc-muted, inherit); }
.chb-item-facts li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.chb-item-facts i { flex: none; width: 14px; font-size: 11.5px; text-align: center; }
.chb-item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chb-item-actions a { text-decoration: none; }
.chb-skel { min-height: 148px; border-style: dashed; animation: chb-pulse 1.4s ease-in-out infinite; }
@keyframes chb-pulse { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }

.chb-history { display: flex; flex-direction: column; gap: 10px; }
.chb-runs { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.chb-runs li + li { border-top: 1px solid var(--rc-card-border); }
.chb-run {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; width: 100%;
    padding: 11px 6px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px;
}
.chb-run:hover, .chb-run:focus-visible { background: var(--rc-row-hover, rgba(127, 127, 127, .08)); outline: 0; }
.chb-run-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--rc-card-border); border-radius: 50%; font-size: 13px; }
.chb-run-mark.is-positive { color: var(--tx-positive); border-color: var(--tx-positive); }
.chb-run-mark.is-caution { color: var(--tx-caution); border-color: var(--tx-caution); }
.chb-run-mark.is-neutral { color: var(--rc-muted, inherit); }
.chb-run-text { display: flex; flex-direction: column; min-width: 0; }
.chb-run-name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chb-run-meta { color: var(--rc-muted, inherit); font-size: 12px; }
.chb-run-receipt, .chb-run-go { color: var(--rc-muted, inherit); font-size: 12px; }
.chb-more { align-self: flex-start; }

.chb-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(0, 0, 0, .5); }
.chb-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1041; display: flex; flex-direction: column;
    width: min(620px, 100vw); background: var(--rc-card, #151a2b); color: var(--rc-text, inherit);
    border-left: 1px solid var(--rc-card-border); box-shadow: -18px 0 48px rgba(0, 0, 0, .35); outline: 0;
    animation: chb-slide .22s ease-out;
}
@keyframes chb-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.chb-drawer-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--rc-card-border); }
.chb-drawer-titles { min-width: 0; }
.chb-drawer-title { margin: 0; font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chb-drawer-sub { margin: 2px 0 0; color: var(--rc-muted, inherit); font-size: 12.5px; }
.chb-drawer-close { width: 36px; height: 36px; border: 1px solid var(--rc-card-border); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.chb-drawer-close:hover { border-color: var(--rc-text, currentColor); }
.chb-drawer-body { flex: 1; overflow-y: auto; padding: 4px 18px 22px; }
.chb-block { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; }
.chb-block + .chb-block { border-top: 1px solid var(--rc-card-border); }
.chb-block-title { margin: 0; color: var(--rc-muted, inherit); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.chb-block-note { margin: 0; color: var(--rc-muted, inherit); font-size: 12.5px; line-height: 1.5; }
.chb-block-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chb-block-actions a { text-decoration: none; }
.chb-summary { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.chb-receipt { display: block; max-height: 420px; overflow: hidden; border: 1px solid var(--rc-card-border); border-radius: 12px; background: #fff; }
.chb-receipt img, .chb-frame { display: block; width: 100%; height: auto; }
.chb-frame { border: 1px solid var(--rc-card-border); border-radius: 12px; background: #fff; }
.chb-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 16px; margin: 0; }
.chb-facts dt { color: var(--rc-muted, inherit); font-size: 11.5px; font-weight: 600; }
.chb-facts dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.chb-replay-bar { display: flex; align-items: center; gap: 10px; }
.chb-replay-pos { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chb-events { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.chb-events li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
.chb-events time { color: var(--rc-muted, inherit); font-variant-numeric: tabular-nums; }

@media (max-width: 1200px) {
    .chb-layout { grid-template-columns: minmax(0, 1fr); }
    .chb-side { position: static; }
}
@media (max-width: 640px) {
    .chb-grid { grid-template-columns: minmax(0, 1fr); }
    .chb-item-actions > * { flex: 1 1 auto; justify-content: center; }
    .chb-search { width: 100%; }
    .chb-drawer { width: 100vw; border-left: 0; }
    .chb-events li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .chb-drawer, .chb-skel { animation: none; }
    .chb-item { transition: none; }
}

/* ---------------------------------------------------------------------------------------------------------------
   Cancel Assist help (chb-help, chb-demo, hiw-): the question mark on every card, the "See how it works" card in the
   hero, and the sheet both open: what each button does, and an animated walk-through of each way to cancel. Outlined,
   never tinted; the motion stops for people who ask for less of it.
   --------------------------------------------------------------------------------------------------------------- */
.chb-item { position: relative; }
.chb-item-head { padding-right: 34px; }
.chb-help { position: absolute; top: 8px; right: 8px; color: var(--rc-muted, inherit); }
.chb-help:hover, .chb-help:focus-visible { color: var(--tx-primary); }
.chb-demo {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 10px; font: inherit; text-align: left; cursor: pointer;
    color: var(--rc-text, inherit); background: transparent; border: 1px solid var(--rc-card-border); border-radius: 14px;
}
.chb-demo:hover, .chb-demo:focus-visible { border-color: var(--tx-primary); }
.chb-demo-mark { display: inline-flex; font-size: 22px; color: var(--tx-primary); }
.chb-demo-text { display: flex; flex-direction: column; line-height: 1.2; }
.chb-demo-text strong { font-size: 13.5px; font-weight: 700; }
.chb-demo-text span { font-size: 12px; color: var(--rc-muted, inherit); }

/* "What you can do" and "See how it works" (hiw-): the public site's glass. A translucent sheet over a softly blurred
   page, neutral ink, hairlines drawn as inset shadows rather than borders, no tinted fills and no accent borders. The
   selected way to cancel is a raised segment; the current step a soft gradient; finished steps a checkmark. */
.e-dialog.tx-dialog.hiw-dialog {
    --hiw-ink: #0b0f19; --hiw-sub: #5d6178; --hiw-line: rgba(11, 15, 25, .08); --hiw-well: rgba(11, 15, 25, .05); --hiw-well-strong: rgba(11, 15, 25, .09);
    --hiw-glass: rgba(255, 255, 255, .74); --hiw-panel: rgba(255, 255, 255, .62); --hiw-raised: #ffffff;
    --hiw-shadow: 0 0 0 1px rgba(11, 15, 25, .06), 0 1px 1px rgba(11, 15, 25, .05), 0 12px 24px -10px rgba(11, 15, 25, .18), 0 40px 70px -30px rgba(11, 15, 25, .38);
    --hiw-raised-shadow: 0 0 0 1px rgba(11, 15, 25, .06), 0 1px 2px rgba(11, 15, 25, .08), 0 4px 10px -4px rgba(11, 15, 25, .12);
    --hiw-current: linear-gradient(180deg, rgba(11, 15, 25, .075), rgba(11, 15, 25, .035));
    --hiw-good: #16a34a;
    border: 0; border-radius: 24px; overflow: hidden;
    background: var(--hiw-glass); -webkit-backdrop-filter: blur(40px) saturate(1.6); backdrop-filter: blur(40px) saturate(1.6);
    box-shadow: var(--hiw-shadow);
}
[data-bs-theme="dark"] .e-dialog.tx-dialog.hiw-dialog {
    --hiw-ink: #f1f2f8; --hiw-sub: #a3a8be; --hiw-line: rgba(255, 255, 255, .08); --hiw-well: rgba(255, 255, 255, .06); --hiw-well-strong: rgba(255, 255, 255, .1);
    --hiw-glass: rgba(14, 17, 28, .64); --hiw-panel: rgba(255, 255, 255, .04); --hiw-raised: rgba(255, 255, 255, .13);
    --hiw-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 50px -18px rgba(0, 0, 0, .6);
    --hiw-raised-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 2px 8px -2px rgba(0, 0, 0, .4);
    --hiw-current: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
    --hiw-good: #34d399;
}
.e-dialog.tx-dialog.hiw-dialog .e-dlg-content { background: transparent; color: var(--hiw-ink); height: auto; }
.e-dlg-container:has(> .hiw-dialog) > .e-dlg-overlay { background-color: rgba(11, 15, 25, .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
[data-bs-theme="dark"] .e-dlg-container:has(> .hiw-dialog) > .e-dlg-overlay { background-color: rgba(3, 5, 10, .5); }

.hiw { display: flex; flex-direction: column; max-height: min(760px, calc(100dvh - 32px)); color: var(--hiw-ink); }
.hiw :focus-visible { outline: 2px solid color-mix(in srgb, var(--hiw-ink) 45%, transparent); outline-offset: 2px; }
.hiw-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 20px 20px 4px 22px; }
.hiw-head-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ci-icon-pill); color: var(--hiw-ink); font-size: 14px; }
.hiw-title { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: var(--hiw-ink); }
.hiw-subtitle { margin: 3px 0 0; font-size: 13px; line-height: 1.4; color: var(--hiw-sub); }
.hiw-close { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--hiw-well); color: var(--hiw-sub); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.hiw-close svg { width: 18px; height: 18px; fill: currentColor; }
.hiw-close:hover { background: var(--hiw-well-strong); color: var(--hiw-ink); }

.hiw-body { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow: auto; padding: 16px 22px 20px; }

/* The ways to cancel: a segmented control, the chosen one raised. */
.hiw-tabs { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; padding: 4px; border-radius: 14px; background: var(--hiw-well); }
.hiw-tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--hiw-sub); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.hiw-tab i { font-size: 13px; opacity: .8; }
.hiw-tab:hover { color: var(--hiw-ink); }
.hiw-tab.is-on { background: var(--hiw-raised); color: var(--hiw-ink); box-shadow: var(--hiw-raised-shadow); }
.hiw-lead { margin: -4px 0 0; font-size: 14px; line-height: 1.5; color: var(--hiw-sub); }

.hiw-stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.hiw-screen { position: relative; display: flex; flex-direction: column; min-height: 272px; border-radius: 18px; background: var(--hiw-panel); box-shadow: inset 0 0 0 1px var(--hiw-line); overflow: hidden; }
.hiw-screen-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; }
.hiw-dots { display: inline-flex; gap: 6px; }
.hiw-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--hiw-well-strong); }
.hiw-count { margin-left: auto; font-size: 12px; font-style: normal; font-weight: 600; color: var(--hiw-sub); font-variant-numeric: tabular-nums; }
.hiw-frame { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding: 18px 22px 20px; animation: hiw-in .36s cubic-bezier(.22, .8, .24, 1) both; }
.hiw-frame-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 2px; border-radius: 14px; background: var(--ci-icon-pill); color: var(--hiw-ink); font-size: 19px; }
.hiw-frame-mark.is-chipin { color: var(--hiw-good); }
.hiw-frame-title { font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.hiw-frame-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--hiw-sub); }

/* Who does the step: a quiet label with a dot. Chip In's dot is the one colour on the sheet. */
.hiw-who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--hiw-sub); white-space: nowrap; }
.hiw-who::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hiw-ink); opacity: .55; }
.hiw-who.is-chipin::before { background: var(--hiw-good); opacity: 1; }
.hiw-who.is-company::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hiw-sub); opacity: .8; }

.hiw-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 0 14px 14px; }
.hiw-progress span { position: relative; height: 3px; border-radius: 2px; background: var(--hiw-well-strong); overflow: hidden; }
.hiw-progress span::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--hiw-ink); transform: scaleX(0); transform-origin: 0 50%; }
.hiw-progress span.is-done::after { transform: none; }
.hiw-progress span.is-filling::after { animation: hiw-fill var(--hiw-beat, 3400ms) linear both; }

.hiw-steps { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.hiw-step { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 42px; padding: 7px 12px 7px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--hiw-sub); font: inherit; font-size: 14px; line-height: 1.35; text-align: left; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.hiw-step:hover { background: var(--hiw-well); color: var(--hiw-ink); }
.hiw-step.is-done { color: var(--hiw-ink); }
.hiw-step.is-current { background: var(--hiw-current); color: var(--hiw-ink); font-weight: 600; }
.hiw-step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--hiw-well); color: var(--hiw-sub); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color .2s ease, color .2s ease; }
.hiw-step-n i { font-size: 11px; }
.hiw-step.is-done .hiw-step-n { color: var(--hiw-ink); }
.hiw-step.is-current .hiw-step-n { background: var(--hiw-ink); color: var(--hiw-raised); }
[data-bs-theme="dark"] .hiw-step.is-current .hiw-step-n { color: #0b0f19; }
.hiw-step-text { min-width: 0; }

.hiw-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--hiw-well); font-size: 13.5px; line-height: 1.5; color: var(--hiw-sub); }
.hiw-note i { margin-top: 3px; color: var(--hiw-ink); opacity: .7; }

.hiw-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--hiw-line); }
.hiw-player { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.hiw-ghost, .hiw-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; font: inherit; font-size: var(--ci-fs-btn-xs, 13px); font-weight: 600; cursor: pointer; transition: background-color .15s ease, color .15s ease, filter .15s ease; }
.hiw-ghost { background: var(--hiw-well); color: var(--hiw-ink); }
.hiw-ghost i { font-size: 11px; opacity: .8; }
.hiw-ghost:hover:not(:disabled) { background: var(--hiw-well-strong); }
.hiw-ghost:disabled { opacity: .4; cursor: default; }
.hiw-primary { margin-left: auto; padding: 0 20px; background: var(--ci-btn-fill) border-box; color: var(--ci-btn-text); box-shadow: var(--ci-btn-edge); }
.hiw-primary:hover { filter: var(--ci-btn-hover); }

/* "What you can do": the card's buttons, one to a row. */
.hiw-actions { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.hiw-action { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 14px 0; box-shadow: inset 0 -1px 0 var(--hiw-line); }
.hiw-action:first-child { padding-top: 4px; }
.hiw-action:last-child { box-shadow: none; }
.hiw-action-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ci-icon-pill); color: var(--hiw-ink); font-size: 15px; }
.hiw-action-text h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--hiw-ink); }
.hiw-action-text p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--hiw-sub); }
.hiw-action-text .hiw-best { margin-top: 6px; font-size: 13px; }
.hiw-best strong { color: var(--hiw-ink); font-weight: 600; }

@keyframes hiw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes hiw-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 640px) {
    .e-dialog.tx-dialog.hiw-dialog { border-radius: 0; }
    .e-dialog.tx-dialog.hiw-dialog .e-dlg-content { height: 100%; }
    .hiw { height: 100%; max-height: 100dvh; }
    .hiw-head { padding: max(16px, env(safe-area-inset-top)) 16px 4px 18px; }
    .hiw-body { flex: 1 1 auto; padding: 14px 18px max(18px, env(safe-area-inset-bottom)); }
    .hiw-tabs { align-self: stretch; }
    .hiw-tab { flex: 1 1 auto; justify-content: center; }
    .hiw-stage { grid-template-columns: minmax(0, 1fr); }
    .hiw-screen { min-height: 230px; }
    .hiw-step .hiw-who { display: none; }
    .hiw-step { grid-template-columns: 26px minmax(0, 1fr); }
    .hiw-foot { margin-top: auto; }
    .hiw-primary { margin-left: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .hiw-frame { animation: none; }
    .hiw-progress span.is-filling::after { animation: none; transform: none; }
}
[data-a11y-reduce-motion="on"] .hiw-frame { animation: none; }
[data-a11y-reduce-motion="on"] .hiw-progress span.is-filling::after { animation: none; transform: none; }

/* ---------------------------------------------------------------------------------------------------------------
   Admin > Cancel Assist > Merchants (cma-): the few things the AI usage kit does not have. The tabs are buttons
   (the lists switch in place), the guide editor is a two-column form, and a candidate's actions wrap.
   --------------------------------------------------------------------------------------------------------------- */
button.aiu-tab.cma-tab { border: 0; font: inherit; cursor: pointer; }
.cma-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.cma-search { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 420px; margin: 0; }
.cma-search .adu-input { flex: 1; min-width: 0; }
.cma-actions { white-space: normal; }
.cma-actions .adu-btn { margin: 2px 0 2px 4px; }
.cma-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cma-form .aiu-field { min-width: 0; margin: 0; }
.cma-wide { grid-column: 1 / -1; }
.cma-area { width: 100%; min-height: 0; resize: vertical; line-height: 1.45; }
.cma-label { display: block; margin-bottom: 4px; font-weight: 600; }
.cma-review { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--adu-border, rgba(127, 127, 127, .25)); }
.cma-review p { margin: 0 0 8px; }
.cma-pages summary { cursor: pointer; font-weight: 600; }
.cma-pages ul { margin: 8px 0 0; padding-left: 18px; }
.cma-pages li { margin-bottom: 4px; overflow-wrap: anywhere; }
.cma-changes { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cma-changes li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.cma-was, .cma-now { white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; padding-left: 10px; border-left: 3px solid var(--adu-border, rgba(127, 127, 127, .35)); }
.cma-was { text-decoration: line-through; opacity: .7; }
.cma-now { border-left-color: var(--tx-positive, #16a34a); }
.cma-extra { margin-top: 18px; }
.cma-extra h3 { margin: 16px 0 8px; font-size: 14px; font-weight: 700; }
.cma-aliases, .cma-versions { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.cma-aliases li, .cma-versions li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cma-aliases code { overflow-wrap: anywhere; }
.cma-alias-add { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr) auto; gap: 8px; align-items: center; }

/* The help: how the lists fit together, and for the open list what it is, the steps and what every button does.
   Outlined, never tinted. */
.cma-flow, .cma-help { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--adu-card-border, rgba(127, 127, 127, .25)); border-radius: 12px; }
.cma-flow h2, .cma-help h3 { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--adu-text, inherit); }
.cma-flow ol, .cma-help ol, .cma-points { display: flex; flex-direction: column; gap: 4px; margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.45; }
.cma-points { margin: 0 0 10px; }
.cma-help-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.cma-help-what { flex: 1 1 320px; margin: 0; font-weight: 600; line-height: 1.45; }
.cma-help-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 14px 24px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--adu-card-border, rgba(127, 127, 127, .25)); }
.cma-help-body section { min-width: 0; }
.cma-help-body section:nth-child(3) { grid-column: 1 / -1; }
.cma-keys { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13.5px; line-height: 1.45; }
.cma-keys > div { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 2px 12px; }
.cma-keys dt { display: flex; align-items: baseline; gap: 7px; margin: 0; font-weight: 700; }
.cma-keys dt i { flex: 0 0 16px; text-align: center; opacity: .75; }
.cma-keys dd { margin: 0; color: var(--adu-muted, inherit); }
.cma-unread { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--adu-card-border, rgba(127, 127, 127, .25)); border-left: 3px solid var(--aiu-warning, #d97706); border-radius: 8px; }
.cma-unread i { margin-top: 3px; color: var(--aiu-warning-ink, #b45309); }
@media (max-width: 900px) {
    .cma-help-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .cma-form { grid-template-columns: minmax(0, 1fr); }
    .cma-alias-add { grid-template-columns: minmax(0, 1fr); }
    .cma-keys > div { grid-template-columns: minmax(0, 1fr); }
}

/* The receipt on a finished run: the capture beside what it is and what can be done with it. */
.cas-receipt { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rc-card-border); }
.cas-receipt-shot { display: block; max-height: 150px; overflow: hidden; border: 1px solid var(--rc-card-border); border-radius: 10px; }
.cas-receipt-shot img { display: block; width: 100%; height: auto; }
.cas-receipt-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; line-height: 1.45; }
.cas-receipt-text span { color: var(--rc-muted, inherit); }
.cas-receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cas-receipt-actions a { text-decoration: none; }
@media (max-width: 560px) { .cas-receipt { grid-template-columns: minmax(0, 1fr); } }

/* Chip In's cursor over the browser picture (cancel-live-view.js), and the ring where a step landed in the replay. */
.cas-cursor { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; pointer-events: none; transition: transform .35s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.cas-cursor[hidden] { display: none; }
.cas-cursor.is-jump { transition: none; }
.cas-cursor-arrow { position: absolute; left: -4px; top: -2px; fill: var(--rc-bills, #5b4be1); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .35)); }
.cas-cursor-ring { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; box-sizing: border-box; border: 2px solid var(--rc-bills, #5b4be1); border-radius: 50%; opacity: 0; }
.cas-cursor.is-pulse .cas-cursor-ring { animation: cas-cursor-pulse .6s ease-out 1; }
.cas-cursor.is-resting .cas-cursor-ring { opacity: .85; }
@keyframes cas-cursor-pulse { 0% { opacity: .95; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.5); } }
.chb-frame-wrap { position: relative; line-height: 0; }
.chb-frame-ring { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; box-sizing: border-box; border: 2px solid var(--rc-bills, #5b4be1); border-radius: 50%; box-shadow: 0 0 0 2px rgb(255 255 255 / .85); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .cas-cursor { transition: none; }
    .cas-cursor.is-pulse .cas-cursor-ring { animation: none; opacity: .85; }
}

/* A charge on something the member cancelled: the same notice, marked with the caution colour on its edge and icon. */
.chb-notice-charge { border-left: 3px solid var(--rc-caution, #b45309); }
.chb-notice-charge .chb-running-text > i, .chb-notice-charge .chb-running-text > svg { color: var(--rc-caution, #b45309); }
.chb-notice-actions a { text-decoration: none; }

/* The sign-in opened in a window of its own: said under the browser, with the two ways out when it cannot be seen. */
.cas-foot-window { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border: 1px solid var(--rc-card-border); border-radius: 10px; color: inherit; }
.cas-foot + .cas-foot { margin-top: 6px; }

/* Bills: what ending one means, above "I agree"; and the word "Bill" beside a hub item's price. No fill, by design. */
.ca-bill-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13.5px; line-height: 1.5; font-weight: 600; }
.ca-bill-note i { margin-top: 3px; color: var(--tx-caution); }
.chb-item-kind { margin-left: 6px; padding: 0 7px; border: 1px solid var(--rc-card-border); border-radius: 999px; font-size: 11.5px; white-space: nowrap; }

/* ==========================================================================
   Cancel Assist in the member's own browser (cas-own, ca-own-, chb-more): the run page's note in place of the hosted
   browser, the two setup steps on the offer, and the hub card's "More ways to cancel". Bordered, never tinted.
   ========================================================================== */
.cas-own { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px; border: 1px solid var(--rc-card-border); border-radius: 14px; }
.cas-own-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.cas-own-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--rc-muted, inherit); }
.ca-own-setup { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--rc-card-border); border-radius: 12px; }
.ca-own-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; }
.ca-own-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.ca-own-text, .ca-own-alt { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--rc-muted, inherit); }
.ca-own-alt a, .ca-own-list a { color: var(--tx-primary); font-weight: 600; }
.chb-more { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rc-card-border); font-size: 13.5px; }
.chb-more summary { cursor: pointer; font-weight: 600; color: var(--rc-muted, inherit); }
.chb-more summary:hover, .chb-more[open] summary { color: var(--rc-text, inherit); }
.chb-more-body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.chb-more-note { color: var(--rc-muted, inherit); }
