/* ── Design tokens ────────────────────────────────────────────────────── */

:root {
    color-scheme: light;

    --bg: #f6f6fb;
    --bg-soft: #eef0fb;
    --surface: #ffffff;
    --surface-border: #e6e6f2;
    --text: #17172a;
    --text-muted: #5b5b70;
    --text-faint: #8a8aa0;

    --accent: #6366f1;
    --accent-strong: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.1);
    --accent-contrast: #ffffff;

    --blob-1: rgba(99, 102, 241, 0.35);
    --blob-2: rgba(236, 72, 153, 0.25);

    --shadow-sm: 0 1px 2px rgba(23, 23, 42, 0.06);
    --shadow-md: 0 12px 30px -12px rgba(23, 23, 42, 0.18);
    --shadow-lg: 0 30px 80px -30px rgba(23, 23, 42, 0.35);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --nav-bg: rgba(255, 255, 255, 0.72);
    /* logo.png is white line-art on a transparent background: invert it for light backgrounds */
    --logo-filter: invert(1);
}

/*
 * Three-state theming: no explicit choice → follow the OS (media query, guarded so an
 * explicit [data-theme="light"] can still win); an explicit choice (cookie set via
 * /prefs/theme/{value}) → the attribute block below wins outright, in either direction.
 */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #0a0a12;
        --bg-soft: #10101c;
        --surface: #14141f;
        --surface-border: #262637;
        --text: #f2f2f8;
        --text-muted: #a6a6bd;
        --text-faint: #6f6f88;

        --accent: #818cf8;
        --accent-strong: #6366f1;
        --accent-soft: rgba(129, 140, 248, 0.16);
        --accent-contrast: #0a0a12;

        --blob-1: rgba(99, 102, 241, 0.35);
        --blob-2: rgba(236, 72, 153, 0.22);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, 0.55);
        --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.7);

        --nav-bg: rgba(10, 10, 18, 0.72);
        --logo-filter: none;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0a0a12;
    --bg-soft: #10101c;
    --surface: #14141f;
    --surface-border: #262637;
    --text: #f2f2f8;
    --text-muted: #a6a6bd;
    --text-faint: #6f6f88;

    --accent: #818cf8;
    --accent-strong: #6366f1;
    --accent-soft: rgba(129, 140, 248, 0.16);
    --accent-contrast: #0a0a12;

    --blob-1: rgba(99, 102, 241, 0.35);
    --blob-2: rgba(236, 72, 153, 0.22);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.7);

    --nav-bg: rgba(10, 10, 18, 0.72);
    --logo-filter: none;
}

/* ── Reset & base ─────────────────────────────────────────────────────── */

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

html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

#when-we-play,
#about {
    scroll-margin-top: 84px;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 {
    line-height: 1.15;
    margin: 0 0 0.5em;
}

p {
    margin: 0 0 1em;
    color: var(--text-muted);
}

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

img {
    max-width: 100%;
    display: block;
}

/* ── Layout shell ─────────────────────────────────────────────────────── */

.app-shell {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    width: 100%;
}

.page-content > .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Header / nav ─────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--surface-border);
}

.site-nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%), var(--surface);
    border: 1px solid var(--surface-border);
    padding: 4px;
}

.brand-logo img {
    filter: var(--logo-filter);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.nav-links > a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}

.nav-links > a:hover {
    color: var(--text);
}

.user-name {
    color: var(--text-faint);
    font-size: 0.85rem;
}

/* Theme + language controls */

.ui-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.25rem;
}

.lang-switch {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.lang-switch a {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-switch a.active {
    background: var(--accent);
    color: var(--accent-contrast);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover {
    color: var(--accent-strong);
    transform: translateY(-1px);
}

.theme-toggle svg {
    width: 17px;
    height: 17px;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1.3rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--surface-border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    text-decoration: none;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    padding: 0 1.5rem 3.5rem;
    text-align: center;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    width: 420px;
    height: 420px;
    background: var(--blob-1);
    top: -160px;
    left: 50%;
    transform: translateX(-70%);
}

.hero::after {
    width: 320px;
    height: 320px;
    background: var(--blob-2);
    top: -60px;
    right: 8%;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding-top: 2.5rem;
}

/* Full-bleed header banner: breaks out of `.hero`'s side padding via the viewport-width
   trick so it spans edge-to-edge regardless of ancestor padding/max-width. */
.hero-banner {
    position: relative;
    z-index: 1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: clamp(220px, 38vw, 420px);
    overflow: hidden;
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

.hero-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-strong);
    background: var(--accent-soft);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    animation: hero-rise 0.5s ease 0.08s both;
}

.next-event-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    margin: 0 auto 1.5rem;
    animation: hero-rise 0.5s ease both;
}

.next-event-chip:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.next-event-chip strong {
    color: var(--text);
}

.next-event-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    flex-shrink: 0;
}

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    animation: hero-rise 0.6s ease 0.14s both;
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FocusOnNavigate (Routes.razor) programmatically focuses the h1 for screen readers on
   each navigation; it isn't a keyboard-interactive control, so skip the visible outline. */
.hero h1:focus {
    outline: none;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    animation: hero-rise 0.6s ease 0.14s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    animation: hero-rise 0.6s ease 0.2s both;
}

.hero-note {
    font-size: 0.85rem;
    color: var(--text-faint);
}

/* Quick facts */

.fact-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 780px;
    margin: 2.5rem auto 0;
}

.fact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 0.75rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: hero-rise 0.6s ease 0.26s both;
}

.fact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.fact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 0.6rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.fact-icon svg {
    width: 18px;
    height: 18px;
}

.fact-card .fact-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.fact-card .fact-label {
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-top: 0.2rem;
}

/* ── Sections / cards ─────────────────────────────────────────────────── */

.section {
    max-width: 860px;
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
}

.section-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    position: relative;
    display: inline-block;
    padding-bottom: 0.6rem;
}

.section-heading h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 46px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transform: translateX(-50%);
}

.section-lead {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0.75rem auto 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-md);
}

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

.card p {
    line-height: 1.7;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--surface-border);
    padding: 1.75rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-faint);
}

.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-muted);
}

.site-footer-logo {
    width: 22px;
    height: 22px;
    filter: var(--logo-filter);
    opacity: 0.85;
}

.site-footer-links {
    display: flex;
    gap: 1.25rem;
}

.site-footer-links a {
    color: var(--text-faint);
    text-decoration: none;
    font-weight: 500;
}

.site-footer-links a:hover {
    color: var(--accent-strong);
}

.site-footer-copy {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .site-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ── Admin pages ──────────────────────────────────────────────────────── */

/* MudLayout's own `height:100%` can't resolve against `.page-content` (an ordinary
   block whose height comes from `flex:1` two levels up in `.app-shell`, not from its
   own specified height) — it collapses to the content's natural height instead of the
   full viewport, which is why the non-fixed MudDrawer used to fall short of the page
   bottom. Making `.page-content` a flex container here and stretching `.admin-layout`
   with `flex:1` gives it a real computed height so the drawer's `height:100%` has
   something definite to resolve against. */
.page-content:has(> .admin-layout) {
    display: flex;
    flex-direction: column;
}

.admin-layout {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    background: var(--bg);
}

.admin-appbar.mud-appbar {
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--surface) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--surface-border);
}

.admin-drawer-toggle {
    color: var(--text-muted) !important;
}

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.25rem;
    font-size: 0.9rem;
}

.admin-breadcrumb-root {
    color: var(--text-faint);
    font-weight: 600;
}

.admin-breadcrumb-sep {
    color: var(--text-faint);
}

.admin-breadcrumb-current {
    color: var(--text);
    font-weight: 700;
}

.admin-exit-link.mud-button-root {
    color: var(--text-muted) !important;
    text-transform: none;
}

.admin-exit-link.mud-button-root:hover {
    color: var(--accent-strong) !important;
}

.admin-drawer.mud-drawer {
    border-right: 1px solid var(--surface-border);
    background: var(--surface) !important;
}

.admin-drawer-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--surface-border);
}

.admin-drawer-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.admin-drawer-title {
    font-weight: 700;
    color: var(--text);
}

.admin-nav {
    padding: 0.75rem;
}

.admin-nav-heading.mud-typography {
    display: block;
    color: var(--text-faint);
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.9rem 0.75rem 0.35rem;
}

.admin-nav .mud-nav-link {
    border-radius: var(--radius-sm);
    margin: 0.1rem 0.4rem;
    color: var(--text-muted);
}

.admin-nav .mud-nav-link:hover {
    background: var(--accent-soft);
    color: var(--text);
}

.admin-nav .mud-nav-link.active,
.admin-nav .mud-nav-link.mud-nav-link-active {
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 700;
}

.admin-main {
    padding: 0;
    margin-left: 0;
    width: 100%;
    transition: margin-left 0.2s ease, width 0.2s ease;
}

.admin-content {
    padding: 1.75rem clamp(1rem, 3vw, 2rem);
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .admin-main--drawer-open {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
}

/* MudDataGrid, restyled to match the site's surfaces/radius instead of MudBlazor's defaults */

.admin-content .mud-data-grid {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-content .mud-data-grid .mud-toolbar {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--surface-border);
    padding: 0.85rem 1.25rem;
    gap: 0.75rem;
}

.admin-content .mud-table-head {
    background: var(--bg-soft);
}

.admin-content .mud-table-head th {
    color: var(--text-faint);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--surface-border);
}

.admin-content .mud-table-body tr.mud-table-row {
    border-bottom: 1px solid var(--surface-border);
    transition: background-color 0.12s ease;
}

.admin-content .mud-table-body tr.mud-table-row:nth-of-type(even) {
    background: color-mix(in srgb, var(--bg-soft) 45%, transparent);
}

.admin-content .mud-table-body tr.mud-table-row:hover {
    background: var(--accent-soft) !important;
}

.admin-content .mud-table-container {
    border-radius: 0;
}

/* Plain HTML tables (e.g. the read-only Beamer review) get the same card treatment */

.admin-table-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 0.65rem 1rem;
    background: var(--bg-soft);
    color: var(--text-faint);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--surface-border);
}

.admin-table td {
    text-align: left;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--surface-border);
    color: var(--text);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: var(--accent-soft);
}

.beamer-container {
    padding-top: 1.5rem;
}

.beamer-back {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-faint);
    text-decoration: none;
    margin-bottom: 1rem;
}

.beamer-back:hover {
    color: var(--accent-strong);
}

.beamer-container h2 {
    margin-top: 2rem;
    font-size: 1.15rem;
}

.beamer-meta {
    color: var(--text-muted);
}

.beamer-note {
    font-size: 0.85rem;
    color: var(--text-faint);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* ── Public calendar ──────────────────────────────────────────────────── */

.calendar-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-list--past {
    margin-top: 1rem;
    opacity: 0.8;
}

.calendar-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1rem 3rem 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.calendar-item__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.5rem;
    color: var(--accent-strong);
}

.calendar-item__day {
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
}

.calendar-item__month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.calendar-item__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.calendar-item__title {
    font-weight: 700;
    color: var(--text);
}

.calendar-item__badge {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--accent-strong);
    background: var(--accent-soft);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    vertical-align: middle;
}

.calendar-item__location {
    font-size: 0.85rem;
    color: var(--text-faint);
}

.calendar-item__details {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: pre-wrap;
}

.calendar-past summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-strong);
    margin-bottom: 0.75rem;
}

.calendar-admin-link {
    margin-top: 2rem;
    text-align: center;
}

.calendar-ics-all {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-strong);
}

.calendar-item__ics-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    color: var(--accent-strong);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.calendar-item__ics-icon:hover,
.calendar-item__ics-icon:focus-visible {
    background: var(--accent-soft);
}

.calendar-item__ics-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .site-nav {
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: space-between;
        padding-top: 0.5rem;
        border-top: 1px solid var(--surface-border);
    }

    .fact-row {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 0 1.25rem 2.5rem;
    }
}

/* ── Urza's Caverna Cup ───────────────────────────────────────────────── */

.urza-hero {
    text-align: center;
}

.poster-frame {
    position: relative;
    max-width: 360px;
    margin: 0 auto;
    container-type: inline-size;
}

.poster-frame img {
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.poster-edition-patch {
    position: absolute;
    left: 32%;
    top: 9.2%;
    width: 36%;
    height: 4.6%;
    background: #efe6d2;
    clip-path: polygon(3% 0%, 97% 0%, 100% 50%, 97% 100%, 3% 100%, 0% 50%);
    border-top: 2px solid #1c2b46;
    border-bottom: 2px solid #1c2b46;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-edition-patch span {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    color: #1c2b46;
    font-size: 4.4cqw;
    letter-spacing: 0.01em;
}

.urza-letter h2 {
    font-size: 1.1rem;
    margin: 1.75rem 0 0.5rem;
}

.urza-letter h2:first-of-type {
    margin-top: 1.25rem;
}

/* ── Standalone event pages (Blattner Magicturnier, etc.) ────────────── */

.event-hero {
    text-align: center;
}

/* ── Edition timeline (year/edition switcher on event pages) ─────────── */

.edition-timeline {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.edition-timeline-nav {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 5rem;
    padding-top: 0.1rem;
}

.edition-timeline-nav::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 0.3rem;
    top: 0.7rem;
    bottom: 0.7rem;
    width: 2px;
    background: var(--surface-border);
}

.edition-timeline-node {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.5rem 0.55rem 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.edition-timeline-node:hover {
    color: var(--text);
}

.edition-timeline-dot {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--surface-border);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.edition-timeline-node.active {
    color: var(--text);
}

.edition-timeline-node.active .edition-timeline-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.edition-timeline-panel {
    flex: 1;
    min-width: 0;
}

@media (max-width: 640px) {
    .edition-timeline {
        flex-direction: column;
        gap: 1rem;
    }

    .edition-timeline-nav {
        flex-direction: row;
        min-width: 0;
        gap: 0.25rem;
        overflow-x: auto;
        padding-top: 0;
    }

    .edition-timeline-nav::before {
        left: 0.75rem;
        right: 0.75rem;
        top: 0.95rem;
        bottom: auto;
        width: auto;
        height: 2px;
    }

    .edition-timeline-node {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.55rem 0.75rem 0;
    }
}

.event-letter h2 {
    font-size: 1.1rem;
    margin: 1.75rem 0 0.5rem;
}

.event-letter h2:first-of-type {
    margin-top: 1.25rem;
}

.event-letter h3 {
    font-size: 1rem;
    margin: 1.25rem 0 0.4rem;
}

.event-letter ul,
.event-letter ol {
    margin: 0.5rem 0 1rem;
    padding-left: 1.4rem;
    line-height: 1.7;
}

.event-letter li {
    margin-bottom: 0.2rem;
}
