/* ═══════════════════════════════════════════════════════════
   Map11 — Shared Design System (secondary pages)
   Flat · bold · minimal. Mirrors the tokens in style.css.
   ═══════════════════════════════════════════════════════════ */
@font-face {
    font-family: 'Ease Double';
    src: url('/fonts/EaseDoubleRounded-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Ease Double';
    src: url('/fonts/EaseDoubleRounded-Black.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'At Aero';
    src: url('/fonts/AtAero-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'At Aero';
    src: url('/fonts/AtAero-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'At Aero';
    src: url('/fonts/AtAero-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'At Aero';
    src: url('/fonts/AtAero-Retina.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ── Design Tokens — identical to style.css ─────────────────── */
:root {
    --lime:        #92ff4a;
    --lime-strong: #74e828;
    --lime-text:   #2f6b0e;
    --lime-dim:    rgba(146, 255, 74, 0.18);
    --lime-border: rgba(146, 255, 74, 0.7);
    --lime-06:     rgba(146, 255, 74, 0.08);

    --fg-rgb: 22, 23, 21;
    --ink:     rgb(var(--fg-rgb));
    --ink-90:  rgba(var(--fg-rgb), 0.9);
    --ink-85:  rgba(var(--fg-rgb), 0.85);
    --ink-75:  rgba(var(--fg-rgb), 0.75);
    --ink-60:  rgba(var(--fg-rgb), 0.6);
    --ink-45:  rgba(var(--fg-rgb), 0.45);
    --ink-35:  rgba(var(--fg-rgb), 0.35);
    --ink-25:  rgba(var(--fg-rgb), 0.25);
    --ink-15:  rgba(var(--fg-rgb), 0.15);
    --ink-10:  rgba(var(--fg-rgb), 0.1);
    --ink-08:  rgba(var(--fg-rgb), 0.08);
    --ink-06:  rgba(var(--fg-rgb), 0.06);
    --ink-04:  rgba(var(--fg-rgb), 0.04);

    --ink-fixed: #161715;

    --bg:      #f5f5f5;
    --surface: #ffffff;

    --r-xs: 0px; --r-sm: 0px; --r-md: 0px; --r-lg: 0px; --r-xl: 0px; --r-2xl: 0px; --r-pill: 0px;

    --line:        1px solid var(--ink-10);
    --line-strong: 1.5px solid var(--ink);

    --pop:    3px 3px 0 var(--ink);
    --pop-sm: 2px 2px 0 var(--ink);

    --font-display: 'Ease Double', -apple-system, sans-serif;
    --font: 'At Aero', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --ease: 0.14s ease;

    /* Semantic — used sparingly, only where color carries real meaning */
    --red:   #c62828;
    --gold:  #a3760a;
    --green: #2f6b0e;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --fg-rgb: 240, 240, 238;
        --bg:      #161715;
        --surface: #201f1c;
        --lime-text: #8fe259;
        --red:   #ff6b6b;
        --gold:  #e0b24d;
        --green: #8fe259;
    }
}
:root[data-theme="dark"] {
    --fg-rgb: 240, 240, 238;
    --bg:      #161715;
    --surface: #201f1c;
    --lime-text: #8fe259;
    --red:   #ff6b6b;
    --gold:  #e0b24d;
    --green: #8fe259;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Browser surfaces — themed, not left to defaults ──────── */
::selection { background: var(--lime); color: var(--ink-fixed); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }

/* ── Base ────────────────────────────────────────────────── */
html, body {
    min-height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink-85);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Page container ──────────────────────────────────────── */
.page {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 52px 24px 96px;
}

/* ── Back navigation ─────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-60);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 40px;
    transition: color var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.back-link:hover { color: var(--ink); }
.back-link svg { flex-shrink: 0; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 40px;
}

.hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    background: var(--surface);
    border: var(--line-strong);
    box-shadow: var(--pop-sm);
    flex-shrink: 0;
    color: var(--ink);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1.1;
}

.hero p {
    margin-top: 6px;
    font-size: 15px;
    color: var(--ink-60);
    font-weight: 400;
    line-height: 1.5;
}

/* ── Section ─────────────────────────────────────────────── */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-35);
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: var(--line-strong);
    padding: 22px 26px;
    margin-bottom: 14px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.card-header svg { color: var(--ink); flex-shrink: 0; }

.card h2 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0;
}

.card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-75);
}
.card p + p { margin-top: 12px; }

.card a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--ink-25);
    transition: text-decoration-color var(--ease);
}
.card a:hover { text-decoration-color: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 20px;
    font-size: 13px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--ease);
    border: var(--line-strong);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--lime);
    color: var(--ink-fixed);
    border-color: var(--ink-fixed);
    box-shadow: var(--pop-sm);
}
.btn-primary:hover {
    background: var(--lime-strong);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink-fixed);
}
.btn-primary:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink-fixed); }

.btn-secondary {
    background: var(--surface);
    border-color: var(--ink);
    color: var(--ink-75);
}
.btn-secondary:hover { background: var(--ink-06); color: var(--ink); }

.btn-ghost {
    background: var(--surface);
    border-color: var(--ink-15);
    color: var(--ink-60);
}
.btn-ghost:hover {
    background: var(--ink-06);
    border-color: var(--ink-45);
    color: var(--ink);
}

.btn-danger {
    background: var(--surface);
    border-color: var(--ink-15);
    color: var(--red);
}
.btn-danger:hover { background: var(--ink-06); border-color: var(--red); }

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

/* ── Board (list/leaderboard) ────────────────────────────── */
.board {
    background: var(--surface);
    border: var(--line-strong);
    overflow: hidden;
}

.board-row {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: var(--line);
    transition: background var(--ease);
}
.board-row:last-child { border-bottom: none; }
.board-row:hover { background: var(--ink-04); }

.board-empty,
.board-loading {
    padding: 48px 20px;
    text-align: center;
    color: var(--ink-35);
    font-size: 13px;
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    width: fit-content;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: var(--line-strong);
    background: var(--surface);
    color: var(--ink-60);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.14s ease;
    -webkit-tap-highlight-color: transparent;
}
.tab-btn.active {
    background: var(--lime);
    color: var(--ink-fixed);
    border-color: var(--ink-fixed);
}
.tab-btn:hover:not(.active) { background: var(--ink-06); color: var(--ink); }

.tab-badge {
    margin-left: 2px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    background: var(--ink-10);
    color: inherit;
    font-variant-numeric: tabular-nums;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Stats grid ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 36px;
}

.stat-card {
    background: var(--surface);
    border: var(--line-strong);
    padding: 20px 20px 16px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-45);
    margin-top: 8px;
    font-weight: 600;
}

/* ── List items ──────────────────────────────────────────── */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: var(--line);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background var(--ease), border-color var(--ease);
    margin-bottom: 6px;
}
.list-item:last-child { margin-bottom: 0; }
.list-item:hover {
    background: var(--ink-04);
    border-color: var(--ink-45);
}
.list-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.list-item-sub {
    font-size: 12px;
    color: var(--ink-35);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Badges / pills ──────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid;
    letter-spacing: 0.02em;
}
.badge-blue  { background: var(--surface); border-color: var(--ink);    color: var(--ink); }
.badge-gold  { background: var(--surface); border-color: var(--gold);   color: var(--gold); }
.badge-red   { background: var(--surface); border-color: var(--red);    color: var(--red); }
.badge-green { background: var(--surface); border-color: var(--green);  color: var(--green); }
.badge-ghost { background: var(--surface); border-color: var(--ink-15); color: var(--ink-60); }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
    height: 1.5px;
    background: var(--ink);
    margin: 28px 0;
}

/* ── Numbered steps ──────────────────────────────────────── */
.steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}
.steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink-75);
}
.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--lime);
    border: 1.5px solid var(--ink-fixed);
    font-size: 11px;
    font-weight: 800;
    color: var(--ink-fixed);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-weight: 800;
}
.avatar-md { width: 46px; height: 46px; font-size: 17px; }
.avatar-lg { width: 60px; height: 60px; font-size: 22px; }
.avatar-blue {
    background: var(--surface);
    border: var(--line-strong);
    color: var(--ink);
}

/* ── Page footer ─────────────────────────────────────────── */
.page-footer {
    margin-top: 64px;
    font-size: 12px;
    color: var(--ink-35);
    text-align: center;
    line-height: 2;
}
.page-footer a {
    color: var(--ink-45);
    text-decoration: none;
    transition: color var(--ease);
}
.page-footer a:hover { color: var(--ink); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--ink-35);
}
.empty-state p {
    font-size: 14px;
    line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .page { padding: 36px 16px 80px; }
    .hero { gap: 14px; margin-bottom: 32px; }
    .hero h1 { font-size: 25px; }
    .hero p { font-size: 14px; }
    .card { padding: 18px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
    .stat-value { font-size: 26px; }
    .back-link { margin-bottom: 30px; }
    .tabs { width: 100%; }
    .tab-btn { flex: 1; padding: 8px 10px; font-size: 12px; justify-content: center; }
    .section { margin-bottom: 30px; }
}
