/*
 * App styles. Mobile first; desktop gets a centred column.
 *
 * Brand: The GAP. Ink #151821, lime #D9FB55, paper #F7F8F2, slate #656B78,
 * blue #5064F5. Lime is a fill (with ink text on it) or a colour on dark
 * backgrounds only: on paper it is unreadable (1.1:1 contrast).
 */

/* Brand fonts (SIL Open Font License, see assets/fonts/). A font chosen in
   Ghost Admin → Settings → Design → Typography overrides these. */
@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    /* Brand palette */
    --brand-ink: #151821;
    --brand-lime: #D9FB55;
    --brand-paper: #F7F8F2;
    --brand-slate: #656B78;
    --brand-blue: #5064F5;

    /* Light theme */
    --color-bg: var(--brand-paper);
    --color-surface: #FFFFFF;
    --color-text: var(--brand-ink);
    --color-muted: var(--brand-slate);
    --color-border: #E3E5DC;
    --color-header: var(--brand-ink);
    --color-header-text: var(--brand-paper);
    --color-primary: var(--brand-lime);         /* filled buttons, badges, highlights */
    --color-on-primary: var(--brand-ink);       /* text on lime */
    --color-accent: #4A5EF0;                    /* links and labels: brand blue, darkened a touch to pass contrast on paper */
    --color-strong-border: var(--brand-ink);    /* outline for the current item */
    --color-bar: rgba(255, 255, 255, .94);

    --font-body: var(--gh-font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    --font-heading: var(--gh-font-heading, "Space Grotesk", var(--font-body));

    --header-height: 52px;
    --tab-bar-height: 62px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --content-width: 680px;
    --radius: 14px;

    color-scheme: light;
}

/* Dark theme follows the phone's setting */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0E1016;
        --color-surface: #1B1F29;
        --color-text: var(--brand-paper);
        --color-muted: #9AA1AE;
        --color-border: #2A2F3B;
        --color-header: var(--brand-ink);
        --color-accent: var(--brand-lime);      /* lime reads beautifully on dark */
        --color-strong-border: var(--brand-lime);
        --color-bar: rgba(21, 24, 33, .94);

        color-scheme: dark;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    /* Keep things scrolled into view (e.g. by keyboard focus) clear of the fixed bars */
    scroll-padding-top: calc(var(--header-height) + var(--safe-top));
    scroll-padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom));
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font: 17px/1.55 var(--font-body);
    overscroll-behavior-y: none;
}

[hidden] {
    display: none !important;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-accent);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -.02em;
}

/* --- App shell ------------------------------------------------------------ */

.app-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    height: calc(var(--header-height) + var(--safe-top));
    padding: var(--safe-top) 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-header);
    color: var(--color-header-text);
}

.app-header__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    letter-spacing: -.01em;
    color: inherit;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__mark {
    flex-shrink: 0;
}

.app-header__back,
.app-header__action {
    position: absolute;
    bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.app-header__back {
    left: 4px;
}

.app-header__action {
    right: 4px;
}

.app-header__back .icon,
.app-header__action .icon {
    width: 24px;
    height: 24px;
}

.app-header__title {
    max-width: calc(100% - 96px);
}

.app-main {
    max-width: var(--content-width);
    margin: 0 auto;
    padding:
        calc(var(--header-height) + var(--safe-top) + 16px)
        16px
        calc(var(--tab-bar-height) + var(--safe-bottom) + 24px);
    min-height: 100vh;
}

.tab-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: flex;
    height: calc(var(--tab-bar-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--color-bar);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--color-border);
}

.tab-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
}

.tab-bar__item .icon {
    box-sizing: content-box;
    padding: 3px 16px;
    border-radius: 999px;
}

.tab-bar__item[aria-current="page"] {
    color: var(--color-text);
}

.tab-bar__item[aria-current="page"] .icon {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.tab-bar__item:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -4px;
    border-radius: 8px;
}

.icon {
    display: block;
    flex-shrink: 0;
}

.icon--inline {
    display: inline-block;
    vertical-align: -2px;
}

/* --- Buttons -------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button--primary {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.button--ghost {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}

/* --- Install banner ------------------------------------------------------- */

.install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 12px);
    z-index: 30;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
}

.install-banner__body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.install-banner__icon {
    border-radius: 11px;
    flex-shrink: 0;
}

.install-banner__title {
    margin: 0 0 4px;
    font-weight: 700;
}

.install-banner__text,
.install-banner__steps {
    margin: 0;
    font-size: 15px;
    color: var(--color-muted);
}

.install-banner__steps {
    padding-left: 20px;
}

.install-banner__steps li + li {
    margin-top: 4px;
}

.install-banner__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

/* --- Screens & lists ------------------------------------------------------ */

.screen__title {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.2;
}

.screen--center {
    text-align: center;
    padding-top: 15vh;
}

.post-list {
    display: grid;
    gap: 10px;
}

.empty {
    color: var(--color-muted);
}

/* Compact row: text on the left, thumbnail on the right */
.post-card__link {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    background: var(--color-surface);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
}

.post-card__text {
    flex: 1;
    min-width: 0;
}

.post-card__image {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--color-border);
}

.post-card__title {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.3;
}

.post-tag {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.post-meta {
    margin: 0;
    font-size: 14px;
    color: var(--color-muted);
}

/* Featured (latest) post at the top of the list */
.post-hero__link {
    display: block;
    overflow: hidden;
    background: var(--color-surface);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
}

.post-hero__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--color-border);
}

.post-hero__text {
    padding: 16px;
}

.post-hero__title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
}

.post-hero__excerpt {
    margin: 0 0 10px;
    color: var(--color-muted);
}

.post-card__link:active,
.post-hero__link:active {
    opacity: .7;
}

.load-more {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* --- Article -------------------------------------------------------------- */

.article__header {
    margin-bottom: 20px;
}

.article__title {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: -.01em;
}

.article__excerpt {
    margin: 0 0 12px;
    font-size: 19px;
    line-height: 1.45;
    color: var(--color-muted);
}

.article__image {
    margin: 0 -16px 24px;
}

.article__image img {
    display: block;
    width: 100%;
}

.article__image figcaption,
.gh-content figcaption {
    padding: 6px 16px 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-muted);
    text-align: center;
}

.article__footer {
    display: flex;
    justify-content: center;
    margin: 36px 0 8px;
}

.more {
    margin-top: 32px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

/* Article body: comfortable reading on a phone */
.gh-content {
    font-size: 18px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.gh-content > * {
    margin-top: 0;
    margin-bottom: 0;
}

.gh-content > * + * {
    margin-top: 1.1em;
}

.gh-content > :is(h2, h3, h4) {
    margin-top: 1.6em;
    line-height: 1.25;
}

.gh-content > h2 {
    font-size: 24px;
}

.gh-content > h3 {
    font-size: 20px;
}

.gh-content :is(ul, ol) {
    padding-left: 1.3em;
}

.gh-content li + li {
    margin-top: .4em;
}

.gh-content blockquote:not([class]) {
    margin-left: 0;
    margin-right: 0;
    padding-left: 16px;
    border-left: 3px solid var(--color-accent);
    font-style: italic;
}

.gh-content hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 2em 0;
}

.gh-content figure {
    margin-left: 0;
    margin-right: 0;
}

.gh-content figure img {
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.gh-content .kg-width-full img,
.gh-content .kg-width-wide img {
    border-radius: 0;
}

.gh-content :not(pre) > code {
    padding: .1em .35em;
    border-radius: 4px;
    background: var(--color-border);
    font-size: .88em;
}

.gh-content pre {
    overflow-x: auto;
    padding: 14px;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.5;
}

.gh-content table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
}

.gh-content :is(th, td) {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

/* Embedded videos (YouTube, Vimeo) fill the width and keep their shape */
.gh-content iframe[src*="youtube"],
.gh-content iframe[src*="vimeo"] {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Ghost editor card widths (required by Ghost) */
.kg-width-wide,
.kg-width-full {
    margin-left: -16px;
    margin-right: -16px;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
}

@media (min-width: 720px) {
    .kg-width-wide {
        margin-left: -60px;
        margin-right: -60px;
    }

    .kg-width-full {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }
}

/* --- Cards & sections ----------------------------------------------------- */

.card {
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius);
}

.card > :first-child {
    margin-top: 0;
}

.card > :last-child {
    margin-bottom: 0;
}

.section-title {
    margin: 28px 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* --- Public screens (no tab bar) ------------------------------------------ */

.is-public .app-main {
    padding-bottom: calc(var(--safe-bottom) + 32px);
}

/* --- Welcome / sign-up ---------------------------------------------------- */

.welcome__hero {
    margin: 0 -4px 28px;
    padding: 32px 20px 24px;
    border-radius: 20px;
    background: var(--brand-ink);
    color: var(--brand-paper);
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    .welcome__hero {
        border: 1px solid var(--color-border);
    }
}

.welcome__icon {
    margin-bottom: 14px;
}

.welcome__title {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.1;
    color: var(--brand-lime);
}

.welcome__lead {
    margin: 0 auto 22px;
    max-width: 30em;
    font-size: 18px;
    color: #C9CCD3;
}

.welcome__hero .button--ghost {
    border-color: rgba(247, 248, 242, .35);
    color: var(--brand-paper);
}

.welcome__status {
    text-align: center;
    padding-top: 20vh;
    color: var(--color-muted);
}

/* After Stripe Checkout */
.checkout-status {
    margin: 8px 0 24px;
    padding: 28px 20px;
    text-align: center;
}

.checkout-status p {
    margin: 0 0 14px;
    color: var(--color-muted);
}

.checkout-status .checkout-status__title {
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

.checkout-status .button {
    margin-top: 4px;
}

.checkout-status__code {
    margin: 16px 0 0;
    font-size: 13px;
}

.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-text);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation-duration: 3s;
    }
}

.welcome__content {
    margin-bottom: 32px;
}

.welcome__plans-title {
    margin: 0 0 12px;
    font-size: 22px;
    text-align: center;
}

.welcome__secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.welcome__signin-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--color-muted);
}

/* --- Plans ---------------------------------------------------------------- */

.plans {
    display: grid;
    gap: 12px;
}

.plan__name {
    margin: 0 0 4px;
    font-size: 20px;
}

.plan__description {
    margin: 0 0 12px;
    color: var(--color-muted);
}

.plan__benefits {
    margin: 0 0 16px;
    padding-left: 20px;
}

.plan__benefits li + li {
    margin-top: 4px;
}

.plan__buttons {
    display: grid;
    gap: 8px;
}

/* --- Account -------------------------------------------------------------- */

.account__name {
    margin: 0;
    font-weight: 700;
}

.account__email {
    margin: 0 0 8px;
    color: var(--color-muted);
    word-break: break-all;
}

.account__link {
    font-size: 15px;
    font-weight: 600;
}

.account__plan {
    margin: 0 0 4px;
}

.account__detail {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--color-muted);
}

.account__detail--warning {
    color: #b91c1c;
}

.account__button {
    width: 100%;
    margin-top: 4px;
}

.account__signout {
    width: 100%;
    margin-top: 28px;
}

/* --- Fireside Chats ------------------------------------------------------- */

.fireside-section {
    margin-bottom: 8px;
}

.fireside-section .section-title:first-child {
    margin-top: 0;
}

/* Chat in a list: video thumbnail on the left */
.chat-list {
    display: grid;
    gap: 10px;
}

.chat-card__link {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 10px;
    background: var(--color-surface);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
}

.chat-card__link:active {
    opacity: .7;
}

.chat-card__thumb {
    position: relative;
    flex-shrink: 0;
    width: 128px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-ink), #2E3443);
}

.chat-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.chat-card__play .icon {
    width: 34px;
    height: 34px;
    padding: 8px 7px 8px 9px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
}

.chat-card__text {
    min-width: 0;
}

.chat-card__title {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.3;
}

/* Upcoming live sessions */
.live-list {
    display: grid;
    gap: 10px;
}

.live-card__link {
    display: block;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--color-header);
    color: var(--color-header-text);
    text-decoration: none;
}

.live-card__badge {
    display: inline-block;
    margin: 0 0 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.live-card__badge.is-live {
    background: #D92D20;
    color: #fff;
    animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
    50% { opacity: .65; }
}

@media (prefers-reduced-motion: reduce) {
    .live-card__badge.is-live {
        animation: none;
    }
}

.live-card__title {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.25;
}

.live-card__when {
    margin: 0 0 10px;
    opacity: .85;
}

.live-card__cta {
    font-size: 15px;
    font-weight: 600;
}

.live-when {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
}

.live-ended {
    color: var(--color-muted);
}

/* Series: a row you can swipe sideways */
.series-row {
    display: flex;
    gap: 10px;
    margin: 0 -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.series-row::-webkit-scrollbar {
    display: none;
}

.series-card {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: var(--color-surface);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
}

.series-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 6px;
}

.series-card__name {
    font-weight: 700;
    line-height: 1.25;
}

.series-card__count {
    font-size: 13px;
    color: var(--color-muted);
}

/* Topic buttons */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.article--fireside .chips {
    margin-top: 28px;
}

/* Topic and series pages */
.tag-header {
    margin-bottom: 20px;
}

.tag-header__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 14px;
}

.tag-header .screen__title {
    margin-bottom: 8px;
}

.tag-header__description {
    margin: 0;
    color: var(--color-muted);
}

/* Numbered episode list */
.episode-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.episode__link {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: var(--color-surface);
    border: 2px solid transparent;
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
}

.episode.is-current .episode__link {
    border-color: var(--color-strong-border);
}

.episode__number {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-bg);
    font-weight: 700;
}

.episode.is-current .episode__number {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.episode__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.episode__title {
    font-weight: 600;
    line-height: 1.3;
}

.series-next {
    width: 100%;
    margin-bottom: 12px;
}

/* Chat page: let the video (first thing in the post) use the full width */
.post-tag--link {
    display: inline-block;
    text-decoration: none;
}

.article--fireside .gh-content > .kg-embed-card:first-child {
    margin-left: -16px;
    margin-right: -16px;
}

/* --- Events --------------------------------------------------------------- */

.event-list {
    display: grid;
    gap: 10px;
}

.event-card__link {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: var(--color-surface);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
}

.event-card__link:active {
    opacity: .7;
}

/* Calendar-page style date: NOV / 20 */
.event-card__date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 60px;
    border-radius: 12px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    line-height: 1;
}

.event-card__date[hidden] {
    display: none;
}

.event-card__month {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.event-card__day {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 800;
}

.event-card__text {
    min-width: 0;
}

.event-card__title {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.3;
}

.event-card.is-past {
    opacity: .6;
}

.event-facts {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.event-fact {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    font-weight: 600;
}

.event-fact .icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: var(--color-accent);
}

.rsvp {
    margin-top: 32px;
    scroll-margin-top: calc(var(--header-height) + var(--safe-top) + 12px);
}

.rsvp__form {
    padding: 8px 12px;
    background: var(--color-surface);
    border-radius: var(--radius);
}

.rsvp__form iframe {
    display: block;
    width: 100%;
    border: 0;
}

.rsvp__closed {
    color: var(--color-muted);
}

/* --- Beta label (Design → Customize → "Beta mode") ------------------------ */

.beta-label {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--brand-lime);
    color: var(--brand-ink);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.welcome__beta {
    margin: 0 0 28px;
    font-size: 15px;
    color: var(--color-muted);
}

.welcome__beta .beta-label {
    margin-right: 6px;
    vertical-align: 1px;
}

/* --- Phone alerts ---------------------------------------------------------- */

.push__title {
    margin: 0 0 4px;
    font-weight: 700;
}

.push__button {
    width: 100%;
    margin-top: 4px;
}

.push__topics {
    margin: 4px 0 14px;
    padding: 0;
    border: 0;
}

.push__topics legend {
    margin-bottom: 6px;
    padding: 0;
}

.push__topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    border-top: 1px solid var(--color-border);
    font-weight: 600;
    cursor: pointer;
}

/* On/off switch */
.switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 50px;
    height: 30px;
    margin: 0;
    border-radius: 999px;
    background: var(--color-border);
    cursor: pointer;
    transition: background-color .2s;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s;
}

.switch:checked {
    background: var(--color-primary);
}

.switch:checked::after {
    transform: translateX(20px);
}

.switch:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .switch,
    .switch::after {
        transition: none;
    }
}

/* One-time invitation on the News tab */
.push-prompt {
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
}

.push-prompt__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
