/* BSSP-281 (Ticket A): Screen 1, Welcome. BSSP-278 rev 3, FR-A1 to FR-A15.
   Tokens only (css/tokens.css, BSSP-280): no hex literals here. The one colour that isn't a
   token is a screener's own, which js/welcome.js sets per card from the config (OQ-6). */

/* FR-A14 (OQ-18): designed at 375px; wider, a centred column at most 420px. */
.sr-screen {
    max-width: var(--sr-column-max);
    margin: 0 auto;
    padding-left: var(--sr-space-page);
    padding-right: var(--sr-space-page);
    display: flex;
    flex-direction: column;
    gap: var(--sr-space-block);
}

.sr-screen > * {
    margin: 0;
}

/* FR-A1 */
.sr-heading {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--sr-color-brand);
    text-align: center;
}

.sr-heading:focus {
    outline: none;   /* focused by script after navigation (A11Y-10), never by the keyboard */
}

/* FR-A2 */
.sr-subhead {
    font-size: 17px;
    line-height: 1.5;
    color: var(--sr-color-text);
    text-align: center;
}

/* FR-A3: one card per screener */
.sr-cards {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sr-space-card-gap);
}

.sr-card {
    display: flex;
    border: 1px solid var(--sr-color-border);
    border-radius: var(--sr-radius-card);
    overflow: hidden;
}

.sr-card-strip {
    flex: none;
    width: 14px;
    background: var(--sr-card-color, var(--sr-color-neutral));
}

.sr-card-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    min-width: 0;
}

.sr-card-dot {
    flex: none;
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--sr-card-color, var(--sr-color-neutral));
}

.sr-card-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--sr-color-text);
    overflow-wrap: anywhere;
}

.sr-card-descriptor {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    color: var(--sr-color-subtext);
}

/* FR-A4 provider notice. OQ-19: the <br> between the sentences always holds; a sentence wraps
   within itself when it must; never truncated, never below 13px. */
.sr-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    background: var(--sr-color-brand-wash);
    border-radius: var(--sr-radius-card);
}

.sr-notice .material-symbols-outlined {
    flex: none;
    color: var(--sr-color-brand);
}

.sr-notice-text {
    margin: 0;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--sr-color-text);
}

/* FR-A5: the price in Bold 24 brand, the rest Regular 16 subtext, baseline-aligned, 8px apart.
   The translator places {price}, so the words may come before it, after it, or both. */
.sr-price {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    column-gap: 8px;
    font-size: 16px;
    color: var(--sr-color-subtext);
}

.sr-price-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--sr-color-brand);
}

/* FR-A15 */
.sr-promo {
    font-size: 14px;
    color: var(--sr-color-subtext);
    text-align: center;
}

/* FR-A6: the native checkbox, drawn to the design. The whole label row is the tap target,
   at least 44px high (A11Y-1). */
.sr-terms-label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    font-size: 17px;
    color: var(--sr-color-text);
    cursor: pointer;
}

.sr-checkbox-box {
    position: relative;
    flex: none;
    width: 22px;
    height: 22px;
}

.sr-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid var(--sr-color-brand);
    border-radius: var(--sr-radius-checkbox);
    background: transparent;
    cursor: pointer;
}

.sr-checkbox:checked {
    background: var(--sr-color-brand);
}

.sr-checkbox-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sr-color-on-brand);
    pointer-events: none;
    visibility: hidden;
}

.sr-checkbox:checked + .sr-checkbox-check {
    visibility: visible;
}

.sr-terms-label a {
    color: var(--sr-color-brand);
    text-decoration: underline;
}

/* FR-A7: full width, 48px, 24px radius, Bold 20. */
.sr-cta {
    display: block;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--sr-radius-cta);
    font-size: 20px;
    font-weight: 700;
    background: var(--sr-color-brand);
    color: var(--sr-color-on-brand);
}

.sr-cta[aria-disabled="true"] {
    background: var(--sr-color-border);
    color: var(--sr-color-disabled-text);
    cursor: default;
}

@media (hover: hover) {
    .sr-cta:not([aria-disabled="true"]):hover {
        background: var(--sr-color-brand-hover);
    }
}

/* ---------------------------------------------------------------------------------------------
   BSSP-282 (Ticket B): Screen 2, How it works. BSSP-278 rev 3, FR-B1 to FR-B9.
   --------------------------------------------------------------------------------------------- */

/* FR-B5: the screen fills the viewport below the header, so the disclaimer's auto top margin
   anchors it (and the CTA and footer under it) to the bottom. When the content is taller, the
   margin collapses to nothing and the 16px block gap still separates it from the timeline. */
.sr-screen-fill {
    box-sizing: border-box;
    min-height: calc(100vh - var(--sr-header-height));
    min-height: calc(100dvh - var(--sr-header-height));
}

/* FR-B3: 32px wash marker, 12px gap, then the text; 22px between rows; a 2px connector from
   the bottom of each marker to the next, none after the last. */
.sr-steps {
    list-style: none;
    padding: 0;
}

.sr-step {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: var(--sr-space-timeline-row);
}

.sr-step:last-child {
    padding-bottom: 0;
}

.sr-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 15px;   /* centred under the 32px marker */
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--sr-color-border);
}

.sr-step-marker {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sr-color-brand-wash);
    color: var(--sr-color-brand);
}

.sr-step-body {
    flex: 1;
    min-width: 0;
}

.sr-step-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.sr-step-title {
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--sr-color-text);
}

/* the estimate, right-aligned, in the hint grey (OQ-16) */
.sr-step-time {
    margin-left: auto;
    flex: none;
    font-size: 13px;
    color: var(--sr-color-hint);
    white-space: nowrap;
}

.sr-step-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--sr-color-subtext);
}

/* FR-B5 */
.sr-screen > .sr-disclaimer {
    margin-top: auto;
    font-size: 15px;
    font-style: italic;
    color: var(--sr-color-subtext);
}
