:root {
    --platform-amber: #e7bd6a;
    --platform-teal: #89c9ae;
    --platform-red: #b84f49;
    --platform-blue: #7fb2c6;
}

.hub-page {
    min-height: 100dvh;
    overflow-x: hidden;
}

.site-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.site-header-actions > a {
    min-height: 36px;
    padding: 0 0.72rem;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(167, 224, 197, 0.28);
    border-radius: 4px;
    color: #e7f0ec;
    background: rgba(7, 15, 16, 0.72);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 780;
}

.site-header-actions > a:hover,
.site-header-actions > a:focus-visible {
    border-color: var(--platform-amber);
    color: var(--platform-amber);
}

.front-desk-entry {
    border-color: var(--platform-amber);
    color: #171006;
    background: var(--platform-amber);
}

.age-start-actions .under-18-start,
.age-start-actions .adult-start {
    min-height: 78px;
    display: grid;
    align-content: center;
    gap: 5px;
    text-align: left;
}

.age-start-actions .under-18-start {
    border-color: #8ac6b7;
    color: #06100d;
    background: #8ac6b7;
}

.age-start-actions .adult-start {
    border-color: #d5af6a;
    color: #fff8e9;
    background: #6d3f27;
}

.age-start-actions a strong {
    font-size: 0.96rem;
    line-height: 1.2;
}

.age-start-actions a span {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
}

.hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    min-height: min(760px, calc(100dvh - 80px));
    padding: clamp(3rem, 8vw, 7rem) 0 4rem;
}

.hub-copy h2 {
    max-width: 880px;
    margin: 0 0 1.25rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.3rem, 9vw, 7.7rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.86;
}

.hub-copy h2 span {
    display: block;
    color: transparent;
    background: linear-gradient(135deg, #f1f6f3 12%, #91cfb3 70%, #d9b66a 110%);
    background-clip: text;
}

.hub-primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.7rem;
}

.capability-summary {
    min-height: 1.4rem;
    margin-top: 1rem;
    color: #879b95;
    font-size: 0.82rem;
}

.admissions-board {
    position: relative;
    border: 1px solid rgba(169, 211, 194, 0.22);
    border-radius: 7px;
    padding: 0.9rem;
    background:
        linear-gradient(rgba(3, 8, 9, 0.93), rgba(9, 17, 18, 0.97)),
        repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.02) 3px 4px);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), inset 0 0 50px rgba(81, 145, 118, 0.05);
    transform: rotate(0.65deg);
}

.admissions-board::before,
.admissions-board::after {
    position: absolute;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    content: "";
    background: #252e2c;
    box-shadow: inset 0 1px 2px #000, 0 0 0 1px rgba(255,255,255,.05);
}

.admissions-board::before {
    top: 11px;
    left: 11px;
}

.admissions-board::after {
    right: 11px;
    bottom: 11px;
}

.board-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(167, 224, 197, 0.18);
    padding: 0.75rem 1rem 0.9rem;
    color: #92aaa2;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
}

.admissions-board ul {
    display: grid;
    gap: 0.62rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.admissions-board li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(140, 182, 165, 0.12);
    border-radius: 4px;
    padding: 0.8rem 1rem;
    color: #b7c7c2;
    background: rgba(120, 175, 151, 0.035);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.admissions-board li strong {
    color: #9ae0be;
    text-align: right;
}

.admissions-board > p {
    margin: 0;
    padding: 0.4rem 1rem 0.8rem;
    color: #778983;
    font-size: 0.78rem;
    line-height: 1.55;
}

.portal-section {
    padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.section-heading-row h2,
.ward-admissions-copy h2,
.challenge-intro h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
}

.section-heading-row > p {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.game-portal {
    position: relative;
    display: grid;
    min-height: 500px;
    overflow: hidden;
    border: 1px solid rgba(167, 224, 197, 0.2);
    border-radius: 4px 4px 18px 18px;
    color: var(--text);
    text-decoration: none;
    background:
        linear-gradient(155deg, rgba(24, 38, 38, 0.94), rgba(5, 10, 11, 0.98)),
        repeating-linear-gradient(90deg, transparent 0 42px, rgba(255,255,255,.01) 42px 43px);
    box-shadow: 0 24px 62px rgba(0,0,0,.38), inset 0 0 60px rgba(108, 184, 149, .035);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-portal::before {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(220, 235, 229, 0.07);
    border-radius: 2px 2px 11px 11px;
    content: "";
    pointer-events: none;
}

.game-portal::after {
    position: absolute;
    top: 50%;
    right: 22px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    content: "";
    background: var(--portal-accent, var(--platform-teal));
    box-shadow: 0 0 12px color-mix(in srgb, var(--portal-accent, var(--platform-teal)) 65%, transparent);
}

.game-portal:hover,
.game-portal:focus-visible {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--portal-accent, var(--platform-teal)) 55%, transparent);
    box-shadow: 0 32px 80px rgba(0,0,0,.48), inset 0 0 90px rgba(108, 184, 149, .055);
}

.game-portal.is-unavailable {
    filter: saturate(0.45);
    opacity: 0.76;
}

.portal-intake { --portal-accent: #b9e8cd; }
.portal-ward { --portal-accent: #91cdb0; }

.portal-number {
    position: absolute;
    top: 1.15rem;
    left: 1.2rem;
    z-index: 1;
    color: var(--portal-accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.portal-light {
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 3px;
    background: var(--portal-accent);
    box-shadow: 0 0 22px var(--portal-accent);
    opacity: 0.7;
}

.portal-content {
    align-self: end;
    position: relative;
    z-index: 1;
    padding: 4.5rem 2rem 2rem;
}

.portal-category {
    margin-bottom: 0.55rem;
    color: var(--portal-accent);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.portal-content h3 {
    margin-bottom: 0.8rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.portal-content > p:not(.portal-category) {
    color: #a7b8b2;
    line-height: 1.55;
}

.portal-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 1.2rem 0;
}

.portal-facts div {
    min-width: 0;
    border-left: 2px solid color-mix(in srgb, var(--portal-accent, var(--platform-teal)) 55%, transparent);
    padding-left: 0.55rem;
}

.portal-facts dt {
    color: #70817c;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portal-facts dd {
    margin: 0.25rem 0 0;
    color: #d7e2de;
    font-size: 0.78rem;
    font-weight: 700;
}

.portal-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.portal-inputs span {
    border: 1px solid rgba(210, 228, 220, 0.12);
    border-radius: 999px;
    padding: 0.34rem 0.48rem;
    color: #9eafaa;
    font-size: 0.65rem;
}

.portal-status {
    display: inline-block;
    margin-top: 1.2rem;
    color: var(--portal-accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ward-admissions {
    display: grid;
    grid-template-columns: minmax(340px, 0.76fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 7vw, 6rem);
    align-items: start;
    padding: clamp(0.65rem, 2vw, 1.25rem) 0 clamp(3rem, 6vw, 5rem);
}

.ward-admissions.is-focused {
    display: block;
    min-height: calc(100dvh - 154px);
    padding: clamp(0.65rem, 2vw, 1.25rem) 0;
}

.ward-admissions.is-focused .entry-panel {
    width: min(100%, 580px);
    margin: 0 auto;
}

.ward-admissions.is-focused .action-grid {
    grid-template-columns: 1fr;
}

.admission-back-link {
    display: inline-flex;
    margin-bottom: 1.35rem;
    color: #a9beb7;
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.admission-back-link:hover,
.admission-back-link:focus-visible,
.entry-route-action a:hover,
.entry-route-action a:focus-visible {
    color: var(--platform-amber);
}

.entry-route-summary {
    margin: 0.65rem 0 1.25rem;
    color: var(--muted);
    line-height: 1.55;
}

.entry-route-action {
    margin: 1.15rem 0 0;
    color: #91a49e;
    font-size: 0.85rem;
    text-align: center;
}

.entry-route-action a {
    color: #b9dfce;
    font-weight: 760;
}

.action-grid[hidden],
.join-box[hidden] {
    display: none;
}

.adult-ai-notice {
    margin: 1rem 0 0;
    border: 1px solid rgba(231, 189, 106, 0.22);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    color: #d8caa9;
    background: rgba(89, 63, 19, 0.14);
    font-size: 0.8rem;
    line-height: 1.5;
}

.ward-admissions-copy > p:not(.eyebrow) {
    max-width: 620px;
    margin-top: 1.2rem;
    color: var(--muted);
    line-height: 1.7;
}

.ward-feature-list {
    display: grid;
    gap: 0.65rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.ward-feature-list li {
    position: relative;
    padding-left: 1.4rem;
    color: #c1d0cb;
}

.ward-feature-list li::before {
    position: absolute;
    top: 0.48em;
    left: 0;
    width: 7px;
    height: 7px;
    border: 1px solid var(--accent);
    content: "";
    transform: rotate(45deg);
}

.hub-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--line);
    padding: 1.25rem 0 2.5rem;
    color: #6f817c;
    font-size: 0.75rem;
}

.hub-footer p {
    margin: 0;
}

@media (max-width: 1000px) {
    .portal-grid {
        grid-template-columns: 1fr;
    }

    .game-portal {
        min-height: 330px;
    }
}

@media (max-width: 820px) {
    .site-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .site-header-actions {
        flex-wrap: wrap;
    }

    .hub-hero,
    .ward-admissions {
        grid-template-columns: 1fr;
    }

    .hub-hero {
        min-height: auto;
        padding-top: 2rem;
    }

    .admissions-board {
        transform: none;
    }

    .section-heading-row,
    .hub-footer {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .site-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .site-header-actions .status-pill {
        margin-left: auto;
    }

    .hub-copy h2 {
        font-size: clamp(3rem, 18vw, 5.4rem);
    }

    .ward-admissions.is-focused {
        min-height: calc(100dvh - 180px);
        padding-top: 0.75rem;
    }

    .ward-admissions.is-focused .entry-panel {
        border-radius: 16px;
        padding: 1.15rem;
    }

    .hub-primary-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hub-primary-actions .button-link {
        width: 100%;
        text-align: center;
    }

    .portal-content {
        padding-right: 1.35rem;
        padding-left: 1.35rem;
    }

    .portal-facts {
        grid-template-columns: 1fr;
    }

    .game-portal {
        min-height: 420px;
    }

    .board-header,
    .admissions-board li {
        align-items: start;
        flex-direction: column;
    }

    .admissions-board li strong {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-portal {
        transition: none;
    }

    .game-portal:hover,
    .game-portal:focus-visible {
        transform: none;
    }
}
