/* ==========================================================================
   layout.css — shells, containers
   Shells: shell-public · shell-app (master-detail: sidebar rail + workspace)

   Ported from the shared "master-window" app-shell boilerplate (see
   docs/templates.md for lineage). Trimmed of gameday_sandbox-specific
   marketing sections (hero, feature bands, availability map, onboarding,
   auth-card forms) that don't apply to this app.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Universal site wrap
   -------------------------------------------------------------------------- */

.site-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.site-main {
    flex: 1 1 auto;
}

/* --------------------------------------------------------------------------
   Containers
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--lg  { max-width: var(--container-lg); }
.container--2xl { max-width: var(--container-2xl); }

@media (max-width: 700px) {
    .container { padding-inline: var(--space-4); }
}

@media (max-width: 500px) {
    .container { padding-inline: var(--space-3); }
}

/* --------------------------------------------------------------------------
   Shell: auth — centered card, minimal chrome
   Used by: login, register, verify, forgot, reset
   -------------------------------------------------------------------------- */

body.auth-page {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, var(--primary-glow), transparent),
        var(--bg-page);
}

.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: var(--space-8) var(--space-4);
}

.auth-shell__logo {
    margin-bottom: var(--space-6);
    text-align: center;
}

.auth-shell__logo a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
}

.auth-shell__logo img {
    border-radius: 50%;
}

.auth-shell__logo a:hover {
    color: var(--primary-hi);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-10) var(--space-8);
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: var(--space-3);
    color: var(--text);
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--text-3);
    text-align: center;
    margin-bottom: var(--space-5);
    line-height: 1.5;
}

.auth-hint {
    margin-top: var(--space-5);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-3);
}

.auth-hint a {
    color: var(--text-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-hint a:hover { color: var(--primary); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-5) 0;
    font-size: var(--text-sm);
    color: var(--text-3);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-oauth-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-oauth:hover {
    background: var(--surface-hi);
    border-color: var(--border-hi);
    color: var(--text);
}

.btn-oauth__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-oauth--discord {
    background: #5865F2;
    border-color: #5865F2;
    color: #ffffff;
}

.btn-oauth--discord:hover {
    background: #4752c4;
    border-color: #4752c4;
    color: #ffffff;
}

.form-input--otp {
    text-align: center;
    font-size: var(--text-2xl);
    letter-spacing: 0.3em;
    font-family: var(--font-ui);
}

.resend-form {
    margin-top: var(--space-4);
    text-align: center;
}

@media (max-width: 500px) {
    .auth-card {
        border: none;
        background: transparent;
        box-shadow: none;
        padding: var(--space-6) var(--space-4);
    }
}

/* --------------------------------------------------------------------------
   Dev-token stack — floating panel showing captured OTP codes/reset links
   while FLASK_DEBUG is on and no real SMTP is configured
   -------------------------------------------------------------------------- */

.dev-token-stack {
    position: fixed;
    bottom: var(--space-4);
    left: var(--space-4);
    z-index: var(--z-toast);
    max-width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(120, 80, 180, 0.10);
    border: 1px solid #7850b4;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
}

.dev-token-stack__label {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a878e8;
    margin-bottom: var(--space-2);
}

.dev-token {
    padding: var(--space-2) 0;
    border-top: 1px solid rgba(120, 80, 180, 0.25);
}

.dev-token:first-of-type {
    border-top: none;
    padding-top: 0;
}

.dev-token__hdr {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.dev-token__label {
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.dev-token__close {
    flex: 0 0 auto;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 20px;
    height: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.dev-token__close:hover,
.dev-token__close:focus {
    background: var(--surface-hi);
    outline: none;
}

.dev-token__value {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.dev-token__value code {
    word-break: break-all;
    flex: 1 1 auto;
}

.dev-token__copy {
    flex: 0 0 auto;
    background: var(--surface-hi);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    cursor: pointer;
}

.dev-token__copy:hover,
.dev-token__copy:focus {
    background: var(--surface);
    outline: none;
}

.dev-token__copy.is-copied {
    color: var(--green);
    border-color: var(--green);
}

/* --------------------------------------------------------------------------
   Shell: unified master-detail — sidebar rail + workspace
   Used by all non-public pages (dashboard, admin)
   -------------------------------------------------------------------------- */

#program {
    display: flex;
    flex-direction: row;
    min-height: 100dvh;
}

#workspace {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100dvh;
}

.app-main {
    flex: 1 1 auto;
    padding-bottom: var(--space-16);
    padding-top: var(--space-10);
}

.page-home .app-main { padding-top: 0; }

/* Padded page content wrapper */
.page {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.page-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: var(--text-3xl);
}

@media (max-width: 699px) {
    .app-main {
        padding-top: 0;
        padding-bottom: calc(var(--mobile-menubar-height) + var(--space-8));
    }
    .is-authed .site-footer {
        display: none;
    }
    .page-header { padding-top: var(--space-5); }
}

@media (max-width: 500px) {
    .app-main {
        padding-bottom: calc(var(--mobile-menubar-height) + var(--space-6));
    }
    .page { padding-inline: var(--space-3); }
    .page-header { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Shell: public — marketing / legal pages (base_public.html)
   -------------------------------------------------------------------------- */

body.public-page {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    background: var(--secondary-fill);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-header__inner {
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.public-header__brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-header__brand img {
    display: block;
    flex-shrink: 0;
    border-radius: 50%;
}

/* The wordmark is two words and must stay on one line — the header is a
   flex row, and letting it wrap makes everything beside it jump. */
.public-header__brand span {
    white-space: nowrap;
}

@media (max-width: 359px) {
    /* Below this the row can't hold logo + wordmark + status + theme +
       button, and nowrap would overflow instead of wrapping. Drop the
       wordmark to the logo, which is the brand anyway — hidden the .sr-only
       way, not display:none, because it is this link's accessible name. */
    .public-header__brand span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }
}

.public-header__brand:hover {
    color: rgba(255, 255, 255, 0.85);
}

.public-header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.public-header .btn {
    background: #ffffff;
    color: var(--primary-fill);
    border: 1px solid transparent;
    font-weight: 600;
}

.public-header .btn:hover {
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-fill);
}

.public-header__theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    color: #ffffff;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.public-header__theme-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .theme-icon--sun  { display: none; }
[data-theme="dark"]  .theme-icon--moon { display: none; }

.public-main {
    flex: 1 1 auto;
}

/* The public header is sticky at top:0 — push the flash-stack below it so
   toasts don't overlap the sign-in/theme-toggle controls */
.public-page .flash-stack {
    top: calc(56px + var(--space-4));
}

/* Footer grid override — public footer has 2 children (copy + links), not 3 */
.public-page .site-footer__inner {
    grid-template-columns: 1fr auto;
}

@media (max-width: 500px) {
    .public-header__inner {
        padding-inline: var(--space-4);
    }
    .public-header__nav {
        gap: var(--space-2);
    }
}

/* --------------------------------------------------------------------------
   Site footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: var(--space-8) var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-3);
}

.site-footer__inner {
    max-width: var(--container-xl);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-2) var(--space-6);
}

.site-footer__copy {
    justify-self: start;
    color: var(--text-3);
}

.site-footer__links {
    display: grid;
    grid-template-columns: repeat(3, auto);
    column-gap: var(--space-6);
    row-gap: var(--space-2);
    justify-self: end;
    text-align: center;
}

.site-footer__links a {
    color: var(--text-3);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-footer__links a:hover {
    color: var(--primary);
}

@media (max-width: 699px) {
    .site-footer {
        padding-bottom: calc(var(--mobile-menubar-height) + var(--space-8));
    }
}

@media (max-width: 500px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .site-footer__copy  { justify-self: center; }
    .site-footer__links  { display: flex; justify-self: center; justify-content: center; flex-wrap: wrap; gap: var(--space-4); }
}

/* --------------------------------------------------------------------------
   Legal / prose page — terms, privacy, help
   -------------------------------------------------------------------------- */

.prose-page {
    max-width: 720px;
    margin-inline: auto;
    padding: var(--space-12) var(--space-6);
}

.prose-page h1 {
    margin-bottom: var(--space-2);
}

.prose-page .prose-meta {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    color: var(--text-3);
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border);
}

.prose-page h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
}

.prose-page h3 {
    font-size: var(--text-lg);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.prose-page p {
    margin-bottom: var(--space-4);
    max-width: 68ch;
}

.prose-page ul, .prose-page ol {
    list-style: disc;
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
    color: var(--text-2);
}

.prose-page li {
    margin-bottom: var(--space-2);
    line-height: 1.7;
    font-size: var(--text-base);
    max-width: 68ch;
}

.prose-page a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 500px) {
    .prose-page { padding: var(--space-8) var(--space-3); }
}

/* --------------------------------------------------------------------------
   Section utility
   -------------------------------------------------------------------------- */

.section {
    margin-bottom: var(--space-10);
}

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.section__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}

/* --------------------------------------------------------------------------
   Landing page — marketing bands (templates/public/index.html)

   Structure follows rivalprize's landing (hero + alternating full-bleed
   bands + native-<details> FAQ + CTA); the colours are this brand's, and
   the band internals are this app's own. Shared band typography lives in
   .band-eyebrow/.band-title/.band-sub rather than being repeated per
   section — rivalprize duplicates those per band and they drift.
   -------------------------------------------------------------------------- */

.band-eyebrow {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: var(--space-2);
}

.band-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-4);
}

.band-sub {
    font-size: var(--text-lg);
    color: var(--text-2);
    max-width: var(--measure);
    margin-inline: auto;
}

.band-note {
    font-size: var(--text-sm);
    color: var(--text-3);
    text-align: center;
    max-width: var(--measure);
    margin: var(--space-8) auto 0;
}

/* Hero ---------------------------------------------------------------- */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    padding: var(--space-16) var(--space-6) 0;
    /* The photographic backdrop that used to live here (chrome bumper at
       sunset) moved to .cta-band, where it has far less text to fight for
       legibility. Just the brand glow remains. */
    background-image: radial-gradient(ellipse 80% 60% at 50% 0%, var(--primary-glow), transparent);
    background-position: center;
    background-repeat: no-repeat;
}

.hero__content {
    flex: 0 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-bottom: var(--space-8);
}

.hero__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.hero__brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.hero__brand-name {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.hero__title {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
    margin-bottom: var(--space-5);
}

.hero__title-line {
    display: block;
    white-space: nowrap;
}

.hero__title em {
    display: block;
    font-style: normal;
    color: var(--primary);
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-2);
    max-width: var(--measure);
    margin-inline: auto;
    margin-bottom: var(--space-6);
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
}

.hero__visual {
    flex: 0 0 400px;
    max-width: 400px;
    align-self: flex-end;
}

.hero__phone {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 32px rgba(44, 27, 73, 0.28));
}

@media (max-width: 1000px) {
    .hero {
        flex-direction: column;
        align-items: center;
        gap: var(--space-6);
        padding: var(--space-10) var(--space-6) 0;
    }
    /* Image first when stacked: it is the thing that reads at a glance. */
    .hero__visual { order: -1; flex: 0 0 auto; width: 100%; max-width: 360px; margin-inline: auto; }
    .hero__content { flex: none; }
    .hero__title { font-size: var(--text-4xl); }
}

@media (max-width: 700px) {
    .hero { padding: var(--space-4) var(--space-4) 0; gap: 0; }
    .hero__visual { max-width: 300px; }
    .hero__content {
        align-self: stretch;
        margin-inline: calc(-1 * var(--space-4));
        padding: var(--space-8) var(--space-4);
        background: var(--bg-alt);
        border-top: 1px solid var(--border);
        justify-content: flex-start;
        flex: none;
    }
}

@media (max-width: 500px) {
    .hero { padding: var(--space-2) var(--space-3) 0; }
    .hero__visual { max-width: 260px; }
    .hero__content { margin-inline: calc(-1 * var(--space-3)); padding-inline: var(--space-3); }
    .hero__title { font-size: var(--text-3xl); }
    .hero__subtitle { font-size: var(--text-base); }
    .hero__actions { flex-wrap: wrap; }
}

/* Steps band ----------------------------------------------------------- */

.steps-band {
    background: var(--bg-alt);
    border-block: 1px solid var(--border);
    padding: var(--space-20) var(--space-6);
}

.steps-band__inner,
.link-band__inner,
.faq-section__inner {
    max-width: var(--container-landing);
    margin-inline: auto;
}

.steps-band__header,
.link-band__header,
.faq-section__header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.steps-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.step-card__num {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    opacity: 0.55;
}

.step-card__heading {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.step-card__body {
    font-size: var(--text-sm);
    color: var(--text-2);
    line-height: 1.7;
}

@media (max-width: 1000px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .steps-band { padding: var(--space-12) var(--space-4); }
    .steps-band__header { margin-bottom: var(--space-8); }
    .steps-grid { grid-template-columns: 1fr; }
}

/* Link band ------------------------------------------------------------ */

.link-band {
    padding: var(--space-20) var(--space-6);
}

.link-band__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.link-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
}

.link-card__heading {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.link-card__body {
    color: var(--text-2);
    line-height: 1.75;
}

.link-card code {
    /* No --font-mono token exists; <code> keeps the UA monospace default,
       the same as templates/dashboard/link.html. */
    font-size: 0.9em;
    background: var(--surface-hi);
    border-radius: var(--radius-sm);
    padding: 0.1em 0.4em;
}

@media (max-width: 700px) {
    .link-band { padding: var(--space-12) var(--space-4); }
    .link-band__header { margin-bottom: var(--space-8); }
    .link-band__grid { grid-template-columns: 1fr; }
    .link-card { padding: var(--space-6); }
}

/* Community band — theme-invariant, brand purple in both themes -------- */

.community-band {
    background: var(--secondary-fill);
    background-image:
        radial-gradient(ellipse 70% 120% at 50% 100%, rgba(244, 132, 31, 0.22), transparent);
    padding: var(--space-20) var(--space-6);
    text-align: center;
}

.community-band__inner {
    max-width: var(--container-md);
    margin-inline: auto;
}

.community-band .band-title { color: #F1E9E2; }
.community-band .band-sub   { color: rgba(241, 233, 226, 0.72); }
.community-band .band-eyebrow { color: var(--primary-fill-hi); }

.community-band__actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-8);
}

@media (max-width: 560px) {
    .community-band { padding: var(--space-12) var(--space-4); }
}

/* FAQ ------------------------------------------------------------------ */

.faq-section {
    background: var(--bg-alt);
    border-block: 1px solid var(--border);
    padding: var(--space-20) var(--space-6);
}

.faq-section__inner { max-width: 820px; }

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.faq-entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-entry[open] {
    border-color: var(--primary);
}

.faq-entry__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--text);
    list-style: none;
}

/* Safari still paints its own disclosure triangle without this. */
.faq-entry__q::-webkit-details-marker { display: none; }

.faq-entry__q:hover { color: var(--primary); }

.faq-entry__chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-3);
    transition: transform var(--transition-fast);
}

.faq-entry[open] .faq-entry__chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-entry__a {
    padding: 0 var(--space-6) var(--space-5);
    color: var(--text-2);
    line-height: 1.75;
    max-width: var(--measure);
}

@media (max-width: 560px) {
    .faq-section { padding: var(--space-12) var(--space-4); }
    .faq-section__header { margin-bottom: var(--space-8); }
    .faq-entry__q { padding: var(--space-4); }
    .faq-entry__a { padding: 0 var(--space-4) var(--space-4); }
}

/* Closing CTA — theme-invariant, same photo the hero used to carry, with
   far less text on top of it so it can run at full strength ------------- */

.cta-band {
    padding: var(--space-20) var(--space-6);
    text-align: center;
    background-image:
        radial-gradient(ellipse 70% 120% at 50% 100%, rgba(244, 132, 31, 0.30), transparent),
        linear-gradient(rgba(44, 27, 73, 0.65), rgba(44, 27, 73, 0.65)),
        url("../assets/hero-bumper.webp");
    background-size: auto, auto, cover;
    background-position: center, center, center 30%;
    background-repeat: no-repeat;
}

.cta-band__inner {
    max-width: var(--container-md);
    margin-inline: auto;
}

.cta-band__title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-3);
    color: #F1E9E2;
}

.cta-band__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-8);
}

@media (max-width: 560px) {
    .cta-band { padding: var(--space-12) var(--space-4); }
    .cta-band__title { font-size: var(--text-3xl); }
}

/* Back-to-top — shown by js/landing.js past a scroll threshold --------- */

.to-top {
    position: fixed;
    right: var(--space-6);
    bottom: var(--space-6);
    z-index: var(--z-raised);
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-2);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover {
    color: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 699px) {
    /* Clear of the mobile menubar the app shell reserves space for. */
    .to-top { bottom: calc(var(--mobile-menubar-height) + var(--space-4)); right: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
    .to-top { transition: none; }
    .faq-entry__chevron { transition: none; }
}
