/* ═══════════════════════════════════════════════════════════ */
/* SECTION 1 - INTRO */
/* ═══════════════════════════════════════════════════════════ */
/* #main-content already carries margin-top: var(--navbar-height),
   so this only needs its own breathing room on top. */
.beta-intro {
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(to bottom, var(--brand-primary-tint-100), var(--surface-background) 90%);
}

/* Not --font-size-hero: that clamps to ~1rem on small screens, which would sink the h1 below the section h2s */
.beta-intro h1 {
    font-size: clamp(1.7rem, calc(1.1rem + 2.14vw), 2rem);
    color: var(--brand-primary-500);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.beta-lead {
    max-width: 640px;
    margin: 0 auto var(--spacing-md);
    color: var(--text-secondary);
}

.beta-lead:last-child {
    margin-bottom: 0;
}

/* iPhone visitors need redirecting, not instructing: the app is out for them.
   Gold rather than the page's purple so it reads as an aside, not a step. */
.beta-ios-note {
    background: var(--accent-gold-tint-100);
    border-left: 4px solid var(--accent-gold-500);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: left;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════ */
/* SHARED SECTION FURNITURE */
/* ═══════════════════════════════════════════════════════════ */

/* base.css sets h2 to a flat 2rem; every section heading here scales instead */
.beta-signup h2,
.beta-trust h2,
.beta-steps h2,
.beta-help h2,
.beta-feedback h2,
.beta-next h2 {
    font-size: clamp(1.2rem, calc(0.95rem + 2.14vw), 1.6rem);
    color: var(--brand-primary-500);
    font-weight: 600;
    padding: 0;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.beta-steps h2 i {
    margin-right: var(--spacing-sm);
}

/* Centred to match the other sections, whose leads carry .text-center */
.beta-section-lead {
    max-width: 680px;
    margin: 0 auto var(--spacing-xl);
    color: var(--text-secondary);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════ */
/* SECTION 3 - WHAT YOU'LL SEE / HOW TO CHECK IT'S US */
/* ═══════════════════════════════════════════════════════════ */
/* Never make this collapsible. It exists because a tester hit a run of
   warnings mid-install and thought they were being scammed - someone in that
   state does not expand an accordion to find out whether they're being conned. */
.beta-trust {
    padding: var(--spacing-xl) var(--spacing-md);
}

.beta-trust-panel {
    max-width: 720px;
}

.beta-trust-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-lg);
}

.beta-trust-list li {
    background: var(--surface-background);
    border: 1px solid var(--border-hairline);
    border-left: 4px solid var(--accent-gold-500);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.beta-trust-list li strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.beta-trust-after {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Purple, not gold: this is the reassuring half, and it should read as ours
   rather than as another warning */
.beta-trust-verify {
    background: var(--brand-primary-tint-100);
    border: 1px solid var(--brand-primary-tint-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.beta-trust-verify h3 {
    font-size: clamp(1.05rem, calc(0.9rem + 0.9vw), 1.25rem);
    margin-bottom: var(--spacing-sm);
}

.beta-trust-verify h3 i {
    margin-right: var(--spacing-sm);
}

.beta-trust-verify p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.beta-trust-verify ul {
    padding-left: var(--spacing-lg);
    margin-bottom: 0;
    color: var(--text-secondary);
}

.beta-trust-verify li {
    margin-bottom: var(--spacing-md);
}

.beta-trust-verify li:last-child {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* SECTION 4 - NUMBERED INSTALL STEPS */
/* ═══════════════════════════════════════════════════════════ */
.beta-steps {
    padding: var(--spacing-xl) var(--spacing-md);
}

/* Counter rather than list-style, so the number can be a styled badge
   sitting in the card's top-left corner */
.beta-step-list {
    counter-reset: beta-step;
    list-style: none;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
}

.beta-step {
    counter-increment: beta-step;
    position: relative;
    background: var(--surface-background);
    border: 1px solid var(--border-hairline);
    border-left: 4px solid var(--brand-primary-500);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-small);
    padding: var(--spacing-lg);
    /* Room for the number badge, which overlaps the top-left corner */
    padding-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.beta-step::before {
    content: "Step " counter(beta-step);
    position: absolute;
    top: calc(var(--spacing-md) * -0.75);
    left: var(--spacing-lg);
    background: var(--brand-primary-500);
    color: var(--text-inverse);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-lg);
}

.beta-step-title {
    font-size: clamp(1.05rem, calc(0.9rem + 0.9vw), 1.25rem);
    margin-bottom: var(--spacing-sm);
}

.beta-step p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.beta-step p:last-child {
    margin-bottom: 0;
}

/* A menu path or tap sequence - set apart so it reads as instructions
   rather than prose, since people scan for it.
   Scoped to .beta-step to outrank the `.beta-step p` colour above. */
.beta-step .beta-path {
    background: var(--bg-blue);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--text-primary);
}

/* Asides: worth reading, but not part of the step itself */
.beta-note {
    font-size: 0.9rem;
    border-left: 3px solid var(--accent-gold-500);
    padding-left: var(--spacing-md);
}

/* ═══════════════════════════════════════════════════════════ */
/* SECTION 2 - SIGNUP FORM (Netlify) */
/* ═══════════════════════════════════════════════════════════ */
/* Returns to white at BOTH edges: the intro above and the steps below are both
   white, so a one-way fade would leave a hard band at one end or the other. */
.beta-signup {
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(to bottom,
        var(--surface-background),
        var(--bg-blue) 50%,
        var(--surface-background));
}

/* Matches the panel treatment on the contact and notify forms */
.beta-form-container {
    max-width: 650px;
    background: #E8EFF5;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: var(--shadow-small);
}

.beta-form-alert-wrap,
#beta-form-alert {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Which address to use - platform-specific, sits above the field it explains */
.beta-which-address {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-hairline);
}

.beta-which-address h3 {
    font-size: clamp(1.05rem, calc(0.9rem + 0.9vw), 1.25rem);
    margin-bottom: var(--spacing-sm);
}

.beta-which-address p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.beta-which-address p:last-child {
    margin-bottom: 0;
}

/* The .beta-path treatment is scoped to .beta-step further down, so the
   form's copy of it is restated here */
.beta-which-address .beta-path {
    background: var(--surface-background);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--text-primary);
}

#beta-form .form-label,
#beta-form legend.form-label {
    font-weight: 600;
    color: var(--brand-primary-500);
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    /* Bootstrap floats legends full-width; this keeps it sized to its text */
    float: none;
    width: auto;
}

#beta-form .required-indicator {
    margin-left: var(--spacing-xs);
}

#beta-form .form-check-label {
    font-weight: normal;
    color: var(--text-primary);
    margin-bottom: 0;
}

.beta-field-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

/* This page doesn't load contact.css, so the shared .form-check treatment
   (flex row, card background) is repeated here rather than cross-imported */
#beta-form .form-check {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    background: var(--surface-background);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

/* flex-basis: 0 keeps the long consent text on the same line as its checkbox -
   with basis auto its max-content width overflows and wraps below */
#beta-form .form-check .form-check-label {
    flex: 1 1 0;
    min-width: 0;
}

/* Drop the feedback onto its own line instead of a third flex column */
#beta-form .form-check .invalid-feedback {
    flex-basis: 100%;
}

#beta-form .form-check-input {
    -webkit-appearance: none;
    appearance: none;
    float: none;
    margin-left: 0;
    width: 1.4em;
    height: 1.4em;
    border: 2px solid var(--border-default);
    border-radius: 4px;
    background-color: var(--surface-background);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

#beta-form .form-check-input[type="radio"] {
    border-radius: var(--radius-rounded);
}

#beta-form .form-check-input:checked {
    background-color: var(--brand-primary-500);
    border-color: var(--brand-primary-500);
    background-repeat: no-repeat;
    background-position: center;
}

#beta-form .form-check-input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 80%;
}

#beta-form .form-check-input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
    background-size: 100%;
}

#beta-form .form-check-input:focus {
    outline: 3px solid var(--brand-primary-tint-200);
    outline-offset: 2px;
}

#beta-form .form-control {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background-color: var(--surface-background);
}

#beta-form .form-control:focus {
    border-color: var(--brand-primary-500);
    box-shadow: var(--shadow-form-input);
}

/* Bootstrap's own invalid styles are (0,3,0) and lose to the id-scoped rules
   above, so the error state is restated at a specificity that wins */
#beta-form.was-validated .form-control:invalid,
#beta-form.was-validated .form-check-input:invalid {
    border-color: #dc3545;
}

#beta-form.was-validated .form-check-input:invalid:focus {
    outline-color: #f5c2c7;
}

/* The consent text is a <p> inside .form-check, so it needs the same indent
   Bootstrap gives a real .form-check-label */
.beta-consent .form-check-label {
    margin-bottom: 0;
}

.beta-footnote {
    color: var(--text-secondary);
}

.beta-footnote a {
    white-space: nowrap;
}

/* .btn sets margin: 2rem 1rem, which throws the submit button off-centre */
.beta-submit-btn {
    margin: var(--spacing-sm) 0 0 0;
    font-size: 1rem;
    /* Comfortable tap target: most people read this page on the phone
       they're about to install on */
    min-height: 44px;
}

/* ─────────────────────────────────────────────────────────── */
/* Success panel (shown once the signup goes through)          */
/* ─────────────────────────────────────────────────────────── */
.beta-success {
    padding: var(--spacing-md) 0;
}

.beta-success:focus {
    outline: 3px solid var(--brand-primary-tint-200);
    outline-offset: 4px;
}

.beta-success-icon {
    font-size: 2.5rem;
    color: var(--brand-primary-500);
    margin-bottom: var(--spacing-sm);
}

.beta-success h3 {
    color: var(--brand-primary-500);
    margin-bottom: var(--spacing-sm);
}

/* ═══════════════════════════════════════════════════════════ */
/* SECTION 3 - TROUBLESHOOTING ACCORDION */
/* ═══════════════════════════════════════════════════════════ */
.beta-help {
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(to bottom, var(--surface-background), var(--bg-blue));
}

.beta-accordion {
    max-width: 720px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* The question text runs to two lines on a phone, so let it wrap
   instead of squeezing the expand arrow */
.beta-accordion .accordion-button {
    text-align: left;
}

.beta-accordion .accordion-body ul {
    padding-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.beta-accordion .accordion-body li {
    margin-bottom: var(--spacing-sm);
}

/* The accordion header is an h3 here (h2 belongs to the section), and base.css
   gives every h3 a 1rem bottom margin - which would gap the items apart.
   Nothing else needs overriding: .accordion-button in components.css sets its
   own colour and size, so the h3 rules never reach the button text. */
.beta-accordion .accordion-header {
    margin-bottom: 0;
}

/* The tag sits on the purple header, where the brand-purple it gets from
   components.css would be unreadable - take the button's colour instead */
.beta-accordion .accordion-button .platform-tag {
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════ */
/* SECTION 4 - FEEDBACK */
/* ═══════════════════════════════════════════════════════════ */
.beta-feedback {
    padding: var(--spacing-xl) var(--spacing-md);
}

/* Matches the panel treatment on the contact and notify forms */
.beta-feedback-panel {
    max-width: 650px;
    background: #E8EFF5;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: var(--shadow-small);
}

.beta-feedback-panel h3 {
    font-size: clamp(1.05rem, calc(0.9rem + 0.9vw), 1.25rem);
}

.beta-feedback-panel p {
    color: var(--text-secondary);
}

.beta-feedback-list {
    padding-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.beta-feedback-list li {
    margin-bottom: var(--spacing-sm);
}

/* The feedback CTA stays a mailto rather than a form: bug reports usually come
   with a screenshot attached, which a Netlify form can't take. */
.beta-btn-wrap {
    text-align: center;
}

/* .btn sets margin: 2rem 1rem, which throws the button off-centre */
.beta-mail-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0 0 0;
    font-size: 1rem;
    min-height: 44px;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* SECTION 5 - WORTH A LOOK */
/* ═══════════════════════════════════════════════════════════ */
.beta-next {
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-2xl);
    background: linear-gradient(to bottom, var(--surface-background), var(--bg-yellow));
}

.beta-next-links {
    max-width: 640px;
    margin: 0 auto;
    color: var(--text-secondary);
}

.beta-next-links li {
    margin-bottom: var(--spacing-md);
}

.beta-next-links li:last-child {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* FOOTER */
/* ═══════════════════════════════════════════════════════════ */
footer {
    padding-top: var(--spacing-xl);
}

/* ═══════════════════════════════════════════════════════════ */
/* MEDIA QUERIES */
/* ═══════════════════════════════════════════════════════════ */

/* SCREEN SIZE - SMALL (< 576px) */
@media (max-width: 575.98px) {
    .beta-step {
        padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    }

    .beta-step::before {
        left: var(--spacing-md);
    }

    /* Full-width so they're easy to hit one-handed */
    .beta-mail-btn,
    .beta-submit-btn {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .beta-feedback-panel,
    .beta-form-container {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}
