/*
 * User interface theme (App/Views/neo/). docs/site-cards.md and docs/site-navigation.md are the
 * rulebooks; this file only draws them.
 *
 * Colours only through --bs-* variables, so dark mode and the owner's brand colour need no
 * per-page fixes. --bs-primary is the brand: it marks what can be clicked, never a meaning.
 * Every component is a modifier on Bootstrap markup (`card feature-card`), because add-on views
 * render in both themes and must still read as plain cards where this file isn't loaded.
 */
:root {
    /* Corner radius scale: the owner's "Corner radius" setting (site_corner_radius) sets it in
       template_base.twig, from 0 (square) up. Every radius below is a multiple of it, Bootstrap's
       too, so one setting rounds the whole site alike. Pills (50rem) and circles stay round. */
    --site-r: 1;
    --site-radius: calc(1rem * var(--site-r));
    --bs-border-radius: calc(.375rem * var(--site-r));
    --bs-border-radius-sm: calc(.25rem * var(--site-r));
    --bs-border-radius-lg: calc(.5rem * var(--site-r));
    --bs-border-radius-xl: calc(1rem * var(--site-r));
    --bs-border-radius-xxl: calc(2rem * var(--site-r));
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    /* The brand as text (an active menu row), and text on the brand (the brand mark). BrandTheme
       resets both for an owner's colour that wouldn't read: a yellow is darkened on a light page. */
    --site-brand-text: var(--bs-primary);
    --site-brand-on: #fff;
    --site-section-y: clamp(3rem, 7vw, 5.5rem);
    --site-nav-h: 64px;
    --site-sidebar-w: 248px;
    --site-rail-w: 72px;
    --site-tabbar-h: 60px;
    --site-ad-sticky-h: 58px;
}

/*
 * Surfaces. Bootstrap's light palette puts cards (--bs-body-bg) on a page of the same white, with
 * a tertiary only 2.5% darker, so light mode read as one white sheet. The page is a soft grey
 * instead, and everything on it a step up or down from it:
 *   --site-canvas  the page itself, behind cards, tables and the shell's white bars;
 *   --site-band    a full-width band or a borderless panel on the page (footer, `.site-section-alt`,
 *                  `.fact-card`, `.cta-band`): white in light, Bootstrap's tertiary in dark;
 *   --site-well    a recess on the page (an ad slot, a done card): a shade under whatever it sits on.
 * Dark mode keeps the values it always had. Wells and hover rows inside a card stay
 * --bs-tertiary-bg: on a white card that tint is enough.
 */
:root,
[data-bs-theme="light"] {
    --site-canvas: #f3f5f7;
    --site-band: var(--bs-body-bg);
    --site-well: rgba(var(--bs-emphasis-color-rgb), .045);
}

[data-bs-theme="dark"] {
    --site-canvas: var(--bs-body-bg);
    --site-band: var(--bs-tertiary-bg);
    --site-well: var(--bs-tertiary-bg);
}

body {
    background-color: var(--site-canvas);
}

.min-w-0 {
    min-width: 0;
}

/*
 * Shell: navbar (docs/site-navigation.md, "Public navbar")
 *
 * Sticky, translucent over the page. Stacking stays under Bootstrap's dropdowns and modals:
 * sticky-top is 1020, the off-canvas menu 1045.
 */
.site-navbar {
    min-height: var(--site-nav-h);
    padding-block: .5rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

/* The translucent blur lives on a layer behind the bar, never on the bar itself: a backdrop-filter
   makes its element the containing block of every position: fixed descendant, which would squeeze
   the phone menu (an off-canvas inside the bar) into the bar's 64px. */
.site-navbar::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background-color: rgba(var(--bs-body-bg-rgb), .85);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
}

.site-navbar > .container-xl {
    flex-wrap: nowrap;
}

.site-brand {
    display: inline-flex;
    flex-shrink: 1;
    align-items: center;
    gap: .625rem;
    min-width: 0;
    margin-inline-end: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--bs-emphasis-color);
    text-decoration: none;
}

.site-brand:hover {
    color: var(--bs-emphasis-color);
}

.brand-mark {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--site-brand-on);
    background-color: var(--bs-primary);
    border-radius: calc(.625rem * var(--site-r));
}

.brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-navbar .nav-link {
    padding-inline: .875rem !important;
    font-weight: 500;
    color: var(--bs-secondary-color);
    border-radius: calc(.5rem * var(--site-r));
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus-visible,
.site-navbar .nav-link.show {
    color: var(--bs-emphasis-color);
}

.site-navbar .nav-link.active {
    color: var(--site-brand-text);
}

.navbar-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: .5rem;
    margin-inline-start: auto;
}

/* Round icon buttons: the theme picker and the menu toggler. */
.icon-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.0625rem;
    line-height: 1;
    color: var(--bs-secondary-color);
    background-color: transparent;
    border: 0;
    border-radius: 50%;
    transition: background-color .12s ease, color .12s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible,
.icon-btn.show {
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
}

.site-navbar .navbar-toggler:focus {
    box-shadow: none;
}

.site-navbar .navbar-toggler:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}

/* Balance chip: Balance, and Purchase balance underneath on wide screens (site-navigation.md). */
.balance-chip {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: .5rem;
    padding: .375rem .875rem .375rem .75rem;
    line-height: 1.15;
    color: var(--bs-emphasis-color);
    text-decoration: none;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 50rem;
    transition: border-color .12s ease;
}

.balance-chip:hover,
.balance-chip:focus-visible,
.balance-chip.active {
    color: var(--bs-emphasis-color);
    border-color: var(--bs-primary);
}

.balance-chip > i {
    color: var(--bs-success-text-emphasis);
}

.balance-chip-text {
    min-width: 0;
}

.balance-chip-value {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
}

.balance-chip-sub {
    overflow: hidden;
    font-size: .75rem;
    color: var(--bs-secondary-color);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-secondary-bg);
    border-radius: 50%;
}

.account-btn {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .125rem .5rem .125rem .125rem;
    color: var(--bs-secondary-color);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50rem;
}

.account-btn:hover,
.account-btn:focus-visible,
.account-btn.show {
    border-color: var(--bs-border-color);
}

.account-btn.active .avatar {
    box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 4px var(--bs-primary);
}

.account-menu {
    min-width: 15rem;
}

.site-navbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding-block: .5rem;
}

.site-navbar .dropdown-item > i {
    width: 1.125rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

.site-navbar .dropdown-item.active > i,
.site-navbar .dropdown-item:active > i {
    color: inherit;
}

/* Earn menu: the Earn, Play and Grow sections of site_menu(). A wide dropdown on desktop, plain
   lists in the phone menu. */
.earn-group + .earn-group {
    margin-top: 1.25rem;
}

.earn-group-label {
    margin-bottom: .375rem;
    padding-inline: .5rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.earn-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem;
    color: var(--bs-body-color);
    text-decoration: none;
    border-radius: calc(.625rem * var(--site-r));
}

.earn-link:hover,
.earn-link:focus-visible {
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
}

.earn-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.5rem * var(--site-r));
}

.earn-link:hover .earn-icon,
.earn-link.active .earn-icon {
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
}

.earn-link.active .earn-label {
    color: var(--site-brand-text);
}

.earn-text {
    min-width: 0;
}

.earn-label {
    display: block;
    font-weight: 600;
}

.earn-desc {
    display: block;
    font-size: .8125rem;
    line-height: 1.35;
    color: var(--bs-secondary-color);
}

/* Phone menu */
.menu-account {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    margin-bottom: 1.25rem;
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.75rem * var(--site-r));
}

.menu-links a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem .5rem;
    color: var(--bs-body-color);
    text-decoration: none;
    border-radius: calc(.5rem * var(--site-r));
}

.menu-links a:hover {
    background-color: var(--bs-tertiary-bg);
}

.menu-links a.active {
    font-weight: 600;
    color: var(--site-brand-text);
}

.menu-links i {
    width: 1.25rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

.menu-links a.active i {
    color: inherit;
}

.theme-switch .btn {
    font-size: .875rem;
}

@media (max-width: 991.98px) {
    .site-navbar .offcanvas {
        max-width: 22rem;
    }

    .site-navbar .offcanvas-header {
        border-bottom: 1px solid var(--bs-border-color-translucent);
    }

    .earn-desc {
        display: none;
    }

    .site-brand {
        margin-inline-end: .75rem;
    }

    .balance-chip {
        padding-inline: .625rem;
    }

    .balance-chip-unit {
        display: none;
    }
}

@media (max-width: 359.98px) {
    /* At 320px the brand, the chip and the toggler don't fit beside a long site name. */
    .site-navbar .brand-name {
        display: none;
    }
}

@media (min-width: 992px) {
    .site-navbar .offcanvas {
        flex-grow: 1;
    }

    .earn-menu {
        display: none;
        width: 40rem;
        padding: 1rem;
        margin-top: .75rem !important;
        border-color: var(--bs-border-color-translucent);
        border-radius: var(--site-radius);
        box-shadow: 0 1.5rem 3rem -1rem rgba(0, 0, 0, .25);
    }

    .earn-menu.show {
        display: grid;
        /* minmax(0, …): a plain 1fr column grows to its longest line and pushes past the menu. */
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }

    .earn-menu .earn-group + .earn-group {
        margin-top: 0;
    }

    /* Earn is the long list: it takes the left column on its own, Play and Grow stack on the right. */
    .earn-menu .earn-group:first-child {
        grid-row: span 2;
    }
}

/*
 * Shell: member layout (docs/site-navigation.md, "Two layouts")
 *
 * Top bar (.site-navbar.site-topbar, full width), then .site-shell: the sidebar beside
 * .site-column, which holds `main`, the footer banner slots and the footer. Driven by two classes
 * on <body>, set in template_base.twig:
 *
 *   .has-sidebar                     the member layout is rendered. Nothing here may lay `main`
 *                                    out beside a sidebar without it.
 *   .has-sidebar.sidebar-collapsed   from xl: the sidebar is an icon rail that widens over the
 *                                    content while the pointer or focus is in it.
 *
 * Below xl the sidebar is the Earn bottom sheet (Bootstrap's offcanvas-xl) and a tab bar is fixed
 * to the bottom of the screen. Stacking: sidebar 1010, under the top bar (sticky-top, 1020); tab
 * bar 1030, under the off-canvas backdrop (1040) so an open sheet covers it.
 */
.site-topbar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: .25rem;
    padding-inline: 1rem;
}

.site-topbar .site-brand {
    margin-inline-end: .75rem;
}

.site-shell {
    display: flex;
    flex: 1 0 auto;
}

.site-column {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.sidebar-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1.25rem .75rem .375rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--bs-secondary-color);
}

/* Stands in for the heading in the rail, where there is no room for its text. */
.sidebar-heading .heading-rule {
    display: none;
    flex: 1 1 auto;
    height: 1px;
    background-color: var(--bs-border-color);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    margin-block: .0625rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--bs-secondary-color);
    text-decoration: none;
    border-radius: calc(.625rem * var(--site-r));
    transition: background-color .12s ease, color .12s ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
}

/* The brand colour: the one thing besides a button that site-cards.md lets primary mean. */
.sidebar-link.active {
    font-weight: 600;
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
}

.sidebar-icon {
    flex: 0 0 1.25rem;
    width: 1.25rem;
    font-size: 1rem;
    text-align: center;
}

.sidebar-link.active .sidebar-icon {
    color: var(--site-brand-text);
}

.sidebar-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tab bar */
.site-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(var(--site-tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background-color: rgba(var(--bs-body-bg-rgb), .92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--bs-border-color-translucent);
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    padding: 0;
    font-size: .6875rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    text-decoration: none;
    background: none;
    border: 0;
}

.tabbar-item > i {
    font-size: 1.25rem;
}

.tabbar-item:hover,
.tabbar-item:focus-visible {
    color: var(--bs-emphasis-color);
}

.tabbar-item.active {
    font-weight: 600;
    color: var(--site-brand-text);
}

@media (max-width: 1199.98px) {
    body.has-sidebar {
        padding-bottom: calc(var(--site-tabbar-h) + env(safe-area-inset-bottom));
    }

    /* Bottom sheets: the Earn sheet (the sidebar) and the Menu sheet. Capped and centred, so on a
       tablet they read as a panel rather than a slab across the whole screen. Two classes, to beat
       Bootstrap's .offcanvas-bottom (and .offcanvas-xl.offcanvas-bottom) max-height. */
    .site-sheet.offcanvas-bottom {
        --bs-offcanvas-height: auto;
        max-width: 48rem;
        max-height: 85vh;
        margin-inline: auto;
        border-radius: var(--site-radius) var(--site-radius) 0 0;
    }

    .site-sheet .offcanvas-header {
        border-bottom: 1px solid var(--bs-border-color-translucent);
    }

    .site-sheet .offcanvas-body {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .site-sidebar .offcanvas-body {
        padding-top: .25rem;
    }

    /* The tab bar has its own Dashboard slot. */
    .sidebar-home {
        display: none;
    }

    /* Sections side by side when the sheet is wide enough, so it doesn't scroll on a tablet.
       Columns rather than a grid: the long Earn section would leave a gap under Play and Grow. */
    .sidebar-panel {
        column-gap: 1.5rem;
        column-width: 14rem;
    }

    .sidebar-section {
        break-inside: avoid;
    }

    .sidebar-heading {
        padding-top: .875rem;
    }

    .sidebar-link {
        padding-block: .625rem;
    }
}

@media (min-width: 1200px) {
    .site-topbar {
        padding-inline: .75rem 1.25rem;
    }

    /* Pages bring their own .container, whose 12px gutter is too tight against the sidebar's
       edge. Padded per child rather than on the column, so the footer's background still runs
       to the edge. */
    .site-column > * {
        padding-inline: 1rem;
    }

    /* Sticky rather than fixed, so the maintenance notice above the top bar can't hide its top. */
    .site-sidebar {
        position: sticky;
        top: var(--site-nav-h);
        z-index: 1010;
        flex: 0 0 var(--site-sidebar-w);
        align-self: flex-start;
        width: var(--site-sidebar-w);
        height: calc(100vh - var(--site-nav-h));
        transition: flex-basis .2s ease, width .2s ease;
    }

    .site-sidebar .offcanvas-body {
        position: relative;
        height: 100%;
    }

    /* Positioned over its column, so in the rail it can widen over the content without moving it. */
    .sidebar-panel {
        position: absolute;
        inset: 0 auto 0 0;
        width: var(--site-sidebar-w);
        padding: .75rem .75rem 1.5rem;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--bs-border-color) transparent;
        background-color: var(--bs-body-bg);
        border-inline-end: 1px solid var(--bs-border-color-translucent);
        transition: width .2s ease, box-shadow .2s ease;
    }

    /* ---- Rail ---------------------------------------------------------------------------- */
    body.sidebar-collapsed .site-sidebar {
        flex-basis: var(--site-rail-w);
        width: var(--site-rail-w);
    }

    body.sidebar-collapsed .sidebar-panel {
        width: var(--site-rail-w);
    }

    body.sidebar-collapsed .sidebar-link {
        justify-content: center;
        padding-inline: .5rem;
    }

    body.sidebar-collapsed .sidebar-label,
    body.sidebar-collapsed .sidebar-heading .heading-text {
        display: none;
    }

    body.sidebar-collapsed .sidebar-heading {
        padding-inline: .5rem;
    }

    body.sidebar-collapsed .sidebar-heading .heading-rule {
        display: block;
    }

    /* ---- Peek: the rail widens over the page while it has the pointer or focus. ---------- */
    body.sidebar-collapsed .sidebar-panel:hover,
    body.sidebar-collapsed .sidebar-panel:focus-within {
        width: var(--site-sidebar-w);
        box-shadow: .5rem 0 1.5rem rgba(0, 0, 0, .18);
    }

    body.sidebar-collapsed .sidebar-panel:hover .sidebar-link,
    body.sidebar-collapsed .sidebar-panel:focus-within .sidebar-link {
        justify-content: flex-start;
        padding-inline: .75rem;
    }

    body.sidebar-collapsed .sidebar-panel:hover .sidebar-label,
    body.sidebar-collapsed .sidebar-panel:focus-within .sidebar-label {
        display: block;
    }

    body.sidebar-collapsed .sidebar-panel:hover .sidebar-heading,
    body.sidebar-collapsed .sidebar-panel:focus-within .sidebar-heading {
        padding-inline: .75rem;
    }

    body.sidebar-collapsed .sidebar-panel:hover .sidebar-heading .heading-text,
    body.sidebar-collapsed .sidebar-panel:focus-within .sidebar-heading .heading-text {
        display: inline;
    }

    body.sidebar-collapsed .sidebar-panel:hover .sidebar-heading .heading-rule,
    body.sidebar-collapsed .sidebar-panel:focus-within .sidebar-heading .heading-rule {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-sidebar,
    .sidebar-panel {
        transition: none;
    }
}

/*
 * Shell: footer
 */
.site-footer {
    padding-top: clamp(2.5rem, 6vw, 4rem);
    margin-top: var(--site-section-y);
    font-size: .9375rem;
    background-color: var(--site-band);
    border-top: 1px solid var(--bs-border-color-translucent);
}

/* The home page ends on its own section spacing and doesn't need a gap before the footer. */
main:has(.landing-hero) + .site-footer {
    margin-top: 0;
}

.footer-blurb {
    max-width: 22rem;
    margin-bottom: 1rem;
    color: var(--bs-secondary-color);
}

.footer-heading {
    margin-bottom: .75rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bs-emphasis-color);
}

.footer-links {
    display: grid;
    gap: .5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-links a {
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--bs-emphasis-color);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    padding-block: 1.5rem;
    margin-top: clamp(2rem, 5vw, 3rem);
    font-size: .875rem;
    color: var(--bs-secondary-color);
    border-top: 1px solid var(--bs-border-color-translucent);
}

/*
 * Shell: toasts (notyf.open() / sendNotify(), drawn by @admin/_toasts.twig with the `site` prefix)
 *
 * The AdminCP's toast on the site's radius scale: a neutral card, the type carried by the icon
 * badge and the countdown bar from the theme's subtle/emphasis pairs, so every type reads in light
 * and dark alike and none is drawn in the brand colour. Top-right, over the top bar and over an
 * open dialog (a CAPTCHA's error has to show above it). Entering and leaving are animated by the
 * partial's script: leaving measures the toast's height to collapse the gap.
 */
.site-toasts {
    z-index: 1090;
    top: 0;
    right: 0;
    padding: 1rem;
    width: min(380px, 100%);
}

.site-toast {
    /* On the toast, not the container: Bootstrap's .toast sets its own 1.5rem, and the gap
       (.toast-container > :not(:last-child)) reads the toast's value. */
    --bs-toast-spacing: .625rem;
    --toast-accent: var(--bs-info);
    --toast-accent-bg: var(--bs-info-bg-subtle);
    --toast-accent-fg: var(--bs-info-text-emphasis);
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(.75rem * var(--site-r));
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12), 0 .125rem .25rem rgba(0, 0, 0, .06);
}

[data-bs-theme="dark"] .site-toast {
    background-color: var(--bs-tertiary-bg);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .45);
}

.site-toast-success { --toast-accent: var(--bs-success); --toast-accent-bg: var(--bs-success-bg-subtle); --toast-accent-fg: var(--bs-success-text-emphasis); }
.site-toast-warning { --toast-accent: var(--bs-warning); --toast-accent-bg: var(--bs-warning-bg-subtle); --toast-accent-fg: var(--bs-warning-text-emphasis); }
.site-toast-danger  { --toast-accent: var(--bs-danger);  --toast-accent-bg: var(--bs-danger-bg-subtle);  --toast-accent-fg: var(--bs-danger-text-emphasis); }

.site-toast .toast-body {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .875rem .75rem .875rem .875rem;
}

.site-toast-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: var(--toast-accent-bg);
    color: var(--toast-accent-fg);
}

.site-toast-message {
    flex: 1;
    min-width: 0;
    align-self: center;
    overflow-wrap: anywhere;
    color: var(--bs-emphasis-color);
}

.site-toast .btn-close {
    flex-shrink: 0;
    font-size: .625rem;
    margin-top: .5rem;
}

/* Time left before it closes. Paused, with the timer, while the pointer or focus is on the toast. */
.site-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background-color: var(--toast-accent);
    transform-origin: left;
    animation: site-toast-countdown var(--toast-delay, 5000ms) linear forwards;
}

.site-toast.is-paused .site-toast-progress { animation-play-state: paused; }

@keyframes site-toast-countdown {
    to { transform: scaleX(0); }
}

/*
 * Shell: confirmation dialog (data-confirm / siteConfirm(), drawn by @admin/_confirm.twig with the
 * `site` prefix)
 *
 * The AdminCP's dialog without its status bar (no accent bars here, site-cards.md): the round icon
 * over the title carries the type, danger unless the trigger says otherwise. `primary` is the
 * brand, not a meaning, so its icon stays neutral and only the button is the brand's.
 */
.site-confirm {
    --confirm-accent-bg: var(--bs-danger-bg-subtle);
    --confirm-accent-fg: var(--bs-danger-text-emphasis);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(.75rem * var(--site-r));
}

.site-confirm-primary { --confirm-accent-bg: var(--bs-tertiary-bg);         --confirm-accent-fg: var(--bs-emphasis-color); }
.site-confirm-success { --confirm-accent-bg: var(--bs-success-bg-subtle); --confirm-accent-fg: var(--bs-success-text-emphasis); }
.site-confirm-info    { --confirm-accent-bg: var(--bs-info-bg-subtle);    --confirm-accent-fg: var(--bs-info-text-emphasis); }
.site-confirm-warning { --confirm-accent-bg: var(--bs-warning-bg-subtle); --confirm-accent-fg: var(--bs-warning-text-emphasis); }

/* Above .modal-body, which Bootstrap makes position: relative and which comes later in the
   markup, so without a z-index it paints over the button and swallows its clicks. */
.site-confirm .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    font-size: .75rem;
}

.site-confirm .modal-body {
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
}

.site-confirm-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: var(--confirm-accent-bg);
    color: var(--confirm-accent-fg);
}

.site-confirm-message {
    color: var(--bs-secondary-color);
    overflow-wrap: anywhere;
}

/* The consequences under the summary (a refund, a price, a balance after). Left-aligned in a panel
   of their own, since a list centred like the rest of the dialog puts every line's marker
   somewhere else. Amounts in them line up as they do everywhere else. */
.site-confirm-points {
    list-style: none;
    margin: 1rem 0 0;
    padding: .75rem 1rem;
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-tertiary-bg);
    text-align: start;
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.site-confirm-points li {
    display: flex;
    gap: .5rem;
}

.site-confirm-points li + li {
    margin-top: .375rem;
}

.site-confirm-points li > i {
    flex: none;
    margin-top: .2rem;
    color: var(--bs-secondary-color);
}

.site-confirm .modal-footer {
    justify-content: center;
    gap: .5rem;
    padding: 0 1.5rem 1.5rem;
    border-top: 0;
}

.site-confirm .modal-footer > .btn {
    flex: 1 1 0;
    margin: 0;
}

/*
 * Numbers
 */
.money,
.stat-tile-value,
.payout-amount {
    font-variant-numeric: tabular-nums;
}

/*
 * Page sections (public layout)
 */
.site-section {
    padding-block: var(--site-section-y);
}

.site-section-alt {
    background-color: var(--site-band);
    border-block: 1px solid var(--bs-border-color-translucent);
}

.section-eyebrow {
    margin-bottom: .5rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--bs-emphasis-color);
}

/* One short sentence: members know what a faucet or a PTC ad is, so a lead says what is particular
   to the page here and leaves the rules to the form or the action they apply to. */
.section-lead {
    max-width: 40rem;
    font-size: 1rem;
    color: var(--bs-secondary-color);
}

@media (min-width: 768px) {
    .section-lead {
        font-size: 1.125rem;
    }
}

/*
 * Landing hero (page_home.twig). A faint grid fading out from the top, two soft glows of the brand
 * colour, and on the right a stage: the payout feed with the coins and two facts floating round it.
 * Every colour is a --bs-* variable, so the owner's brand and dark mode need nothing here. The brand
 * tints are decoration only; nothing that means something is drawn in primary.
 */
.landing-hero {
    position: relative;
    padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
    isolation: isolate;
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(var(--bs-emphasis-color-rgb), .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--bs-emphasis-color-rgb), .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}

.landing-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.landing-glow-a {
    top: -12rem;
    right: -8rem;
    width: 42rem;
    height: 32rem;
    background: rgba(var(--bs-primary-rgb), .22);
}

.landing-glow-b {
    bottom: -16rem;
    left: -10rem;
    width: 34rem;
    height: 26rem;
    background: rgba(var(--bs-primary-rgb), .12);
}

[data-bs-theme="dark"] .landing-glow-a {
    background: rgba(var(--bs-primary-rgb), .3);
}

.landing-title {
    font-size: clamp(2.375rem, 5.6vw, 4rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.04;
    color: var(--bs-emphasis-color);
    text-wrap: balance;
}

.landing-title .brand {
    position: relative;
    display: inline-block;
    color: var(--site-brand-text);
}

/* A hand-drawn underline under the brand word. */
.brand-swoosh {
    position: absolute;
    left: 0;
    bottom: -.12em;
    width: 100%;
    height: .22em;
    opacity: .4;
}

.landing-lead {
    max-width: 34rem;
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    color: var(--bs-secondary-color);
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .875rem .25rem .25rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--bs-emphasis-color);
    background-color: rgba(var(--bs-body-bg-rgb), .7);
    border: 1px solid var(--bs-border-color);
    border-radius: 50rem;
    box-shadow: 0 .25rem 1rem -.5rem rgba(var(--bs-emphasis-color-rgb), .2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hero-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: .8125rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: 50%;
}

/* The landing's large buttons: a little more room, and a lift on hover. */
.btn-hero {
    padding-inline: 1.5rem;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-hero.btn-primary {
    box-shadow: 0 .75rem 1.75rem -.75rem rgba(var(--bs-primary-rgb), .7);
}

.btn-hero:hover {
    transform: translateY(-1px);
}

.btn-hero.btn-primary:hover {
    box-shadow: 0 1rem 2rem -.75rem rgba(var(--bs-primary-rgb), .8);
}

.btn-hero .fa-arrow-right {
    transition: transform .15s ease;
}

.btn-hero:hover .fa-arrow-right {
    transform: translateX(3px);
}

.hero-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.hero-checks i {
    margin-inline-end: .375rem;
    color: var(--bs-emphasis-color);
}

/*
 * The stage: the card in the middle, two rings behind it, coins and two facts floating round it.
 * The floating pieces are aria-hidden (they repeat what the page says) and leave below md, where
 * they would cover the card.
 */
.hero-stage {
    position: relative;
    max-width: 30rem;
    margin-inline: auto;
}

@media (min-width: 768px) {
    .hero-stage {
        padding: 2.5rem 2.5rem 3rem;
    }
}

.hero-orbit {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.hero-orbit span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30rem;
    height: 30rem;
    border: 1px dashed rgba(var(--bs-emphasis-color-rgb), .14);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.hero-orbit span + span {
    width: 40rem;
    height: 40rem;
    border-style: solid;
    border-color: rgba(var(--bs-emphasis-color-rgb), .07);
}

.hero-card {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-color: rgba(var(--bs-body-bg-rgb), .88);
    border-color: var(--bs-border-color-translucent);
    border-radius: calc(var(--site-radius) * 1.25);
    box-shadow:
        0 2rem 4rem -2rem rgba(var(--bs-emphasis-color-rgb), .35),
        0 0 0 1px rgba(var(--bs-emphasis-color-rgb), .03);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.hero-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background-color: transparent;
}

.hero-card-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--bs-emphasis-color);
}

.hero-card-title small {
    display: block;
    font-size: .75rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.hero-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--bs-success-text-emphasis);
    background-color: var(--bs-success-bg-subtle);
    border-radius: calc(.625rem * var(--site-r));
}

.hero-card .list-group-item {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .875rem 1.25rem;
    background-color: transparent;
}

.payout-body {
    min-width: 0;
}

.payout-amount {
    font-weight: 700;
    color: var(--bs-success-text-emphasis);
    font-variant-numeric: tabular-nums;
}

.payout-meta,
.payout-time {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.payout-time {
    margin-inline-start: auto;
    white-space: nowrap;
}

.hero-coin,
.hero-float {
    position: absolute;
    z-index: 2;
    display: none;
}

@media (min-width: 768px) {
    .hero-coin,
    .hero-float {
        display: flex;
    }
}

/* A coin: a raised disc with an inner rim, in the page's own neutrals. */
.hero-coin {
    z-index: 0;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--bs-emphasis-color);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), transparent 55%),
        var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 5px var(--bs-body-bg),
        inset 0 0 0 6px var(--bs-border-color),
        0 1rem 2rem -1rem rgba(var(--bs-emphasis-color-rgb), .45);
    animation: hero-bob 7s ease-in-out infinite;
}

[data-bs-theme="dark"] .hero-coin {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .12), transparent 55%),
        var(--bs-tertiary-bg);
}

.hero-coin-1 {
    top: 0;
    left: -.5rem;
}

.hero-coin-2 {
    top: 42%;
    right: -1.75rem;
    width: 3.25rem;
    height: 3.25rem;
    font-size: .6875rem;
    animation-delay: -2.5s;
}

.hero-coin-3 {
    bottom: .25rem;
    left: 18%;
    width: 2.75rem;
    height: 2.75rem;
    font-size: .625rem;
    animation-delay: -5s;
}

.hero-float {
    align-items: center;
    gap: .75rem;
    padding: .625rem 1rem .625rem .625rem;
    line-height: 1.2;
    white-space: nowrap;
    background-color: rgba(var(--bs-body-bg-rgb), .92);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(.875rem * var(--site-r));
    box-shadow: 0 1.25rem 2.5rem -1.25rem rgba(var(--bs-emphasis-color-rgb), .4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: hero-bob 8s ease-in-out infinite;
}

.hero-float strong {
    display: block;
    font-size: .9375rem;
    color: var(--bs-emphasis-color);
}

.hero-float small {
    display: block;
    font-size: .75rem;
    color: var(--bs-secondary-color);
}

.hero-float-a {
    top: .75rem;
    right: -.5rem;
    animation-delay: -3s;
}

.hero-float-b {
    bottom: .5rem;
    right: 1.5rem;
    animation-delay: -6s;
}

.hero-float-icons {
    display: flex;
}

.hero-float-icons span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: .8125rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border: 2px solid var(--bs-body-bg);
    border-radius: 50%;
}

.hero-float-icons span + span {
    margin-inline-start: -.5rem;
}

.hero-float-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--bs-success-text-emphasis);
    background-color: var(--bs-success-bg-subtle);
    border-radius: calc(.625rem * var(--site-r));
}

@keyframes hero-bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/*
 * Site stats, at the foot of the hero: one strip of four stat tiles. Neutral, as every stat tile
 * (site-cards.md); the icon tile is decoration, the same grey on all four.
 */
.landing-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
    overflow: hidden;
    background-color: var(--bs-border-color-translucent);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(var(--site-radius) * 1.25);
    box-shadow: 0 1.5rem 3rem -2rem rgba(var(--bs-emphasis-color-rgb), .3);
}

@media (min-width: 992px) {
    .landing-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.landing-stats .stat-tile {
    display: flex;
    gap: .875rem;
    align-items: center;
    min-width: 0;
    padding: 1.25rem;
    background-color: rgba(var(--bs-body-bg-rgb), .92);
    border: 0;
    border-radius: 0;
}

@media (min-width: 992px) {
    .landing-stats .stat-tile {
        padding: 1.5rem 1.75rem;
    }
}

.landing-stats .stat-tile > div {
    min-width: 0;
}

.landing-stats .stat-tile-value {
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.landing-stat-icon {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.75rem * var(--site-r));
}

@media (min-width: 576px) {
    .landing-stat-icon {
        display: inline-flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-coin,
    .hero-float {
        animation: none;
    }

    .btn-hero,
    .btn-hero .fa-arrow-right {
        transition: none;
    }

    .btn-hero:hover,
    .btn-hero:hover .fa-arrow-right {
        transform: none;
    }
}

/*
 * Coin avatar: a coin's symbol in a round neutral tile (payouts, history, deposits, the lists).
 */
.coin-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 50%;
}

/*
 * Stat tile: a label over a value, no icon tile, so two fit side by side at 320px.
 * Never coloured by its value (site-cards.md).
 */
.stat-tile {
    height: 100%;
    padding: 1.25rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: var(--site-radius);
}

.stat-tile-label {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.stat-tile-value {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--bs-emphasis-color);
}

/*
 * Feature card: one destination on a public page, the whole card a link. The icon is neutral
 * and turns brand-coloured on hover, because the brand colour means "click here".
 */
.feature-card {
    border-radius: var(--site-radius);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.feature-card:hover,
.feature-card:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 .75rem 2rem -1rem rgba(var(--bs-primary-rgb), .45);
    transform: translateY(-2px);
}

.feature-card .card-body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
}

.feature-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.75rem * var(--site-r));
    transition: color .15s ease, background-color .15s ease;
}

.feature-card:hover .feature-icon,
.feature-card:focus-within .feature-icon {
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
}

.feature-title {
    margin-bottom: .25rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.feature-text {
    margin: 0;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.feature-section {
    margin-bottom: .125rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

@media (prefers-reduced-motion: reduce) {
    .feature-card,
    .feature-icon {
        transition: none;
    }

    .feature-card:hover,
    .feature-card:focus-within {
        transform: none;
    }
}

/*
 * Offer card: one way to earn (site-cards.md, Offer card). Reward first, in the chip top-right,
 * the cost under it, the state as a class on the card and as a pill, one action in the footer.
 */
.offer-card {
    border-radius: var(--site-radius);
    transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.offer-card .card-body {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1.25rem 1.25rem 1rem;
}

.offer-head {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}

/* The advertiser's favicon, on a neutral tile so a missing one still holds its place. A partner's
   card shows its logo on a round badge instead (partials/brand_logo.twig). */
.offer-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(.625rem * var(--site-r));
}

.offer-icon img {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: calc(.25rem * var(--site-r));
}

/* Two lines at most, cut at the end; the whole of it is in the title attribute. */
.offer-title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    color: var(--bs-emphasis-color);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.offer-source {
    display: block;
    overflow: hidden;
    font-size: .8125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-secondary-color);
}

/* Money coming to the member: solid on its own subtle tint (site-cards.md, Colour). */
.offer-reward {
    flex-shrink: 0;
    margin-inline-start: auto;
    padding: .25rem .625rem;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--bs-success-text-emphasis);
    background-color: var(--bs-success-bg-subtle);
    border-radius: 50rem;
    font-variant-numeric: tabular-nums;
}

.offer-desc {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: .9375rem;
    overflow-wrap: anywhere;
    color: var(--bs-secondary-color);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* The cost: seconds to wait, where it opens. Muted, an icon each, pushed to the foot of the body
   so the rows of a grid line up whatever the description's length. */
.offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    padding: 0;
    margin: auto 0 0;
    list-style: none;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.offer-meta li {
    display: inline-flex;
    gap: .375rem;
    align-items: baseline;
}

.offer-hint {
    margin: 0;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.offer-card .card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    min-height: calc(2.375rem + 1.25rem);
    padding: 0 1.25rem 1.25rem;
    background: none;
    border-top: 0;
}

.offer-pill {
    display: inline-flex;
    gap: .375rem;
    align-items: center;
}

.offer-foot-note {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

/* Done: muted and, on load, sorted last; never hidden, since what was earned is part of the reward.
   The pill stays at full strength, so the state still reads. */
.offer-card.is-done {
    background-color: var(--site-well);
}

.offer-card.is-done .card-body {
    opacity: .6;
}

@media (prefers-reduced-motion: reduce) {
    .offer-card {
        transition: none;
    }
}

/*
 * How it works
 */
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--bs-body-bg);
    background-color: var(--bs-emphasis-color);
    border-radius: 50%;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

/*
 * Withdrawal coins
 */
.coin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.coin-chip {
    display: inline-flex;
    align-items: center;
    padding: .375rem .75rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 50rem;
}

.coin-chip-more {
    font-weight: 500;
    color: var(--bs-secondary-color);
}

/*
 * Fact list (advertisers)
 */
.fact-card {
    background-color: var(--site-band);
    border: 0;
    border-radius: var(--site-radius);
}

.fact-list {
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.fact-list li {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
}

.fact-list i {
    width: 1.25rem;
    margin-top: .2rem;
    text-align: center;
    color: var(--bs-emphasis-color);
}

.fact-list strong {
    display: block;
    color: var(--bs-emphasis-color);
}

.fact-list span {
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

/*
 * Closing call to action
 */
.cta-band {
    padding: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    background:
        radial-gradient(40rem 20rem at 50% 120%, rgba(var(--bs-primary-rgb), .18), transparent 70%),
        var(--site-band);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(var(--site-radius) * 1.5);
}
/*
 * Landing sections below the hero (page_home.twig): a centred head, the earn cards' arrow, the
 * steps, the coins, the advertisers' browser frame and the closing band in the brand colour.
 */
.landing-head {
    max-width: 44rem;
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
    text-align: center;
}

.landing-head .section-lead {
    margin-inline: auto;
}

/* The eyebrow as a small pill on the landing, so each section starts with a clear marker. */
.landing-head .section-eyebrow,
.landing-ads .section-eyebrow {
    display: inline-block;
    padding: .25rem .75rem;
    margin-bottom: 1rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 50rem;
}

/* The earn cards: a larger icon tile and an arrow that comes in on hover (it is a link). */
.landing-earn .feature-card .card-body {
    position: relative;
    padding: 1.5rem;
}

.landing-earn .feature-icon {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.375rem;
}

.feature-arrow {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    color: var(--site-brand-text);
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity .15s ease, transform .15s ease;
}

.feature-card:hover .feature-arrow,
.feature-card:focus-within .feature-arrow {
    opacity: 1;
    transform: none;
}

/*
 * Steps: an icon tile each, with its number in a corner badge, joined by a dashed line from lg.
 */
.landing-steps {
    display: grid;
    gap: 2rem;
    padding: 0;
    margin: 0;
    list-style: none;
    counter-reset: none;
}

@media (min-width: 768px) {
    .landing-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.landing-step {
    position: relative;
    padding: 1.75rem;
    text-align: center;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(var(--site-radius) * 1.25);
    box-shadow: 0 1rem 2rem -1.75rem rgba(var(--bs-emphasis-color-rgb), .4);
}

@media (min-width: 992px) {
    .landing-step {
        padding: 2.25rem 2rem;
    }

    /* The dashed line from one step to the next, behind the cards' edges. */
    .landing-step:not(:last-child)::after {
        position: absolute;
        top: calc(2.25rem + 2rem);
        right: -1.5rem;
        width: 1.5rem;
        content: "";
        border-top: 2px dashed var(--bs-border-color);
    }
}

.landing-step-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(1rem * var(--site-r));
}

.landing-step-num {
    position: absolute;
    top: -.5rem;
    right: -.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    font-size: .75rem;
    font-weight: 700;
    color: var(--bs-body-bg);
    background-color: var(--bs-emphasis-color);
    border: 2px solid var(--bs-body-bg);
    border-radius: 50%;
}

.landing-coins {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    text-align: center;
}

.landing-coins .coin-chips {
    justify-content: center;
}

.coin-chip-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-inline-end: .5rem;
    font-size: .6875rem;
    font-weight: 800;
    color: var(--bs-body-bg);
    background-color: var(--bs-emphasis-color);
    border-radius: 50%;
}

.landing-coins .coin-chip {
    padding-inline-start: .375rem;
}

.landing-coins .coin-chip-more {
    padding-inline-start: .75rem;
}

/*
 * Advertisers: the facts inside a browser window, where the advertiser's page will be shown.
 */
.browser-card {
    overflow: hidden;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(var(--site-radius) * 1.25);
    box-shadow: 0 2rem 4rem -2.5rem rgba(var(--bs-emphasis-color-rgb), .45);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.browser-dots {
    display: flex;
    flex-shrink: 0;
    gap: .375rem;
}

.browser-dots span {
    width: .625rem;
    height: .625rem;
    background-color: var(--bs-border-color);
    border-radius: 50%;
}

.browser-url {
    flex: 1;
    min-width: 0;
    max-width: 18rem;
    padding: .25rem .75rem;
    margin-inline: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 50rem;
}

.browser-url i,
.browser-timer i {
    margin-inline-end: .25rem;
}

.browser-timer {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    font-variant-numeric: tabular-nums;
}

.browser-card .card-body {
    padding: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 576px) {
    .fact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 1.75rem;
    }
}

.fact-grid li i {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 0;
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.625rem * var(--site-r));
}

/*
 * Closing band in the brand colour. Its one button is the inverse of a primary button, since a
 * primary one would vanish on it; --site-brand-on is the text colour BrandTheme picks to read on
 * the owner's colour, so the pair holds for a yellow brand as for a blue one.
 */
.cta-band-brand {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem);
    color: var(--site-brand-on);
    background:
        radial-gradient(30rem 18rem at 85% 0%, rgba(255, 255, 255, .22), transparent 70%),
        radial-gradient(26rem 16rem at 10% 110%, rgba(0, 0, 0, .14), transparent 70%),
        var(--bs-primary);
    border: 0;
    border-radius: calc(var(--site-radius) * 1.75);
    box-shadow: 0 2rem 4rem -2rem rgba(var(--bs-primary-rgb), .7);
}

/* The same faint grid as the hero, in the band's text colour. */
.cta-band-brand::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(to right, currentColor 1px, transparent 1px),
        linear-gradient(to bottom, currentColor 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: .08;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000, transparent 80%);
}

.cta-band-brand .section-title,
.cta-band-brand .section-lead {
    color: inherit;
}

.cta-band-brand .section-lead {
    opacity: .85;
}

.btn-cta {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-bg: var(--site-brand-on);
    --bs-btn-border-color: var(--site-brand-on);
    --bs-btn-hover-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--site-brand-on);
    --bs-btn-hover-border-color: var(--site-brand-on);
    --bs-btn-active-color: var(--bs-primary);
    --bs-btn-active-bg: var(--site-brand-on);
    --bs-btn-active-border-color: var(--site-brand-on);
    --bs-btn-focus-shadow-rgb: 255, 255, 255;
    box-shadow: 0 1rem 2rem -1rem rgba(0, 0, 0, .45);
}

.btn-cta:hover {
    box-shadow: 0 1.25rem 2.5rem -1rem rgba(0, 0, 0, .5);
}

.cta-band-art {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-coin {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--bs-primary);
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .35), transparent 60%), var(--site-brand-on);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 5px rgba(var(--bs-primary-rgb), .12),
        0 1rem 2rem -.75rem rgba(0, 0, 0, .45);
    animation: hero-bob 7s ease-in-out infinite;
}

@media (min-width: 992px) {
    .cta-coin {
        display: inline-flex;
    }
}

.cta-coin-1 {
    top: 18%;
    left: 7%;
    width: 4.5rem;
    height: 4.5rem;
    font-size: .875rem;
}

.cta-coin-2 {
    right: 8%;
    bottom: 16%;
    width: 3.5rem;
    height: 3.5rem;
    font-size: .75rem;
    animation-delay: -3.5s;
}

/*
 * Cards rise into place as they scroll in, where the browser can drive an animation by scroll
 * (no script, so nothing is ever left hidden). Elsewhere they are simply there.
 */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .landing-reveal {
            animation: landing-rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 60%;
        }
    }
}

@keyframes landing-rise {
    from {
        opacity: 0;
        transform: translateY(1.5rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feature-arrow {
        transition: none;
    }

    .cta-coin {
        animation: none;
    }
}


/*
 * Landing tones: the illustration palette of the home page (icon tiles, step badges, section
 * pills). Decoration only. Nothing a member reads as a meaning is in these colours: money stays
 * success, waiting warning, and so on (site-cards.md). Each hue sits on a 12% tint of itself,
 * darkened on a light page and lightened on a dark one, so it reads with any brand colour.
 * The selectors are doubled with [class*="tone-"] so a tone wins over a tile's neutral default.
 */
.tone-blue { --tone: 59, 130, 246; }
.tone-violet { --tone: 139, 92, 246; }
.tone-orange { --tone: 249, 115, 22; }
.tone-teal { --tone: 20, 184, 166; }
.tone-pink { --tone: 236, 72, 153; }
.tone-cyan { --tone: 6, 182, 212; }

.tone-tile[class*="tone-"] {
    --tone-tint: .12;
    color: color-mix(in srgb, rgb(var(--tone)) 78%, #000);
    /* Opaque (a tint laid on the page colour), so overlapping tiles don't show through. */
    background-color: var(--bs-body-bg);
    background-image: linear-gradient(rgba(var(--tone), var(--tone-tint)), rgba(var(--tone), var(--tone-tint)));
    border-color: rgba(var(--tone), .25);
}

[data-bs-theme="dark"] .tone-tile[class*="tone-"] {
    --tone-tint: .18;
    color: color-mix(in srgb, rgb(var(--tone)) 62%, #fff);
}

/* A hovered earn card fills its tile with the hue: the card is a link. */
.feature-card:hover .feature-icon.tone-tile,
.feature-card:focus-within .feature-icon.tone-tile {
    color: #fff;
    background-color: rgb(var(--tone));
}

.landing-step-icon.tone-tile .landing-step-num {
    color: #fff;
    background-color: rgb(var(--tone));
}

.landing-glow-c {
    top: 30%;
    left: 35%;
    width: 26rem;
    height: 20rem;
    background: rgba(139, 92, 246, .1);
}

/* The browser bar's window buttons, in the colours everyone knows them by. */
.browser-dots span:nth-child(1) { background-color: #ff5f57; }
.browser-dots span:nth-child(2) { background-color: #febc2e; }
.browser-dots span:nth-child(3) { background-color: #28c840; }

/*
 * Logos (partials/brand_logo.twig): coin, gateway or offerwall. The logo fills the round tile,
 * which drops its own fill.
 */
.has-logo {
    padding: 0;
    overflow: hidden;
    background-color: transparent;
    border-color: transparent;
}

.has-logo img {
    display: block;
    width: 100%;
    height: 100%;
}

/* A logo with a dark theme version (BrandLogo: {name}-dark) carries both; the theme picks one. */
.has-logo .logo-dark,
[data-bs-theme="dark"] .has-logo .logo-light {
    display: none;
}

[data-bs-theme="dark"] .has-logo .logo-dark {
    display: block;
}

.hero-coin.has-logo,
.cta-coin.has-logo {
    background: none;
    border: 3px solid var(--bs-body-bg);
    box-shadow: 0 1rem 2rem -.75rem rgba(var(--bs-emphasis-color-rgb), .5);
}

.cta-coin.has-logo {
    border-color: rgba(255, 255, 255, .9);
    box-shadow: 0 1rem 2rem -.75rem rgba(0, 0, 0, .45);
}

/* A gateway's logo on a payment-method card: the logo is the mark, so no tint behind it, selected or not. */
.choice-icon.has-logo,
.btn-check:checked + .choice-tile .choice-icon.has-logo {
    background-color: transparent;
}

/* A gateway's logo inline before its name, in a sentence or a meta line (the home page). */
.inline-logo {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    margin-inline-end: .3em;
    vertical-align: -.3em;
    border-radius: 50%;
}

.coin-chip-dot.has-logo {
    width: 1.375rem;
    height: 1.375rem;
}

/*
 * Page header (public pages other than home): eyebrow, title, one lead paragraph. Part of the
 * page, not a band: no background or border, and one gap down to the content.
 */
.page-header {
    padding-block: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
}

.page-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--bs-emphasis-color);
}

/* One line of facts under the lead (e.g. Payments' "Last payout"). Neutral: they describe the
   site, not the member's money. */
.page-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    padding: 0;
    margin: 1rem 0 0;
    list-style: none;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.page-facts li {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
}

.page-facts i {
    color: var(--bs-emphasis-color);
}

/*
 * Table card: a panel (site-cards.md) holding one table, edge to edge.
 */
.table-card {
    overflow: hidden;
    border-radius: var(--site-radius);
}

.table-card .table {
    --bs-table-bg: transparent;
}

.table-card .table > :not(caption) > * > * {
    padding: .875rem 1rem;
}

.table-card .table > :not(caption) > * > :first-child {
    padding-inline-start: 1.25rem;
}

.table-card .table > :not(caption) > * > :last-child {
    padding-inline-end: 1.25rem;
}

.table-card thead th {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
}

.table-card tbody tr:last-child > * {
    border-bottom: 0;
}

/* The member's own rows: marked by the "You" badge, and a tint so they stand out in a long list. */
.table-card tbody tr.is-mine > * {
    --bs-table-bg: var(--bs-tertiary-bg);
}

/*
 * Payments list
 */
.payment-amount {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.payment-meta {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

/*
 * History: tabs at the foot of the page header, and amounts coloured by what happened to them
 * (site-cards.md, Colour). The badge beside each one says the same in words.
 */
/* The rule under the tabs is an inset shadow, so the active tab's underline paints over it without
   a negative margin (which made the row overflow and show a scrollbar). */
.page-tabs {
    margin-top: 1.5rem;
    box-shadow: inset 0 -1px 0 var(--bs-border-color-translucent);
}

.page-tabs .nav-underline {
    gap: 1.5rem;
}

.page-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

/* Three tabs fit a 320px phone only without their icons. */
@media (max-width: 575.98px) {
    .page-tabs .nav-underline {
        gap: 1.25rem;
    }

    .page-tabs .nav-link i {
        display: none;
    }
}

.history-amount {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.history-amount.is-credited {
    color: var(--bs-success-text-emphasis);
}

.history-amount.is-pending {
    color: var(--bs-warning-text-emphasis);
}

.history-amount.is-reversed {
    color: var(--bs-danger-text-emphasis);
}

/* Cancelled, or reversed but never taken back: it didn't move the balance, so no sign or colour. */
.history-amount.is-void {
    font-weight: 500;
    color: var(--bs-secondary-color);
    text-decoration: line-through;
}

/* A wallet address or email: one line, cut at the end, the whole of it in the tooltip. */
.history-address {
    max-width: 16rem;
    overflow: hidden;
    font-family: var(--bs-font-monospace);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* A tab's count of rows (My Ads): neutral, a count is never coloured. */
.page-tabs .tab-count {
    font-size: .75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color);
}

/*
 * My Ads: the ad's title links to its statistics; views delivered against views bought as a thin
 * neutral bar (a count, not money); the row's next step beside a menu of the rest.
 */
.ad-title {
    display: block;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    text-decoration: none;
}

.ad-title:hover {
    color: var(--bs-link-hover-color);
    text-decoration: underline;
}

.ad-host {
    display: inline-block;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.ad-views {
    min-width: 9rem;
    font-variant-numeric: tabular-nums;
}

.ad-views-bar {
    height: .375rem;
    margin-block: .375rem;
}

.ad-actions {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
}

/* Outline-secondary's grey text is too faint on a table row, so the buttons take the body's
   emphasis colour and a visible border. One fixed height: an icon alone (line-height 1) would
   otherwise make the menu button shorter than one with text. */
.ad-actions .btn {
    --bs-btn-color: var(--bs-emphasis-color);
    --bs-btn-bg: var(--bs-body-bg);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--bs-secondary-bg);
    --bs-btn-hover-border-color: var(--bs-secondary-color);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--bs-secondary-bg);
    --bs-btn-active-border-color: var(--bs-secondary-color);
    display: inline-flex;
    gap: .375rem;
    align-items: center;
    justify-content: center;
    height: 2rem;
    font-weight: 500;
    white-space: nowrap;
}

.ad-actions .ad-menu-btn {
    width: 2rem;
    padding-inline: 0;
}

/* While an action sent from the row is on its way; the row is redrawn from the answer. */
tr.is-busy {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s;
}

/* Delete's countdown after a pause, so the item doesn't jitter as the seconds change. */
.ad-actions [data-until] {
    font-variant-numeric: tabular-nums;
}

/*
 * Ad details: the eyebrow is the way back to My Ads; views delivered is the page's hero, neutral
 * (a count, not money), with views bought beside it and a thin secondary bar under it.
 */
.page-back {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    text-decoration: none;
}

.page-back:hover,
.page-back:focus-visible {
    color: var(--bs-emphasis-color);
}

.ad-hero-value {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--bs-emphasis-color);
    font-variant-numeric: tabular-nums;
}

.ad-hero-value small {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--bs-secondary-color);
}

.ad-hero-bar {
    height: .5rem;
    margin-block: 1rem .25rem;
}

/* The targeted countries, under their count, across the whole row. */
.account-list dd.ad-countries {
    flex-basis: 100%;
    font-size: .8125rem;
    font-weight: 400;
    text-align: start;
    color: var(--bs-secondary-color);
}

/*
 * Ads: what is left to earn today is the hero, beside the header's text from md. The goals in the
 * facts line are warning while they wait on the member. New-tab ads run from their card (surf.js):
 * the running one is ringed in the brand colour, as the card a /view/{uid} link points at is, and
 * the others wait for it. Shortlinks (the add-on) shares the hero, the tabs and the ring: a
 * credited shortlink brings the member back to its card (/shortlinks#shortlink-{id}).
 */
.ads-hero,
.sl-hero {
    width: 100%;
}

/* The unit beside the number, smaller, so the amount stays on one line (here and on the video
   viewer's reward). */
.ads-hero .wallet-value small,
.sl-hero .wallet-value small,
.video-reward .wallet-value small {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* With nothing left, the hero is words, not a number: sized to stay on one line. */
.wallet-card-hero .wallet-value.ads-hero-text,
.wallet-card-hero .wallet-value.sl-hero-text {
    font-size: 1.75rem;
}

@media (min-width: 768px) {
    .ads-hero,
    .sl-hero {
        flex-shrink: 0;
        width: 20rem;
    }
}

.page-facts .is-waiting {
    color: var(--bs-warning-text-emphasis);
}

.page-facts .is-waiting i {
    color: inherit;
}

/* One tab per partner provider can follow the modes: the row scrolls rather than wraps. */
.page-tabs-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.page-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.page-tabs-scroll .nav-underline {
    flex-wrap: nowrap;
}

/* A partner's logo in its tab (assets/img/offerwalls/, round like every brand badge). */
.page-tabs .nav-link img {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.ad-card,
.sl-card {
    scroll-margin-top: calc(var(--site-nav-h) + 1rem);
}

.ad-card.ad-running .offer-card,
.ad-card.ad-target .offer-card,
.sl-card.sl-target .offer-card {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .2);
}

.ad-card.ad-locked .offer-card {
    opacity: .5;
}

.ad-card.ad-locked .btn {
    cursor: not-allowed;
}

/*
 * Watch a video ad: the player beside the reward from lg. videoads.js sets the phase on #videoAd
 * (data-state): the timer is a wait (warning) until the view is credited (success) or refused
 * (danger), in words as well as colour.
 */
.video-card {
    overflow: hidden;
    border-radius: var(--site-radius);
}

.video-frame {
    background-color: #000;
}

.video-progress {
    height: .5rem;
    margin-bottom: .75rem;
}

.video-status {
    margin-bottom: .25rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    font-variant-numeric: tabular-nums;
}

.video-message {
    margin: 0;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.video-message:empty {
    display: none;
}

#videoAd:is([data-state="paused"], [data-state="claim"]) .video-status {
    color: var(--bs-warning-text-emphasis);
}

#videoAd[data-state="credited"] .video-status {
    color: var(--bs-success-text-emphasis);
}

#videoAd:is([data-state="failed"], [data-state="unavailable"]) .video-status {
    color: var(--bs-danger-text-emphasis);
}

#videoAd:not([data-state="claim"]) .video-claim {
    display: none;
}

.video-steps {
    display: grid;
    gap: .5rem;
    padding-inline-start: 1.25rem;
    margin: 0;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.video-steps li::marker {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

/*
 * View an on-site ad: a bare page the ad fills. A slim bar holds the brand, the ad, the timer's
 * status, the reward and the way back; under it, a thin line is the timer. The page script sets
 * the phase on #viewAd (data-state), with the same colours as the video viewer. The view_ad banner
 * (usually 468x60) sits in the bar from xxl and on a row of its own below that: one element,
 * placed by the grid, so its code runs once.
 */
.viewer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

.viewer-bar {
    display: grid;
    flex-shrink: 0;
    grid-template-areas:
        "brand status actions"
        "banner banner banner";
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: .75rem;
    align-items: center;
    min-height: var(--site-nav-h);
    padding: .5rem 1rem;
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.viewer-brand {
    grid-area: brand;
    margin-inline-end: 0;
}

.viewer-brand .brand-name,
.viewer-ad {
    display: none;
}

.viewer-ad {
    grid-area: ad;
    gap: .75rem;
    align-items: center;
    min-width: 0;
}

.viewer-title {
    overflow: hidden;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-emphasis-color);
}

.viewer-status {
    grid-area: status;
    min-width: 0;
}

.viewer-status-text {
    font-weight: 600;
    line-height: 1.3;
    color: var(--bs-warning-text-emphasis);
    font-variant-numeric: tabular-nums;
}

.viewer-message {
    overflow: hidden;
    font-size: .8125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-secondary-color);
}

.viewer-message:empty {
    display: none;
}

#viewAd[data-state="credited"] .viewer-status-text {
    color: var(--bs-success-text-emphasis);
}

#viewAd[data-state="failed"] .viewer-status-text {
    color: var(--bs-danger-text-emphasis);
}

.viewer-banner {
    grid-area: banner;
    max-width: 100%;
    margin-top: .5rem;
    overflow: hidden;
    text-align: center;
}

/* A 468px image on a phone shrinks to fit; an iframe banner can't, and is cut instead. */
.viewer-banner img {
    max-width: 100%;
    height: auto;
}

.viewer-actions {
    display: flex;
    grid-area: actions;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
}

#viewAd:not([data-state="claim"]) .viewer-claim {
    display: none;
}

.viewer-back {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    white-space: nowrap;
}

.viewer-progress {
    flex-shrink: 0;
    height: .25rem;
    border-radius: 0;
}

/* It ticks every 100ms: Bootstrap's .6s ease would trail behind the count. */
.viewer-progress .progress-bar {
    transition: width .1s linear;
}

/* Most sites assume a white page; a frame left transparent shows the dark theme through them. */
.viewer-frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    background-color: #fff;
    border: 0;
}

.viewer-empty {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.viewer-empty > .card {
    width: 100%;
    max-width: 36rem;
}

/* Phones: the brand's square, the status and the actions. The way back is its icon, the site's own
   link waits for a wider screen, and a Claim button takes the reward chip's place. */
@media (max-width: 575.98px) {
    .viewer-back span,
    .viewer-actions .icon-btn,
    #viewAd[data-state="claim"] .viewer-reward {
        display: none;
    }
}

@media (min-width: 768px) {
    .viewer-bar {
        grid-template-areas:
            "brand ad status actions"
            "banner banner banner banner";
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
        column-gap: 1.25rem;
    }

    .viewer-ad {
        display: flex;
    }
}

@media (min-width: 992px) {
    .viewer-brand .brand-name {
        display: inline;
    }
}

@media (min-width: 1400px) {
    .viewer-bar.has-banner {
        grid-template-areas: "brand ad status banner actions";
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 16rem) auto auto;
    }

    .viewer-bar.has-banner .viewer-banner {
        margin-top: 0;
    }

    .viewer-bar.has-banner .brand-name {
        display: none;
    }
}

/* The countdown is a wait on a timer (site-cards.md: warning). */
.ad-run .progress {
    height: .375rem;
}

.ad-run-text {
    margin-top: .375rem;
    font-size: .8125rem;
    color: var(--bs-warning-text-emphasis);
}

/*
 * Deposits: quick amounts under the amount field. Neutral buttons: they fill the field, the
 * summary's button is the one that acts.
 */
.amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

/*
 * Empty state: a panel with nothing in it (partials/empty_state.twig).
 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    text-align: center;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: 50%;
}

.empty-state-title {
    margin-bottom: .375rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.empty-state-text {
    max-width: 28rem;
    margin-bottom: 1.25rem;
    color: var(--bs-secondary-color);
}

.empty-state-text:last-child {
    margin-bottom: 0;
}

/*
 * Status page: a page that is nothing but a status (partials/status_page.twig): the error pages,
 * maintenance and the country block. The empty state's anatomy at page size, centred in the
 * space the shell leaves. On a bare page it fills the window under its own brand row.
 */
.status-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: clamp(3rem, 10vw, 6rem) 1rem;
    text-align: center;
}

.status-page.is-bare {
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    padding-block: 1.25rem;
}

.status-brand {
    align-self: flex-start;
    margin-inline-end: 0;
}

.status-page.is-bare .status-brand {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
}

.status-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 36rem;
}

.status-page.is-bare .status-body {
    margin-block: auto;
    padding-block: 2rem 4rem;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.875rem;
    color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: 50%;
}

/* By the colour table: a wait is warning, a block is danger. Emphasis text on its own subtle. */
.status-icon.is-warning {
    color: var(--bs-warning-text-emphasis);
    background-color: var(--bs-warning-bg-subtle);
}

.status-icon.is-danger {
    color: var(--bs-danger-text-emphasis);
    background-color: var(--bs-danger-bg-subtle);
}

.status-title {
    margin-bottom: .75rem;
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: var(--bs-emphasis-color);
    overflow-wrap: anywhere;
}

.status-text {
    margin-bottom: 0;
    font-size: 1.0625rem;
    color: var(--bs-secondary-color);
}

/* The path that wasn't found: it can be any length, so it breaks anywhere rather than overflow. */
.status-path {
    max-width: 100%;
    margin: 1rem 0 0;
}

.status-path code {
    display: inline-block;
    max-width: 100%;
    padding: .25rem .625rem;
    font-size: .875rem;
    color: var(--bs-body-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.5rem * var(--site-r));
    overflow-wrap: anywhere;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.75rem;
}

.status-note {
    margin: 1.5rem 0 0;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

/* Maintenance: the page checking on its own. The dot is the wait, so warning; solid, as it's thin. */
.status-live {
    display: inline-flex;
    align-items: flex-start;
    gap: .625rem;
    margin: 1.25rem 0 0;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.status-live[hidden] {
    display: none;
}

.status-live-dot {
    flex-shrink: 0;
    width: .5rem;
    height: .5rem;
    margin-top: .5rem;
    background-color: var(--bs-warning);
    border-radius: 50%;
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    50% {
        opacity: .3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-live-dot {
        animation: none;
    }
}

/*
 * News (page_news.twig): each post is a panel, in a reading-width column. The body is the owner's
 * HTML from the AdminCP's editor, so it is styled as prose here rather than trusted to fit.
 */
.news-post {
    scroll-margin-top: calc(var(--site-nav-h) + 1rem);
    border-radius: var(--site-radius);
}

.news-post + .news-post {
    margin-top: 1rem;
}

.news-post > .card-body {
    padding: clamp(1.25rem, 3.5vw, 2rem);
}

/* Opened from its link (/news#post-12): news is info, so the ring is too. */
.news-post:target {
    border-color: var(--bs-info-border-subtle);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-info-rgb), .2);
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.news-title {
    margin-bottom: 1rem;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.25;
    color: var(--bs-emphasis-color);
    overflow-wrap: break-word;
}

/* Legal's section anchor: shown on hover or focus, always on touch screens. */
.news-anchor {
    margin-inline-start: .375rem;
    font-size: .875rem;
    vertical-align: middle;
    color: var(--bs-secondary-color);
    text-decoration: none;
    opacity: 0;
    transition: opacity .12s ease;
}

.news-title:hover .news-anchor,
.news-anchor:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .news-anchor {
        opacity: 1;
    }
}

.news-body {
    line-height: 1.7;
    overflow-wrap: break-word;
}

.news-body > :last-child {
    margin-bottom: 0;
}

.news-body h2,
.news-body h3,
.news-body h4 {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.news-body img,
.news-body video {
    max-width: 100%;
    height: auto;
    border-radius: calc(.5rem * var(--site-r));
}

/* An embedded video keeps its shape at any width. */
.news-body iframe {
    max-width: 100%;
    border: 0;
}

.news-body iframe[src*="youtube"],
.news-body iframe[src*="vimeo"] {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.news-body blockquote {
    padding-inline-start: 1rem;
    color: var(--bs-secondary-color);
    border-inline-start: 3px solid var(--bs-border-color);
}

/* A wide table scrolls inside the post instead of widening the page. */
.news-body table {
    display: block;
    max-width: 100%;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.news-body td,
.news-body th {
    padding: .375rem .75rem;
    border: 1px solid var(--bs-border-color);
}

/*
 * FAQ: the questions as one panel (site-cards.md), an accordion with neutral colours. Bootstrap
 * tints an open question in primary, which here would mean "click", so the open state is the
 * chevron and the answer under it.
 */
.faq-search {
    position: relative;
    max-width: 32rem;
    margin-top: 1.5rem;
}

.faq-search > i {
    position: absolute;
    top: 50%;
    left: 1.125rem;
    color: var(--bs-secondary-color);
    pointer-events: none;
    transform: translateY(-50%);
}

.faq-search .form-control {
    padding-inline-start: 3rem;
    border-radius: calc(.75rem * var(--site-r));
}

.faq-list {
    overflow: hidden;
    border-radius: var(--site-radius);
}

.faq-list .accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-color: var(--bs-body-color);
    --bs-accordion-border-color: var(--bs-border-color-translucent);
    --bs-accordion-btn-color: var(--bs-emphasis-color);
    --bs-accordion-btn-padding-x: 1.25rem;
    --bs-accordion-btn-padding-y: 1.125rem;
    --bs-accordion-btn-active-icon: var(--bs-accordion-btn-icon);
    --bs-accordion-btn-focus-box-shadow: inset 0 0 0 .2rem rgba(var(--bs-primary-rgb), .35);
    --bs-accordion-active-bg: transparent;
    --bs-accordion-active-color: var(--bs-emphasis-color);
    /* Every item keeps its bottom border, and the card clips the last visible one: with search
       hiding items, "last" is not always :last-child. */
    margin-bottom: -1px;
}

.faq-list .accordion-flush > .accordion-item,
.faq-list .accordion-flush > .accordion-item:last-child {
    border-bottom: 1px solid var(--bs-accordion-border-color);
}

/* The sticky navbar would cover a question scrolled to by its link (/faq#faq-3). */
.faq-item {
    scroll-margin-top: calc(var(--site-nav-h) + 1rem);
}

.faq-list .accordion-button {
    gap: 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
}

.faq-list .accordion-button:hover {
    background-color: var(--bs-tertiary-bg);
}

.faq-list .accordion-button:not(.collapsed),
.faq-list .accordion-button:focus:not(:focus-visible) {
    box-shadow: none;
}

.faq-list .accordion-button:focus-visible {
    box-shadow: var(--bs-accordion-btn-focus-box-shadow);
}

/* The answer is the owner's HTML from the AdminCP editor: paragraphs, lists, links, images and
   the odd table, none of which may widen the panel. */
.faq-list .faq-answer {
    max-width: 46rem;
    padding: 0 1.25rem 1.25rem;
    overflow-wrap: break-word;
}

.faq-answer > :last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    padding-inline-start: 1.25rem;
}

.faq-answer img {
    max-width: 100%;
    height: auto;
    border-radius: calc(.5rem * var(--site-r));
}

.faq-answer table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/*
 * Page aside: the column beside a page's main panel (FAQ, Terms, Privacy), with its titled cards
 * and the contact card, whose "Email us" is the aside's one btn-primary.
 */
.page-aside {
    display: grid;
    gap: 1.5rem;
}

/* Beside the main column from lg, it stays in view while a long page scrolls, when the window is
   tall enough to hold all of it (see .order-summary). */
@media (min-width: 992px) and (min-height: 640px) {
    .page-aside {
        position: sticky;
        top: calc(var(--site-nav-h) + 1rem);
    }
}

.aside-title {
    margin-bottom: 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.contact-card {
    border-radius: var(--site-radius);
}

.contact-card-text {
    margin-bottom: 1.25rem;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.contact-card-address {
    margin-top: .625rem;
    font-size: .8125rem;
    text-align: center;
    overflow-wrap: anywhere;
    color: var(--bs-secondary-color);
}

/*
 * Legal pages (Terms, Privacy; partials/legal_document.twig): the document is one panel. Sections
 * and clauses carry real numbers (5.2), so support can cite one and a member can find it.
 */
.legal-doc {
    border-radius: var(--site-radius);
}

.legal-doc > .card-body {
    padding: clamp(1.25rem, 3.5vw, 2.25rem);
}

/* The sticky navbar would cover a section scrolled to by its link (/tos#withdrawals). */
.legal-section {
    scroll-margin-top: calc(var(--site-nav-h) + 1rem);
}

/* A readable line; the rule between sections still spans the panel. */
.legal-section > * {
    max-width: 46rem;
}

.legal-section + .legal-section {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.legal-section-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.125rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--bs-emphasis-color);
}

.legal-anchor {
    font-size: .875rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    opacity: 0;
    transition: opacity .12s ease;
}

.legal-section-title:hover .legal-anchor,
.legal-anchor:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .legal-anchor {
        opacity: 1;
    }
}

.legal-intro {
    margin-bottom: 1.25rem;
    color: var(--bs-secondary-color);
}

.legal-clauses {
    display: grid;
    gap: .875rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.legal-clauses li {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    align-items: baseline;
    gap: .5rem;
    line-height: 1.65;
    overflow-wrap: break-word;
}

.legal-clause-num {
    font-size: .875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color);
}

/* "In short": the fact card, two to a row once there is room. */
@media (min-width: 768px) {
    .legal-summary .fact-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem 1.5rem;
    }
}

/* Who else sees your data: a table from md, one block per service below it. */
.legal-table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    font-size: .9375rem;
}

.legal-table thead th {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.legal-table th[scope="row"] {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.legal-table > :not(caption) > * > * {
    padding: .875rem .75rem;
}

.legal-table > :not(caption) > * > :first-child {
    padding-inline-start: 0;
}

.legal-table tbody tr:last-child > * {
    border-bottom: 0;
}

@media (min-width: 768px) {
    .legal-table th[scope="row"] {
        width: 30%;
    }
}

@media (max-width: 767.98px) {
    .legal-table thead {
        display: none;
    }

    .legal-table tr,
    .legal-table th,
    .legal-table td {
        display: block;
    }

    .legal-table tr {
        padding-block: 1rem;
        border-bottom: 1px solid var(--bs-border-color-translucent);
    }

    .legal-table tbody tr:last-child {
        border-bottom: 0;
    }

    .legal-table > :not(caption) > * > * {
        padding: 0;
        border: 0;
    }

    .legal-table th[scope="row"] {
        margin-bottom: .375rem;
    }

    .legal-table td + td {
        margin-top: .25rem;
    }

    .legal-table td::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--bs-secondary-color);
    }
}

/* Contents: a nav, so the section in view is the active row, in the brand colour as in the
   sidebar (site-cards.md). From lg it is in the aside; below, it folds away above the text. */
.legal-toc-list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: .125rem;
}

.legal-toc-list .nav-link {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .4375rem .75rem;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
    border-radius: calc(.5rem * var(--site-r));
    transition: background-color .12s ease, color .12s ease;
}

.legal-toc-list .nav-link:hover,
.legal-toc-list .nav-link:focus-visible {
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
}

.legal-toc-list .nav-link.active {
    font-weight: 600;
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
}

.legal-toc-num {
    flex: 0 0 1.25rem;
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    text-align: end;
}

/* The aside's card holds a long list: with twelve sections it can outgrow a short window, so it
   scrolls on its own rather than pushing the contact card out of reach. */
.legal-toc {
    border-radius: var(--site-radius);
}

@media (min-width: 992px) and (min-height: 640px) {
    .legal-toc .legal-toc-list {
        max-height: calc(100vh - var(--site-nav-h) - 18rem);
        overflow-y: auto;
    }
}

.legal-toc-mobile {
    overflow: hidden;
    border-radius: var(--site-radius);
}

.legal-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    background: none;
    border: 0;
}

.legal-toc-chevron {
    transition: transform .2s ease;
}

.legal-toc-toggle:not(.collapsed) .legal-toc-chevron {
    transform: rotate(180deg);
}

.legal-toc-mobile .legal-toc-list {
    padding: 0 .75rem .75rem;
}

@media print {
    .page-aside,
    .legal-toc-mobile,
    .legal-anchor {
        display: none !important;
    }
}

/*
 * Form card: a panel (site-cards.md) holding one step of a long form, titled with its number.
 */
.form-card,
.order-summary,
.rules-card {
    border-radius: var(--site-radius);
}

.form-card .card-body,
.order-summary .card-body {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.form-card-title {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.form-card-step,
.legal-num {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: .875rem;
    font-weight: 700;
    color: var(--bs-body-bg);
    background-color: var(--bs-emphasis-color);
    border-radius: 50%;
}

.form-card .form-label,
.order-summary .form-label {
    font-weight: 500;
}

/*
 * Choice tile: one radio of a small set, drawn as a card. The input is a .btn-check before its
 * label; checked is the brand colour, the same as Bootstrap's own checked controls.
 */
.choice-tile {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    height: 100%;
    padding: 1.125rem;
    cursor: pointer;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: calc(var(--site-radius) * .75);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.choice-tile:hover {
    border-color: rgba(var(--bs-primary-rgb), .5);
}

.btn-check:checked + .choice-tile {
    border-color: var(--bs-primary);
    box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.btn-check:focus-visible + .choice-tile {
    box-shadow: inset 0 0 0 1px var(--bs-primary), 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}

.btn-check:disabled + .choice-tile {
    cursor: not-allowed;
    opacity: .5;
}

.choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .375rem;
    font-size: 1.125rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.625rem * var(--site-r));
    transition: color .15s ease, background-color .15s ease;
}

.btn-check:checked + .choice-tile .choice-icon {
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
}

.choice-title {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.choice-text {
    flex-grow: 1;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.choice-price {
    padding-top: .5rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

@media (prefers-reduced-motion: reduce) {
    .choice-tile,
    .choice-icon {
        transition: none;
    }
}

/*
 * Option list: switches that change the price, each with its surcharge on the right.
 */
.option-list > * + * {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.option-list > .option-extra {
    padding-top: 0;
    margin-top: .75rem;
    border-top: 0;
}

.option-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.option-title {
    display: block;
    font-weight: 500;
    color: var(--bs-emphasis-color);
}

.option-text {
    display: block;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.option-rate {
    flex-shrink: 0;
    font-size: .875rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

/*
 * Order summary: what the form adds up to. The total is the page's hero (site-cards.md, "One hero
 * per page"), neutral because it is a price, not the member's money.
 *
 * Beside the form from lg, it stays in view while the form scrolls. It needs a column as tall as
 * the form to move in, and a window tall enough to hold all of it: a sticky panel taller than the
 * window would hide its own submit button until the end of the page.
 */
@media (min-width: 992px) and (min-height: 760px) {
    .order-summary {
        position: sticky;
        top: calc(var(--site-nav-h) + 1rem);
    }
}

.summary-list {
    display: grid;
    gap: .625rem;
    margin: 0;
    font-size: .9375rem;
}

.summary-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.summary-list dt {
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.summary-list dd {
    margin: 0;
    font-weight: 500;
    text-align: end;
    color: var(--bs-emphasis-color);
}

.summary-total {
    padding-block: 1.25rem;
    margin-block: 1.25rem;
    border-block: 1px solid var(--bs-border-color-translucent);
}

.summary-total-label {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.summary-total-value {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--bs-emphasis-color);
}

.summary-total-value small {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--bs-secondary-color);
}

.summary-min {
    margin-top: .375rem;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

/* Below the minimum the button is disabled; this line says why (warning: waiting on the member). */
.summary-min.is-below {
    font-weight: 600;
    color: var(--bs-warning-text-emphasis);
}

/* Under a short purchase balance: the move that covers it, or Top up (partials/purchase_shortfall.twig). */
.shortfall {
    margin-top: .5rem;
    font-size: .8125rem;
}

.shortfall-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .5rem;
}

.shortfall .form-text {
    margin-top: .375rem;
}

/*
 * Rules list: what an ad may not be.
 */
.rules-list {
    display: grid;
    gap: .625rem;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: .9375rem;
}

.rules-list li {
    display: flex;
    gap: .75rem;
    align-items: baseline;
}

.rules-list i {
    width: 1rem;
    flex-shrink: 0;
    text-align: center;
    color: var(--bs-danger-text-emphasis);
}

/*
 * Wallet card: money the member holds (site-cards.md). The hero is Balance, the only large
 * number on the dashboard; the supporting cards are smaller and neutral but for Pending.
 *
 * .wallet-grid lays them out, with --wallet-support (how many supporting cards) set inline.
 * The grid, not h-100 in nested rows, is what keeps every edge in line:
 *   phones  the hero across the top, the others two to a row (an odd last one full width)
 *   md      the hero across the top, the others on one row
 *   lg      the hero on the left, the others stacked beside it as strips, value on the right,
 *           so a long amount has the width it needs at a desktop size
 */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.wallet-grid > .wallet-card-hero {
    grid-column: 1 / -1;
}

/* The hero is the first child, so an odd number of supporting cards ends on an even child. */
@media (max-width: 767.98px) {
    .wallet-grid > .wallet-card:last-child:nth-child(even) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 768px) {
    .wallet-grid {
        grid-template-columns: repeat(var(--wallet-support, 3), minmax(0, 1fr));
    }
}

.wallet-card {
    border-radius: var(--site-radius);
}

.wallet-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.wallet-card-hero .card-body {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

/* #withdraw is the tab bar's Wallet target: clear the sticky top bar when it scrolls there. */
.wallet-card-hero {
    scroll-margin-top: calc(var(--site-nav-h) + 1rem);
}

.wallet-label {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.wallet-value {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--bs-emphasis-color);
    font-variant-numeric: tabular-nums;
}

/* The colour classes on a value (text-success-emphasis, text-warning-emphasis) win over the
   neutral default above: Bootstrap's utilities are !important. */
.wallet-card-hero .wallet-value {
    margin-block: .25rem .75rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.wallet-note {
    margin: auto 0 0;
    padding-top: .5rem;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.wallet-progress {
    height: .375rem;
    margin-bottom: .5rem;
}

.wallet-status {
    display: flex;
    gap: .5rem;
    align-items: baseline;
    margin-bottom: 1.25rem;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

/* Waiting on the member or on a date (site-cards.md: warning). */
.wallet-status.is-waiting {
    color: var(--bs-warning-text-emphasis);
}

.wallet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: auto;
}

@media (min-width: 768px) {
    .wallet-value {
        font-size: 1.25rem;
    }

    .wallet-card-hero .wallet-value {
        font-size: 2.5rem;
    }
}

/* Desktop: the hero spans every row on the left; each supporting card is a strip, label and note
   on the left and the value on the right. */
@media (min-width: 992px) {
    .wallet-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        grid-template-rows: repeat(var(--wallet-support, 3), minmax(0, 1fr));
        gap: 1.25rem;
    }

    .wallet-grid > .wallet-card-hero {
        grid-row: 1 / -1;
        grid-column: 1;
    }

    .wallet-grid > .wallet-card:not(.wallet-card-hero) {
        grid-column: 2;
    }

    .wallet-grid > .wallet-card:not(.wallet-card-hero) .card-body {
        display: grid;
        /* The value takes what it needs, and wraps at the space before the unit when it can't. */
        grid-template-columns: minmax(0, 1fr) minmax(0, auto);
        grid-template-areas: "label value" "note value";
        align-content: center;
        column-gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .wallet-grid > .wallet-card:not(.wallet-card-hero) .wallet-label {
        grid-area: label;
        font-weight: 500;
        color: var(--bs-emphasis-color);
    }

    .wallet-grid > .wallet-card:not(.wallet-card-hero) .wallet-value {
        grid-area: value;
        align-self: center;
        text-align: end;
    }

    .wallet-grid > .wallet-card:not(.wallet-card-hero) .wallet-note {
        grid-area: note;
        margin: 0;
        padding-top: .125rem;
    }

    .wallet-label {
        font-size: .9375rem;
    }

    .wallet-value {
        font-size: 1.5rem;
    }

    .wallet-note {
        font-size: .875rem;
    }

    .wallet-card-hero .card-body {
        padding: 2rem;
    }

    .wallet-card-hero .wallet-value {
        font-size: 3rem;
    }

    .wallet-status {
        font-size: 1rem;
    }
}

/*
 * Panel card: a panel (site-cards.md) with a title row. A table card can be one too.
 */
.panel-card {
    border-radius: var(--site-radius);
}

.panel-card > .card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    padding: 1rem 1.25rem;
    background-color: transparent;
}

.panel-card > .card-body {
    padding: 1.25rem;
}

.panel-card > .card-footer {
    padding: 1rem 1.25rem;
    background-color: transparent;
}

.panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.panel-meta {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.panel-link {
    font-size: .875rem;
    text-decoration: none;
}

.panel-link:hover,
.panel-link:focus-visible {
    text-decoration: underline;
}

/* A chart that fills what its panel leaves (the panel beside it sets the height), never less than
   240px. The canvas is taken out of the flow: in it, its own height would hold the box open and
   Chart.js could never shrink it again (createChart's maintainAspectRatio: false). */
.chart-box {
    position: relative;
    flex: 1 1 auto;
    min-height: 240px;
}

.chart-box > canvas {
    position: absolute;
    inset: 0;
}

/* The stat tiles inside a panel sit on the panel, so they take the tinted surface. */
.panel-card .stat-tile {
    padding: .875rem 1rem;
    background-color: var(--bs-tertiary-bg);
    border: 0;
}

.panel-card .stat-tile-value {
    font-size: 1.25rem;
}

/*
 * Account list: label left, value right, one row each.
 */
.account-list {
    display: grid;
    margin: 0;
}

.account-list > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    padding-block: .75rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.account-list > div:first-child {
    padding-top: 0;
}

.account-list > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.account-list dt {
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.account-list dd {
    min-width: 0;
    margin: 0;
    font-weight: 500;
    text-align: end;
    color: var(--bs-emphasis-color);
}

.tfa-steps {
    padding-inline-start: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--bs-secondary-color);
}

/* Desktop: the panels' small print steps up with the room (the phone sizes above stay). */
@media (min-width: 992px) {
    .panel-card > .card-header {
        padding: 1.25rem 1.5rem;
    }

    .panel-card > .card-body {
        padding: 1.5rem;
    }

    .panel-card > .card-footer {
        padding: 1.25rem 1.5rem;
    }

    .panel-title {
        font-size: 1.125rem;
    }

    .panel-meta,
    .panel-link,
    .panel-card .stat-tile-label,
    .panel-card .payment-meta {
        font-size: .9375rem;
    }

    .panel-card .stat-tile {
        padding: 1rem 1.25rem;
    }

    .panel-card .stat-tile-value {
        font-size: 1.5rem;
    }

    .panel-card .payment-amount {
        font-size: 1.0625rem;
    }

    .panel-card.table-card .table > :not(caption) > * > :first-child {
        padding-inline-start: 1.5rem;
    }

    .panel-card.table-card .table > :not(caption) > * > :last-child {
        padding-inline-end: 1.5rem;
    }
}

/*
 * Auth pages (login, register, forgot): one card, split in two from lg into the
 * form and the brand half (partials/auth_aside.twig). Below lg the form is the whole card, so a
 * phone gets straight to the fields.
 */
.auth-page {
    padding-block: clamp(1.5rem, 5vw, 4rem);
}

.auth-split {
    display: grid;
    max-width: 28rem;
    margin-inline: auto;
    overflow: hidden;
    border-radius: calc(var(--site-radius) * 1.5);
    box-shadow: 0 1.5rem 3rem -1.5rem rgba(var(--bs-emphasis-color-rgb), .25);
}

@media (min-width: 992px) {
    .auth-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        max-width: 64rem;
    }
}

.auth-main {
    padding: clamp(1.5rem, 5vw, 3rem);
}

.auth-title {
    margin-bottom: .5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    overflow-wrap: anywhere;
    color: var(--bs-emphasis-color);
}

.auth-lead {
    margin-bottom: 1.75rem;
    color: var(--bs-secondary-color);
}

.auth-note {
    margin: 0;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

/* Register: who invited them, from the `ref` cookie. A fact, not a notice, so no alert colour. */
.auth-invite {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin: -.75rem 0 1.75rem;
    padding: .625rem .875rem;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: var(--site-radius);
}

.auth-invite strong {
    color: var(--bs-emphasis-color);
    overflow-wrap: anywhere;
}

/* Forgot, once sent: the icon stands where the eyebrow is on the other states. */
.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(1rem * var(--site-r));
}

.auth-tips {
    display: grid;
    gap: .75rem;
    padding: 0;
    margin: 0 0 1.75rem;
    font-size: .9375rem;
    list-style: none;
    color: var(--bs-secondary-color);
}

.auth-tips li {
    display: flex;
    gap: .75rem;
    align-items: baseline;
}

.auth-tips i {
    flex: 0 0 1rem;
    text-align: center;
}

/* Show password: sits in the field's border, not a second button competing with Log in. */
.auth-reveal {
    min-width: 3.25rem;
    --bs-btn-color: var(--bs-secondary-color);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--bs-tertiary-bg);
    --bs-btn-hover-border-color: var(--bs-border-color);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--bs-tertiary-bg);
    --bs-btn-active-border-color: var(--bs-border-color);
}

/* The 2FA disclosure: a quiet link, since most members never need it. */
.auth-2fa-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 0;
    font-size: .9375rem;
    text-decoration: none;
    color: var(--bs-secondary-color);
}

.auth-2fa-toggle:hover,
.auth-2fa-toggle:focus-visible {
    color: var(--bs-emphasis-color);
}

.auth-2fa-chevron {
    font-size: .75rem;
    transition: transform .15s ease;
}

.auth-2fa-toggle:not(.collapsed) .auth-2fa-chevron {
    transform: rotate(180deg);
}

.auth-code {
    font-variant-numeric: tabular-nums;
    letter-spacing: .3em;
}

/* "or continue with", then the providers side by side while they fit. */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-block: 1.75rem 1.25rem;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    content: "";
    border-top: 1px solid var(--bs-border-color);
}

.auth-social {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: .5rem;
    margin-bottom: .75rem;
}

.auth-social .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

/* Brand half */
.auth-aside {
    display: none;
}

@media (min-width: 992px) {
    .auth-aside {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 3rem;
        background:
            radial-gradient(40rem 24rem at 100% 0%, rgba(var(--bs-primary-rgb), .16), transparent 70%),
            var(--bs-tertiary-bg);
        border-inline-start: 1px solid var(--bs-border-color-translucent);
    }
}

.auth-aside-title {
    margin-bottom: .75rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--bs-emphasis-color);
}

.auth-aside-lead {
    margin: 0;
    color: var(--bs-secondary-color);
}

.auth-earn {
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.auth-earn li {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
}

/* On the tinted half the feature icon's own tertiary tile would vanish. */
.auth-earn .feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: calc(.625rem * var(--site-r));
}

.auth-earn-label {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.auth-earn-desc {
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

/* Under the list, lined up with the labels (icon 2.5rem + gap .875rem). */
.auth-earn-more {
    margin-top: -1rem;
    padding-inline-start: 3.375rem;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

/*
 * Offerwalls: one partner's wall at a time in a panel, under a bar that names it and says when its
 * rewards are held. A member who can't use the walls yet gets the unlock card instead.
 */
.wall-card {
    overflow: hidden;
    border-radius: var(--site-radius);
}

.wall-bar {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

/* The partner's logo on a round badge (partials/brand_logo.twig), or its initial where there is none. */
.wall-mark {
    font-size: 1rem;
}

.wall-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.wall-hold {
    display: flex;
    gap: .375rem;
    align-items: baseline;
    margin: .125rem 0 0;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

.wall-open {
    flex-shrink: 0;
    margin-inline-start: auto;
}

/* As tall as the window leaves under the top bar, so the wall scrolls inside itself rather than
   the page scrolling around it; never shorter than a phone's worth of offers. */
.wall-frame {
    position: relative;
    height: clamp(32rem, calc(100dvh - var(--site-nav-h) - 6rem), 64rem);
    background-color: var(--bs-tertiary-bg);
}

.wall-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.wall-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
    pointer-events: none;
}

/* A section's title inside a plain card ("How it works", "Good to know"): Offerwalls and Lottery. */
.card-section-title {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

/* Locked: what unlocks the walls, each requirement met (secondary: done) or still to do (warning:
   waiting on the member or on a date). */
.unlock-card {
    border-radius: var(--site-radius);
}

.unlock-card .card-body {
    max-width: 40rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.unlock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(.75rem * var(--site-r));
}

.unlock-title {
    margin-bottom: .5rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.unlock-text {
    margin-bottom: 1.5rem;
    color: var(--bs-secondary-color);
}

.unlock-list {
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.unlock-list li {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
}

.unlock-state {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: .875rem;
    border-radius: 50%;
}

.unlock-list .is-waiting .unlock-state {
    color: var(--bs-warning-text-emphasis);
    background-color: var(--bs-warning-bg-subtle);
}

.unlock-list .is-met .unlock-state {
    color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
}

.unlock-label {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.unlock-list .is-met .unlock-label {
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.unlock-detail {
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.unlock-list .is-waiting .unlock-detail {
    color: var(--bs-warning-text-emphasis);
}

.unlock-progress {
    height: .375rem;
    margin-top: .5rem;
}

.unlock-actions {
    margin-top: 1.75rem;
}

/*
 * Lottery: this round's 1st prize is the hero, beside the header from md, with 2nd and 3rd under
 * it. The countdown counts to a timestamp, in tabular figures so it doesn't jitter. The games'
 * purchase balance (Hi-Lo, Coin Flipper) sits in the same place, with the balance under it, and so
 * do what Revenue Share's shares pay a day, what Referrals Market's referrals have paid, what
 * Mining's hashes are worth and Referral Contest's 1st prize.
 */
.lottery-hero,
.game-hero,
.share-hero,
.refs-hero,
.mining-hero,
.contest-hero {
    width: 100%;
}

.lottery-hero .wallet-value small,
.share-hero .wallet-value small,
.refs-hero .wallet-value small,
.mining-hero .wallet-value small,
.contest-hero .wallet-value small {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
}

.lottery-hero .summary-list,
.game-hero .summary-list,
.share-hero .summary-list,
.refs-hero .summary-list,
.mining-hero .summary-list,
.contest-hero .summary-list {
    padding-top: .75rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

@media (min-width: 768px) {
    .lottery-hero,
    .game-hero,
    .share-hero,
    .refs-hero,
    .mining-hero,
    .contest-hero {
        flex-shrink: 0;
        width: 20rem;
    }
}

.round-countdown {
    font-variant-numeric: tabular-nums;
}

/* The quote under the ticket field, set off from it as the order summary's total is. */
.summary-split {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

/* A winner's name, cut to one line, with the "You" badge beside it. */
.draw-winner {
    display: flex;
    gap: .5rem;
    align-items: center;
    min-width: 0;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

/*
 * Games (Hi-Lo, Coin Flipper): one card holds the game, the round on one side (tinted, as the
 * stage) and the bet on the other. The outcome is the round's result, coloured by its sign once
 * it lands (site-cards.md: a signed result follows its sign); while it plays, and before the
 * first round, it is neutral. Hi-Lo's roll is coloured with it.
 */
.game-card {
    overflow: hidden;
    border-radius: var(--site-radius);
}

.game-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
    text-align: center;
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

@media (min-width: 992px) {
    .game-stage {
        border-right: 1px solid var(--bs-border-color-translucent);
        border-bottom: 0;
    }
}

.hilo-roll {
    font-family: var(--bs-font-monospace);
    font-size: clamp(3rem, 12vw, 4.5rem);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    color: var(--bs-emphasis-color);
    transition: color .2s ease;
}

.game-stage[data-state="rolling"] .hilo-roll {
    color: var(--bs-secondary-color);
}

.game-stage[data-state="won"] .hilo-roll {
    color: var(--bs-success-text-emphasis);
}

.game-stage[data-state="lost"] .hilo-roll {
    color: var(--bs-danger-text-emphasis);
}

.game-outcome {
    display: inline-flex;
    gap: .5rem;
    align-items: baseline;
    justify-content: center;
    min-height: 1.5em;
    margin: 1rem 0 1.75rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.game-stage[data-state="won"] .game-outcome {
    color: var(--bs-success-text-emphasis);
}

.game-stage[data-state="lost"] .game-outcome {
    color: var(--bs-danger-text-emphasis);
}

/* 0 to 10,000. LO wins on the left zone, HI on the right one; the gap between them is the house
   edge. The side bet on is the darker zone; neither is coloured, since neither is money yet. */
.hilo-track {
    position: relative;
    height: .5rem;
    background-color: var(--bs-secondary-bg);
    border-radius: 50rem;
}

.hilo-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    background-color: var(--bs-border-color);
    transition: width .2s ease, background-color .2s ease;
}

.hilo-zone.is-lo {
    left: 0;
    border-radius: 50rem 0 0 50rem;
}

.hilo-zone.is-hi {
    right: 0;
    border-radius: 0 50rem 50rem 0;
}

.hilo-track[data-side="hi"] .hilo-zone.is-hi,
.hilo-track[data-side="lo"] .hilo-zone.is-lo,
.hilo-track[data-side="random"] .hilo-zone {
    background-color: var(--bs-secondary-color);
}

/* The last roll, by its sign. */
.hilo-marker {
    position: absolute;
    top: 50%;
    width: .875rem;
    height: .875rem;
    background-color: var(--bs-emphasis-color);
    border: 2px solid var(--bs-body-bg);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left .25s ease;
}

.hilo-marker[data-result="won"] {
    background-color: var(--bs-success);
}

.hilo-marker[data-result="lost"] {
    background-color: var(--bs-danger);
}

.hilo-scale {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .5rem;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color);
}

/* Auto bet's run: three counts side by side under the track. */
.hilo-run {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 1.25rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.hilo-run > div {
    flex-direction: column;
    gap: .125rem;
    align-items: center;
}

.hilo-run dt {
    font-size: .8125rem;
}

.hilo-run dd {
    text-align: center;
}

.hilo-run-note {
    margin: 1rem 0 0;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.game-controls {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.game-controls .form-label {
    font-weight: 500;
}

.hilo-modes {
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 -1px 0 var(--bs-border-color-translucent);
}

.hilo-modes .nav-link {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
}

.hilo-sides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.hilo-sides.has-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-tile.hilo-side {
    gap: .125rem;
    padding: .75rem 1rem;
}

.hilo-side .choice-text {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
    .hilo-sides.has-three .choice-tile.hilo-side {
        padding: .625rem .75rem;
    }

    .hilo-sides.has-three .choice-text {
        font-size: .75rem;
    }
}

.hilo-auto {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.hilo-rule {
    height: 100%;
    padding: .875rem 1rem;
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(var(--site-radius) * .75);
}

.hilo-rule-title {
    margin-bottom: .5rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

/* Provably fair (both games): the next round's seeds. A hash breaks anywhere; it is not an amount. */
.fair-seed-label {
    margin-bottom: .25rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.fair-seed {
    margin-bottom: 1rem;
}

.fair-seed-value {
    display: block;
    padding: .5rem .75rem;
    font-size: .8125rem;
    color: var(--bs-emphasis-color);
    word-break: break-all;
    background-color: var(--bs-tertiary-bg);
    border-radius: calc(var(--site-radius) * .5);
}

.fair-how {
    margin-top: 1.25rem;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.fair-how summary {
    font-weight: 500;
    color: var(--bs-emphasis-color);
}

.fair-how ol {
    display: grid;
    gap: .375rem;
    padding-left: 1.25rem;
    margin: .75rem 0 0;
}

.fair-how code {
    color: var(--bs-emphasis-color);
}

/* Verify a roll or a flip: the result is the hero, neutral until a bet is given, then by its
   sign. A hash that doesn't match is refused (danger); one that matches is a fact, not money, so
   neutral. */
.verify-verdict[data-state="won"] .verify-result {
    color: var(--bs-success-text-emphasis);
}

.verify-verdict[data-state="lost"] .verify-result {
    color: var(--bs-danger-text-emphasis);
}

.verify-checks {
    display: grid;
    gap: .75rem;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: .9375rem;
}

.verify-checks li {
    display: flex;
    gap: .625rem;
    align-items: baseline;
    color: var(--bs-secondary-color);
    overflow-wrap: anywhere;
}

.verify-checks .is-ok {
    color: var(--bs-emphasis-color);
}

.verify-checks .is-bad,
.verify-checks .is-lost {
    color: var(--bs-danger-text-emphasis);
}

.verify-checks .is-won {
    color: var(--bs-success-text-emphasis);
}

.verify-steps {
    display: grid;
    gap: .5rem;
    padding-left: 1.25rem;
    margin: 0;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.verify-steps code {
    color: var(--bs-emphasis-color);
}

@media (prefers-reduced-motion: reduce) {
    .hilo-roll,
    .hilo-zone,
    .hilo-marker {
        transition: none;
    }
}

/*
 * Coin Flipper (the add-on): the coin on the game stage, Bitcoin on one face and Ethereum on the
 * other. It rises and spins while the flip is sent, then lands on the side the server drew; the
 * outcome under it follows its sign. The page script animates it only while .coin keeps its 3D
 * (this stylesheet is loaded), so without it (bootstrap5) both faces simply sit side by side.
 */
.coin-scene {
    position: relative;
    display: flex;
    justify-content: center;
    padding-bottom: 1.25rem;
    perspective: 60rem;
}

/* Its shadow on the stage, smaller while the coin is in the air. */
.coin-scene::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 6.5rem;
    height: .875rem;
    content: "";
    background: radial-gradient(closest-side, rgba(var(--bs-emphasis-color-rgb), .2), transparent);
    transform: translateX(-50%);
    transition: transform .3s ease, opacity .3s ease;
}

.coin-lift {
    transition: transform .3s ease;
}

.coin {
    position: relative;
    width: clamp(7.5rem, 32vw, 10rem);
    height: clamp(7.5rem, 32vw, 10rem);
    transform-style: preserve-3d;
}

.coin-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.coin-face.is-eth {
    transform: rotateY(180deg);
}

.game-stage[data-state="flipping"] .coin-lift {
    transform: translateY(-.875rem);
}

.game-stage[data-state="flipping"] .coin-scene::after {
    opacity: .5;
    transform: translateX(-50%) scale(.65);
}

/* The two sides: Bootstrap's outline toggle buttons, drawn as choice tiles. Checked is the brand
   colour, as on a choice tile; without this stylesheet they are still a working toggle. Referrals
   Market's package sizes (.pack-option) are the same control. */
.coin-sides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.btn.coin-side,
.btn.pack-option {
    --bs-btn-color: var(--bs-emphasis-color);
    --bs-btn-bg: var(--bs-body-bg);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--bs-body-bg);
    --bs-btn-hover-border-color: rgba(var(--bs-primary-rgb), .5);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--bs-body-bg);
    --bs-btn-active-border-color: var(--bs-primary);
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .75rem 1rem;
    text-align: start;
    border-radius: calc(var(--site-radius) * .75);
}

.btn-check:checked + .btn.coin-side,
.btn-check:checked + .btn.pack-option {
    box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.btn-check:focus-visible + .btn.coin-side,
.btn-check:focus-visible + .btn.pack-option {
    box-shadow: inset 0 0 0 1px var(--bs-primary), 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}

.coin-side img {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}

.coin-side-title,
.pack-option-title {
    display: block;
    font-weight: 600;
}

.coin-side-text,
.pack-option-text {
    display: block;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

/* A package size: its count over its discount, stacked; a size out of stock is a disabled toggle. */
.btn.pack-option {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    padding: .625rem .875rem;
}

/* A row of Your flips: the side, with its coin. */
.coin-pick {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    white-space: nowrap;
}

.coin-pick img {
    width: 1.25rem;
    height: 1.25rem;
}

@media (max-width: 575.98px) {
    .btn.coin-side {
        gap: .5rem;
        padding: .625rem .75rem;
    }

    .coin-side img {
        width: 1.5rem;
        height: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .coin-lift,
    .coin-scene::after {
        transition: none;
    }
}

/*
 * Faucets List: other sites' faucets, in one table card with a toolbar (coin, search, category,
 * sort). The reward is money coming to the member, so it is success with a "+"; a faucet out of
 * the coin is unavailable (secondary), muted and sorted last, never hidden.
 */
.coin-avatar-sm {
    width: 1.75rem;
    height: 1.75rem;
    font-size: .5625rem;
}

.faucet-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.faucet-coin-btn {
    --bs-btn-color: var(--bs-emphasis-color);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--bs-secondary-bg);
    --bs-btn-hover-border-color: var(--bs-secondary-color);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--bs-secondary-bg);
    --bs-btn-active-border-color: var(--bs-secondary-color);
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    padding-block: .25rem;
    padding-inline-start: .375rem;
    font-weight: 600;
}

/* 23 coins: a scrolling menu rather than one taller than a phone's screen. */
.faucet-coin-menu {
    max-height: min(24rem, 60vh);
    overflow-y: auto;
}

.faucet-coin-menu .dropdown-item {
    display: flex;
    gap: .625rem;
    align-items: center;
}

.faucet-search {
    position: relative;
    flex: 1 1 14rem;
    max-width: 22rem;
}

.faucet-search > i {
    position: absolute;
    top: 50%;
    left: .875rem;
    color: var(--bs-secondary-color);
    pointer-events: none;
    transform: translateY(-50%);
}

.faucet-search .form-control {
    padding-inline-start: 2.5rem;
}

.faucet-toolbar .form-select {
    width: auto;
}

.faucet-toolbar .form-switch {
    margin-inline-start: auto;
}

/* At 320px the selects share a row and the search takes its own. */
@media (max-width: 575.98px) {
    .faucet-search {
        flex-basis: 100%;
        max-width: none;
    }

    .faucet-toolbar .form-switch {
        margin-inline-start: 0;
    }
}

.faucet-name {
    display: block;
    max-width: 22rem;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-emphasis-color);
    text-decoration: none;
}

.faucet-name:hover {
    color: var(--bs-link-hover-color);
    text-decoration: underline;
}

.faucet-host {
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .faucet-name {
        max-width: 11rem;
    }
}

.faucet-reward {
    font-weight: 600;
    white-space: nowrap;
    color: var(--bs-success-text-emphasis);
}

.faucet-health {
    display: flex;
    gap: .625rem;
    align-items: center;
    min-width: 7rem;
}

.faucet-health .money {
    min-width: 1.75rem;
    text-align: end;
}

.faucet-health-bar {
    flex: 1;
    height: .375rem;
}

/* Out of the coin: muted, with the badge at full strength so the state still reads. */
.faucet-row.is-unavailable > td:not(:last-child) {
    opacity: .6;
}

.faucet-more {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    padding: .875rem 1.25rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.faucet-steps {
    display: grid;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.faucet-steps li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.faucet-steps .step-num {
    flex-shrink: 0;
    margin-bottom: 0;
}

.faucet-steps .step-title {
    margin-bottom: .25rem;
    font-size: 1rem;
}

/*
 * Faucet (the add-on's page): the next claim's reward is the hero, in the centre column between
 * the banner columns. While it cools down the wait is a warning bar and a disabled button that
 * counts down; a day's claims used up mutes it, as a done offer card is. The claim dialog puts
 * the AntiBot words on the background they were drawn for (data-bs-theme on their row), and
 * numbers each one as it is clicked. Timer Faucet (the add-on) shares the hero, the bar and the
 * banner rules; its bar fills as the timer counts (.is-live).
 */
.faucet-hero .wallet-value small {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
}

.faucet-hero.is-done {
    background-color: var(--site-well);
}

.faucet-status {
    margin-bottom: .75rem;
}

.faucet-progress {
    height: .375rem;
}

/* It ticks every 250ms: Bootstrap's .6s ease would trail behind the count. */
.faucet-progress.is-live .progress-bar {
    transition: width .25s linear;
}

.faucet-clock {
    font-variant-numeric: tabular-nums;
}

/* A banner never pushes the page sideways: a 728x90 in a narrower column is cut, as before. */
.faucet-banner {
    max-width: 100%;
}

.faucet-banner img,
.faucet-banner iframe {
    max-width: 100%;
}

.faucet-antibot-head {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    align-items: center;
    font-size: .9375rem;
}

.faucet-antibot-phrase {
    display: inline-flex;
    padding: .125rem .5rem;
}

.faucet-antibot-phrase img,
.faucet-antibot-link img {
    max-width: 100%;
    height: auto;
}

.faucet-antibot-link {
    position: relative;
    padding: .25rem .5rem;
    border-radius: calc(.5rem * var(--site-r));
}

/* A clicked word keeps its place, faded, with the order it was clicked in on a badge (which
   stays solid: the fade is on the picture, not the button). */
.faucet-antibot-link.is-picked {
    --bs-btn-disabled-opacity: 1;
}

.faucet-antibot-link.is-picked img {
    opacity: .35;
}

.faucet-antibot-link.is-picked::after {
    content: attr(data-order);
    position: absolute;
    top: -.5rem;
    right: -.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    font-size: .75rem;
    font-weight: 700;
    color: var(--bs-body-bg);
    background-color: var(--bs-emphasis-color);
    border-radius: 50%;
}

/*
 * YouTube Tasks (the Aviso add-on): Aviso's widget fills one panel. It draws in its own shadow
 * root, so only its box is ours: full width, held open while it loads, scrolling sideways rather
 * than being cut if it still comes out wider than a narrow phone.
 */
.aviso-card {
    overflow: hidden;
    border-radius: var(--site-radius);
}

.aviso-widget {
    width: 100%;
    max-width: 100%;
    min-height: 24rem;
    overflow-x: auto;
}

.aviso-widget[hidden] {
    display: none;
}

/*
 * CAPTCHA (captcha.twig): the provider's widget, or the image code with its input, then "Try
 * another check" when the member may pick. Left-aligned in a form, centred in a dialog.
 */
.captcha-field {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: flex-start;
}

.modal-body .captcha-field {
    align-items: center;
    text-align: center;
}

/* Turnstile's flexible size fills the field. */
.captcha-field .cf-turnstile {
    align-self: stretch;
}

.captcha-image {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.captcha-image img {
    max-width: 100%;
    height: auto;
    background-color: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: calc(.5rem * var(--site-r));
}

.captcha-input {
    max-width: 12rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.captcha-switch {
    margin: 0;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

/* reCAPTCHA and hCaptcha are fixed at about 304px, wider than a 320px phone's form. */
@media (max-width: 374.98px) {
    .captcha-field .g-recaptcha,
    .captcha-field .h-captcha {
        width: 304px;
        transform: scale(.85);
        transform-origin: 0 0;
        margin-bottom: -12px;
    }

    .modal-body .captcha-field .g-recaptcha,
    .modal-body .captcha-field .h-captcha {
        transform-origin: 50% 0;
    }
}

/*
 * Banner slots (docs/site-banners.md): the theme's own spots, from partials/ad_slot.twig. A small
 * label and a neutral frame, so an ad never passes for one of the site's cards and a white banner
 * doesn't glare in dark mode. The frame keeps the banner's height while it loads, so the page
 * doesn't jump when it arrives. A banner never pushes the page sideways: a 728x90 in a narrower
 * column is cut, as on the Faucet.
 */
.site-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    max-width: 100%;
}

.site-ad-label {
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.site-ad-body {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    background-color: var(--site-well);
    border-radius: calc(.5rem * var(--site-r));
}

.site-ad-body img,
.site-ad-body iframe {
    max-width: 100%;
}

/* Under the page header: the same gap down to the content as the header leaves. */
.site-ad-top {
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.site-ad-top.site-ad-first {
    margin-top: clamp(1.25rem, 3vw, 2rem);
}

/* A leaderboard: 728x90 from lg, a 320x50 phone code below. `wide` is the same without the gap. */
.site-ad-top .site-ad-body,
.site-ad-wide .site-ad-body {
    min-height: 50px;
}

@media (min-width: 992px) {
    .site-ad-top .site-ad-body,
    .site-ad-wide .site-ad-body {
        min-height: 90px;
    }
}

.site-ad-inline .site-ad-body {
    min-height: 90px;
}

/* The home page's spot, between the hero and the next section: the section's own gap above it,
   so the banner sits in the middle of the space between them. */
.landing-banner {
    padding-top: var(--site-section-y);
}

.news-post + .site-ad,
.site-ad + .news-post {
    margin-top: 1rem;
}

.site-ad-footer .site-ad-body {
    min-height: 60px;
}

/* Sticky on phones: a 320x50 above the tab bar, with its close button as a tab on top. */
.site-ad-sticky {
    position: fixed;
    right: 0;
    bottom: calc(var(--site-tabbar-h) + env(safe-area-inset-bottom));
    left: 0;
    z-index: 1029;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--site-ad-sticky-h);
    padding-block: .25rem;
    background-color: rgba(var(--bs-body-bg-rgb), .92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--bs-border-color-translucent);
}

.site-ad-sticky .site-ad-body {
    width: auto;
    height: 50px;
    background: none;
    border-radius: 0;
}

.site-ad-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 1.5rem;
    padding: 0;
    font-size: .8125rem;
    color: var(--bs-secondary-color);
    background: none;
    border: 0;
    border-radius: calc(.375rem * var(--site-r));
}

.site-ad-close:hover,
.site-ad-close:focus-visible {
    color: var(--bs-emphasis-color);
}

.site-ad-sticky .site-ad-close {
    position: absolute;
    right: .5rem;
    bottom: 100%;
    background-color: rgba(var(--bs-body-bg-rgb), .92);
    border: 1px solid var(--bs-border-color-translucent);
    border-bottom: 0;
    border-radius: calc(.5rem * var(--site-r)) calc(.5rem * var(--site-r)) 0 0;
}

@media (max-width: 1199.98px) {
    body.has-sidebar.has-ad-sticky {
        padding-bottom: calc(var(--site-tabbar-h) + var(--site-ad-sticky-h) + env(safe-area-inset-bottom));
    }
}

@media (min-width: 1200px) {
    .site-ad-sticky {
        display: none;
    }
}

/* Floating corner: a 300x250 in the bottom-right corner from xl, under its label and close button,
   on every page. Toasts use the top-right corner, so the two never meet. */
.site-ad-float {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1029;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    max-width: calc(100vw - 2rem);
    padding: .25rem .5rem .5rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: var(--site-radius);
    box-shadow: var(--bs-box-shadow);
    animation: site-ad-float-in .3s ease-out;
}

.site-ad-float-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline-start: .25rem;
}

.site-ad-float .site-ad-body {
    min-width: 300px;
    min-height: 250px;
}

@keyframes site-ad-float-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
}

@media (max-width: 1199.98px) {
    .site-ad-float {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-ad-float {
        animation: none;
    }
}
