:root {
    --ink: #101b19;
    --blue: #164b3a;
    --sky: #70c4e5;
    --ice: #eef6f5;
    --red: #f2c230;
    --red-dark: #d4a514;
    --white: #ffffff;
    --muted: #62736f;
    --line: #d7e5e1;
    --shadow: 0 18px 50px rgba(16, 27, 25, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--ice);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: relative;
    min-height: 82px;
    padding: 0 clamp(24px, 6vw, 92px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    color: var(--white);
    background: var(--ink);
}

.site-header::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--sky) 0 34%,
        var(--red) 34% 67%,
        var(--blue) 67% 100%
    );
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    letter-spacing: 0.06em;
}

.brand-mark {
    width: 45px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 900;
    font-style: italic;
    color: var(--ink);
    background: var(--red);
    clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 2px;
    color: #9fb1c9;
    font-size: 0.67rem;
}

.club-family {
    display: grid;
    grid-template-columns: auto auto auto auto auto;
    gap: 7px;
    align-items: baseline;
    color: #91a2b7;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.club-family strong {
    color: var(--white);
    font-size: 0.7rem;
}

.club-family i {
    margin: 0 5px;
    color: var(--red);
    font-size: 1rem;
    font-style: normal;
    font-weight: 900;
}

nav {
    display: flex;
    gap: 30px;
    color: #b8c5d5;
    font-size: 0.88rem;
    font-weight: 700;
}

nav a:hover,
nav a.active {
    color: var(--white);
}

.logout-link {
    padding: 8px 11px;
    margin: -8px 0;
    color: var(--red);
    border: 1px solid rgba(242, 194, 48, 0.45);
    border-radius: 999px;
}

.logout-link:hover {
    color: var(--ink);
    background: var(--red);
}

.ios-install-hint {
    display: none;
}

.ios-install-hint.is-visible {
    position: sticky;
    z-index: 20;
    top: 0;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    color: var(--ink);
    background: var(--red);
    box-shadow: 0 8px 25px rgba(16, 27, 25, 0.18);
    font-size: 0.78rem;
}

.ios-install-hint span {
    color: #3b392d;
}

.ios-install-hint button {
    width: 30px;
    height: 30px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.35);
    border: 0;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
}

main {
    min-height: calc(100vh - 160px);
}

.logout-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--white);
    background:
        radial-gradient(circle at 20% 20%, rgba(112, 196, 229, 0.18), transparent 32%),
        radial-gradient(circle at 80% 12%, rgba(242, 194, 48, 0.18), transparent 28%),
        var(--ink);
}

.logout-card {
    width: min(100%, 520px);
    padding: 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.logout-card .brand-mark {
    margin-bottom: 26px;
}

.logout-card h1 {
    font-size: clamp(2.2rem, 7vw, 4.4rem);
    line-height: 0.94;
}

.logout-card p:not(.eyebrow) {
    margin: 22px 0 28px;
    color: #c6d2df;
    line-height: 1.65;
}

.logout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 490px;
    padding: 88px clamp(24px, 8vw, 130px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 70px;
    color: var(--white);
    background:
        linear-gradient(110deg, rgba(16, 27, 25, 0.99) 35%, rgba(22, 75, 58, 0.92)),
        repeating-linear-gradient(120deg, transparent 0 35px, rgba(255,255,255,0.035) 35px 37px);
}

.hero::after {
    content: "H";
    position: absolute;
    right: -30px;
    bottom: -150px;
    color: rgba(255, 255, 255, 0.035);
    font-size: 40rem;
    font-weight: 1000;
    font-style: italic;
    line-height: 1;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--red);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.2em;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 7vw, 6.2rem);
    line-height: 0.91;
    letter-spacing: -0.055em;
    text-transform: uppercase;
}

.hero h1 em {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--sky);
    font-style: normal;
}

.hero-copy {
    max-width: 610px;
    margin: 28px 0 34px;
    color: #c3cfdd;
    font-size: 1.08rem;
    line-height: 1.7;
}

.button {
    display: inline-flex;
    min-height: 48px;
    padding: 0 23px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 3px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.button-primary {
    color: var(--ink);
    background: var(--red);
    box-shadow: 0 10px 28px rgba(242, 194, 48, 0.22);
}

.button-primary:hover {
    background: var(--red-dark);
}

.event-card {
    min-width: 270px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(8px);
}

.event-number {
    color: var(--red);
    font-size: 4rem;
    font-weight: 950;
    line-height: 1;
}

.event-card small,
.event-card strong,
.event-card div > span {
    display: block;
}

.event-card small {
    color: #9fb1c9;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
}

.event-card strong {
    margin-top: 5px;
    font-size: 1.25rem;
}

.event-card div > span {
    color: #c3cfdd;
    font-size: 0.86rem;
}

.stats {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: -42px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.stats article {
    padding: 25px 32px;
    background: var(--white);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.stats article:first-child {
    border-top: 4px solid var(--red);
}

.stats article > span,
.stats small {
    display: block;
    color: var(--muted);
    font-size: 0.73rem;
}

.stats strong {
    display: block;
    margin: 4px 0;
    font-size: 2rem;
}

.workspace {
    max-width: 1120px;
    margin: 88px auto;
    padding: 0 24px;
}

.section-heading {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

h2,
h3 {
    margin: 0;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -0.04em;
}

.status-pill,
.category {
    padding: 7px 10px;
    color: #153f4f;
    background: #dff3fa;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 800;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
    gap: 22px;
    align-items: start;
}

.panel {
    min-height: 430px;
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.participant-row {
    padding: 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
}

.avatar {
    width: 44px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--blue);
    font-size: 0.8rem;
    font-weight: 900;
}

.team-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.team-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.team-logo-huskys {
    background: #050505;
}

.team-logo-huskys img {
    transform: scale(1.18);
}

.team-logo-ehc img {
    transform: scale(1.1);
}

.participant-row strong,
.participant-row small {
    display: block;
}

.participant-row small {
    margin-top: 3px;
    color: var(--muted);
}

.participant-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.delete-button {
    padding: 6px 9px;
    color: #8c2b2b;
    background: #fff1f1;
    border: 1px solid #f0cccc;
    border-radius: 4px;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.delete-button:hover {
    color: var(--white);
    background: #a52b2b;
    border-color: #a52b2b;
}

.empty-state {
    min-height: 370px;
    display: grid;
    place-content: center;
    text-align: center;
}

.empty-state > span {
    color: var(--line);
    font-size: 5rem;
    font-weight: 950;
}

.empty-state p,
.coming-soon > p:last-child {
    color: var(--muted);
}

.form-panel {
    display: grid;
    gap: 17px;
}

.form-panel .eyebrow {
    margin-bottom: -8px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 45px;
    padding: 0 12px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 3px;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(22, 61, 115, 0.22);
    border-color: var(--blue);
}

textarea {
    min-height: 92px;
    padding-block: 12px;
    line-height: 1.55;
    resize: vertical;
}

.homepage-save-confirmation {
    max-width: 1120px;
    margin-bottom: 18px;
}

.homepage-editor {
    gap: 28px;
}

.editor-section {
    padding-top: 24px;
    display: grid;
    gap: 17px;
    border-top: 1px solid var(--line);
}

.editor-section .eyebrow {
    margin-bottom: 0;
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.editor-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.homepage-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.editor-preview-link {
    color: var(--ink);
    border-color: var(--line);
    background: var(--white);
}

.editor-preview-link:hover {
    background: #f1f6f5;
}

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

.discipline-row {
    padding: 16px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.discipline-edit-row {
    align-items: end;
}

.discipline-edit-fields {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(80px, 0.45fr) minmax(170px, 0.8fr);
    gap: 12px;
}

.discipline-edit-fields input,
.discipline-edit-fields select {
    min-height: 40px;
}

.discipline-save-button {
    min-height: 40px;
    padding-inline: 14px;
    font-size: 0.72rem;
}

.discipline-index {
    color: var(--red);
    font-size: 1.5rem;
    font-weight: 950;
}

.discipline-row strong,
.discipline-row small {
    display: block;
}

.discipline-row small {
    margin-top: 4px;
    color: var(--muted);
}

.unit {
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.results-section {
    padding: 82px 24px;
    color: var(--white);
    background: var(--ink);
}

.results-inner {
    max-width: 1072px;
    margin: 0 auto;
}

.quick-result {
    margin-bottom: 34px;
    padding: 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.quick-result label {
    color: #aebdd0;
}

.setup-note {
    padding: 20px;
    color: #c3cfdd;
    border-left: 3px solid var(--red);
    background: rgba(255, 255, 255, 0.06);
}

.export-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.export-button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.72rem;
    text-decoration: none;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.live-sync {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b9d8cf;
    font-size: 0.72rem;
    font-weight: 800;
}

.live-sync i {
    width: 9px;
    height: 9px;
    background: #43d48b;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(67, 212, 139, 0.12);
}

.live-sync.is-offline {
    color: #f1baba;
}

.live-sync.is-offline i {
    background: #e05a5a;
    box-shadow: 0 0 0 5px rgba(224, 90, 90, 0.12);
}

.live-updated {
    animation: live-result-pulse 0.8s ease;
}

@keyframes live-result-pulse {
    40% {
        color: #168353;
        transform: scale(1.12);
    }
}

.leaderboard {
    padding: 24px;
    color: var(--ink);
    background: var(--white);
}

.leaderboard header {
    padding-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    border-bottom: 2px solid var(--ink);
}

.leaderboard header small {
    color: var(--red);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.leaderboard header > span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.leaderboard ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.leaderboard-categories {
    display: grid;
    gap: 16px;
}

.leaderboard-category {
    padding-top: 14px;
}

.leaderboard-category + .leaderboard-category {
    border-top: 2px solid var(--line);
}

.leaderboard-category-title {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.leaderboard-category-title h4 {
    margin: 0;
    padding: 5px 9px;
    color: #153f4f;
    background: #dff3fa;
    border-radius: 99px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.leaderboard-category-title span {
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 750;
}

.leaderboard li {
    min-height: 53px;
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.rank {
    color: var(--red);
    font-weight: 950;
}

.athlete {
    font-size: 0.9rem;
    font-weight: 700;
}

.no-results {
    margin: 25px 0 5px;
    color: var(--muted);
}

footer {
    padding: 28px clamp(24px, 6vw, 92px);
    display: flex;
    justify-content: space-between;
    color: #91a2b7;
    background: var(--ink);
    font-size: 0.78rem;
}

.public-body {
    background: #f4f8f7;
}

.public-header {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 0;
    left: 0;
    min-height: 92px;
    padding: 16px clamp(24px, 6vw, 92px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.public-brand img {
    width: 58px;
    height: 58px;
    display: block;
    object-fit: contain;
    background: #050505;
    border-radius: 10px;
}

.public-brand strong,
.public-brand small {
    display: block;
}

.public-brand strong {
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: 0.12em;
}

.public-brand small {
    margin-top: 3px;
    color: #aebeb9;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.public-nav {
    align-items: center;
}

.public-nav-cta {
    padding: 11px 15px;
    color: var(--ink);
    background: var(--red);
    border-radius: 3px;
}

.public-nav .public-nav-cta:hover {
    color: var(--ink);
    background: var(--red-dark);
}

.public-hero {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    padding: 165px clamp(24px, 8vw, 130px) 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 70px;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 35%, rgba(112, 196, 229, 0.2), transparent 26%),
        linear-gradient(115deg, #0a1412 25%, #123a30 72%, #164b3a);
}

.public-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background:
        linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, 0.1) 48% 48.2%, transparent 48.2%),
        repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 48px);
}

.public-hero::after {
    content: "S";
    position: absolute;
    right: -85px;
    bottom: -210px;
    color: rgba(255, 255, 255, 0.04);
    font-size: 43rem;
    font-weight: 1000;
    font-style: italic;
    line-height: 1;
}

.public-hero-content,
.public-season-card {
    position: relative;
    z-index: 1;
}

.public-hero-content {
    max-width: 850px;
}

.public-hero h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(4rem, 9vw, 8rem);
    line-height: 0.84;
    letter-spacing: -0.065em;
    text-transform: uppercase;
}

.public-hero-content > p:not(.eyebrow) {
    max-width: 610px;
    margin: 32px 0;
    color: #c1d0cc;
    font-size: 1.12rem;
    line-height: 1.75;
}

.public-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.05);
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.public-season-card {
    min-width: 230px;
    padding: 31px 30px;
    display: grid;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(9px);
}

.public-season-card span,
.public-season-card small {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.19em;
}

.public-season-card span {
    color: var(--sky);
}

.public-season-card strong {
    color: var(--red);
    font-size: 8rem;
    font-weight: 1000;
    letter-spacing: -0.09em;
    line-height: 0.9;
}

.public-season-card small {
    margin-top: 12px;
    color: #c1d0cc;
}

.public-facts {
    position: relative;
    z-index: 3;
    width: min(100% - 48px, 1080px);
    margin: -48px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--white);
    box-shadow: var(--shadow);
}

.public-facts article {
    padding: 28px 36px;
    display: flex;
    align-items: baseline;
    gap: 13px;
    border-right: 1px solid var(--line);
}

.public-facts article:first-child {
    border-top: 4px solid var(--red);
}

.public-facts article:last-child {
    border-right: 0;
}

.public-facts strong {
    color: var(--blue);
    font-size: 2.5rem;
    font-weight: 950;
}

.public-facts span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.public-intro,
.public-clubs {
    max-width: 1120px;
    margin: 0 auto;
    padding: 130px 24px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(50px, 10vw, 150px);
    align-items: start;
}

.public-intro h2,
.public-clubs h2,
.public-rankings h2 {
    font-size: clamp(3rem, 6vw, 5.4rem);
    line-height: 0.92;
    text-transform: uppercase;
}

.public-intro-copy > p,
.public-club-copy > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.public-principles {
    margin-top: 38px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.public-principles span {
    padding: 20px 10px 20px 0;
    display: grid;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.public-principles b {
    color: var(--red-dark);
    font-size: 0.68rem;
}

.public-rankings {
    padding: 105px max(24px, calc((100vw - 1072px) / 2));
    color: var(--white);
    background:
        linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
        var(--ink);
}

.public-section-heading {
    margin-bottom: 35px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.public-rankings .leaderboard {
    border-top: 4px solid var(--red);
}

.public-empty-results {
    padding: 55px;
    color: var(--ink);
    background: var(--white);
}

.public-empty-results strong {
    font-size: 1.5rem;
}

.public-empty-results p {
    margin-bottom: 0;
    color: var(--muted);
}

.public-clubs {
    align-items: center;
}

.public-club-logos {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.public-club-logos article {
    min-width: 0;
    padding: 22px;
    display: grid;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.public-club-logos img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.public-club-logos article:first-child img {
    background: #050505;
    border-radius: 9px;
}

.public-club-logos span {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.public-club-logos strong {
    margin-top: 4px;
    font-size: 0.9rem;
}

.public-club-logos > i {
    color: var(--red-dark);
    font-size: 1.6rem;
    font-style: normal;
    font-weight: 950;
}

.public-footer {
    min-height: 115px;
    align-items: center;
    border-top: 4px solid var(--red);
}

.public-brand-small img {
    display: none;
}

.public-footer > div {
    display: flex;
    gap: 24px;
    font-weight: 800;
}

.public-footer a:hover {
    color: var(--white);
}

.station-body {
    min-height: 100vh;
    background: #e7efed;
}

.station-body main {
    min-height: calc(100vh - 74px);
}

.station-header {
    position: sticky;
    z-index: 10;
    top: 0;
    min-height: 74px;
    padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    background: var(--ink);
    border-bottom: 4px solid var(--red);
}

.station-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.station-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #000;
    border-radius: 9px;
}

.station-brand small,
.station-brand strong {
    display: block;
}

.station-brand small {
    color: var(--sky);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.station-brand strong {
    margin-top: 2px;
    font-size: 1rem;
}

.station-admin-link {
    padding: 8px 10px;
    color: #b8c8c4;
    font-size: 0.7rem;
    font-weight: 800;
}

.station-shell {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 20px 16px calc(40px + env(safe-area-inset-bottom));
}

.save-confirmation {
    margin-bottom: 14px;
    padding: 13px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    color: #0c442e;
    background: #ccebd9;
    border: 1px solid #9fd4b5;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 850;
}

.save-confirmation span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: #168353;
    border-radius: 50%;
}

.station-selector,
.station-form,
.station-recent,
.station-setup {
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(16, 27, 25, 0.08);
}

.station-selector {
    margin-bottom: 14px;
}

.station-selector > label,
.station-form > label {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.station-selector select,
.station-form select {
    min-height: 56px;
    color: var(--ink);
    background: #f5f8f7;
    border: 2px solid var(--line);
    font-size: 1rem;
    font-weight: 750;
}

.station-rule {
    margin-top: 13px;
    padding: 11px 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--white);
    background: var(--blue);
    border-radius: 6px;
}

.station-rule strong {
    font-size: 0.84rem;
}

.station-rule span {
    color: #c9ded8;
    font-size: 0.72rem;
}

.station-form {
    display: grid;
    gap: 12px;
}

.station-form > label:not(:first-of-type) {
    margin-top: 10px;
}

.station-value-field {
    position: relative;
}

.station-value-field input {
    min-height: 86px;
    padding: 0 92px 0 17px;
    color: var(--ink);
    background: #f5f8f7;
    border: 3px solid var(--line);
    font-size: clamp(2.1rem, 11vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.station-value-field input:focus {
    border-color: var(--sky);
    outline: 4px solid rgba(112, 196, 229, 0.2);
}

.station-value-field span {
    position: absolute;
    top: 50%;
    right: 18px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    transform: translateY(-50%);
}

.station-save-button {
    min-height: 66px;
    margin-top: 8px;
    padding: 0 21px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink);
    background: var(--red);
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: 1rem;
    font-weight: 950;
    cursor: pointer;
}

.station-save-button:active {
    transform: translateY(1px);
}

.station-save-button strong {
    font-size: 1.5rem;
}

.station-recent {
    margin-top: 14px;
}

.station-section-heading {
    margin-bottom: 15px;
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.station-section-heading .eyebrow {
    margin-bottom: 4px;
}

.station-section-heading h2 {
    font-size: 1.45rem;
}

.station-section-heading > span {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: #dff3fa;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 900;
}

.station-result-list {
    display: grid;
}

.station-result-list article {
    padding: 13px 0;
    display: grid;
    grid-template-columns: 26px 1fr auto;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--line);
}

.station-result-number {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
}

.station-result-list strong,
.station-result-list small {
    display: block;
}

.station-result-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.68rem;
}

.station-result-list b {
    color: var(--blue);
    font-size: 0.9rem;
}

.station-edit-button {
    grid-column: 2 / -1;
    justify-self: end;
    padding: 5px 8px;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 4px;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 850;
}

.station-empty {
    padding: 35px 15px;
    display: grid;
    gap: 6px;
    text-align: center;
    color: var(--muted);
    border: 2px dashed var(--line);
    border-radius: 8px;
}

.station-empty strong {
    color: var(--ink);
}

.station-setup {
    margin-top: 40px;
}

.station-setup h1 {
    font-size: 2rem;
}

.station-setup p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 800px) {
    .public-header {
        min-height: 80px;
    }

    .public-brand img {
        width: 48px;
        height: 48px;
    }

    .public-nav a:not(.public-nav-cta) {
        display: none;
    }

    .public-hero {
        min-height: 760px;
        padding-top: 145px;
        align-items: flex-start;
        flex-direction: column;
        gap: 50px;
    }

    .public-season-card {
        min-width: 0;
        width: 100%;
        grid-template-columns: auto 1fr auto;
        align-items: end;
        gap: 16px;
    }

    .public-season-card strong {
        justify-self: center;
        font-size: 5rem;
    }

    .public-season-card small {
        margin: 0;
    }

    .public-intro,
    .public-clubs {
        padding-block: 90px;
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .site-header {
        padding-block: 17px;
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        width: 100%;
        gap: 18px;
        overflow-x: auto;
    }

    .club-family {
        display: none;
    }

    .hero {
        padding-block: 65px 95px;
        align-items: flex-start;
        flex-direction: column;
    }

    .event-card {
        width: 100%;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .editor-grid,
    .editor-grid-three {
        grid-template-columns: 1fr;
    }

    .discipline-edit-row,
    .discipline-edit-fields {
        grid-template-columns: 1fr;
    }

    .quick-result {
        grid-template-columns: 1fr 1fr;
    }

    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .public-header {
        padding-inline: 18px;
    }

    .public-brand small {
        display: none;
    }

    .public-nav {
        width: auto;
    }

    .public-nav-cta {
        padding: 10px 12px;
        font-size: 0.72rem;
    }

    .public-hero {
        min-height: 700px;
        padding: 130px 20px 90px;
    }

    .public-hero h1 {
        font-size: 3.65rem;
    }

    .public-hero-content > p:not(.eyebrow) {
        font-size: 1rem;
    }

    .public-season-card {
        padding: 22px;
    }

    .public-facts {
        width: calc(100% - 32px);
        margin-top: -30px;
        grid-template-columns: 1fr;
    }

    .public-facts article {
        padding: 16px 22px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .public-facts strong {
        min-width: 58px;
        font-size: 2rem;
    }

    .public-intro,
    .public-clubs {
        padding: 75px 20px;
    }

    .public-intro h2,
    .public-clubs h2,
    .public-rankings h2 {
        font-size: 2.8rem;
    }

    .public-principles {
        grid-template-columns: 1fr;
    }

    .public-principles span {
        grid-template-columns: 34px 1fr;
        border-bottom: 1px solid var(--line);
    }

    .public-rankings {
        padding: 75px 16px;
    }

    .public-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-club-logos {
        gap: 8px;
    }

    .public-club-logos article {
        padding: 10px;
    }

    .public-club-logos > i {
        font-size: 1rem;
    }

    .public-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .ios-install-hint.is-visible {
        grid-template-columns: 1fr auto;
    }

    .ios-install-hint span {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .ios-install-hint button {
        grid-column: 2;
        grid-row: 1;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .stats {
        margin-top: -28px;
    }

    .quick-result {
        grid-template-columns: 1fr;
    }

    .section-heading,
    footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .export-actions {
        justify-content: flex-start;
    }

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

    .participant-actions {
        grid-column: 2;
        justify-content: space-between;
    }
}
