:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(18, 26, 43, 0.75);
    --border-color: rgba(0, 255, 204, 0.2);
    --accent-cyan: #00ffcc;
    --accent-amber: #ffb703;
    --text-main: #e0e6ed;
    --text-dim: #8b9bb4;
    --glow-cyan: 0 0 15px rgba(0, 255, 204, 0.3);
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 204, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 183, 3, 0.04) 0%, transparent 40%);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[hidden] {
    display: none !important;
}

body > header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand {
    font-family: var(--font-code);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: var(--glow-cyan);
}

.brand-logo {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
    filter: drop-shadow(0 0 6px rgba(0, 255, 204, 0.4));
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    align-items: center;
}

nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

nav a:hover {
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
}

.btn-cta {
    background: linear-gradient(135deg, rgba(0,255,204,0.15), rgba(0,255,204,0.05));
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.btn-amber {
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}
.btn-amber:hover, .btn-amber.active {
    background: var(--accent-amber);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.3);
}

.btn-cta:hover, .btn-cta.active {
    background: var(--accent-cyan);
    color: var(--bg-color);
    box-shadow: var(--glow-cyan);
}

.btn-primary-amber {
    background: var(--accent-amber);
    border-color: var(--accent-amber);
    color: var(--bg-color);
    font-weight: 700;
    box-shadow: 0 0 20px rgba(255, 183, 3, 0.25);
}

.btn-primary-amber:hover,
.btn-primary-amber.active {
    background: #ffc52f;
    border-color: #ffc52f;
    color: var(--bg-color);
    box-shadow: 0 0 26px rgba(255, 183, 3, 0.4);
    transform: translateY(-1px);
}

.btn-secondary-muted {
    background: transparent;
    border-color: rgba(224, 230, 237, 0.3);
    color: var(--text-main);
    box-shadow: none;
}

.btn-secondary-muted:hover,
.btn-secondary-muted.active {
    background: rgba(0, 255, 204, 0.06);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: none;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

.home-resource-cards .card {
    display: flex;
    flex-direction: column;
}

.home-resource-cards .btn-outline {
    margin-top: auto;
}

main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: var(--font-code);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

.share-badge-canvas {
    display: block;
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin-inline: auto;
    border: 1px solid rgba(0, 255, 204, 0.24);
    border-radius: 12px;
    background: #080b12;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

#weekly-badge-canvas,
.weekly-badge-canvas {
    max-width: 440px;
}

.completion-summary {
    margin-top: 1.5rem;
    text-align: center;
    opacity: 0;
}

.hero-card {
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-amber), transparent);
    opacity: 0.9;
}

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

.demo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.demo-modal-card {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin-bottom: 0;
    border-color: var(--accent-cyan);
    background: #0a0d14;
    text-align: center;
}

.demo-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.demo-modal-close:hover,
.demo-modal-close:focus-visible {
    color: #fff;
}

.demo-modal input.demo-modal-input {
    margin-bottom: 0;
    border-color: var(--accent-cyan);
    background: rgba(0, 0, 0, 0.6);
    color: var(--accent-cyan);
}

.hero.not-found-section {
    padding-top: 0;
}

.auth-packet-log {
    overflow: visible;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(6, 9, 17, 0.75);
}

.auth-packet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.75rem;
}

.auth-expiry-hotspot {
    position: relative;
    border: 0;
    padding: 0.15rem 0.3rem;
    background: transparent;
    color: var(--accent-amber);
    cursor: help;
    font-size: 1rem;
}

.auth-expiry-hotspot:hover .auth-expiry-tooltip,
.auth-expiry-hotspot:focus .auth-expiry-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-expiry-tooltip {
    position: absolute;
    z-index: 2;
    top: calc(100% + 0.5rem);
    right: 0;
    width: max-content;
    max-width: min(240px, calc(100vw - 3rem));
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.98);
    color: var(--text-main);
    font-family: var(--font-code);
    font-size: 0.72rem;
    line-height: 1.4;
    white-space: normal;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.auth-packet-body {
    padding: 0.9rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.not-found-map-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.not-found-map {
    display: block;
    width: 100%;
    max-width: 688px;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

.not-found-map-hotspot {
    position: absolute;
    right: 3%;
    bottom: 8%;
    width: 18%;
    height: 28%;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: help;
}

.not-found-map-hotspot:hover .not-found-map-tooltip,
.not-found-map-hotspot:focus .not-found-map-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.not-found-map-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: max-content;
    max-width: min(240px, calc(100vw - 3rem));
    margin-bottom: 10px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    font-family: var(--font-code);
    font-size: 0.78rem;
    line-height: 1.4;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.profile-dashboard {
    padding: 0;
    overflow: hidden;
}

.profile-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.04), transparent 52%);
}

.profile-dashboard-heading h1 {
    margin-bottom: 0.15rem;
    line-height: 1.25;
}

.profile-dashboard-summary {
    color: var(--text-main);
    font-size: 0.95rem;
}

.profile-dashboard-account {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.profile-dashboard-account strong {
    color: #aab8cb;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.profile-sign-out {
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.profile-sign-out:hover,
.profile-sign-out:focus-visible {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.08);
    color: #ff8b96;
}

.profile-login-retry {
    margin-top: 1.5rem;
    text-align: center;
}

.profile-login-retry-link {
    color: var(--accent-cyan);
    font-family: var(--font-code);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.profile-login-retry-link:hover,
.profile-login-retry-link:focus-visible {
    color: var(--accent-amber);
}

.profile-runs {
    padding: 0 2rem 1.5rem;
}

.profile-runs-table {
    table-layout: fixed;
    max-width: 100%;
    margin-top: 0;
}

.profile-runs-table th {
    padding: 0.75rem 0.85rem;
    color: var(--text-dim);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
}

.profile-run-row td {
    padding: 1rem 0.85rem;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.profile-run-row.is-active td:first-child {
    box-shadow: inset 2px 0 0 rgba(255, 183, 3, 0.75);
}

.profile-run-row.is-completed td:first-child {
    box-shadow: inset 2px 0 0 rgba(0, 255, 204, 0.6);
}

.profile-run-row:hover td {
    background: rgba(0, 255, 204, 0.025);
}

.profile-status-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.profile-status-badges .badge {
    padding: 0.24rem 0.5rem;
    font-size: 0.68rem;
}

.profile-publication-status {
    display: flex;
    align-items: center;
    min-height: 1.6rem;
}

.profile-publication-status .badge {
    padding: 0.24rem 0.5rem;
    font-size: 0.68rem;
}

.profile-publication-private {
    border-color: rgba(170, 184, 203, 0.35);
    background: rgba(170, 184, 203, 0.08);
    color: #aab8cb;
}

.profile-publication-na {
    color: var(--text-dim);
    font-family: var(--font-code);
}

.profile-run-level {
    color: var(--text-main);
    font-family: var(--font-code);
    font-size: 0.84rem;
    font-weight: 600;
}

.profile-run-date {
    display: flex;
    flex-direction: column;
    color: #aab8cb;
    font-family: var(--font-code);
    font-size: 0.78rem;
    line-height: 1.45;
}

.profile-run-time {
    color: var(--text-dim);
    font-size: 0.7rem;
}

.profile-run-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.profile-run-action {
    min-height: 38px;
    max-width: 100%;
    text-align: center;
    white-space: normal;
}

.profile-run-detail-row td {
    padding: 0 0.85rem 1rem;
    border-bottom-color: var(--border-color);
}

.profile-run-details {
    margin: 0;
}

.profile-run-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(6, 9, 17, 0.5);
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.72rem;
    cursor: pointer;
    list-style: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.profile-run-details > summary::-webkit-details-marker {
    display: none;
}

.profile-run-details > summary:hover,
.profile-run-details > summary:focus-visible {
    border-color: rgba(0, 255, 204, 0.25);
    background: rgba(0, 255, 204, 0.04);
    color: var(--text-main);
}

.profile-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.profile-summary-chevron {
    color: var(--accent-amber);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.profile-run-details[open] .profile-summary-chevron {
    transform: rotate(90deg);
}

.profile-summary-progress {
    color: var(--text-dim);
    white-space: nowrap;
}

.profile-run-roadmap {
    margin: 0.75rem 0 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #060911;
}

.profile-progress {
    margin-bottom: 1rem;
}

.profile-progress-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-family: var(--font-code);
    font-size: 0.75rem;
}

.profile-progress-track {
    width: 100%;
    height: 0.625rem;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 4px;
    background: rgba(15, 18, 26, 0.6);
}

.profile-progress-fill {
    height: 100%;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.profile-roadmap-list {
    display: grid;
    gap: 0.5rem;
}

.profile-roadmap-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.75rem;
}

.profile-roadmap-step.is-completed {
    border-color: rgba(0, 255, 204, 0.3);
    background: rgba(0, 255, 204, 0.1);
}

.profile-roadmap-step.is-current {
    border-color: rgba(255, 183, 3, 0.3);
    background: rgba(255, 183, 3, 0.1);
}

.profile-roadmap-step.is-locked {
    background: rgba(15, 18, 26, 0.6);
    opacity: 0.5;
}

.profile-roadmap-step-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    font-family: var(--font-code);
}

.profile-roadmap-badge {
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
}

.profile-roadmap-locked {
    color: var(--text-dim);
    font-size: 0.75rem;
}

.profile-roadmap-hints {
    margin: 0 0 0.5rem 1rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 183, 3, 0.2);
    border-radius: 4px;
    background: rgba(15, 18, 26, 0.6);
    font-size: 0.75rem;
}

.profile-hint-heading {
    margin-bottom: 0.5rem;
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-weight: 600;
}

.profile-hint-tier {
    margin-bottom: 0.5rem;
}

.profile-hint-tier:last-child {
    margin-bottom: 0;
}

.profile-hint-tier > summary {
    color: var(--text-dim);
    font-family: var(--font-code);
    cursor: pointer;
    transition: color 0.2s ease;
}

.profile-hint-tier > summary:hover,
.profile-hint-tier > summary:focus-visible {
    color: var(--accent-cyan);
}

.profile-hint-copy {
    margin-top: 0.25rem;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    border-left: 2px solid var(--accent-cyan);
    border-radius: 4px;
    background: rgba(6, 9, 17, 0.5);
    color: #fff;
    font-family: var(--font-code);
    font-size: 0.75rem;
}

.profile-dashboard-empty {
    padding: 1.5rem 2rem 2rem;
}

.profile-runs-table th:nth-child(1),
.profile-runs-table td:nth-child(1) { width: 17%; }
.profile-runs-table th:nth-child(2),
.profile-runs-table td:nth-child(2) { width: 23%; }
.profile-runs-table th:nth-child(3),
.profile-runs-table td:nth-child(3) { width: 20%; }
.profile-runs-table th:nth-child(4),
.profile-runs-table td:nth-child(4) { width: 18%; }
.profile-runs-table th:nth-child(5),
.profile-runs-table td:nth-child(5) { width: 22%; }

.admin-shell {
    width: min(1320px, calc(100% - 2rem));
    margin: 2rem auto;
}

.admin-dashboard {
    padding: 0;
    overflow: hidden;
}

.admin-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.05), transparent 55%);
}

.admin-dashboard-header-weekly {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.07), transparent 55%);
}

.admin-workspace-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(4, 7, 14, 0.78);
}

.admin-workspace-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.78rem;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.admin-workspace-link:hover {
    border-color: rgba(0, 255, 204, 0.45);
    color: var(--text-main);
}

.admin-workspace-link.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 255, 204, 0.08);
    color: var(--accent-cyan);
    box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.admin-workspace-index {
    color: var(--accent-amber);
    font-size: 0.65rem;
}

.admin-eyebrow {
    margin-bottom: 0.35rem;
    color: var(--accent-amber);
    font-family: var(--font-code);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.admin-dashboard-summary {
    color: var(--text-main);
    font-size: 0.95rem;
}

.admin-dashboard-account {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.admin-dashboard-account strong {
    color: #aab8cb;
    overflow-wrap: anywhere;
}

.admin-grant-panel {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(6, 9, 17, 0.42);
}

.admin-grant-copy {
    max-width: 760px;
    margin-bottom: 1rem;
}

.admin-grant-copy h2 {
    margin-bottom: 0.45rem;
    color: var(--text-main);
}

.admin-grant-copy p:last-child {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.admin-grant-message {
    margin-bottom: 1rem;
}

.admin-grant-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.75rem;
    max-width: 760px;
}

.admin-grant-field {
    min-width: 0;
}

.admin-grant-field label {
    display: block;
    margin-bottom: 0.4rem;
}

.admin-grant-field input[type="email"] {
    margin-bottom: 0;
}

.admin-grant-form .btn-cta {
    min-height: 44px;
    white-space: nowrap;
}

.admin-grant-help {
    max-width: 760px;
    margin: 0.65rem 0 0;
    color: var(--text-dim);
    font-size: 0.72rem;
    line-height: 1.5;
}

.admin-weekly-panel {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 15, 27, 0.58);
}

.admin-games-panel {
    padding: 1.5rem 2rem;
    background: rgba(10, 15, 27, 0.38);
}

.admin-games-panel .admin-empty-state {
    padding: 2rem 0 1rem;
}

.admin-games-panel .admin-pagination {
    padding: 0.75rem 0 0;
}

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

.admin-section-heading h2 {
    color: var(--text-main);
}

.admin-section-note {
    max-width: 520px;
    margin: 0;
    color: var(--text-dim);
    font-size: 0.75rem;
    line-height: 1.5;
}

.admin-weekly-table-wrap {
    overflow-x: auto;
}

.admin-weekly-page-summary {
    margin: -0.25rem 0 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.7rem;
}

.admin-weekly-page-summary strong {
    color: var(--accent-amber);
}

.admin-weekly-overview-pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0 0;
}

.admin-weekly-overview-pagination > :first-child {
    justify-self: start;
}

.admin-weekly-overview-pagination > :last-child {
    justify-self: end;
}

.admin-pagination-status {
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.72rem;
    white-space: nowrap;
}

.admin-weekly-table {
    table-layout: fixed;
    margin-top: 0;
}

.admin-weekly-table th {
    padding: 0.7rem 0.55rem;
    color: var(--text-dim);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

.admin-weekly-row td {
    padding: 0.75rem 0.55rem;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.admin-weekly-row:hover td {
    background: rgba(255, 183, 3, 0.025);
}

.admin-weekly-table th:nth-child(1),
.admin-weekly-table td:nth-child(1) { width: 20%; }
.admin-weekly-table th:nth-child(2),
.admin-weekly-table td:nth-child(2) { width: 24%; }
.admin-weekly-table th:nth-child(3),
.admin-weekly-table td:nth-child(3) { width: 17%; }
.admin-weekly-table th:nth-child(4),
.admin-weekly-table td:nth-child(4) { width: 13%; }
.admin-weekly-table th:nth-child(5),
.admin-weekly-table td:nth-child(5) { width: 13%; }
.admin-weekly-table th:nth-child(6),
.admin-weekly-table td:nth-child(6) { width: 13%; }

.admin-weekly-issue,
.admin-weekly-title,
.admin-weekly-count,
.admin-weekly-detail-link {
    font-family: var(--font-code);
    font-size: 0.73rem;
}

.admin-weekly-issue {
    color: #aab8cb;
}

.admin-weekly-title {
    color: var(--text-main);
}

.admin-weekly-count {
    color: var(--accent-amber);
    font-size: 0.9rem;
}

.admin-weekly-detail-link {
    color: var(--accent-cyan);
    text-underline-offset: 0.2rem;
}

.admin-weekly-detail-shell {
    width: min(900px, calc(100% - 2rem));
    margin: 2rem auto;
}

.admin-weekly-detail {
    padding: 0;
    overflow: hidden;
}

.admin-weekly-detail-header {
    padding: 1.75rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.05), transparent 55%);
}

.admin-weekly-detail-header > a {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.admin-weekly-detail-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
    margin: 0.85rem 0;
    color: #aab8cb;
    font-size: 0.82rem;
}

.admin-weekly-detail-summary strong {
    color: var(--accent-amber);
}

.admin-weekly-completions {
    padding: 0 2rem 1.5rem;
}

.admin-weekly-completions-table {
    table-layout: fixed;
    margin-top: 0;
}

.admin-weekly-completions-table th {
    color: var(--text-dim);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
}

.admin-weekly-completion-row td {
    vertical-align: middle;
}

.admin-games-table {
    table-layout: fixed;
    margin-top: 0;
}

.admin-games-table th {
    padding: 0.75rem 0.65rem;
    color: var(--text-dim);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
}

.admin-game-row td {
    padding: 0.95rem 0.65rem;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.admin-game-row:hover td {
    background: rgba(0, 255, 204, 0.025);
}

.admin-games-table th:nth-child(1),
.admin-games-table td:nth-child(1) { width: 18%; }
.admin-games-table th:nth-child(2),
.admin-games-table td:nth-child(2) { width: 13%; }
.admin-games-table th:nth-child(3),
.admin-games-table td:nth-child(3) { width: 8%; }
.admin-games-table th:nth-child(4),
.admin-games-table td:nth-child(4) { width: 14%; }
.admin-games-table th:nth-child(5),
.admin-games-table td:nth-child(5) { width: 8%; }
.admin-games-table th:nth-child(6),
.admin-games-table td:nth-child(6) { width: 14%; }
.admin-games-table th:nth-child(7),
.admin-games-table td:nth-child(7) { width: 14%; }
.admin-games-table th:nth-child(8),
.admin-games-table td:nth-child(8) { width: 11%; }

.admin-player-email,
.admin-puzzle-title,
.admin-progress-value,
.admin-access-label {
    font-family: var(--font-code);
    font-size: 0.76rem;
}

.admin-puzzle-title,
.admin-progress-value,
.admin-access-label {
    color: var(--text-main);
}

.admin-player-email {
    color: #c6d1df;
}

.admin-games-table .badge {
    padding: 0.22rem 0.45rem;
    font-size: 0.62rem;
    white-space: normal;
}

.admin-delete-message {
    margin: 0 2rem 1rem;
}

.admin-game-delete > summary {
    cursor: pointer;
    list-style: none;
    text-align: center;
}

.admin-game-delete > summary::-webkit-details-marker {
    display: none;
}

.admin-game-delete-confirmation {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.admin-game-delete-confirmation p {
    margin: 0;
    color: #ff8b96;
    font-size: 0.68rem;
    line-height: 1.4;
}

.admin-game-delete-confirmation .btn-sm {
    width: 100%;
    white-space: normal;
}

.admin-date {
    display: flex;
    flex-direction: column;
    color: #aab8cb;
    font-family: var(--font-code);
    font-size: 0.68rem;
    line-height: 1.45;
}

.admin-expiry {
    color: #f3c862;
}

.admin-empty-state {
    padding: 2.5rem 2rem;
    text-align: center;
}

.admin-pagination {
    display: flex;
    justify-content: flex-end;
    padding: 0 2rem 1.5rem;
}

.leaderboard-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.leaderboard-entry-highlight {
    background: rgba(0, 255, 204, 0.08);
    box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.leaderboard-manage-shell {
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

.leaderboard-empty-state,
.leaderboard-publish-form,
.leaderboard-entry-preview {
    padding: 1.5rem;
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.leaderboard-run-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
}

.leaderboard-publish-form select,
.leaderboard-run-picker select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(6, 9, 17, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-code);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    outline: none;
}

.leaderboard-publish-form select:focus,
.leaderboard-run-picker select:focus {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.leaderboard-run-picker select {
    margin-bottom: 0;
}

.leaderboard-manage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    align-items: start;
    gap: 1.25rem;
}

.leaderboard-entry-preview dl {
    margin: 0;
}

.leaderboard-entry-preview dl > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.leaderboard-entry-preview dt {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.leaderboard-entry-preview dd {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.leaderboard-privacy-note {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.leaderboard-publish-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.leaderboard-publish-actions .btn-cta,
.leaderboard-publish-actions .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.2rem;
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

th {
    font-family: var(--font-code);
    color: var(--accent-amber);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

tr:hover td {
    background: rgba(0, 255, 204, 0.03);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-code);
    font-weight: 600;
    white-space: nowrap;
}

.badge-human {
    background: rgba(0, 255, 204, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 255, 204, 0.3);
}

.badge-ai {
    background: rgba(255, 183, 3, 0.15);
    color: var(--accent-amber);
    border: 1px solid rgba(255, 183, 3, 0.3);
}

/* Code highlight styling */
pre {
    background: #060911 !important;
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    font-family: var(--font-code);
    font-size: 0.9rem;
    margin: 1rem 0;
}

:not(pre) > code {
    font-family: var(--font-code);
    color: var(--accent-cyan);
}

pre code {
    font-family: var(--font-code);
    color: var(--text-main);
}

/* Pygments Syntax Highlighting Theme */
.codehilite { background: #060911; }
.codehilite .hll { background-color: #222738; }
.codehilite .c, .codehilite .ch, .codehilite .cd, .codehilite .cm, .codehilite .c1, .codehilite .cs { color: #6272a4; font-style: italic; } /* Comment */
.codehilite .k, .codehilite .kc, .codehilite .kd, .codehilite .kn, .codehilite .kp, .codehilite .kr, .codehilite .kt { color: #ff79c6; font-weight: 600; } /* Keyword */
.codehilite .s, .codehilite .sa, .codehilite .sb, .codehilite .sc, .codehilite .dl, .codehilite .sd, .codehilite .s2, .codehilite .se, .codehilite .sh, .codehilite .si, .codehilite .sx, .codehilite .sr, .codehilite .s1, .codehilite .ss { color: #f1fa8c; } /* String */
.codehilite .m, .codehilite .mb, .codehilite .mf, .codehilite .mh, .codehilite .mi, .codehilite .il, .codehilite .mo { color: #bd93f9; } /* Number */
.codehilite .na, .codehilite .nb, .codehilite .nc, .codehilite .no, .codehilite .nd, .codehilite .ni, .codehilite .ne, .codehilite .nf, .codehilite .nl, .codehilite .nn, .codehilite .nt, .codehilite .nv, .codehilite .vc, .codehilite .vg, .codehilite .vi { color: #50fa7b; } /* Name / Function / Class */
.codehilite .o, .codehilite .ow { color: #ff79c6; } /* Operator */
.codehilite .p { color: var(--text-main); } /* Punctuation */

input[type="email"], input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(6, 9, 17, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-code);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    outline: none;
}

input[type="email"]:focus, input[type="text"]:focus {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* UTILITY CLASSES */

/* Typography */
.font-code { font-family: var(--font-code); }
.text-cyan { color: var(--accent-cyan); }
.text-amber { color: var(--accent-amber); }
.text-dim { color: var(--text-dim); }
.text-main { color: var(--text-main); }
.glow-cyan { text-shadow: var(--glow-cyan); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-white { color: #fff; }

/* Font Sizes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 0.95rem; }
.text-lg { font-size: 1.15rem; }
.text-xl { font-size: 1.3rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-hero { font-size: 2.8rem; }

/* Font Weights & Spacing */
.font-bold { font-weight: 600; }
.font-bold-800 { font-weight: 800; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-wider { letter-spacing: 2px; }
.tracking-widest { letter-spacing: 0.12em; }

/* Flexbox */
.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Margins */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.8rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.ml-2 { margin-left: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.my-12 { margin-top: 3rem; margin-bottom: 3rem; }

/* Paddings */
.p-2 { padding: 0.1rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pt-6 { padding-top: 1.5rem; }

/* Utility Layouts & Misc */
.block { display: block; }
.inline-block { display: inline-block; }
.max-w-md { max-width: 650px; }
.max-w-lg { max-width: 700px; }
.min-h-80vh { min-height: 80vh; }
.w-full { width: 100%; }
.no-underline { text-decoration: none; }
.cursor-pointer { cursor: pointer; }
.leading-tight { line-height: 1.2; }
.leading-loose { line-height: 1.8; }
.overflow-hidden { overflow: hidden; }
.whitespace-nowrap { white-space: nowrap; }
.opacity-0 { opacity: 0; }

/* Theme Helpers */
.bg-dark { background: #060911; }
.bg-darker { background: #05070a; }
.bg-panel { background: #0b0e14; }
.bg-header { background: rgba(255,255,255,0.04); }
.bg-card-light { background: rgba(15, 18, 26, 0.6); }
.bg-white-5 { background: rgba(255,255,255,0.05); }
.border-solid { border: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-light { border: 1px solid rgba(255, 255, 255, 0.1); }
.border-b-light { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.border-t-light { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.border-none { border: none !important; }
.bg-transparent { background: transparent !important; }
.rounded { border-radius: 4px; }
.rounded-lg { border-radius: 8px; }
.shadow-lg { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.text-muted { color: #a3b8cc; }

/* Components */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(124, 245, 196, 0.1);
    border: 1px solid rgba(124, 245, 196, 0.3);
    border-radius: 20px;
    color: var(--accent-cyan);
    font-family: var(--font-code);
    font-size: 0.85rem;
}
.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
}
.weekly-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    width: min(100%, 36rem);
    margin: 0 auto 1.25rem;
}
.weekly-countdown-segment {
    padding: 0.9rem 0.5rem 0.75rem;
    background: rgba(6, 9, 17, 0.72);
    border: 1px solid rgba(0, 255, 204, 0.24);
    border-radius: 8px;
    box-shadow: inset 0 0 18px rgba(0, 255, 204, 0.03);
}
.weekly-countdown-value,
.weekly-countdown-label {
    display: block;
    font-family: var(--font-code);
}
.weekly-countdown-value {
    color: var(--accent-cyan);
    font-size: clamp(1.5rem, 4vw, 2.35rem);
    font-weight: 600;
    line-height: 1;
    text-shadow: var(--glow-cyan);
}
.weekly-countdown-label {
    margin-top: 0.45rem;
    color: var(--text-dim);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.faq-item {
    background: rgba(6, 9, 17, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.2rem;
}
.btn-solid-cyan {
    background: var(--accent-cyan);
    color: #080a0f;
    font-weight: 700;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}
.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}
.btn-outline.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}
.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Specific Component / Form Styling */
.alert-success {
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.alert-error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid #ff4757;
    color: #ff8b96;
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.btn-danger {
    border-color: #ff4757;
    color: #ff4757;
}
.btn-danger:hover, .btn-danger.active {
    background: #ff4757;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.3);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Markdown Blog and public information body styles */
.blog-body a,
.public-page-body a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.blog-body a:hover,
.public-page-body a:hover {
    color: #50fa7b;
    text-decoration: underline;
    text-shadow: var(--glow-cyan);
}

.blog-list-title-link,
.blog-back-link {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: text-decoration-color 0.2s ease;
}

.blog-list-title-link:hover,
.blog-list-title-link:focus-visible,
.blog-back-link:hover,
.blog-back-link:focus-visible {
    text-decoration: underline;
}

.blog-back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-family: var(--font-code);
    font-size: 0.85rem;
}

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.public-page-support {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.blog-body hr,
.public-page-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}
.blog-body ul,
.blog-body ol,
.public-page-body ul,
.public-page-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}
.blog-body li,
.public-page-body li {
    margin-bottom: 0.5rem;
}
.blog-body img,
.public-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}
.blog-body img {
    display: block;
    margin: 1rem auto;
}
.blog-body table,
.public-page-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

/* Table Responsiveness */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

@media (max-width: 768px) {
    .profile-dashboard-header {
        padding: 1.25rem;
    }

    .profile-runs {
        padding: 0 1.25rem 1.25rem;
    }

    .admin-shell {
        width: 100%;
        margin: 1rem auto;
    }

    .admin-dashboard-header {
        padding: 1.25rem;
    }

    .admin-workspace-nav {
        padding: 0.75rem 1.25rem;
    }

    .admin-grant-panel {
        padding: 1.25rem;
    }

    .admin-grant-form {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .admin-grant-form .btn-cta {
        width: 100%;
    }

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

    .admin-weekly-panel,
    .admin-games-panel,
    .admin-weekly-detail-header {
        padding: 1.25rem;
    }

    .admin-weekly-completions {
        padding: 0 1.25rem 1.25rem;
    }

    .admin-weekly-table-wrap {
        overflow: visible;
    }

    .admin-weekly-overview-pagination {
        padding-top: 1rem;
    }

    .admin-weekly-table,
    .admin-weekly-table tbody,
    .admin-weekly-completions-table,
    .admin-weekly-completions-table tbody {
        display: block;
        width: 100%;
    }

    .admin-weekly-table thead,
    .admin-weekly-completions-table thead {
        display: none;
    }

    .admin-weekly-row,
    .admin-weekly-completion-row {
        display: block;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .admin-weekly-row td,
    .admin-weekly-completion-row td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
        gap: 0.75rem;
        width: 100% !important;
        padding: 0.45rem 0;
        border: 0;
    }

    .admin-weekly-row td::before,
    .admin-weekly-completion-row td::before {
        content: attr(data-label);
        color: var(--text-dim);
        font-family: var(--font-code);
        font-size: 0.66rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .admin-games-table,
    .admin-games-table tbody {
        display: block;
        width: 100%;
    }

    .admin-games-table thead {
        display: none;
    }

    .admin-game-row {
        display: block;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .admin-game-row td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
        gap: 0.75rem;
        width: 100% !important;
        padding: 0.5rem 0;
        border: 0;
    }

    .admin-game-row td::before {
        content: attr(data-label);
        color: var(--text-dim);
        font-family: var(--font-code);
        font-size: 0.66rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .admin-pagination {
        padding: 0 1.25rem 1.25rem;
    }

    .profile-runs-table,
    .profile-runs-table tbody {
        display: block;
        width: 100%;
    }

    .profile-runs-table thead {
        display: none;
    }

    .profile-run-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.7rem 1rem;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .profile-run-row td {
        display: block;
        width: auto !important;
        padding: 0;
        border: 0;
        box-shadow: none !important;
    }

    .profile-run-row td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .profile-run-row td:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .profile-run-row td:nth-child(3) {
        grid-column: 1;
        grid-row: 3;
    }

    .profile-run-row td:nth-child(4) {
        grid-column: 2;
        grid-row: 1;
    }

    .profile-run-row td:nth-child(5) {
        grid-column: 2;
        grid-row: 3;
    }

    .profile-run-row td:nth-child(2)::before,
    .profile-run-row td:nth-child(3)::before,
    .profile-run-row td:nth-child(4)::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.1rem;
        color: var(--text-dim);
        font-family: var(--font-code);
        font-size: 0.62rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .profile-run-date {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .profile-run-time {
        font-size: inherit;
    }

    .profile-run-detail-row,
    .profile-run-detail-row td {
        display: block;
        width: 100%;
    }

    .profile-run-detail-row td {
        width: 100% !important;
        padding: 0 0 1rem;
    }

    .profile-run-details > summary {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .profile-summary-progress {
        white-space: normal;
        text-align: right;
    }

    .profile-roadmap-hints {
        margin-left: 0;
    }

    .leaderboard-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .leaderboard-manage-grid,
    .leaderboard-run-picker {
        grid-template-columns: minmax(0, 1fr);
    }

    .leaderboard-run-picker .btn-outline {
        width: 100%;
        text-align: center;
    }

    .leaderboard-manage-shell {
        padding: 1.25rem;
    }

    .leaderboard-empty-state,
    .leaderboard-publish-form,
    .leaderboard-entry-preview {
        padding: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 15, 25, 0.95);
        backdrop-filter: blur(12px);
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border-color);
        gap: 1.2rem;
        align-items: stretch;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 0.5rem 0;
    }

    .grid-2-cols {
        grid-template-columns: 1fr;
    }

    .text-hero {
        font-size: 2.2rem;
    }

    .card.py-16.px-8 {
        padding: 2.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .profile-dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-dashboard-header form {
        align-self: flex-start;
    }

    .admin-grant-panel {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .admin-workspace-nav,
    .admin-weekly-panel,
    .admin-games-panel,
    .admin-weekly-detail-header,
    .admin-weekly-completions {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .admin-weekly-detail-shell {
        width: 100%;
        margin: 1rem auto;
    }

    .admin-pagination {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .admin-pagination .btn-cta {
        width: 100%;
    }

    .admin-weekly-overview-pagination {
        gap: 0.55rem;
        padding-right: 0;
        padding-left: 0;
    }

    .admin-weekly-overview-pagination .btn-outline,
    .admin-weekly-overview-pagination .btn-cta {
        width: 100%;
        padding-right: 0.55rem;
        padding-left: 0.55rem;
        text-align: center;
    }

    .profile-dashboard-header form {
        align-self: flex-start;
    }

    .profile-runs {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .profile-run-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-run-row td:nth-child(1),
    .profile-run-row td:nth-child(2),
    .profile-run-row td:nth-child(3),
    .profile-run-row td:nth-child(4),
    .profile-run-row td:nth-child(5) {
        grid-column: 1;
        grid-row: auto;
    }

    .profile-run-actions {
        margin-top: 0.2rem;
    }

    .profile-run-action {
        width: 100%;
    }

    .profile-roadmap-step {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}
