/* SportCal AI design system: tokens first, then shared components. Page-specific styles build on these tokens. */

:root {
    /* Brand palette */
    --color-ocean: #0a2342;
    --color-ocean-mid: #0f3460;
    --color-turquoise: #00c9bc;
    --color-sunset: #ff6b35;
    --color-sand: #f4f1eb;
    --color-reef: #2ecc71;
    --color-gold: #f5c518;

    /* Semantic colours (light theme) */
    --bg: var(--color-sand);
    --surface: #ffffff;
    --surface-raised: #fdfdfc;
    --surface-muted: #f5f7f9;
    --surface-accent: #e9eff8;
    --surface-today: #eff5fb;
    --text: #0f2236;
    --text-muted: #56697b;
    --text-subtle: #66798b;
    --text-on-brand: #ffffff;
    --text-accent: #0b6f6a;
    --border: #dce2e7;
    --border-strong: #c3ccd4;
    --brand-bg: var(--color-ocean);
    --brand-text-muted: rgb(255 255 255 / .68);
    --accent: var(--color-turquoise);
    --accent-contrast: var(--color-ocean);
    --warning-text: #a63c20;
    --warning-bg: #fbefea;
    --warning-border: #f1c9bb;
    --success-bg: #eaf7ef;
    --record-text: #7a5d00;
    --focus-ring: #f4a261;
    --shadow-card: 0 5px 22px rgb(10 35 66 / .08);
    --scrim: rgb(10 35 66 / .4);

    /* Type */
    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', ui-monospace, Consolas, monospace;
    --text-xs: 11px;
    --text-sm: 13px;
    --text-md: 15px;
    --text-lg: 18px;

    /* Spacing, radius, layout */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --content-width: 1240px;
    --header-height: 60px;
    --tap: 44px;

    color-scheme: light;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(40px, 5.5vw, 68px); letter-spacing: -.01em; margin: var(--space-4) 0; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: var(--space-4); top: -100px; z-index: 100; padding: var(--space-3) var(--space-4); background: var(--surface); color: var(--text); border-radius: var(--radius); }
.skip:focus { top: var(--space-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Site header */
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-6); height: var(--header-height); padding: 0 var(--space-6); background: var(--brand-bg); color: var(--text-on-brand); border-bottom: 1px solid rgb(255 255 255 / .06); }
.site-brand { display: flex; align-items: baseline; flex: none; font: 900 24px/1 var(--font-display); letter-spacing: -.01em; }
.site-brand span { color: var(--accent); font-weight: 400; }
.site-brand small { align-self: center; margin-left: 5px; padding: 2px 5px; border: 1px solid rgb(0 201 188 / .45); border-radius: var(--radius-sm); background: rgb(0 201 188 / .12); color: var(--accent); font: 500 9px/1.3 var(--font-mono); letter-spacing: .05em; }
.site-nav { display: flex; align-self: stretch; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { display: flex; align-items: center; padding: 0 14px; border-bottom: 2px solid transparent; color: var(--brand-text-muted); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.site-nav a:hover { color: var(--text-on-brand); }
.site-nav a[aria-current="page"] { color: var(--text-on-brand); border-bottom-color: var(--accent); }
.site-portal { margin-left: auto; flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius); background: var(--accent); color: var(--accent-contrast); font: 800 13px/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.site-portal:hover { filter: brightness(1.08); }

/* Footer */
.site-footer { max-width: var(--content-width); margin: auto; padding: var(--space-6); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: var(--space-6); }
.site-footer p, .site-footer span, .site-footer a:not(.site-brand) { font-size: 12px; color: var(--text-muted); }
.site-footer .site-brand { color: var(--text); }
.site-footer > div:last-child { display: flex; flex-direction: column; gap: var(--space-3); }

/* Buttons and links */
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3); min-height: var(--tap); padding: 0 22px; border: 0; border-radius: var(--radius); background: var(--color-ocean); color: var(--text-on-brand); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.button.small { min-height: 38px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.button.teal { background: var(--accent); color: var(--accent-contrast); }
.text-link { font-size: 14px; font-weight: 700; }
.host-link { text-decoration: underline; text-underline-offset: 3px; }
.muted { color: var(--text-muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

/* Page hero and content */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 56px max(var(--space-6), calc((100vw - 1176px) / 2)); background: var(--color-ocean); color: var(--text-on-brand); }
.hero::after { content: ''; position: absolute; right: -140px; top: -160px; width: 650px; height: 650px; border: 1px solid rgb(255 255 255 / .06); border-radius: 50%; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 750px; }
.hero .eyebrow { color: #79d8d2; }
.hero p { max-width: 520px; color: #c0cbd7; font-size: 16px; line-height: 1.7; }
.compact { padding-top: 40px; padding-bottom: 40px; }
.compact h1 { font-size: clamp(40px, 6vw, 54px); }
.content { max-width: var(--content-width); margin: auto; padding: var(--space-7) var(--space-6) 70px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.prose { white-space: pre-line; }

/* Cards and panels */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: var(--space-5); }
.panel { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.panel h2 { margin-bottom: 20px; }
.panel h3 { margin-top: 15px; }
.panel hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-5) 0; }
.panel .text-link { display: inline-block; margin-top: var(--space-5); }
a.panel { transition: border-color .15s, background-color .15s; }
a.panel:hover { border-color: var(--border-strong); background-color: var(--surface-raised); }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-5); }
.notice { margin-top: 30px; padding: 20px; border-radius: 10px; background: var(--warning-bg); }
.notice h3 { margin-top: 0; }
.notice a { display: block; margin-top: 10px; font-size: var(--text-sm); font-weight: 600; color: var(--warning-text); }
.result-block { margin-top: var(--space-5); padding: var(--space-5); border-radius: 10px; background: var(--success-bg); }
.score { font: 700 30px var(--font-display); color: var(--text-accent); }
.record { display: block; margin-top: 15px; font-size: 12px; font-weight: 700; color: var(--record-text); }
.sport-tag { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-accent); }
.empty { grid-column: 1 / -1; width: 100%; padding: 60px var(--space-5); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.empty h3 { font-size: 30px; }
.empty p { max-width: 480px; margin: 15px auto 0; color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.filters label { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .03em; }
.filters input, .filters select { min-height: var(--tap); padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 14px; }

/* Event list rows */
.event-list { display: grid; gap: var(--space-3); }
.event-card { display: flex; align-items: center; gap: 28px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color .15s; }
.event-card:hover { border-color: var(--border-strong); }
.date-block { width: 64px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding-right: 22px; border-right: 1px solid var(--border); }
.date-block span { font-size: var(--text-xs); text-transform: uppercase; color: var(--text-muted); }
.date-block strong { font: 700 40px/1.1 var(--font-display); }
.event-info { flex: 1; min-width: 0; }
.event-info h3 { margin: 5px 0; }
.event-info p { margin: 0; color: var(--text-muted); font-size: 12px; }
.event-meta { display: flex; flex-direction: column; gap: 7px; max-width: 220px; font-size: 12px; }
.event-meta span { color: var(--text-muted); }
.event-arrow { font-size: 24px; color: var(--text-subtle); }

/* Pagination */
.pagination { margin-top: var(--space-5); }
.pagination ul { list-style: none; display: flex; gap: 20px; padding: 0; }
.pagination .disabled { color: var(--text-subtle); }

/* Associations */
.association-logo { --sport-color: #627080; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: var(--radius-lg); background: var(--sport-color); color: #fff; font: 800 22px var(--font-display); letter-spacing: .03em; }
.association-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.association-logo.large { width: 104px; height: 104px; border-radius: 18px; border: 3px solid rgb(255 255 255 / .12); font-size: 40px; }
.association-hero { display: flex; align-items: center; gap: 28px; max-width: none; }
.association-hero h1 { margin: 10px 0; }
.association-card { display: flex; flex-direction: column; gap: 6px; }
.association-card .association-logo { margin-bottom: 10px; }
.association-card h3 { margin-top: var(--space-1); }
.profile-heading { margin: 36px 0 var(--space-4); }
.profile-results { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-stats { align-self: start; }
.profile-stats dl { margin: 18px 0 0; }
.profile-stats dl div { display: flex; justify-content: space-between; align-items: baseline; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.profile-stats dt { color: var(--text-muted); }
.profile-stats dd { margin: 0; font: 700 28px var(--font-display); }

@media (max-width: 800px) {
    .site-header { flex-wrap: wrap; height: auto; gap: 0 var(--space-4); padding: var(--space-3) var(--space-4) 0; }
    .site-brand { padding-bottom: 10px; }
    .site-portal { min-height: 32px; margin-bottom: 10px; padding: 0 10px; font-size: 12px; }
    .site-nav { order: 3; width: calc(100% + 32px); height: 42px; margin: 0 calc(var(--space-4) * -1); padding: 0 6px; border-top: 1px solid rgb(255 255 255 / .08); }
    .site-nav a { padding: 0 10px; }
    .hero { padding: 40px 20px; }
    .hero::after { display: none; }
    .content { padding: 30px 20px 45px; }
    .detail-grid, .card-grid, .profile-results { grid-template-columns: minmax(0, 1fr); }
    .section-heading { align-items: flex-start; }
    .section-heading > .button { font-size: var(--text-xs); }
    .filters .button { width: 100%; }
    .event-card { flex-wrap: wrap; gap: 14px; padding: 18px; }
    .date-block { width: 46px; padding-right: var(--space-3); }
    .event-meta { flex: 1; flex-direction: row; flex-wrap: wrap; max-width: none; margin-left: 60px; }
    .event-arrow { display: none; }
    .association-hero { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
    .association-logo.large { width: 80px; height: 80px; font-size: 30px; }
    .site-footer { flex-direction: column; padding: 30px 20px; }
}

/* Sport identity: every sport has a colour and an icon, used together everywhere. */
.sport-icon { display: inline-grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; background: color-mix(in srgb, var(--sport-color, var(--text-subtle)) 20%, var(--surface)); font-size: .85em; line-height: 1; font-style: normal; }
.sport-tag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; justify-self: start; padding: 2px 10px 2px 2px; border-radius: 999px; background: color-mix(in srgb, var(--sport-color, var(--text-subtle)) 12%, var(--surface)); color: var(--text); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sport-tag .sport-icon { font-size: 12px; background: color-mix(in srgb, var(--sport-color, var(--text-subtle)) 28%, var(--surface)); }
.hero .sport-tag { color: var(--text-on-brand); background: rgb(255 255 255 / .1); }
.result-card { display: flex; flex-direction: column; gap: 6px; }
.result-card p { margin: var(--space-2) 0 0; }
.sport-pills { display: flex; gap: var(--space-2); overflow-x: auto; padding: 2px 2px var(--space-2); scrollbar-width: thin; }
.sport-pills a { --sport-color: var(--text-subtle); display: inline-flex; align-items: center; gap: var(--space-2); flex: none; min-height: var(--tap); padding: 0 var(--space-4) 0 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.sport-pills a:hover { border-color: var(--sport-color); }
.sport-pills a[aria-current] { border-color: var(--sport-color); background: color-mix(in srgb, var(--sport-color) 16%, var(--surface)); box-shadow: inset 0 0 0 1px var(--sport-color); }

/* Bottom tab bar (phones) */
.tab-bar { display: none; }
@media (max-width: 800px) {
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .site-header { flex-wrap: nowrap; height: 56px; padding: 0 var(--space-4); }
    .site-header .site-nav { display: none; }

    .site-portal { min-height: 36px; margin-bottom: 0; }
    .tab-bar { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); background: var(--brand-bg); border-top: 1px solid rgb(255 255 255 / .1); box-shadow: 0 -6px 20px rgb(10 35 66 / .18); }
    .tab-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; color: var(--brand-text-muted); font-size: 11px; font-weight: 600; }
    .tab-bar svg { width: 22px; height: 22px; stroke-width: 1.8; }
    .tab-bar a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 3px var(--accent); }
    .site-footer { padding-bottom: var(--space-6); }

    /* Bigger tap targets */
    .text-link, .site-footer a { display: inline-flex; align-items: center; min-height: var(--tap); }
    .pagination a, .pagination span { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-2); }
}
@media (max-width: 800px) {
    .section-heading { flex-wrap: wrap; }
    .site-brand { min-height: var(--tap); align-items: center; }
    .site-portal { min-height: 40px; }
    .association-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: var(--space-4); align-items: start; }
    .association-card .association-logo { grid-row: span 4; margin: 0; }
    .association-card > :not(.association-logo) { grid-column: 2; }
    .association-card p { margin: var(--space-1) 0 0; }
}

/* Dark theme: follows the device setting unless the visitor picks one with the theme button. */
:root { --button-bg: var(--color-ocean); --button-text: #ffffff; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0a1522; --surface: #111f2e; --surface-raised: #0e1a28; --surface-muted: #152535; --surface-accent: #172a3d; --surface-today: #143049;
        --text: #e7eef5; --text-muted: #a8b8c7; --text-subtle: #8fa2b4; --text-accent: #5fe0d6;
        --border: #24394d; --border-strong: #375168; --brand-bg: #06111e;
        --warning-text: #ffa585; --warning-bg: #36201a; --warning-border: #6b3828; --success-bg: #11301f; --record-text: #f5c518;
        --shadow-card: 0 6px 24px rgb(0 0 0 / .35); --scrim: rgb(0 0 0 / .6);
        --button-bg: var(--color-turquoise); --button-text: var(--color-ocean);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0a1522; --surface: #111f2e; --surface-raised: #0e1a28; --surface-muted: #152535; --surface-accent: #172a3d; --surface-today: #143049;
    --text: #e7eef5; --text-muted: #a8b8c7; --text-subtle: #8fa2b4; --text-accent: #5fe0d6;
    --border: #24394d; --border-strong: #375168; --brand-bg: #06111e;
    --warning-text: #ffa585; --warning-bg: #36201a; --warning-border: #6b3828; --success-bg: #11301f; --record-text: #f5c518;
    --shadow-card: 0 6px 24px rgb(0 0 0 / .35); --scrim: rgb(0 0 0 / .6);
    --button-bg: var(--color-turquoise); --button-text: var(--color-ocean);
    color-scheme: dark;
}
.button { background: var(--button-bg); color: var(--button-text); }
.hero { background: var(--brand-bg); }

/* Theme toggle */
.theme-toggle { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; margin-left: auto; border: 1px solid rgb(255 255 255 / .16); border-radius: var(--radius); background: transparent; color: var(--text-on-brand); cursor: pointer; }
.theme-toggle + .site-portal { margin-left: 0; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}
@media (max-width: 800px) { .theme-toggle { width: var(--tap); height: var(--tap); } .site-header { gap: var(--space-2); } }
.theme-toggle[hidden] { display: none; }

/* SVG sport icons (Tabler and Lucide outlines, see resources/svg/sports) */
.sport-icon { color: color-mix(in srgb, var(--sport-color, var(--text-muted)) 72%, var(--text)); }
.sport-icon svg { width: 64%; height: 64%; stroke-width: 2.1; }
.inline-icon { display: inline-flex; vertical-align: -.15em; color: var(--sport-color, currentColor); }
.inline-icon svg { width: 1.05em; height: 1.05em; }
.hero .inline-icon { color: inherit; }
.sport-pills .sport-icon { font-size: 18px; }
.sport-tag .sport-icon { font-size: 14px; }

/* Weather: header button and 7-day forecast panel */
.weather-toggle { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; margin-left: auto; padding: 0 10px; border: 1px solid rgb(255 255 255 / .16); border-radius: var(--radius); background: transparent; color: var(--text-on-brand); font: 600 14px var(--font-body); cursor: pointer; }
.weather-toggle:hover, .theme-toggle:hover { background: rgb(255 255 255 / .08); }
.weather-toggle svg { width: 20px; height: 20px; color: var(--color-gold); }
.weather-toggle ~ .theme-toggle { margin-left: 0; }
.site-header { column-gap: var(--space-2); }
.site-nav { margin-right: var(--space-5); }
.site-brand { margin-right: var(--space-5); }
.weather-panel { position: fixed; inset: calc(var(--header-height) + 8px) 16px auto auto; width: min(360px, calc(100vw - 32px)); margin: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 18px 50px rgb(10 35 66 / .25); }
.weather-panel::backdrop { background: transparent; }
.weather-panel header { position: relative; margin-bottom: var(--space-3); padding-right: 40px; }
.weather-panel h2 { font-size: 24px; }
.weather-panel header p { margin: 2px 0 0; color: var(--text-muted); font-size: var(--text-sm); }
.weather-panel header button { position: absolute; top: -6px; right: -6px; width: var(--tap); height: var(--tap); border: 0; background: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }
.weather-days { list-style: none; margin: 0; padding: 0; max-height: min(60vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.weather-days li.weather-outlook-heading { display: block; min-height: 0; padding: 10px 0 6px; color: var(--text-muted); font: 600 11px var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.weather-days li.is-outlook { opacity: .8; }
.weather-badge.is-outlook { opacity: .75; }
.weather-days li { display: grid; grid-template-columns: 64px 24px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--border); font-size: var(--text-sm); }
.weather-day-name { font-weight: 600; }
.weather-day-icon { width: 22px; height: 22px; color: var(--text-accent); }
.weather-day-label { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.weather-day-rain { display: inline-flex; align-items: center; gap: 3px; color: var(--text-muted); font: 12px var(--font-mono); }
.weather-day-rain svg { width: 13px; height: 13px; }
.weather-day-temp { min-width: 58px; font: 13px var(--font-mono); text-align: right; color: var(--text-muted); }
.weather-day-temp strong { color: var(--text); font-weight: 500; }
.weather-credit { margin: var(--space-3) 0 0; color: var(--text-muted); font-size: 11px; }
.weather-credit a { text-decoration: underline; }
.weather-badge { display: inline-flex; align-items: center; gap: 3px; color: var(--text-muted); font: 500 11px var(--font-mono); white-space: nowrap; }
.weather-badge svg { width: 14px; height: 14px; color: var(--text-accent); }
.forecast-fact { display: flex; align-items: center; gap: 6px; }
.forecast-fact svg { flex: none; width: 18px; height: 18px; color: var(--text-accent); }
@media (max-width: 800px) {
    .weather-toggle { height: var(--tap); padding: 0 8px; }
    .weather-panel { inset: 64px 12px auto 12px; width: auto; }
}
@media (max-width: 380px) { .site-portal { font-size: 11px; padding: 0 8px; } }
@media (max-width: 800px) { .site-header .site-brand { margin-right: 0; } }

/* Install banner (installable app) */
.install-banner { position: fixed; left: 50%; bottom: var(--space-4); z-index: 45; display: flex; align-items: center; gap: var(--space-3); width: min(520px, calc(100vw - 32px)); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); transform: translateX(-50%); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgb(10 35 66 / .22); }
.install-banner[hidden] { display: none; }
.install-banner img { flex: none; border-radius: 10px; }
.install-message { flex: 1; margin: 0; font-size: 14px; line-height: 1.4; }
.install-action { flex: none; min-height: 40px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius); background: var(--button-bg); color: var(--button-text); font-weight: 700; cursor: pointer; }
.install-action[hidden] { display: none; }
.install-dismiss { flex: none; width: 40px; height: 40px; border: 0; background: none; color: var(--text-muted); font-size: 22px; cursor: pointer; }
@media (max-width: 800px) { .install-banner { bottom: calc(72px + env(safe-area-inset-bottom)); } }
@media (display-mode: standalone) { .site-header { padding-top: env(safe-area-inset-top); height: auto; min-height: var(--header-height); } }

/* Mobile alignment fixes (360-414 px phones) */
.portal-short { display: none; }
@media (max-width: 800px) {
    .site-header { gap: var(--space-2); padding: 0 var(--space-3); }
    .site-brand { font-size: 22px; }
    .host-link { display: inline-flex; align-items: center; min-height: var(--tap); }
    .install-banner { gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); }
    .install-banner img { width: 32px; height: 32px; }
    .install-message { font-size: 13px; }
}
@media (max-width: 420px) {
    .portal-long { display: none; }
    .portal-short { display: inline; }
    .site-portal { padding: 0 10px; }
    .weather-toggle { padding: 0 6px; gap: 4px; font-size: 13px; }
    .weather-toggle svg { width: 18px; height: 18px; }
    .theme-toggle { width: 40px; height: 40px; }
    .weather-panel { inset: 64px 8px auto 8px; padding: var(--space-3); }
    .weather-days li { grid-template-columns: 52px 22px minmax(0, 1fr) auto auto; gap: 6px; }
    .weather-day-temp { min-width: 0; }
}
@media (max-width: 360px) {
    .weather-day-label { display: none; }
    .weather-days li { grid-template-columns: 56px 22px 1fr auto; }
}
.site-footer .site-brand span { color: var(--accent); font-size: inherit; }
.site-footer .site-brand small { font-size: 9px; }
@media (max-width: 800px) {
    .event-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: var(--space-1) var(--space-3); }
    .event-card .date-block { grid-row: span 2; }
    .event-card .event-info h3 { font-size: 22px; }
    .event-card .event-meta { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 4px; margin-left: 0; font-size: 13px; }
    .event-card .event-meta span::after { content: ":"; }
    .profile-heading { margin: var(--space-6) 0 var(--space-3); }
    .detail-grid { gap: var(--space-4); }
    .association-hero { gap: var(--space-3); }
}

/* Event sponsors: logo, name and website (slide-out panel and event page). */
.sponsor-list { display: grid; gap: var(--space-2); margin: var(--space-2) 0; padding: 0; list-style: none; }
.sponsor-item { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; color: var(--text); text-decoration: none; }
a.sponsor-item:hover strong { text-decoration: underline; }
.sponsor-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: #627080; font: 800 18px var(--font-display); }
.sponsor-logo img { width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.sponsor-text { display: grid; min-width: 0; }
.sponsor-text strong { font-size: 14px; font-weight: 600; }
.sponsor-text small { overflow: hidden; color: var(--text-accent); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
