:root {
    color-scheme: dark;

    /* Surfaces — true black, matching the reference site exactly */
    --bg: #000000;
    --bg-soft: #050505;
    --surface: #0a0a0c;
    --surface-raised: #131316;
    --surface-sunken: #050505;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --overlay-scrim: rgba(0, 0, 0, 0.72);

    /* Text */
    --text-primary: #f5f5f5;
    --text-secondary: #9ca3af;
    --text-muted: #71717a;

    /* Brand accent — mint/teal, the reference site's one accent color */
    --ember: #00d294;
    --ember-wash: rgba(0, 210, 148, 0.12);
    --cinder: #009b6e;
    --spark-gold: #f5f5f5;
    --spark-gold-wash: rgba(255, 255, 255, 0.08);

    /* Neutral interactive accent — used where the UI needs to stay quiet
       rather than draw on the brand accent (e.g. PD's tint, generic hovers) */
    --neutral-glow: rgba(245, 245, 245, 0.5);
    --neutral-wash: rgba(245, 245, 245, 0.08);
    --neutral-border: rgba(245, 245, 245, 0.3);

    /* Status — kept as the only non-grayscale colors, since pass/fail/pending
       need to stay distinguishable at a glance in the admin review UI */
    --success: #34d399;
    --warning: #f5b954;
    --warning-wash: rgba(245, 185, 84, 0.1);
    --danger: #ff6266;
    --danger-wash: rgba(255, 98, 102, 0.1);

    --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(240, 78, 35, 0.55);

    --mouse-x: 50%;
    --mouse-y: 50%;

    --chevron-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='14' height='14'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23afa396'/%3E%3C/svg%3E");

    /* Radii — soft/rounded throughout, nothing sharper than 10px */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;

    /* Spacing (4px base) */
    --space-1: 0.25rem; --space-2: 0.5rem;  --space-3: 0.75rem; --space-4: 1rem;
    --space-5: 1.25rem; --space-6: 1.5rem;  --space-8: 2rem;    --space-10: 2.5rem;
    --space-12: 3rem;   --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;

    /* Motion */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-snap: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-soft: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-instant: 100ms;
    --dur-fast: 160ms;
    --dur-base: 220ms;
    --dur-slow: 350ms;
    --dur-hero: 600ms;

    /* Fonts — Inter throughout, matching the reference site exactly */
    --font-heading: 'Inter', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    --navbar-offset: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle 480px at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.08), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text-secondary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--navbar-offset);
}

/* Home only: one single fixed background photo for the entire page — it
   doesn't scroll, everything just flows on top of it. */
body.page-home {
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.72) 50%, rgba(0, 0, 0, 0.92) 100%),
        url('/assets/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
    body {
        background: var(--bg);
    }

    body.page-home {
        background-attachment: scroll;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes navIn {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes overlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes modalPowerOn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalPowerOff {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.95) translateY(8px); }
}

@keyframes panelIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes panelOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.97) translateY(4px); }
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--warning-wash); }
    50% { box-shadow: 0 0 6px 2px var(--warning-wash); }
}

/* Scroll-triggered reveal — opt in per-element via [data-reveal], toggled by
   the IntersectionObserver set up in nav.js. */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-slow) var(--ease-out-snap), transform var(--dur-slow) var(--ease-out-snap);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal][data-reveal-delay="120"] { transition-delay: 120ms; }
[data-reveal][data-reveal-delay="240"] { transition-delay: 240ms; }
[data-reveal][data-reveal-delay="360"] { transition-delay: 360ms; }

/* Navbar — floating pill, fixed, shared shell across all 3 pages */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1280px, calc(100% - 2.5rem));
    height: 56px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.8);
    transition: background var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard),
        width var(--dur-base) var(--ease-out-snap), height var(--dur-base) var(--ease-out-snap), padding var(--dur-base) var(--ease-out-snap);
    animation: navIn var(--dur-hero) var(--ease-out-snap) both;
}

/* Shrinks to a small circle while scrolling down, expands back on scroll up
   or click — see the scroll listener in nav.js. */
.navbar.nav-collapsed {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    cursor: pointer;
}

.navbar.nav-collapsed .nav-brand,
.navbar.nav-collapsed .nav-links,
.navbar.nav-collapsed .nav-actions {
    display: none;
}

.navbar-collapse-icon {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    pointer-events: none;
    animation: riseIn var(--dur-base) var(--ease-out-snap) both;
}

.navbar.nav-collapsed .navbar-collapse-icon {
    display: flex;
}

.navbar.scrolled {
    background: var(--surface);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.9);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-logo {
    width: 26px;
    height: 26px;
}

.nav-wordmark {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.nav-links {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link:visited {
    color: var(--text-secondary);
}

.nav-link {
    position: relative;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 2px;
    transition: color var(--dur-fast) var(--ease-standard);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 1px;
    background: var(--ember);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 150ms var(--ease-out-snap);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link[hidden] {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Specificity bumped above .icon-btn's own display:inline-flex (which would
   otherwise win the cascade at equal specificity since it's declared later
   in this file) — without this, the hamburger showed on every screen size
   instead of only on mobile. */
.nav-actions .nav-hamburger {
    display: none;
}

@media (max-width: 880px) {
    .navbar {
        width: calc(100% - 1.5rem);
        padding: 0 8px 0 16px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: var(--space-3);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    }

    .nav-links.mobile-open {
        display: flex;
        animation: panelIn var(--dur-base) var(--ease-out-snap) both;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions .nav-hamburger {
        display: inline-flex;
    }
}

/* Buttons */
.join-btn,
.login-btn,
.modal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    text-transform: none;
    letter-spacing: normal;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard),
        border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard),
        box-shadow var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

.join-btn[hidden],
.login-btn[hidden],
.modal-close-btn[hidden] {
    display: none;
}

.btn-text-short {
    display: none;
}

.join-btn {
    background: #ffffff;
    color: #000000;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* a:visited has higher specificity than a plain class (element + pseudo-
   class beats just a class), so without this, any join-btn that's an <a>
   to a URL the browser considers "visited" falls back to the default
   visited-link color instead of our intended black — nearly invisible
   against the white pill. */
.join-btn:visited {
    color: #000000;
}

.join-btn:hover {
    background: #e4e4e4;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.join-btn:active {
    transform: translateY(0) scale(0.98);
    transition-duration: var(--dur-instant);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.login-btn,
.modal-close-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
}

/* Same a:visited specificity gotcha as .join-btn below — several of these
   are <a> links to pages like /Home that get visited constantly. */
.login-btn:visited,
.modal-close-btn:visited {
    color: var(--text-secondary);
}

.login-btn:hover,
.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--neutral-border);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.join-btn:disabled,
.login-btn:disabled,
.modal-close-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.icon-btn:visited {
    color: var(--text-primary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard),
        transform var(--dur-fast) var(--ease-standard);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    transform: scale(1.05);
}

.icon-btn-danger:hover {
    background: var(--danger-wash);
    color: var(--danger);
}

.icon-btn:active {
    transform: scale(0.94);
    transition-duration: var(--dur-instant);
}

/* Nav's "Join" button — a compact circular icon button instead of a text
   pill, so it stays a fixed size next to the profile menu instead of
   fighting it for space. */
.join-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

.join-icon-btn:visited {
    color: #000000;
}

.join-icon-btn:hover {
    background: #e4e4e4;
    transform: translateY(-2px);
}

.join-icon-btn:active {
    transform: scale(0.97);
    transition-duration: var(--dur-instant);
}

/* Profile dropdown */
.profile-menu {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px 6px 6px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--dur-fast) var(--ease-standard);
}

.profile-btn:hover {
    border-color: var(--border-strong);
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--surface-sunken);
}

.profile-btn .chevron {
    color: var(--text-secondary);
    transition: transform var(--dur-base) var(--ease-out-snap);
}

.profile-menu:has(.profile-dropdown.open) .chevron {
    transform: rotate(180deg);
}

.profile-menu:has(.profile-dropdown.open) .profile-btn {
    border-color: var(--neutral-border);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.96) translateY(8px);
    transform-origin: top right;
    transition: opacity var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard), visibility var(--dur-fast);
}

.profile-dropdown.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1) translateY(0);
    transition: opacity var(--dur-base) var(--ease-out-snap), transform var(--dur-base) var(--ease-out-snap), visibility var(--dur-base);
}

.dropdown-item:visited {
    color: var(--text-secondary);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard),
        transform var(--dur-fast) var(--ease-standard);
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateX(2px);
}

.dropdown-item[hidden] {
    display: none;
}

.dropdown-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.dropdown-info-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-info-main svg {
    flex-shrink: 0;
}

.dropdown-info.status-linked {
    color: var(--success);
}

.dropdown-info-retry {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}

.dropdown-info-retry:visited {
    color: var(--text-secondary);
}

.dropdown-info-retry:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.dropdown-info-retry[hidden] {
    display: none;
}

.logout-item {
    color: var(--danger);
}

/* Must come after .dropdown-item:visited — same specificity (class +
   :visited), and logout-item's red needs to win the tie via source order. */
.logout-item:visited {
    color: var(--danger);
}

.logout-item:hover {
    background-color: var(--danger-wash);
    color: #ff8b8e;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--overlay-scrim);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-overlay:not([hidden]) {
    animation: overlayIn var(--dur-slow) var(--ease-in-out-soft);
}

.modal-overlay:not([hidden]) .modal {
    animation: modalPowerOn var(--dur-slow) var(--ease-in-out-soft);
}

.modal-overlay.closing {
    animation: overlayOut var(--dur-fast) var(--ease-standard) forwards;
}

.modal-overlay.closing .modal {
    animation: modalPowerOff var(--dur-fast) var(--ease-standard) forwards;
}

.modal {
    position: relative;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-10);
    text-align: center;
    max-width: 340px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.modal h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.modal p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-6);
}

/* Hero */
.hero {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Applications page: .hero has no padding of its own (Home's hero-intro
   manages that itself), so this restores normal breathing room for pages
   that put a plain title/subtitle directly inside .hero. */
.hero-plain {
    padding: var(--space-16) var(--space-6) var(--space-8);
    width: 100%;
}

.not-found-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--navbar-offset));
    text-align: center;
}

.not-found-content {
    max-width: 480px;
    margin: 0 auto;
}

.not-found-code {
    display: block;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 6rem;
    line-height: 1;
    color: var(--text-primary);
    opacity: 0.9;
    margin-bottom: var(--space-4);
}

.not-found-content h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.not-found-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* Privacy Policy (and any future plain long-form content page) */
.policy-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
}

.policy-content h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.policy-content .policy-updated {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 40px;
}

.policy-content h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 12px;
}

.policy-content p,
.policy-content li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.policy-content ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.policy-content a {
    color: var(--text-primary);
}

.policy-content strong {
    color: var(--text-primary);
}

/* Connect Roblox page */
.connect-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.connect-option-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.connect-option-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--neutral-wash);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.connect-option-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.connect-option-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.connect-option-card button,
.connect-option-card a {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

.legacy-tag {
    background-color: var(--neutral-wash);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.connect-success {
    color: var(--success);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Settings page */
.settings-section {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.settings-section h2 {
    margin-top: 0;
}

.settings-section-danger {
    border-color: var(--danger-wash);
}

.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

/* .danger-btn sets display unconditionally above, which silently overrides
   the native [hidden] attribute/property -- this exact bug class has
   recurred multiple times in this codebase (.role-detail-pane,
   .recovery-confirm-member, .ticket-tab-pane); guard it here too. */
.danger-btn[hidden] {
    display: none;
}

.danger-btn:hover {
    background: #ff8b8e;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .connect-options {
        grid-template-columns: 1fr;
    }
}

/* Full first screen: logo/title/description fill the viewport, cards live
   below and only come into view once the visitor scrolls. The background
   photo itself lives on body.page-home (one single fixed layer for the
   whole page) — this section just centers its content over it. */
.hero-intro {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - var(--navbar-offset));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    justify-content: center;
    padding: var(--space-8) var(--space-6);
}

/* Smoothly blends the fixed background photo into .hero-body's flat black
   below it, instead of the two meeting at a hard edge. */
.hero-intro::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 300px;
    background: linear-gradient(180deg, transparent, var(--bg));
    pointer-events: none;
}

.hero-logo,
.hero-title,
.hero-subtitle,
.description {
    animation: riseIn var(--dur-hero) var(--ease-out-snap) both;
}

.hero-logo { animation-delay: 0ms; }
.hero-title { animation-delay: 140ms; }
.hero-subtitle { animation-delay: 220ms; }
.description { animation-delay: 300ms; }

.hero-logo {
    width: 140px;
    height: 140px;
    margin-bottom: var(--space-6);
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(3rem, 8vw + 1rem, 7rem);
    letter-spacing: -0.025em;
    line-height: 0.95;
    color: var(--text-primary);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 10px;
    margin-bottom: var(--space-8);
    color: var(--text-secondary);
}

.description {
    max-width: 720px;
    margin-bottom: var(--space-8);
}

.description p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: var(--space-4);
    font-size: 1.02rem;
}

.description strong {
    color: var(--text-primary);
}

.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: var(--space-8);
    animation: riseIn var(--dur-hero) var(--ease-out-snap) both;
    animation-delay: 340ms;
}

.hero-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    animation: riseIn var(--dur-hero) var(--ease-out-snap) both;
}

.hero-status-pill[hidden] {
    display: none;
}

.hero-status-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ember);
    box-shadow: 0 0 8px var(--ember);
    flex-shrink: 0;
}

.hero-status-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--ember);
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    70%, 100% { transform: scale(2.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-status-dot::after {
        animation: none;
    }
}

.scroll-down-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    gap: 6px;
    margin-top: var(--space-8);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 8px;
    transition: color var(--dur-fast) var(--ease-standard);
    animation: riseIn var(--dur-hero) var(--ease-out-snap) both, bounce 2.2s ease-in-out 1s infinite;
}

.scroll-down-btn:hover {
    color: var(--text-primary);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-down-btn {
        animation: none;
    }
}

/* Horizontally scrolling ticker strip separating the hero from the content
   below it — a band of duplicated phrases that loops seamlessly. */
.marquee-strip {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    white-space: nowrap;
    /* Position is driven by JS (requestAnimationFrame) directly setting
       transform every frame, not a CSS animation -- see the inline script
       at the bottom of Home/index.html for why. */
    /* Promotes this to its own compositor layer so the loop keeps running
       smoothly off the main thread — without this, the page's custom
       wheel-scroll glide (which calls window.scrollTo every animation
       frame while scrolling) can visibly stutter the marquee. */
    will-change: transform;
}

.marquee-item {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.marquee-dot {
    color: var(--text-muted);
}

/* Quick Actions — three direct-action cards between the hero and the
   department list. */
.quick-actions {
    max-width: 900px;
    margin: var(--space-20) auto var(--space-20);
    padding: 0 var(--space-6);
    text-align: center;
}

@media (max-width: 640px) {
    .quick-actions {
        margin: var(--space-16) auto var(--space-16);
    }
}

.quick-actions-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.quick-actions h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2rem, 3vw + 1rem, 2.75rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.quick-actions-subtitle {
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto var(--space-12);
    line-height: 1.6;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    text-align: left;
}

.quick-action-card {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease-out, opacity 0.3s ease, border-color var(--dur-base) var(--ease-standard);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    border-color: var(--neutral-border);
}

/* Faint always-on accent tint, using each card's own --qa-accent. */
.quick-action-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 20%, color-mix(in srgb, var(--qa-accent) 8%, transparent), transparent 65%);
    pointer-events: none;
}

.quick-action-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 20%, color-mix(in srgb, var(--qa-accent) 20%, transparent), transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.quick-action-card:hover .quick-action-glow {
    opacity: 1;
}

.quick-action-shimmer {
    position: absolute;
    inset: 0 auto 0 0;
    width: 55%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%) skewX(-12deg);
    transition: transform 0.7s ease-out;
    pointer-events: none;
}

.quick-action-card:hover .quick-action-shimmer {
    transform: translateX(280%) skewX(-12deg);
}

.quick-action-accent-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(to right, var(--qa-accent), transparent);
    transition: width 0.5s ease;
    pointer-events: none;
}

.quick-action-card:hover .quick-action-accent-line {
    width: 100%;
}

/* Hovering one card dims/shrinks its siblings, drawing focus to it. */
.quick-actions-grid:has(.quick-action-card:hover) .quick-action-card:not(:hover) {
    opacity: 0.5;
    transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
    .quick-action-card,
    .quick-action-glow,
    .quick-action-shimmer,
    .quick-action-accent-line {
        transition: none;
    }
}

.quick-action-icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.quick-action-icon-blue {
    background: rgba(106, 166, 255, 0.15);
    color: #6aa6ff;
}

.quick-action-icon-purple {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

.quick-action-icon-mint {
    background: var(--ember-wash);
    color: var(--ember);
}

.quick-action-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.quick-action-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-bottom: var(--space-6);
    flex: 1;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

.quick-action-btn:visited {
    color: #000000;
}

.quick-action-btn:hover {
    background: #e4e4e4;
}

.quick-action-btn:active {
    transform: scale(0.97);
    transition-duration: var(--dur-instant);
}

@media (max-width: 860px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* Division cards — a stacked list of wide horizontal cards, not a grid.
   Note: .card/.card-icon/etc below are intentionally left untouched — they're
   shared with the Applications list and Admin review cards, so this section
   only adds new .division-* classes rather than repurposing .card itself. */
/* Solid, full-width from here down — the fixed hero photo behind
   body.page-home should only ever show through the hero-intro section at
   the top, not bleed through anywhere below it (including either side of
   the centered 900px column, not just the gaps between cards). */
.hero-body {
    position: relative;
    width: 100%;
    background: var(--bg);
}

.speckle-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-body > *:not(.speckle-canvas) {
    position: relative;
    z-index: 1;
}

/* Server stats — plain inline row sitting directly in the hero content, no
   card/border around it, matching the reference's understated stat display. */
.stats-section {
    display: flex;
    justify-content: flex-start;
    align-content: center;
    flex-wrap: wrap;
    gap: var(--space-10);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
}

.stat-number {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem);
    letter-spacing: -0.02em;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

/* Full-bleed photo CTA banner — a large rounded-corner photo with a dark
   gradient overlay so left-aligned content stays legible on top of it. */
.photo-banner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto var(--space-20);
    padding: 0 var(--space-6);
}

.photo-banner-content {
    position: relative;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: var(--space-12);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.15) 100%),
        url('/assets/background.png');
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
}

.photo-banner-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.photo-banner-content h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
    max-width: 560px;
    margin-bottom: 0.875rem;
}

.photo-banner-content > p:not(.photo-banner-eyebrow) {
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.6;
    margin-bottom: var(--space-8);
}

.photo-banner-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.photo-banner-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}

.photo-banner-btn-secondary:visited {
    color: var(--text-primary);
}

.photo-banner-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--neutral-border);
}

@media (max-width: 640px) {
    .photo-banner-content {
        min-height: 320px;
        padding: var(--space-8);
    }
}

/* Apply Now CTA */
.cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-16) var(--space-6);
}

.cta-section h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.75rem, 3vw + 1rem, 2.25rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.divisions {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-6) var(--space-8);
}

.division-card:nth-child(even) {
    flex-direction: row-reverse;
}

.division-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform var(--dur-base) var(--ease-out-snap), box-shadow var(--dur-base) var(--ease-out-snap),
        border-color var(--dur-base) var(--ease-standard);
}

.division-card:hover {
    transform: translateY(-4px);
    border-color: var(--neutral-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 32px rgba(0, 0, 0, 0.3);
}

/* Department color-coding — fire owns the brand accent directly, DOT reads
   as caution/hazard, PD stays on the neutral steel system so authority reads
   as disciplined rather than colorful. */
.division-card[data-dept="FD"] {
    border-color: var(--ember-wash);
}

.division-card[data-dept="FD"]:hover {
    border-color: var(--ember);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--ember-wash);
}

.division-card[data-dept="FD"] .division-card-note,
.division-card[data-dept="FD"] .division-link:hover {
    color: var(--ember);
}

.division-card[data-dept="DOT"] {
    border-color: var(--spark-gold-wash);
}

.division-card[data-dept="DOT"]:hover {
    border-color: var(--spark-gold);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--spark-gold-wash);
}

.division-card[data-dept="DOT"] .division-card-note,
.division-card[data-dept="DOT"] .division-link:hover {
    color: var(--spark-gold);
}

.division-card-image-wrap {
    position: relative;
    flex: 0 0 320px;
}

.division-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

.division-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.division-badge {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
}

.division-card-body {
    flex: 1;
    min-width: 0;
}

.division-card-body h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.division-card-body p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.division-card-note {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.375rem;
}

.division-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 0.875rem;
}

.division-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-standard);
}

.division-link:hover {
    color: var(--ember);
}

.division-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.125rem;
}

.division-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.125rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}

.division-btn:hover {
    border-color: var(--neutral-border);
    background-color: var(--neutral-wash);
}

.division-btn-primary {
    background: #ffffff;
    color: #000000;
    border-color: transparent;
}

.division-btn-primary:hover {
    background: #e4e4e4;
    border-color: transparent;
}

@media (max-width: 768px) {
    .division-card,
    .division-card:nth-child(even) {
        flex-direction: column;
        align-items: stretch;
    }

    .division-card-image-wrap {
        flex: none;
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform var(--dur-base) var(--ease-out-snap), box-shadow var(--dur-base) var(--ease-out-snap),
        border-color var(--dur-base) var(--ease-standard);
    animation: riseIn var(--dur-hero) var(--ease-out-snap) both;
}

.card:hover {
    transform: translateY(-6px) scale(1.06);
    border-color: var(--neutral-border);
    outline: 2px solid var(--neutral-glow);
    outline-offset: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neutral-wash);
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    transition: transform var(--dur-base) var(--ease-out-snap);
}

.card:hover .card-icon {
    transform: rotate(4deg) scale(1.06);
}

.card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.coming-soon {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0 var(--space-6) var(--space-8);
    background: var(--bg);
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    gap: 0.75rem;
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--neutral-wash);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    max-width: 32ch;
}

/* Applications page */
.applications-content {
    width: 100%;
    max-width: 720px;
    margin-top: var(--space-6);
}

/* The sign-in gate needs to break all the way out to full viewport width —
   .applications-content's own max-width/margin was capping it to a narrow
   centered column instead, on top of the .hero-plain padding .auth-gate
   already cancels itself. */
.applications-content:has(.auth-gate) {
    max-width: none;
    margin-top: 0;
}

.login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.login-prompt p {
    color: var(--text-secondary);
}

/* Sign-in gate — split screen shown wherever a page requires auth. Full-bleed
   within .hero-plain via negative margins that exactly cancel its padding. */
.auth-gate {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - var(--navbar-offset));
    width: calc(100% + var(--space-6) * 2);
    margin: calc(-1 * var(--space-16)) calc(-1 * var(--space-6)) calc(-1 * var(--space-8));
    text-align: left;
    animation: riseIn var(--dur-hero) var(--ease-out-snap) both;
}

.auth-gate-panel {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-8);
    background: var(--bg);
}

.auth-gate-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 480px at 30% 60%, rgba(255, 255, 255, 0.06), transparent 70%);
    pointer-events: none;
}

.auth-gate-image {
    flex: 1 1 50%;
    background-image: url('/assets/background.png');
    background-size: cover;
    background-position: center;
}

.auth-gate-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
}

.auth-gate-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-bottom: var(--space-5);
}

.auth-gate-content h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.25rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-gate-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.auth-gate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-pill);
    background: #ffffff;
    color: #000000;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

.auth-gate-btn:hover {
    background: #e4e4e4;
    transform: translateY(-1px);
}

.auth-gate-back {
    display: block;
    text-align: center;
    margin-top: var(--space-5);
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-standard);
}

.auth-gate-back:hover {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .auth-gate {
        flex-direction: column;
    }

    .auth-gate-image {
        display: none;
    }
}

.applications-list-public {
    text-align: left;
}

.apply-form {
    text-align: left;
    padding: var(--space-8);
}

.apply-form h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.apply-form-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.apply-form .admin-field input,
.apply-form .admin-field textarea,
.apply-form .admin-field select {
    display: block;
    width: 100%;
    margin-top: 6px;
    background-color: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.875rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}

.apply-form .admin-field select {
    appearance: none;
    background-image: var(--chevron-icon);
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.apply-form .admin-field input:focus-visible,
.apply-form .admin-field textarea:focus-visible,
.apply-form .admin-field select:focus-visible {
    outline: none;
    border-color: var(--neutral-border);
    box-shadow: 0 0 0 3px var(--neutral-wash);
}

.agreement-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: var(--space-4);
    cursor: pointer;
}

.agreement-field input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--text-primary);
    cursor: pointer;
}

/* Footer */
.footer {
    padding: var(--space-16) var(--space-6) var(--space-6);
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: var(--space-10);
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: var(--space-10);
    text-align: left;
}

.footer-brand-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.footer-logo {
    width: 24px;
    height: 24px;
}

.footer-brand p {
    line-height: 1.6;
    max-width: 32ch;
}

.footer-column h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.625rem;
    transition: color var(--dur-fast) var(--ease-standard);
}

.footer-column a:visited {
    color: var(--text-muted);
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-community-blurb {
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 30ch;
}

.footer-discord-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

.footer-discord-card:visited {
    color: var(--text-primary);
}

.footer-discord-card:hover {
    border-color: var(--neutral-border);
    background: var(--surface-raised);
}

.footer-discord-card:active {
    transform: scale(0.97);
    transition-duration: var(--dur-instant);
}

.footer-discord-card span {
    display: flex;
    flex-direction: column;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-discord-card strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
}

.footer-disclaimer {
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

.footer-link,
.footer-link:visited {
    color: var(--text-muted);
    text-decoration: underline;
}

.footer-link:hover {
    color: var(--ember);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-intro {
        padding: var(--space-6) var(--space-5);
    }

    .divisions,
    .coming-soon {
        padding-left: var(--space-5);
        padding-right: var(--space-5);
    }
}

@media (max-width: 480px) {
    .hero-subtitle {
        font-size: 0.9rem;
    }

    .nav-wordmark {
        display: none;
    }

    #profile-username {
        display: none;
    }

    .btn-text-full {
        display: none;
    }

    .btn-text-short {
        display: inline;
    }

    .join-btn,
    .login-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .nav-actions {
        gap: 6px;
    }

    .modal {
        width: 94vw;
        padding: var(--space-6);
    }
}

/* Cookie notice */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: var(--space-5);
    max-width: min(680px, calc(100% - 2.5rem));
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    animation: riseIn var(--dur-hero) var(--ease-out-snap) both;
}

.cookie-banner.closing {
    animation: cookieBannerOut var(--dur-base) var(--ease-standard) forwards;
}

@keyframes cookieBannerOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.cookie-banner-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #000000;
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

.cookie-banner-btn:hover {
    background: #e4e4e4;
}

.cookie-banner-btn:active {
    transform: scale(0.97);
    transition-duration: var(--dur-instant);
}

@media (max-width: 640px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        bottom: 12px;
    }
}

.falling-cookie {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 400;
    font-size: 32px;
    line-height: 1;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Styled confirm() replacement — reuses the existing .modal-overlay/.modal
   open/close animations, just with a text line and two action buttons. */
.confirm-dialog-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: var(--space-6);
}

.confirm-dialog-input {
    display: block;
    width: 100%;
    margin-bottom: var(--space-6);
    background-color: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.875rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-align: center;
    transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}

.confirm-dialog-input:focus-visible {
    outline: none;
    border-color: var(--neutral-border);
    box-shadow: 0 0 0 3px var(--neutral-wash);
}

.confirm-dialog-actions {
    display: flex;
    gap: 0.75rem;
}

.confirm-dialog-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.confirm-dialog-actions button {
    flex: 1;
}

/* Right-click "Login not working?" context menu */
.recovery-context-menu {
    position: fixed;
    z-index: 500;
    min-width: 200px;
    background-color: var(--surface-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    padding: 6px;
}

.recovery-context-menu-item {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.recovery-context-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Login-recovery modal — search a username, get a DM code, enter it. */
.recovery-modal {
    max-width: 420px;
    text-align: left;
}

.recovery-modal h2 {
    text-align: center;
}

.recovery-modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: var(--space-5);
    text-align: center;
}

.recovery-search-input {
    display: block;
    width: 100%;
    background-color: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.875rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}

.recovery-search-input:focus-visible {
    outline: none;
    border-color: var(--neutral-border);
    box-shadow: 0 0 0 3px var(--neutral-wash);
}

.recovery-search-input:disabled {
    opacity: 0.6;
}

/* Reuses admin.css's log-search-* naming since it's the same concept
   (a floating results list under a text input) — duplicated here since
   these public pages don't load admin.css. */
@keyframes recoverySearchResultsIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.log-search-wrap {
    position: relative;
}

.log-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 240px;
    overflow-y: auto;
    background-color: var(--surface-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    padding: 6px;
    animation: recoverySearchResultsIn 140ms var(--ease-out-snap);
}

.log-search-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 2px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-out-snap);
}

.log-search-result-row:last-child {
    margin-bottom: 0;
}

.log-search-result-row:hover {
    background-color: var(--neutral-wash);
    transform: translateX(6px);
}

.log-search-result-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--surface-sunken);
    flex-shrink: 0;
    transition: transform var(--dur-fast) var(--ease-out-snap);
}

.log-search-result-row:hover .log-search-result-avatar {
    transform: scale(1.08);
}

.recovery-otp-step {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
}

.otp-box-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--space-5);
}

.otp-prefix {
    display: flex;
    align-items: center;
    height: 54px;
    padding: 0 var(--space-3);
    background-color: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.otp-box {
    width: 44px;
    height: 54px;
    background-color: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
    transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard),
        transform var(--dur-fast) var(--ease-out-snap);
}

.otp-box:focus-visible {
    outline: none;
    border-color: var(--neutral-border);
    box-shadow: 0 0 0 3px var(--neutral-wash);
    transform: translateY(-2px);
}

.otp-box.filled {
    border-color: var(--neutral-border);
}

/* Search box turns into this pfp+username chip once a result is picked. */
.recovery-confirm-member {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background-color: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}

.recovery-confirm-member[hidden] {
    display: none;
}

.recovery-confirm-member img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.recovery-confirm-member span {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recovery-chip-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.recovery-chip-clear:hover {
    color: var(--danger);
}

.recovery-join-hint {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
    margin-bottom: var(--space-5);
}

.recovery-join-hint a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.recovery-join-hint a:hover {
    color: var(--text-primary);
}

.log-search-empty {
    padding: var(--space-4);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
    text-align: center;
}

.log-search-empty a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.log-search-result-row.is-selected {
    background-color: var(--neutral-wash);
}

.recovery-error-text {
    color: var(--danger);
    font-size: 0.8125rem;
    margin-bottom: var(--space-4);
}

.recovery-modal-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

/* flex:1 (to split evenly when Cancel + Confirm/Verify are both visible)
   with no cap meant a lone Cancel button -- the only one visible before a
   member is picked -- stretched to fill the entire modal width instead of
   reading as a normal-sized button. The max-width caps that growth in both
   cases: two buttons still share the row evenly up to a sane per-button
   size, and one button alone just sits centered at that same size. */
.recovery-modal-actions button {
    flex: 1 1 auto;
    max-width: 200px;
}

.recovery-confirm-btn {
    width: auto;
}

/* Styled alert() replacement — a small toast that rises in at the bottom
   and dismisses itself instead of blocking the page. */
.lca-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 12px);
    z-index: 350;
    max-width: min(420px, calc(100% - 2.5rem));
    padding: 0.875rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: transform var(--dur-base) var(--ease-out-snap), opacity var(--dur-base) var(--ease-out-snap);
}

.lca-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.lca-toast-error {
    border-color: var(--danger-wash);
    color: var(--danger);
}

/* Apply Now — shine-sweep pill button (adapted from a Uiverse.io design),
   recolored to the site's own accent instead of the original blue. */
.apply-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-block: 0.5rem;
    padding-inline: 1.25rem;
    background-color: transparent;
    border: 2px solid var(--text-secondary);
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard),
        background-color var(--dur-base) var(--ease-standard);
}

.apply-btn:visited {
    color: var(--text-secondary);
}

.apply-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform var(--dur-base) var(--ease-standard);
}

.apply-btn:hover {
    transform: scale(1.05);
    background-color: var(--neutral-wash);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.apply-btn:hover .apply-btn-icon {
    transform: translateX(4px);
}

.apply-btn:active {
    transform: scale(0.98);
    transition-duration: var(--dur-instant);
}

.apply-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100px;
    width: 100px;
    height: 100%;
    background-image: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 70%);
    opacity: 0.6;
}

.apply-btn:hover::before {
    animation: apply-btn-shine 1.5s ease-out infinite;
}

@keyframes apply-btn-shine {
    0% { left: -100px; }
    60% { left: 100%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .apply-btn:hover::before {
        animation: none;
    }
}

/* Team page */
.team-page {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.team-page-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(2.25rem, 4vw + 1rem, 3.25rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.team-page-subtitle {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto var(--space-16);
    line-height: 1.6;
}

.team-loading {
    color: var(--text-muted);
}

.team-section {
    margin-bottom: var(--space-16);
}

.team-section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: var(--space-6);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

/* Card design adapted from a Uiverse.io "brutalist button". The offset edge
   (border/drop shadow) is a fixed white so the grid reads as one consistent
   set at rest; the hover fill-in circle below still uses the member's own
   Discord role color (the midpoint of their gradient role, computed
   server-side), so the rank color shows once you interact with the card. */
.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 130px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: 4px 4px 0 #ffffff;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        border-color var(--dur-base) var(--ease-standard);
}

.team-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 #ffffff;
    border-color: #ffffff;
}

.team-card:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #ffffff;
}

.team-card::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -150%;
    width: 300%;
    height: 300%;
    border-radius: 50%;
    background-color: var(--card-role-color, var(--neutral-border));
    transform: translateX(-50%) scale(0);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1;
}

.team-card:hover::before {
    transform: translateX(-50%) scale(1);
}

.team-card-avatar-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-raised);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.team-card-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes team-card-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.team-card:hover .team-card-avatar-wrap {
    animation: team-card-spin 5s linear infinite;
    width: 50px;
    height: 50px;
    top: 28%;
}

.team-card-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    z-index: 2;
    position: absolute;
    bottom: 16px;
    left: 6px;
    right: 6px;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.team-card:hover .team-card-text {
    opacity: 1;
    transform: translateY(0);
}

.team-card-rank {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.team-card-name {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .team-card,
    .team-card::before,
    .team-card-avatar-wrap,
    .team-card-text {
        transition: none;
    }

    .team-card:hover .team-card-avatar-wrap {
        animation: none;
    }
}
