
@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-Regular-c8978b37.ttf") format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-Italic-b47ea162.ttf") format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-Medium-fafc359f.ttf") format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-MediumItalic-57058366.ttf") format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-SemiBold-f1f8d504.ttf") format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-SemiBoldItalic-35113b97.ttf") format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-Bold-696a1365.ttf") format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: asset-url("/assets/lora/Lora-BoldItalic-fdc5c9f9.ttf") format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
    /* Apple-style grouped surfaces: a quiet grey ground, white cards, near-black ink */
    :root {
        color-scheme: light;
        --background: 0 0% 100%;
        --foreground: 240 3% 12%;         /* #1D1D1F */
        --card: 0 0% 100%;
        --card-foreground: 240 3% 12%;
        --popover: 0 0% 100%;
        --popover-foreground: 240 3% 12%;
        --primary: 240 3% 12%;
        --primary-foreground: 0 0% 100%;
        --secondary: 240 6% 96%;
        --secondary-foreground: 240 3% 12%;
        --muted: 240 6% 96%;              /* quiet fills */
        --muted-foreground: 240 2% 44%;   /* #6E6E73 */
        --accent: 240 6% 96%;
        --accent-foreground: 240 3% 12%;
        --destructive: 356 100% 42%;      /* #D70015 */
        --destructive-foreground: 0 0% 100%;
        --border: 240 6% 90%;             /* hairlines */
        --input: 240 6% 83%;
        --ring: 211 100% 50%;
        --gold: 38 72% 40%;               /* from the Sanjola mark: "next" and the calendar leaf */
        --plan-accent: var(--gold);       /* the price table; the landing sets its own */
        --plan-on-accent: 0 0% 100%;
        --plan-deep: 240 5% 12%;
        /* Voice sections, high → low. Validated categorical palette (colour-blind safe on adjacent pairs);
           always shown with the voice name next to it, never colour alone. */
        --att-present: #1baf7a; --att-late: #eda100; --att-excused: #2a78d6; --att-absent: #d94f45;
        --voice-1: #2a78d6; --voice-2: #eb6834; --voice-3: #1baf7a;
        --voice-4: #eda100; --voice-5: #e87ba4; --voice-6: #008300;
        --radius: 0.5rem;
    }

    .dark {
        /* Native widgets — the audio player above all — follow the theme instead of
           sitting as a white pill on a black page */
        color-scheme: dark;
        --background: 0 0% 0%;
        --foreground: 240 11% 96%;
        --card: 240 3% 11%;               /* #1C1C1E */
        --card-foreground: 240 11% 96%;
        --popover: 240 3% 11%;
        --popover-foreground: 240 11% 96%;
        --primary: 240 11% 96%;
        --primary-foreground: 240 3% 11%;
        --secondary: 240 3% 18%;
        --secondary-foreground: 240 11% 96%;
        --muted: 240 3% 18%;              /* #2C2C2E */
        --muted-foreground: 240 3% 60%;   /* #98989D */
        --accent: 240 3% 18%;
        --accent-foreground: 240 11% 96%;
        --destructive: 3 100% 61%;        /* #FF453A */
        --destructive-foreground: 0 0% 100%;
        --border: 240 3% 20%;
        --input: 240 3% 26%;
        --ring: 211 100% 60%;
        --gold: 42 72% 58%;
        --att-present: #24c489; --att-late: #f0b021; --att-excused: #4a94ea; --att-absent: #e4655b;
        --voice-1: #3987e5; --voice-2: #d95926; --voice-3: #199e70;
        --voice-4: #c98500; --voice-5: #d55181; --voice-6: #008300;
    }

    * {
        @apply border-border;
    }

    body {
        @apply bg-background text-foreground font-sans;
        font-feature-settings: "rlig" 1, "calt" 1;
        letter-spacing: -0.006em;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    :focus-visible {
        outline: 2px solid hsl(var(--ring));
        outline-offset: 2px;
    }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.01ms !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* ── Notification shrink animation ── */
@keyframes shrink {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ── Scrollbar hide ── */
/* No scrollbars anywhere: every scrolling surface in the app keeps its gesture and
   loses its gutter, so nothing shifts when a list grows past its box. */
*, .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
*::-webkit-scrollbar, .no-scrollbar::-webkit-scrollbar { display: none; }

@layer components {
    /* ── Page typography ── */
    /* Large title, set like the heading of a hymnal */
    .page-title {
        font-family: 'Lora', Georgia, serif;
        font-size: 2rem;
        font-weight: 600;
        letter-spacing: -0.02em;
        line-height: 1.15;
    }
    @media (min-width: 768px) {
        .page-title { font-size: 2.5rem; }
    }

    .page-eyebrow {
        font-size: 0.8125rem;
        font-weight: 500;
        color: hsl(var(--muted-foreground));
    }

    /* A quiet marker for a section: a coloured dot and a plain word */
    /* A quiet label above a section or inside a card. No marker: the weight carries it. */
    .section-dot {
        display: block;
        font-size: 0.8125rem;
        font-weight: 500;
        color: hsl(var(--muted-foreground));
    }

    .section-title {
        font-size: 1.125rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        color: hsl(var(--foreground));
    }

    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        font-size: 0.875rem;
        color: hsl(var(--muted-foreground));
        transition: color 150ms;
    }
    .back-link:hover { color: hsl(var(--foreground)); }

    /* ── Rows ── */
    .row-link {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.25rem;
        background: hsl(var(--card));
        transition: background-color 120ms ease;
        cursor: pointer;
    }
    .row-link:hover { background: hsl(var(--accent) / 0.5); }

    /* ── Forms ── */
    .field-label {
        display: block;
        font-size: 0.875rem;
        font-weight: 600;
        color: hsl(var(--foreground));
    }

    .field-hint {
        font-size: 0.8125rem;
        line-height: 1.45;
        color: hsl(var(--muted-foreground));
    }

    .field-input {
        display: flex;
        width: 100%;
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--input));
        background: hsl(var(--card));
        padding: 0.5625rem 0.75rem;
        font-size: 1rem;
        font-family: inherit;
        color: hsl(var(--foreground));
        transition: border-color 150ms, box-shadow 150ms;
        outline: none;
        line-height: 1.5;
    }
    .field-input::placeholder { color: hsl(var(--muted-foreground) / 0.6); }
    .field-input:focus {
        border-color: hsl(var(--ring));
        box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
    }
    .field-input-sm { padding: 0.375rem 0.625rem; font-size: 0.875rem; }
    .field-input-lg { padding: 0.75rem 1rem; font-size: 1.0625rem; }

    .field-select {
        appearance: none;
        cursor: pointer;
        padding-right: 2rem;
        text-overflow: ellipsis;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.625rem center;
    }
    .field-select.is-set { border-color: hsl(var(--foreground) / 0.45); }

    .file-input {
        display: block;
        width: 100%;
        font-size: 0.875rem;
        color: hsl(var(--muted-foreground));
    }
    .file-input::file-selector-button {
        margin-right: 0.875rem;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--border));
        background: hsl(var(--background));
        color: hsl(var(--foreground));
        font-family: inherit;
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 150ms;
    }
    .file-input::file-selector-button:hover { background: hsl(var(--accent)); }

    .form-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-top: 1.5rem;
        border-top: 1px solid hsl(var(--border) / 0.6);
    }

    /* Long forms keep Save within thumb reach, above the mobile tab bar */
    .form-footer.is-sticky {
        position: sticky;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 5.5rem);
        z-index: 30;
        margin-inline: -1.25rem;
        padding: 0.875rem 1.25rem;
        background: hsl(var(--background) / 0.9);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }
    @media (min-width: 768px) {
        .form-footer.is-sticky { bottom: 0; }
    }

    /* ── Filter chips: a native <select> laid over a chip, so phones open their own picker ── */
    .chip-row {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        margin-inline: -1.25rem;
        padding: 0.125rem 1.25rem;
        scrollbar-width: none;
    }
    .chip-row::-webkit-scrollbar { display: none; }
    @media (min-width: 1024px) {
        .chip-row.lg-inline { margin-inline: 0; padding-inline: 0; }
    }

    .filter-chip {
        position: relative;
        display: inline-flex;
        flex-shrink: 0;
        align-items: center;
        gap: 0.375rem;
        height: 2.125rem;
        padding: 0 0.75rem;
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--border));
        background: hsl(var(--card));
        font-size: 0.875rem;
        color: hsl(var(--foreground) / 0.85);
        white-space: nowrap;
        transition: background-color 120ms, color 120ms, border-color 120ms;
    }
    .filter-chip:hover { background: hsl(var(--accent) / 0.6); }
    .filter-chip:focus-within { box-shadow: 0 0 0 3px hsl(var(--ring) / 0.35); }
    .filter-chip.is-set {
        background: hsl(var(--foreground));
        border-color: hsl(var(--foreground));
        color: hsl(var(--background));
    }
    .filter-chip-select {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
        font-size: 16px; /* no zoom-on-focus on iOS */
    }

    /* The invitation panel opens when it is wanted, and stays out of the way otherwise */
    .invite-panel > summary::-webkit-details-marker { display: none; }
    .invite-panel > summary:hover { background: hsl(var(--accent) / 0.35); }
    .invite-panel[open] .invite-caret { transform: rotate(180deg); }
    .invite-caret { transition: transform 150ms; }

    /* Native disclosure: no JavaScript, keyboard and screen readers get it for free.
       Everything starts closed; the caret is a lucide chevron that turns as it opens. */
    .disclosure > summary,
    .disclosure-group > summary {
        cursor: pointer;
        list-style: none;
        user-select: none;
    }
    .disclosure > summary::-webkit-details-marker,
    .disclosure-group > summary::-webkit-details-marker { display: none; }
    .disclosure-caret { transition: transform 150ms ease; opacity: 0.55; }
    .disclosure[open] > summary .disclosure-caret,
    .disclosure-group[open] > summary .disclosure-caret { transform: rotate(90deg); opacity: 1; }

    /* The section's own line: quiet, like every other eyebrow on the page */
    .disclosure-head {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.125rem 0;
        border-radius: 0.5rem;
    }
    .disclosure-head:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }

    /* One audience per row, inside the card: name left, what it holds right */
    .disclosure-row {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        padding: 0.8125rem 1rem;
        transition: background-color 120ms;
    }
    .disclosure-row:hover { background: hsl(var(--accent) / 0.4); }
    .disclosure-row:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: -2px; }
    .disclosure-group[open] > .disclosure-row { background: hsl(var(--accent) / 0.3); }
    .disclosure-name {
        flex: 1;
        min-width: 0;
        font-size: 0.9375rem;
        color: hsl(var(--foreground));
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .disclosure-count {
        font-size: 0.75rem;
        font-variant-numeric: tabular-nums;
        color: hsl(var(--muted-foreground));
        min-width: 1.25rem;
        text-align: right;
    }

    /* Open rows sit on a slightly recessed ground, so the nesting reads without indentation */
    .disclosure-body {
        border-top: 1px solid hsl(var(--border) / 0.7);
        background: hsl(var(--muted) / 0.35);
    }
    .disclosure-body > * + * { border-top: 1px solid hsl(var(--border) / 0.6); }

    .list-scroll {
        max-height: min(70vh, 46rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    [data-nested-row][hidden] { display: none; }

    /* ── Choice chips (multi-select checkboxes) ── */
    .chip { display: inline-flex; cursor: pointer; }
    .chip[hidden] { display: none; }
    .chip-face {
        display: inline-flex;
        align-items: center;
        border: 1px solid hsl(var(--border));
        border-radius: 0.5rem;
        padding: 0.3125rem 0.8125rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        color: hsl(var(--foreground) / 0.8);
        background: hsl(var(--card));
        user-select: none;
        transition: background-color 120ms, color 120ms, border-color 120ms;
    }
    .chip:hover .chip-face { color: hsl(var(--foreground)); border-color: hsl(var(--foreground) / 0.35); }
    /* A chip face used on its own as a link (public profile: the choir's social links) */
    a.chip-face { gap: 0.375rem; }
    a.chip-face:hover { color: hsl(var(--foreground)); border-color: hsl(var(--foreground) / 0.35); }
    .peer:checked + .chip-face {
        background: hsl(var(--foreground));
        border-color: hsl(var(--foreground));
        color: hsl(var(--background));
    }
    .peer:focus-visible + .chip-face { box-shadow: 0 0 0 3px hsl(var(--ring) / 0.4); }

    /* ── Attendance charts: plain bars, one measure, no decoration ── */
    .chart-scroll {
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: -0.25rem;
        padding: 0 0.25rem 0.25rem;
    }
    .chart-scroll::-webkit-scrollbar { display: none; }
    .chart-columns { display: flex; align-items: flex-end; gap: 0.375rem; min-height: 11rem; }
    .chart-column {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.375rem;
        flex: 0 0 2.25rem;
        text-decoration: none;
    }
    .chart-track {
        display: flex;
        align-items: flex-end;
        width: 100%;
        height: 8rem;
        border-radius: 0.25rem;
        background: hsl(var(--secondary) / 0.8);
        overflow: hidden;
    }
    .chart-bar {
        display: block;
        width: 100%;
        border-radius: 0.25rem;
        background: var(--att-present);
        transition: background-color 120ms;
    }
    .chart-column:hover .chart-bar { filter: brightness(0.92); }
    .chart-value { font-size: 0.6875rem; font-variant-numeric: tabular-nums; color: hsl(var(--muted-foreground)); }
    .chart-tick { font-size: 0.625rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }

    .chart-seg {
        position: relative;
        flex: 1 1 0;
        min-width: 0.5rem;
        height: 100%;
        border-radius: 0.1875rem;
        background: hsl(var(--foreground) / 0.06);
    }

    /* A year of rolls, one square per day */
    .activity-grid { display: flex; gap: 3px; padding-bottom: 0.25rem; }
    .activity-months { display: flex; gap: 3px; }
    .activity-month {
        width: 0.75rem;
        font-size: 0.625rem;
        line-height: 1;
        color: hsl(var(--muted-foreground));
        white-space: nowrap;
        overflow: visible;
    }
    .activity-week { display: grid; grid-template-rows: repeat(7, 0.75rem); gap: 3px; }
    .activity-cell {
        position: relative;
        width: 0.75rem;
        height: 0.75rem;
        border-radius: 0.1875rem;
        background: hsl(var(--foreground) / 0.06);
    }
    .activity-cell.is-outside { background: none; }
    .activity-cell:hover { outline: 1px solid hsl(var(--foreground) / 0.35); outline-offset: 1px; }
    .activity-cell.is-outside:hover { outline: none; }

    /* One colour per state: every present cell reads the same, on every row */
    .att-present { background: var(--att-present); }
    .att-late { background: var(--att-late); }
    .att-excused { background: var(--att-excused); }
    .att-absent { background: var(--att-absent); }
    .att-blank {
        background: repeating-linear-gradient(45deg, transparent, transparent 3px,
                    hsl(var(--foreground) / 0.10) 3px, hsl(var(--foreground) / 0.10) 4px);
    }

    .chart-key { width: 0.75rem; height: 0.75rem; border-radius: 0.1875rem; display: inline-block; }

    /* Hover tells you which event it is — no click needed */
    .chart-tip {
        position: absolute;
        bottom: calc(100% + 0.5rem);
        left: 50%;
        transform: translateX(-50%) translateY(0.25rem);
        z-index: 30;
        max-width: 16rem;
        width: max-content;
        padding: 0.375rem 0.625rem;
        border-radius: 0.375rem;
        background: hsl(var(--foreground));
        color: hsl(var(--background));
        font-size: 0.75rem;
        line-height: 1.25;
        white-space: normal;
        opacity: 0;
        pointer-events: none;
        transition: opacity 120ms, transform 120ms;
    }
    .chart-seg:hover .chart-tip,
    .chart-column:hover .chart-tip,
    .chart-cell:hover .chart-tip,
    .chart-seg:focus-visible .chart-tip {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    .chart-column { position: relative; }

    .chart-row { display: flex; align-items: center; gap: 0.75rem; }
    .chart-row-name { flex: 0 0 9rem; font-size: 0.8125rem; color: hsl(var(--foreground)); }
    .chart-row-track {
        display: flex;
        gap: 2px;
        flex: 1;
        height: 1.125rem;
        overflow: visible;
    }
    .chart-row-track .chart-bar { height: 100%; }
    .chart-row-value { flex: 0 0 2.75rem; text-align: right; font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
    @media (max-width: 640px) {
        .chart-row-name { flex-basis: 6.5rem; }
    }

    /* ── Roll call: one segmented control per member, on a single line ── */
    .roll-track {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: -0.25rem;
        padding: 0.125rem 0.25rem;
    }
    .roll-track::-webkit-scrollbar { display: none; }
    .roll-options {
        display: inline-flex;
        flex-shrink: 0;
        align-items: center;
        gap: 0.125rem;
        padding: 0.125rem;
        border: 1px solid hsl(var(--border));
        border-radius: 0.5rem;
        background: hsl(var(--secondary) / 0.7);
    }
    .roll-options label { display: inline-flex; }
    .roll-option {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem 0.625rem;
        border-radius: 0.375rem;
        font-size: 0.8125rem;
        line-height: 1.25rem;
        white-space: nowrap;
        color: hsl(var(--muted-foreground));
        cursor: pointer;
        user-select: none;
        transition: background-color 120ms, color 120ms;
    }
    .roll-option:hover { color: hsl(var(--foreground)); }
    .peer:checked + .roll-option {
        background: hsl(var(--card));
        color: hsl(var(--foreground));
        box-shadow: 0 1px 2px hsl(var(--foreground) / 0.08);
    }
    .peer:checked + .roll-option.is-clear { background: none; box-shadow: none; color: hsl(var(--muted-foreground)); }
    .peer:focus-visible + .roll-option { box-shadow: 0 0 0 3px hsl(var(--ring) / 0.4); }

    /* ── Buttons ── */
    .btn-primary, .btn-outline, .btn-ghost, .btn-danger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: 1px solid transparent;
        font-size: 0.9375rem;
        font-weight: 500;
        line-height: 1.25rem;
        white-space: nowrap;
        cursor: pointer;
        transition: background-color 150ms, color 150ms, border-color 150ms;
    }
    .btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-weight: 500; }
    .btn-primary:hover { background: hsl(var(--primary) / 0.88); }
    .btn-outline { border-color: hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--foreground)); }
    .btn-outline:hover { background: hsl(var(--accent) / 0.6); }
    .btn-ghost { color: hsl(var(--muted-foreground)); padding-left: 0.25rem; padding-right: 0.25rem; }
    .btn-ghost:hover { color: hsl(var(--foreground)); }
    .btn-danger { border-color: hsl(var(--destructive) / 0.4); color: hsl(var(--destructive)); background: transparent; }
    .btn-danger:hover { background: hsl(var(--destructive)); border-color: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
    .btn-block { width: 100%; padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .btn-ghost.btn-block { padding-left: 1.125rem; padding-right: 1.125rem; }

    .icon-button {
        height: 2.25rem;
        width: 2.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.5rem;
        color: hsl(var(--muted-foreground));
        transition: background-color 150ms, color 150ms;
    }
    .icon-button:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
    .icon-button.is-danger:hover { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }

    .danger-zone {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--destructive) / 0.25);
    }
    @media (min-width: 640px) {
        .danger-zone { flex-direction: row; align-items: center; justify-content: space-between; }
    }

    .divider {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.8125rem;
        color: hsl(var(--muted-foreground));
    }
    .divider::before, .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: hsl(var(--border));
    }

    /* ── Badges & pills ── */
    .badge-muted, .badge-outline, .badge-solid {
        display: inline-flex;
        align-items: center;
        border-radius: 0.5rem;
        padding: 0.125rem 0.5rem;
        font-size: 0.6875rem;
        font-weight: 500;
        line-height: 1rem;
        white-space: nowrap;
    }
    .badge-muted { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
    .badge-outline { border: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); }
    .badge-solid { background: hsl(var(--foreground)); color: hsl(var(--background)); min-width: 1.125rem; justify-content: center; padding: 0 0.3125rem; }

    .filter-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--foreground) / 0.25);
        padding: 0.25rem 0.625rem;
        font-size: 0.8125rem;
        color: hsl(var(--foreground));
        transition: background-color 120ms;
    }
    .filter-pill:hover { background: hsl(var(--accent)); }

    .tag-link {
        display: inline-flex;
        align-items: center;
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--border));
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
        color: hsl(var(--foreground) / 0.85);
        transition: background-color 120ms, border-color 120ms;
    }
    .tag-link:hover { background: hsl(var(--accent) / 0.6); border-color: hsl(var(--foreground) / 0.3); }

    .detail-link {
        text-decoration: underline;
        text-decoration-color: hsl(var(--border));
        text-underline-offset: 4px;
        transition: text-decoration-color 150ms;
    }
    .detail-link:hover { text-decoration-color: hsl(var(--foreground)); }

    /* ── Voices ── */
    .voice-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.75rem;
        height: 1.5rem;
        padding: 0 0.375rem;
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--border));
        font-size: 0.6875rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        color: hsl(var(--foreground) / 0.8);
    }

    /* The key sits under the bar, each item as wide as its own segment, so a section's
       name is centred on the colour it belongs to. Too narrow to read on a phone, so
       there it falls back to a plain wrapping list. */
    .voice-keys { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
    @media (min-width: 640px) {
        .voice-keys { flex-wrap: nowrap; gap: 2px; }
        .voice-keys > .voice-key { flex-basis: 0; justify-content: center; }
    }

    .voice-key {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.4375rem;
        flex: 0 1 auto;
        min-width: 0;
        padding-top: 0.375rem;
        font-size: 0.8125rem;
        line-height: 1.25rem;
        color: hsl(var(--muted-foreground));
        transition: color 120ms;
    }
    .voice-key:hover { color: hsl(var(--foreground)); }
    .voice-key.is-active { color: hsl(var(--foreground)); font-weight: 500; }
    .voice-key.is-active .voice-key-dot { box-shadow: 0 0 0 3px hsl(var(--foreground) / 0.12); }
    .voice-key-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; flex-shrink: 0; }
    .voice-key-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .voice-key-count { font-variant-numeric: tabular-nums; font-weight: 600; color: hsl(var(--foreground)); }

    /* The section's own colour, carried by its name rather than a dot */
    .voice-name-0 { color: var(--voice-1); }
    .voice-name-1 { color: var(--voice-2); }
    .voice-name-2 { color: var(--voice-3); }
    .voice-name-3 { color: var(--voice-4); }
    .voice-name-4 { color: var(--voice-5); }
    .voice-name-5 { color: var(--voice-6); }

    .voice-tone-0 { background: var(--voice-1); }
    .voice-tone-1 { background: var(--voice-2); }
    .voice-tone-2 { background: var(--voice-3); }
    .voice-tone-3 { background: var(--voice-4); }
    .voice-tone-4 { background: var(--voice-5); }
    .voice-tone-5 { background: var(--voice-6); }

    /* Stacked section bar: 2px surface gaps between segments, 4px rounded ends */
    .voice-bar { display: flex; gap: 2px; height: 0.625rem; }
    .voice-bar > span { border-radius: 2px; min-width: 4px; }
    .voice-bar > span:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
    .voice-bar > span:last-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }

    /* ── Grouped form rows: label left, value right, hairlines between ── */
    .form-card {
        border-radius: 0.5rem;
        border: 1px solid hsl(var(--border) / 0.8);
        background: hsl(var(--card));
        overflow: hidden;
    }
    .form-card > * + * { border-top: 1px solid hsl(var(--border) / 0.7); }

    .form-row {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-height: 3rem;
        padding: 0.5rem 1rem;
    }
    .form-row:focus-within { background: hsl(var(--accent) / 0.35); }
    .row-label {
        width: 6rem;
        flex-shrink: 0;
        font-size: 0.9375rem;
        color: hsl(var(--foreground));
    }
    @media (min-width: 640px) { .row-label { width: 8rem; } }

    .row-input {
        flex: 1;
        min-width: 0;
        border: 0;
        background: transparent;
        padding: 0.25rem 0;
        font-family: inherit;
        font-size: 0.9375rem;
        color: hsl(var(--foreground));
        text-align: right;
        outline: none;
    }
    .row-input::placeholder { color: hsl(var(--muted-foreground) / 0.7); }
    .row-input.is-title { text-align: left; font-size: 1.0625rem; font-weight: 600; }
    .row-input.is-select {
        appearance: none;
        cursor: pointer;
        text-align: right;
        direction: rtl;
        padding-right: 1.125rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right center;
    }
    .row-input.is-select > option { direction: ltr; }
    .row-stacked { display: block; padding: 0.75rem 1rem; }
    .row-stacked .row-input { text-align: left; }

    /* ── Segmented control (iOS) ── */
    .segmented {
        display: inline-grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 0.125rem;
        padding: 0.1875rem;
        border-radius: 0.5rem;
        background: hsl(var(--muted));
    }
    .segmented > a {
        padding: 0.375rem 1rem;
        border-radius: 0.375rem;
        font-size: 0.8125rem;
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
        color: hsl(var(--foreground) / 0.7);
        transition: background-color 150ms, color 150ms;
    }
    .segmented > a:hover { color: hsl(var(--foreground)); }
    .segmented > a[aria-current="page"] {
        background: hsl(var(--card));
        color: hsl(var(--foreground));
        box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 0 0 0.5px rgb(0 0 0 / 0.04);
    }

    /* ── Calendar leaf: the date of an event, like a page torn from a liturgical calendar ── */
    .date-leaf {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.125rem;
        width: 3.5rem;
        height: 3.75rem;
        flex-shrink: 0;
        border-radius: 0.5rem;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
    }
    .date-leaf-month { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: hsl(var(--gold)); line-height: 1; }
    .date-leaf-day { font-family: 'Lora', Georgia, serif; font-size: 1.5rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: hsl(var(--foreground)); }
    .date-leaf-weekday { font-size: 0.625rem; color: hsl(var(--muted-foreground)); line-height: 1; }
    .date-leaf.is-lg { width: 4.5rem; height: 5rem; }
    .date-leaf.is-lg .date-leaf-day { font-size: 2rem; }
    .date-leaf.is-lg .date-leaf-month, .date-leaf.is-lg .date-leaf-weekday { font-size: 0.6875rem; }

    /* ── Event status ── */
    .status-badge {
        font-size: 0.75rem;
        font-weight: 500;
        line-height: 1.25rem;
        white-space: nowrap;
        color: hsl(var(--muted-foreground));
    }
    .status-next { color: hsl(var(--gold)); font-weight: 600; }
    .status-cancelled { color: hsl(var(--destructive) / 0.85); }

    /* ── Cards ── */
    .event-card {
        display: flex;
        gap: 1rem;
        padding: 1rem;
        border-radius: 0.5rem;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border) / 0.8);
        transition: background-color 120ms, box-shadow 150ms;
    }
    .event-card:hover { box-shadow: 0 2px 10px rgb(0 0 0 / 0.06); }

    /* Public pages share the signed-in canvas, so both sides of the app line up */
    .public-shell {
        max-width: 72rem;
        margin-inline: auto;
        padding-inline: 1.25rem;
    }
    @media (min-width: 1536px) {
        .public-shell { max-width: 80rem; }
    }

    /* The calendar as a board: one column per month. The whole board scrolls in both
       directions — down through a month, across to the next — and each month name stays
       pinned while its own column is in view. Columns keep their width whether there is
       one month or twelve. */
    .month-board {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        max-height: min(72vh, 52rem);
        overflow: auto;
        overscroll-behavior: contain;
        scroll-snap-type: x proximity;
        margin-inline: -1.25rem;
        padding: 0 1.25rem 0.5rem;
    }
    .month-board > * {
        flex: 0 0 min(23rem, 86vw);
        scroll-snap-align: start;
    }
    @media (min-width: 768px) {
        .month-board { margin-inline: 0; padding-inline: 0.125rem; }
    }
    .month-head {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.375rem 0 0.5rem;
        background: hsl(var(--background));
    }
    .month-column { display: grid; gap: 0.75rem; align-content: start; }

    .event-card.is-cancelled .event-card-title { text-decoration: line-through; color: hsl(var(--muted-foreground)); }

    .program { counter-reset: program; }
    .program > [data-nested-row]:not([hidden]), .program > .program-row { counter-increment: program; }
    .program-number::before {
        content: counter(program);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 9999px;
        background: hsl(var(--muted));
        font-size: 0.75rem;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        color: hsl(var(--foreground) / 0.75);
    }

    /* ── Price table ──────────────────────────────────────────────────────────
       One markup, two homes: the landing and a choir's settings. Both prices are
       in the page and the `plan-period` Stimulus controller shows one, so the
       monthly/yearly switch never costs a request. */
    .plan-switch { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.125rem; padding: 0.1875rem; border-radius: 0.5rem; background: hsl(var(--muted)); }
    .plan-switch > button {
        padding: 0.4375rem 1.125rem; border-radius: 0.375rem; font-size: 0.8125rem; font-weight: 500;
        white-space: nowrap; color: hsl(var(--foreground) / 0.7); transition: background-color 150ms, color 150ms;
    }
    .plan-switch > button:hover { color: hsl(var(--foreground)); }
    .plan-switch > button[aria-current="page"] {
        background: hsl(var(--card)); color: hsl(var(--foreground));
        box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 0 0 0.5px rgb(0 0 0 / 0.04);
    }

    /* The price table (shared/_plans). Its colours are variables so the landing
       can carry them in its own brand colour: --plan-accent (ribbon, featured
       price, ticks), --plan-deep (the featured card and the sur-mesure banner). */
    .plan-grid { display: grid; gap: 1.25rem; align-items: stretch; padding-top: 0.75rem; }
    @media (min-width: 900px) { .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
    .plan-card {
        position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 1.25rem;
        padding: 1.75rem 1.5rem 1.5rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius);
        background: hsl(var(--card));
    }
    .plan-card.is-featured {
        background: hsl(var(--plan-deep)); border-color: hsl(var(--plan-deep)); color: #fff;
        box-shadow: 0 28px 56px -32px hsl(var(--plan-deep) / 0.8);
    }
    .dark .plan-card.is-featured { border-color: hsl(var(--plan-accent) / 0.5); }
    .plan-card.is-current { border-color: hsl(var(--foreground)); }
    .plan-ribbon {
        position: absolute; top: -0.75rem; left: 1.5rem; padding: 0.25rem 0.625rem; border-radius: 0.375rem;
        background: hsl(var(--plan-accent)); color: hsl(var(--plan-on-accent));
        font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    }
    .plan-name { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
    .plan-tagline { font-size: 0.875rem; line-height: 1.55; color: hsl(var(--muted-foreground)); }
    @media (min-width: 900px) { .plan-tagline { min-height: 2.7em; } }
    .plan-price { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.03em; color: hsl(var(--foreground)); white-space: nowrap; margin-top: 0.75rem; }
    .plan-per { font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; color: hsl(var(--muted-foreground)); margin-left: 0.25rem; }
    .plan-card.is-featured .plan-name { color: rgb(255 255 255 / 0.9); }
    .plan-card.is-featured .plan-tagline, .plan-card.is-featured .plan-per { color: rgb(255 255 255 / 0.66); }
    .plan-card.is-featured .plan-price { color: hsl(var(--plan-accent)); }
    .plan-features { display: grid; gap: 0.6875rem; align-content: start; padding-top: 1.25rem; border-top: 1px solid hsl(var(--border)); }
    .plan-card.is-featured .plan-features { border-color: rgb(255 255 255 / 0.14); }
    /* Each feature carries a tick drawn in CSS, in the accent colour */
    .plan-feature { position: relative; padding-left: 1.625rem; font-size: 0.875rem; line-height: 1.5; color: hsl(var(--foreground) / 0.88); }
    .plan-feature::before {
        content: ""; position: absolute; left: 0.25rem; top: 0.25rem; width: 0.4375rem; height: 0.75rem;
        border: solid hsl(var(--plan-accent)); border-width: 0 2px 2px 0; transform: rotate(45deg);
    }
    .plan-card.is-featured .plan-feature { color: rgb(255 255 255 / 0.88); }
    .plan-foot { font-size: 0.8125rem; font-weight: 600; color: hsl(var(--foreground)); }
    .plan-card.is-featured .plan-foot { color: #fff; }

    /* Sur mesure: copy, not a Plan, set as a dark banner under the three */
    .plan-custom {
        display: grid; gap: 1.5rem; padding: 1.75rem; border-radius: var(--radius);
        background: hsl(var(--plan-deep)); color: #fff;
    }
    @media (min-width: 900px) { .plan-custom { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3rem; padding: 2rem 2.25rem; } }
    .plan-custom-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
    .plan-custom-tagline { font-size: 0.875rem; color: rgb(255 255 255 / 0.66); margin-top: 0.25rem; }
    .plan-custom-features { display: grid; gap: 0.5rem 2rem; margin-top: 1.25rem; }
    @media (min-width: 640px) { .plan-custom-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    .plan-custom-features .plan-feature { color: rgb(255 255 255 / 0.88); }
    .plan-custom-side { display: grid; gap: 0.75rem; justify-items: start; }
    @media (min-width: 900px) { .plan-custom-side { justify-items: end; text-align: right; } }
    .plan-custom-price { font-size: 1.5rem; font-weight: 700; color: hsl(var(--plan-accent)); }
    .plan-custom-cta {
        display: inline-flex; align-items: center; justify-content: center; padding: 0.625rem 1.25rem; border-radius: var(--radius);
        background: hsl(var(--plan-accent)); color: hsl(var(--plan-on-accent)); font-size: 0.875rem; font-weight: 600;
        transition: filter 150ms;
    }
    .plan-custom-cta:hover { filter: brightness(1.06); }

    /* ── Landing ──────────────────────────────────────────────────────────────
       The landing welcomes people who have never seen the app, so it has its
       own skin — but it is the app's skin, pushed further: Apple-like white and
       #F5F5F7 grounds, the device's own font set big and tight,
       and the Sanjola gold as the one accent. Every rounded corner is the
       app's rounded-lg (--radius), buttons, cards, pictures and labels alike;
       only the attendance cells and the waveform bars stay near-square.

       · --lp-gold        fills (the main button, the ribbon), with ink text;
       · --lp-gold-ink    gold used as text (eyebrows, the headline's phrase);
       · --lp-band        the ground of every other band;
       · --lp-deep        the dark surfaces (featured plan, closing panel).
       Lora stays for sung words only (song titles, incipits) and the date leaf.
       The data palettes (--voice-*, --att-*) stay on data. */
    /* The ground is squared paper: one even grid of hairlines, 16px apart,
       drawn on the page itself. Cards and pictures are opaque and hide it;
       the grey bands are translucent (--lp-band-fill) so it runs through them. */
    body.landing {
        background-color: hsl(var(--background));
        background-image:
            linear-gradient(to right, hsl(var(--foreground) / var(--lp-grid-alpha)) 1px, transparent 1px),
            linear-gradient(to bottom, hsl(var(--foreground) / var(--lp-grid-alpha)) 1px, transparent 1px);
        background-size: 16px 16px;
        background-position: -1px -1px;
        --lp-grid-alpha: 0.04;
        --lp-band-fill: hsl(var(--foreground) / 0.03);
        --lp-gold: 40 70% 55%;            /* #D9A73F */
        --lp-gold-hi: 43 80% 66%;         /* #EDC565 */
        --lp-gold-ink: 36 80% 33%;        /* #985F11 — gold as small text */
        --lp-on-gold: 30 40% 10%;
        --lp-band: 240 11% 96%;           /* #F5F5F7 */
        --lp-deep: 240 3% 8%;
        --plan-accent: var(--lp-gold);
        --plan-on-accent: var(--lp-on-gold);
        --plan-deep: var(--lp-deep);
    }
    .dark body.landing {
        --lp-gold: 41 72% 58%;
        --lp-gold-hi: 44 85% 70%;
        --lp-gold-ink: 42 80% 64%;
        --lp-band: 240 3% 7%;
        --lp-deep: 240 3% 11%;
        --lp-grid-alpha: 0.05;
        --lp-band-fill: hsl(var(--foreground) / 0.035);
    }
    .landing-page { overflow-x: clip; }

    .lp-shell { max-width: 96rem; margin-inline: auto; padding-inline: 1rem; }
    @media (min-width: 720px) { .lp-shell { padding-inline: 1.5rem; } }
    @media (min-width: 1280px) { .lp-shell { padding-inline: 2.5rem; } }
    .lp-section { padding-block: 3.5rem; }
    @media (min-width: 900px) { .lp-section { padding-block: 5.5rem; } }
    /* A full-bleed grey band behind a shell, without extra markup */
    .lp-band { background: var(--lp-band-fill); box-shadow: 0 0 0 100vmax var(--lp-band-fill); clip-path: inset(0 -100vmax); }

    /* ── Type: Lora, the app's own title face, for every title; the device's
       font for everything read ── */
    .lp-eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0; color: hsl(var(--lp-gold-ink)); }
    .lp-display, .lp-head, .lp-card-title, .lp-tongues-title {
        font-family: 'Lora', Georgia, serif; font-weight: 600; color: hsl(var(--foreground)); text-wrap: balance;
    }
    .lp-display { font-size: clamp(1.625rem, 7.6vw, 5rem); line-height: 1.06; letter-spacing: -0.03em; }
    .lp-head { font-size: clamp(1.875rem, 4.2vw, 3.25rem); line-height: 1.1; letter-spacing: -0.025em; }
    /* The phrase that matters, in gold leaf */
    .lp-display mark, .lp-head mark {
        background: linear-gradient(180deg, hsl(var(--lp-gold-hi)) 0%, hsl(var(--lp-gold)) 45%, hsl(36 75% 38%) 100%);
        -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .dark .lp-display mark, .dark .lp-head mark {
        background-image: linear-gradient(180deg, hsl(46 90% 76%) 0%, hsl(var(--lp-gold)) 60%, hsl(38 70% 48%) 100%);
    }
    .lp-lead { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); line-height: 1.5; letter-spacing: -0.01em; color: hsl(var(--muted-foreground)); text-wrap: pretty; }
    .lp-body { font-size: 1.0625rem; line-height: 1.55; color: hsl(var(--muted-foreground)); text-wrap: pretty; }
    .lp-note { font-size: 0.8125rem; line-height: 1.55; color: hsl(var(--muted-foreground)); }
    .lp-sung { font-family: 'Lora', Georgia, serif; font-style: italic; font-weight: 500; }

    /* A section opens on a centred header */
    .lp-intro { display: grid; justify-items: center; gap: 1rem; text-align: center; max-width: 52rem; margin: 0 auto 2.5rem; }
    .lp-intro > .lp-body, .lp-intro > .lp-lead { max-width: 36rem; }
    @media (min-width: 900px) { .lp-intro { margin-bottom: 3.25rem; } }

    /* ── Buttons: the app's rounded-lg, gold for the one thing to do ── */
    .lp-cta, .lp-second {
        display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
        padding: 0.75rem 1.375rem; border-radius: var(--radius); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em;
        white-space: nowrap; transition: transform 150ms, filter 150ms, background-color 150ms, border-color 150ms;
    }
    .lp-cta {
        color: hsl(var(--lp-on-gold));
        background: linear-gradient(180deg, hsl(var(--lp-gold-hi)), hsl(var(--lp-gold)));
        box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), 0 1px 2px rgb(0 0 0 / 0.12), 0 10px 24px -12px hsl(var(--lp-gold) / 0.9);
    }
    .lp-cta:hover { filter: brightness(1.04) saturate(1.05); }
    .lp-cta:active, .lp-second:active { transform: scale(0.98); }
    .lp-second { color: hsl(var(--foreground)); background: hsl(var(--foreground) / 0.06); }
    .lp-second:hover { background: hsl(var(--foreground) / 0.1); }
    .lp-cta.is-sm, .lp-second.is-sm { padding: 0.4375rem 0.9375rem; font-size: 0.875rem; }
    .lp-cta:focus-visible, .lp-second:focus-visible, .lp-faq-item > summary:focus-visible, .lp-seg > button:focus-visible {
        outline: 2px solid hsl(var(--foreground)); outline-offset: 3px;
    }
    .lp-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem; }

    /* ── Top bar: translucent, full width, one hairline ── */
    .lp-header {
        position: sticky; top: 0; z-index: 50;
        background: hsl(var(--background) / 0.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid hsl(var(--border) / 0.7);
    }
    .lp-nav-links { display: none; }
    @media (min-width: 1040px) { .lp-nav-links { display: flex; gap: 0.25rem; } }
    .lp-nav-link { padding: 0.375rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem; color: hsl(var(--foreground) / 0.72); transition: color 150ms; }
    .lp-nav-link:hover { color: hsl(var(--foreground)); }

    /* ── Hero: the promise, then the choir and the app it runs on ── */
    .lp-hero { display: grid; justify-items: center; text-align: center; gap: 1.25rem; padding-top: 2.75rem; }
    @media (min-width: 900px) { .lp-hero { padding-top: 4rem; gap: 1.5rem; } }
    /* The headline holds in two lines at every width: the size follows the
       viewport, and balance splits it evenly */
    .lp-hero > .lp-display { max-width: none; }
    .lp-hero > .lp-lead { max-width: 38rem; }
    .lp-free { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

    /* The stage: a real choir, and the app rising out of the picture */
    .lp-stage { position: relative; margin-top: 2.5rem; }
    @media (min-width: 900px) { .lp-stage { margin-top: 3rem; } }
    .lp-stage-photo {
        position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: hsl(var(--muted));
    }
    @media (min-width: 640px) { .lp-stage-photo { aspect-ratio: 16 / 10; } }
    @media (min-width: 900px) { .lp-stage-photo { aspect-ratio: 16 / 7.5; } }
    .lp-stage-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
    /* A light fall of shadow at the foot, so the app has somewhere to stand */
    .lp-stage-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(0 0 0 / 0.35)); }
    .lp-window {
        position: absolute; left: 50%; bottom: -6rem; transform: translateX(-50%); width: 66%; max-width: 68rem; z-index: 1;
        border-radius: var(--radius); overflow: hidden; background: hsl(var(--card));
        box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 40px 80px -30px rgb(0 0 0 / 0.55);
    }
    .dark .lp-window { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 40px 80px -30px rgb(0 0 0 / 0.9); }
    .lp-window-bar { display: flex; gap: 0.375rem; padding: 0.625rem 0.875rem; background: hsl(var(--muted)); border-bottom: 1px solid hsl(var(--border)); }
    .lp-window-bar > span { width: 0.625rem; height: 0.625rem; border-radius: var(--radius); background: hsl(var(--foreground) / 0.15); }
    .lp-window-view { aspect-ratio: 1799 / 820; overflow: hidden; }
    .lp-window-view img { display: block; width: 100%; height: auto; }
    .lp-handset {
        position: absolute; z-index: 2; width: 44%; max-width: 15rem; left: 50%; bottom: -3rem; transform: translateX(-50%);
        border-radius: var(--radius); padding: 0.375rem; background: #111;
        box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 60px -20px rgb(0 0 0 / 0.6);
    }
    .lp-handset-view { border-radius: var(--radius); overflow: hidden; aspect-ratio: 396 / 760; background: hsl(var(--card)); }
    .lp-handset img { display: block; width: 100%; height: auto; }
    .lp-window { display: none; }
    @media (min-width: 768px) {
        .lp-window { display: block; }
        .lp-handset { left: auto; right: 6%; transform: none; width: 15%; bottom: -7.5rem; }
    }
    .lp-stage-foot { height: 3.5rem; }
    @media (min-width: 768px) { .lp-stage-foot { height: 7.5rem; } }

    /* What is simply true, in one row, each with a gold tick */
    .lp-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 2.5rem; padding-block: 1.75rem 0; }
    .lp-fact { display: inline-flex; align-items: center; gap: 0.625rem; font-size: 0.9375rem; font-weight: 500; color: hsl(var(--foreground) / 0.85); }
    .lp-fact::before {
        content: ""; flex: none; width: 0.375rem; height: 0.6875rem; margin-top: -0.1875rem;
        border: solid hsl(var(--lp-gold)); border-width: 0 2px 2px 0; transform: rotate(45deg);
    }
    @media (max-width: 639px) { .lp-facts { flex-direction: column; align-items: center; gap: 0.5rem; } }

    /* ── Features: one bento, each card a real piece of the app ── */
    .lp-bento { display: grid; gap: 1rem; }
    @media (min-width: 720px) { .lp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lp-card.is-wide { grid-column: 1 / -1; } }
    @media (min-width: 1024px) {
        .lp-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; }
        .lp-card { grid-column: span 2; }
        .lp-card.is-wide { grid-column: span 4; }
        .lp-card.is-half { grid-column: span 3; }
        .lp-card.is-tall { grid-row: span 2; }
    }
    .lp-card {
        display: flex; flex-direction: column; gap: 1.5rem; min-width: 0;
        padding: 1.75rem; border-radius: var(--radius); background: hsl(var(--card));
        box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.05), 0 2px 4px hsl(var(--foreground) / 0.03);
    }
    @media (min-width: 900px) { .lp-card { padding: 2rem; } }
    .dark .lp-card { box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.08); }
    .lp-card-text { display: grid; gap: 0.5rem; }
    .lp-card-was { font-size: 0.8125rem; color: hsl(var(--muted-foreground) / 0.85); text-decoration: line-through; text-decoration-color: hsl(var(--lp-gold) / 0.9); text-decoration-thickness: 1.5px; }
    .lp-card-title { font-size: 1.4375rem; line-height: 1.2; letter-spacing: -0.015em; }
    .lp-card-body { font-size: 0.9375rem; line-height: 1.55; color: hsl(var(--muted-foreground)); text-wrap: pretty; }
    .lp-card-visual { margin-top: auto; border-radius: var(--radius); background: hsl(var(--lp-band)); padding: 1rem; overflow: hidden; }
    .dark .lp-card-visual { background: hsl(var(--background)); }
    @media (min-width: 1024px) {
        .lp-card.is-wide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; align-items: center; }
        .lp-card.is-wide .lp-card-visual { margin-top: 0; }
    }
    .lp-card.is-tall .lp-card-visual { margin-top: 0; flex: 1; }

    /* The small pieces of app drawn inside the cards */
    .mini { border-radius: var(--radius); background: hsl(var(--card)); box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.06), 0 1px 2px hsl(var(--foreground) / 0.04); overflow: hidden; }
    .q-field {
        display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.75rem;
        border-radius: var(--radius); background: hsl(var(--card)); box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.08);
        font-size: 0.875rem; color: hsl(var(--muted-foreground));
    }
    .q-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-block: 0.75rem; }
    .q-chip { padding: 0.25rem 0.625rem; border-radius: var(--radius); background: hsl(var(--card)); box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.08); font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
    .q-chip.is-on { box-shadow: none; background: hsl(var(--foreground)); color: hsl(var(--background)); font-weight: 600; }
    .srow { display: flex; gap: 0.75rem; padding: 0.75rem 0.875rem; align-items: flex-start; }
    .srow + .srow { border-top: 1px solid hsl(var(--border) / 0.7); }
    .srow-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius); background: hsl(var(--muted)); flex: none; }
    .srow-title { font-size: 0.9375rem; font-weight: 600; color: hsl(var(--foreground)); }
    .srow-badge { margin-left: 0.375rem; font-size: 0.6875rem; font-weight: 500; padding: 0.0625rem 0.375rem; border-radius: var(--radius); box-shadow: 0 0 0 1px hsl(var(--border)); color: hsl(var(--muted-foreground)); white-space: nowrap; }
    .srow-meta { display: block; font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.125rem; }

    /* The programme of one Sunday */
    .leaflet-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem; border-bottom: 1px solid hsl(var(--border) / 0.7); }
    .leaflet-choir { display: block; font-size: 0.875rem; font-weight: 600; color: hsl(var(--foreground)); }
    .leaflet-when { display: block; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
    .leaflet-status { margin-left: auto; font-size: 0.75rem; font-weight: 600; color: hsl(var(--lp-gold-ink)); }
    .leaflet-line { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.625rem; padding: 0.6875rem 0.875rem; }
    .leaflet-line + .leaflet-line { border-top: 1px solid hsl(var(--border) / 0.6); }
    .leaflet-num { font-size: 0.75rem; font-variant-numeric: tabular-nums; color: hsl(var(--muted-foreground) / 0.8); padding-top: 0.0625rem; }
    .leaflet-cue { display: block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: hsl(var(--lp-gold-ink)); }
    .leaflet-song { display: block; font-size: 1rem; line-height: 1.35; color: hsl(var(--foreground)); margin-top: 0.125rem; }
    .leaflet-meta { display: block; font-size: 0.6875rem; color: hsl(var(--muted-foreground)); margin-top: 0.0625rem; }

    /* The pupitres, each its own colour and its real headcount */
    .staff { display: grid; gap: 0.625rem; padding: 0.25rem; }
    .staff-row { display: grid; gap: 0.25rem; }
    .staff-label { display: flex; align-items: baseline; gap: 0.5rem; }
    .staff-name { font-size: 0.75rem; font-weight: 600; }
    .staff-count { font-size: 0.75rem; font-variant-numeric: tabular-nums; color: hsl(var(--muted-foreground)); }
    .staff-track { height: 0.4375rem; border-radius: var(--radius); background: hsl(var(--foreground) / 0.07); }
    .staff-line { display: block; height: 100%; border-radius: var(--radius); transform-origin: left center; }
    .staff-0 { color: var(--voice-1); } .staff-0 .staff-line { background: var(--voice-1); }
    .staff-1 { color: var(--voice-2); } .staff-1 .staff-line { background: var(--voice-2); }
    .staff-2 { color: var(--voice-3); } .staff-2 .staff-line { background: var(--voice-3); }
    .staff-3 { color: var(--voice-4); } .staff-3 .staff-line { background: var(--voice-4); }
    .staff-4 { color: var(--voice-5); } .staff-4 .staff-line { background: var(--voice-5); }
    .staff-5 { color: var(--voice-6); } .staff-5 .staff-line { background: var(--voice-6); }

    /* A term of Sundays, one row per singer */
    .rollgrid { display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); gap: 0.75rem; align-items: center; }
    .rollgrid + .rollgrid { margin-top: 0.5rem; }
    .rollgrid-name { font-size: 0.75rem; color: hsl(var(--foreground)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rollrow { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.1875rem; }
    .rollrow > span { aspect-ratio: 1; border-radius: 0.1875rem; }
    .roll-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 0.875rem; margin-top: 0.875rem; }
    .roll-key { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
    .roll-swatch { width: 0.5625rem; height: 0.5625rem; border-radius: 0.1875rem; }

    /* A score and the recordings of each pupitre */
    .frow { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.875rem; }
    .frow + .frow { border-top: 1px solid hsl(var(--border) / 0.7); }
    .frow-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius); background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); flex: none; }
    .frow-icon.is-play { background: hsl(var(--foreground)); color: hsl(var(--background)); }
    .frow-name { font-size: 0.8125rem; font-weight: 500; color: hsl(var(--foreground)); }
    .frow-parts { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }
    .frow-part { font-size: 0.6875rem; padding: 0.0625rem 0.4375rem; border-radius: var(--radius); background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
    .frow-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 1.25rem; min-width: 3rem; }
    .frow-wave > i { flex: 1; border-radius: 1px; background: hsl(var(--foreground) / 0.18); }
    .frow-wave > i.is-played { background: hsl(var(--lp-gold)); }

    /* The file a choir arrives with, and what each of its columns becomes */
    .map-file { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0.875rem; border-bottom: 1px solid hsl(var(--border) / 0.7); font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
    .map-file > b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; color: hsl(var(--foreground)); }
    .mapping-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.75rem; align-items: center; padding: 0.5625rem 0.875rem; }
    .mapping-row + .mapping-row { border-top: 1px solid hsl(var(--border) / 0.6); }
    .mapping-from { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
    .mapping-arrow { font-size: 0.75rem; color: hsl(var(--lp-gold-ink)); }
    .mapping-to { font-size: 0.8125rem; font-weight: 500; color: hsl(var(--foreground)); text-align: right; }

    /* ── The app itself: the owner's captures behind a segmented control ── */
    .lp-seg {
        display: flex; gap: 0.125rem; max-width: 100%; margin: 0 auto 1.75rem; width: max-content;
        padding: 0.25rem; border-radius: var(--radius); background: hsl(var(--foreground) / 0.06); overflow-x: auto;
    }
    .lp-seg > button {
        padding: 0.4375rem 1rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; white-space: nowrap;
        color: hsl(var(--foreground) / 0.7); transition: background-color 150ms, color 150ms;
    }
    .lp-seg > button:hover { color: hsl(var(--foreground)); }
    .lp-seg > button[aria-selected="true"] { background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
    .dark .lp-seg > button[aria-selected="true"] { background: hsl(var(--muted)); }
    .shot-frame {
        border-radius: var(--radius); overflow: hidden; background: hsl(var(--card));
        box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.08), 0 50px 100px -40px rgb(0 0 0 / 0.35);
    }
    /* A capture is shown at its own size, never shrunk: shrinking an 1800px
       screen drew the app's text at 60% and blurred it. Each view is a 16:10
       window onto the top of the capture, centred on the app's content column. */
    .shot-frame [data-app-shots-target="shot"] { aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
    .dark .shot-frame [data-app-shots-target="shot"] { background: #000; }
    .shot-frame :where(img) {
        display: block; position: relative; left: 50%; transform: translateX(-50%);
        width: min(1799px, 170%); max-width: none; height: auto;
    }
    .shot-dark { display: none; }
    .dark .shot-light { display: none; }
    .dark .shot-dark { display: block; }
    /* Below 640px the desktop captures are unreadable and heavy: phones get the
       phone captures, swiped sideways, or no section at all */
    .lp-phones { display: none; }
    @media (max-width: 639px) {
        .lp-shots:not(.has-phones), .lp-shots .lp-seg, .lp-shots .shot-frame { display: none; }
        .lp-phones {
            display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
            margin-inline: -1rem; padding: 0.25rem 1rem 1rem;
        }
    }
    .lp-phone { flex: 0 0 68%; margin: 0; scroll-snap-align: center; }
    .lp-phone img {
        display: block; width: 100%; height: auto; border-radius: var(--radius);
        box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.08), 0 20px 40px -24px rgb(0 0 0 / 0.45);
    }
    .lp-phone figcaption { margin-top: 0.75rem; text-align: center; font-size: 0.8125rem; font-weight: 500; color: hsl(var(--muted-foreground)); }

    /* ── Choirs: real choirs, and the languages they sing in ── */
    .lp-gallery { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 9.5rem; }
    @media (min-width: 900px) { .lp-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 14rem; gap: 1.25rem; } }
    .lp-photo { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: hsl(var(--muted)); }
    .lp-photo.is-wide { grid-column: span 2; grid-row: span 2; }
    .lp-photo.is-tall { grid-row: span 2; }
    .lp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
    .lp-photo figcaption {
        position: absolute; left: 0.75rem; bottom: 0.75rem; right: 0.75rem; width: fit-content; max-width: calc(100% - 1.5rem);
        padding: 0.3125rem 0.625rem; border-radius: var(--radius); font-size: 0.75rem; font-weight: 500; color: #fff;
        background: rgb(0 0 0 / 0.42); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    }
    .lp-tongues { display: grid; gap: 2rem; margin-top: 3rem; padding-top: 3rem; border-top: 1px solid hsl(var(--border)); }
    @media (min-width: 960px) { .lp-tongues { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 5rem; margin-top: 4rem; padding-top: 4rem; } }
    .lp-tongues-title { font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.02em; }
    .incipit { display: block; }
    .incipit + .incipit { margin-top: 1.25rem; }
    .incipit-tongue { display: block; font-size: 0.75rem; font-weight: 600; color: hsl(var(--lp-gold-ink)); margin-bottom: 0.125rem; }
    .incipit-line { display: block; font-size: clamp(1.5rem, 2.8vw, 2.125rem); line-height: 1.15; color: hsl(var(--foreground)); }
    .tongues { display: flex; flex-wrap: wrap; gap: 0.375rem; }
    .tongue { padding: 0.3125rem 0.75rem; border-radius: var(--radius); font-size: 0.8125rem; color: hsl(var(--muted-foreground)); background: hsl(var(--lp-band)); }
    .tongue.is-app { background: hsl(var(--lp-gold) / 0.16); color: hsl(var(--lp-gold-ink)); font-weight: 600; }

    /* ── Prices: the shared table, in the app's gold, with the landing's radii ── */
    .landing-page .plan-card, .landing-page .plan-custom { border-radius: var(--radius); }
    .landing-page .plan-card { border: 0; box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.06); padding: 2rem 1.75rem 1.75rem; }
    .landing-page .plan-card.is-featured { box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.6); }
    .dark .landing-page .plan-card.is-featured { box-shadow: 0 0 0 1px hsl(var(--lp-gold) / 0.45); }
    .landing-page .plan-ribbon { border-radius: var(--radius); left: 1.75rem; }
    .landing-page [data-controller="plan-period"] > .plan-switch { display: flex; width: max-content; margin-inline: auto; background: hsl(var(--foreground) / 0.06); }

    /* ── Questions: the heading on one side, the answers on the other ── */
    .lp-faq-wrap { display: grid; gap: 2.5rem; }
    @media (min-width: 960px) { .lp-faq-wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 5rem; align-items: start; } }
    .lp-faq-head { display: grid; gap: 1rem; justify-items: start; }
    @media (min-width: 960px) { .lp-faq-head { position: sticky; top: 6rem; } }
    .lp-faq-label { font-size: 0.8125rem; font-weight: 600; color: hsl(var(--lp-gold-ink)); margin-bottom: 0.25rem; }
    .lp-faq-group + .lp-faq-group { margin-top: 2.25rem; }
    .lp-faq-item { border-bottom: 1px solid hsl(var(--border)); }
    .lp-faq-item > summary {
        display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.125rem;
        cursor: pointer; list-style: none; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; color: hsl(var(--foreground));
    }
    .lp-faq-item > summary::-webkit-details-marker { display: none; }
    .lp-faq-item > summary::after {
        content: "+"; flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--radius);
        background: hsl(var(--foreground) / 0.06); font-size: 1.125rem; font-weight: 400; line-height: 1; color: hsl(var(--foreground) / 0.7);
        transition: transform 200ms;
    }
    .lp-faq-item[open] > summary::after { transform: rotate(45deg); }
    .lp-faq-item > p { padding-bottom: 1.25rem; padding-right: 2.5rem; font-size: 0.9375rem; line-height: 1.6; color: hsl(var(--muted-foreground)); }
    .lp-faq-more { display: grid; gap: 0.375rem; justify-items: start; margin-top: 1.5rem; padding: 1.5rem; border-radius: var(--radius); background: hsl(var(--lp-band)); }
    .lp-faq-more-title { font-size: 1.0625rem; font-weight: 700; color: hsl(var(--foreground)); }
    .lp-faq-more > .lp-second { margin-top: 0.75rem; }

    /* ── Closing: one dark panel, the gold button lit on it ── */
    .lp-closing {
        position: relative; overflow: hidden; isolation: isolate;
        display: grid; justify-items: center; gap: 1.25rem; text-align: center;
        padding: 4.5rem 1.5rem; border-radius: var(--radius); background: hsl(var(--lp-deep)); color: #fff;
    }
    @media (min-width: 900px) { .lp-closing { padding: 5rem 3rem; } }
    .lp-closing::before {
        content: ""; position: absolute; z-index: -1; left: 50%; top: 0; width: 70%; height: 70%; transform: translate(-50%, -55%);
        background: radial-gradient(closest-side, hsl(var(--lp-gold) / 0.35), transparent);
    }
    .dark .lp-closing { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08); }
    .lp-closing .lp-head { color: #fff; max-width: 40rem; }
    .lp-closing .lp-lead { color: rgb(255 255 255 / 0.66); max-width: 34rem; }
    .lp-closing .lp-actions { margin-top: 0.75rem; }
    .lp-closing .lp-second { color: #fff; background: rgb(255 255 255 / 0.1); }
    .lp-closing .lp-second:hover { background: rgb(255 255 255 / 0.16); }

    /* ── Footer: quiet, on the page's own ground ── */
    .lp-footer { border-top: 1px solid hsl(var(--border)); margin-top: 3.5rem; }
    .lp-footer-name { font-size: 0.9375rem; font-weight: 700; color: hsl(var(--foreground)); }
    .lp-foot-link { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); transition: color 150ms; }
    .lp-foot-link:hover { color: hsl(var(--foreground)); }
    .lp-credits > summary { cursor: pointer; list-style: none; font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
    .lp-credits > summary::-webkit-details-marker { display: none; }
    .lp-credits > summary:hover { color: hsl(var(--foreground)); }
    .lp-credits ul { display: grid; gap: 0.25rem; margin-top: 0.75rem; font-size: 0.75rem; line-height: 1.5; color: hsl(var(--muted-foreground)); }
    .lp-credits a { text-decoration: underline; text-underline-offset: 2px; }
    .lp-credits a:hover { color: hsl(var(--foreground)); }

    /* Motion: sections rise in once; the programme writes itself line by
       line, and the pupitres grow like a canon. */
    @media (prefers-reduced-motion: no-preference) {
        .reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1); }
        .reveal.is-in { opacity: 1; transform: none; }
        .lp-stage.reveal { transform: translateY(40px) scale(0.98); }
        .lp-stage.reveal.is-in { transform: none; }
        .leaflet-line { opacity: 0; transform: translateY(6px); }
        .is-in .leaflet-line { animation: line-in 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(300ms + var(--i) * 140ms); }
        @keyframes line-in { to { opacity: 1; transform: none; } }
        .lp-photo img { transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
        .lp-photo:hover img { transform: scale(1.04); }
        .lp-card { transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms; }
        .lp-card:hover { transform: translateY(-3px); }
        .staff-line { transform: scaleX(0); }
        .is-in .staff-line { animation: staff-in 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(200ms + var(--i) * 110ms); }
        @keyframes staff-in { to { transform: none; } }
    }
}
