/* [Claude Code] Main stylesheet for FLX Adventures */

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

:root {
    --green:       #4a9c2f;
    --green-dark:  #357320;
    --green-light: #6bbf47;
    --black:       #111111;
    --dark:        #1a1a1a;
    --mid:         #2e2e2e;
    --gray:        #6b7280;
    --light-gray:  #f4f4f4;
    --white:       #ffffff;
    --danger:      #dc2626;
    --warning:     #f59e0b;
    --success:     #16a34a;

    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body:    'Barlow', sans-serif;

    --header-h: 72px;
    --radius:   8px;
    --shadow:   0 4px 24px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--dark);
    font-size: 16px;
    line-height: 1.6;
}

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dark); }

img { max-width: 100%; display: block; }

/* [Claude Code] Site-wide banner (shown when site_banner_active = 1) */
.site-banner {
    background: var(--green);
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Header ───────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--black);
    height: var(--header-h);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.site-logo { height: 52px; width: auto; }

/* ── Navigation ───────────────────────────────────── */
.main-nav { display: flex; align-items: center; }

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-item.open > .nav-link {
    background: var(--mid);
    color: var(--green-light);
}

.nav-link--accent {
    background: var(--green);
    color: var(--white) !important;
}
.nav-link--accent:hover { background: var(--green-dark) !important; }

.nav-link--admin { color: var(--warning) !important; }
.nav-link--admin:hover { background: var(--mid); }

.arrow { font-size: 10px; transition: transform 0.2s; }
.nav-item.open .arrow { transform: rotate(180deg); }

/* Dropdowns */
.dropdown {
    list-style: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--dark);
    border: 1px solid var(--mid);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}

.nav-item.open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 16px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    border-radius: 4px;
}

.dropdown li a:hover { background: var(--mid); color: var(--green-light); }

/* [Claude Code] Highlighted dropdown link — stands out on click/hover */
.dropdown li a.nav-link--highlight {
    background: var(--green);
    color: var(--white);
    font-weight: 700;
}
.dropdown li a.nav-link--highlight:hover {
    background: var(--green-dark);
    color: var(--white);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ── Main / Layout ────────────────────────────────── */
.site-main { min-height: calc(100vh - var(--header-h) - 120px); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero (homepage placeholder) ─────────────────── */
.hero {
    background: linear-gradient(135deg, var(--black) 0%, var(--dark) 50%, #0d1f0a 100%);
    color: var(--white);
    padding: 100px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(74,156,47,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green-light);
    margin-bottom: 16px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

.hero h1 span { color: var(--green-light); }

.hero-sub {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255,255,255,0.7);
    max-width: 560px;
    margin: 0 auto 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--green); color: var(--white); box-shadow: 0 4px 20px rgba(74,156,47,0.4); }
.btn--primary:hover { background: var(--green-dark); color: var(--white); }

.btn--outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn--outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); color: var(--white); }

.btn--sm { padding: 10px 20px; font-size: 13px; }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Disciplines strip */
.disciplines {
    background: var(--green);
    padding: 18px 24px;
}
.disciplines-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.discipline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.discipline-icon { font-size: 20px; }

/* ── Auth Pages (login / register) ───────────────── */
.auth-page {
    background: var(--light-gray);
    padding: 60px 0;
    min-height: calc(100vh - var(--header-h));
}

.auth-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.auth-card-header {
    background: var(--black);
    padding: 32px 40px;
    text-align: center;
}

.auth-card-header img { height: 48px; margin: 0 auto 16px; }

.auth-card-header h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--white);
    margin-bottom: 4px;
}

.auth-card-header p { color: rgba(255,255,255,0.6); font-size: 14px; }

.auth-card-body { padding: 36px 40px; }

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 28px;
    gap: 0;
}

.auth-tab {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.auth-tab.active { color: var(--green); border-bottom-color: var(--green); }

.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* Form elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: 0.03em;
}

.form-group label .req { color: var(--green); margin-left: 2px; }

/* [Claude Code] Exclude checkboxes and radios from the full-width input style */
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--dark);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(74,156,47,0.15);
}

.form-group input:not([type="checkbox"]):not([type="radio"]).error,
.form-group select.error {
    border-color: var(--danger);
}

.field-hint {
    font-size: 12px;
    color: var(--gray);
}

.field-error {
    font-size: 12px;
    color: var(--danger);
    font-weight: 500;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--light-gray);
    margin: 24px 0;
}

.form-section-label {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 16px;
}

.form-submit { margin-top: 8px; }
.form-submit .btn { width: 100%; justify-content: center; font-size: 17px; padding: 15px; }

/* Alert banners */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert--danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.alert--info    { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }

/* [Claude Code] Registration error alert — centered, larger text */
.reg-card .alert--danger {
    justify-content: center;
    text-align: center;
    font-size: 16px;
}

/* Password strength */
.password-strength { margin-top: 6px; }
.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 4px;
}
.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    width: 0%;
}
.strength-label { font-size: 12px; font-weight: 600; }

/* ── Footer ───────────────────────────────────────── */
.site-footer {
    background: var(--black);
    color: rgba(255,255,255,0.5);
    padding: 32px 24px;
    text-align: center;
}

.footer-inner { max-width: 800px; margin: 0 auto; }
.footer-logo img { height: 40px; margin: 0 auto 12px; opacity: 0.7; }
.footer-tagline { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.footer-copy { font-size: 13px; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .main-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--dark);
        border-top: 1px solid var(--mid);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    /* [Claude Code] increased from 600px so Admin dropdown doesn't get clipped on mobile */
    .main-nav.open { max-height: 900px; }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 20px;
        gap: 2px;
    }

    .nav-link { padding: 12px 16px; }

    .dropdown {
        position: static;
        background: rgba(255,255,255,0.05);
        border: none;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .nav-item.open .dropdown { max-height: 400px; }

    .form-row { grid-template-columns: 1fr; }
    .auth-card-body { padding: 24px 20px; }
    .auth-card-header { padding: 24px 20px; }

    /* [Claude Code] Profile page responsive — moved to 768px block but grid needs wider breakpoint; see 860px block below */
    .profile-card-body { padding: 24px 20px; }
    .profile-card-header { padding: 18px 20px; }

    /* [Claude Code] Admin pages — reduce card padding and page horizontal padding on mobile */
    .admin-page { padding-left: 12px; padding-right: 12px; }
    .admin-card-body { padding: 20px 16px; }
    .admin-card-header { padding: 14px 16px; }

    /* [Claude Code] Profile page — tighten vertical padding on small screens */
    .profile-page { padding: 28px 0 40px; }
}

/* ── Admin Pages ──────────────────────────────────── */
/* [Claude Code] Shared admin layout, table, and card styles */
.admin-page {
    background: var(--light-gray);
    padding: 36px 0 64px;
    min-height: calc(100vh - var(--header-h));
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-page-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--dark);
    line-height: 1.1;
}

.admin-page-sub {
    font-size: 13px;
    color: var(--gray);
    margin-top: 3px;
}

.admin-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-card-header {
    background: var(--black);
    padding: 16px 28px;
}

.admin-card-header h2 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
}

.admin-card-body {
    padding: 28px;
}

/* Admin table */
.admin-table-wrap {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table thead {
    background: var(--black);
    color: var(--white);
}

.admin-table th {
    padding: 13px 16px;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--light-gray);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #fafafa; }

.admin-table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* [Claude Code] Past Results leaderboard expand row — slightly darker bg so the race row stands out */
.past-event-row td { background: #fff; }
.past-lb-expand-td { background: #eef0ef !important; padding: 24px 20px !important; }
.past-lb-expand-inner { max-width: 100%; }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge--green { background: #dcfce7; color: #14532d; }
.badge--gray  { background: #f3f4f6; color: #374151; }
.badge--dark  { background: #e5e7eb; color: #1f2937; }

/* Extra button variants for admin */
.btn--outline-dark { background: transparent; color: var(--dark); border: 1.5px solid #d1d5db; }
.btn--outline-dark:hover { border-color: var(--dark); background: var(--light-gray); color: var(--dark); }

.btn--green  { background: var(--green);  color: var(--white); }
.btn--green:hover { background: var(--green-dark); color: var(--white); }

.btn--gray   { background: #6b7280; color: var(--white); }
.btn--gray:hover { background: #4b5563; color: var(--white); }

.btn--danger { background: var(--danger); color: var(--white); }
.btn--danger:hover { background: #b91c1c; color: var(--white); }
/* [Claude Code] Outlined danger variant for softer destructive actions */
.btn--danger-outline { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn--danger-outline:hover { background: var(--danger); color: var(--white); }

/* Race type blocks */
.race-type-block {
    border: 1.5px solid #e5e7eb;
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}

.race-type-block-header {
    background: var(--mid);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.race-type-block-label {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
}

.remove-race-type {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}
.remove-race-type:hover { color: var(--white); }

.race-type-block-body {
    padding: 20px;
    background: #fafafa;
}

/* 4-col grid for limits row */
.race-type-block-body .form-row:has(input[name*="max_"]) {
    grid-template-columns: repeat(4, 1fr);
}

/* 4-column grid for limits row */
.form-row--4col { grid-template-columns: repeat(4, 1fr); }

/* Boat discount inputs side by side */
.boat-discount-row {
    display: flex;
    gap: 16px;
}
.boat-discount-row input { width: 120px; }

/* Checkboxes */
.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-group--inline { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--dark);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Profile Page ─────────────────────────────────── */
/* [Claude Code] Profile page layout and card styles */
.profile-page {
    background: var(--light-gray);
    padding: 48px 0 64px;
    min-height: calc(100vh - var(--header-h));
}

.profile-header {
    margin-bottom: 32px;
}

.profile-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--dark);
    line-height: 1.1;
}

.profile-username {
    font-size: 15px;
    color: var(--gray);
    margin-top: 4px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.profile-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-card-header {
    background: var(--black);
    padding: 18px 32px;
}

.profile-card-header h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
}

.profile-card-body {
    padding: 32px;
}

/* [Claude Code] ── Content Pages (Event Rules, Mandatory Gear, etc.) ─── */
.content-page {
    padding: 48px 24px 80px;
}

.content-page__inner {
    max-width: 860px;
    margin: 0 auto;
}

.content-page__header {
    margin-bottom: 40px;
    border-bottom: 3px solid var(--green);
    padding-bottom: 24px;
}

.content-page__header h1 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--black);
    margin-bottom: 16px;
}

.content-page__intro {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.content-page__revised {
    margin-top: 48px;
    font-size: 0.85rem;
    color: var(--gray);
    font-style: italic;
}

/* [Claude Code] cancellation policy page */
.content-page__body h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; color: var(--dark); }
.content-page__body p  { margin-bottom: 1rem; line-height: 1.7; }

.cancel-policy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 2rem;
    font-size: 0.95rem;
}
.cancel-policy-table th,
.cancel-policy-table td {
    padding: 10px 14px;
    border: 1px solid var(--light-gray);
    text-align: left;
}
.cancel-policy-table thead th {
    background: var(--dark);
    color: var(--white);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.03em;
}
.cancel-policy-table tbody tr:nth-child(even) { background: #f9f9f9; }

.content-list { padding-left: 1.4rem; margin: 0.5rem 0 1.5rem; line-height: 1.8; }
.content-list li { margin-bottom: 0.6rem; }

/* ── Event Rules list ── */
.rules-list {
    list-style: none;
    counter-reset: rule-counter;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rules-list > li {
    counter-increment: rule-counter;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.rules-list > li::before {
    content: counter(rule-counter) ".";
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green);
    padding-top: 2px;
    grid-column: 1;
    grid-row: 1 / 99;
}

.rule-text {
    grid-column: 2;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--dark);
}

.rule-penalty {
    grid-column: 2;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

.penalty-label {
    font-weight: 600;
    color: var(--danger);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    margin-right: 4px;
}

.rule-sublist {
    list-style: disc;
    padding-left: 20px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--dark);
}

.penalty-time-list {
    list-style: none;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--gray);
}

.penalty-time-list li::before {
    content: "•";
    color: var(--danger);
    margin-right: 6px;
}

/* ── Mandatory Gear sections ── */
.gear-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.gear-section {
    background: var(--light-gray);
    border-radius: var(--radius);
    padding: 28px 32px;
    border-left: 4px solid var(--green);
}

.gear-section--nocturnal {
    border-left-color: #6366f1;
}

.gear-section--optional {
    border-left-color: var(--gray);
    background: #fafafa;
}

.gear-section__title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--black);
    margin-bottom: 16px;
}

.gear-section__note {
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: none;
    color: var(--gray);
    letter-spacing: 0;
}

.gear-section__desc {
    font-size: 0.97rem;
    color: var(--dark);
    line-height: 1.7;
}

.gear-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gear-list > li {
    padding-left: 20px;
    position: relative;
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--dark);
}

.gear-list > li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

.gear-sublist {
    list-style: none;
    margin-top: 8px;
    padding-left: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gear-sublist > li {
    padding-left: 16px;
    position: relative;
    font-size: 0.93rem;
    color: var(--dark);
    line-height: 1.55;
}

.gear-sublist > li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--gray);
}

.gear-list--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 32px;
}

@media (max-width: 600px) {
    .content-page__header h1 { font-size: 2rem; }
    .rules-list > li { grid-template-columns: 32px 1fr; }
    .gear-section { padding: 20px; }
    .gear-list--two-col { grid-template-columns: 1fr; }
}

/* [Claude Code] ── Individual Event Pages ────────────────────── */
.event-page {}

.event-hero {
    background: var(--white); /* [Claude Code] changed from --black to --white */
    text-align: center;
    padding: 40px 24px;
    border-bottom: 3px solid var(--green);
}

.event-hero img {
    max-height: 320px;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    object-fit: contain;
}

.event-page__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.event-page__title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.event-page__header h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--black);
}

.event-disciplines {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.discipline-pill {
    background: var(--light-gray);
    border: 1px solid #ddd;
    border-radius: 99px;
    padding: 4px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark);
}

/* ── Two-column layout ── */
.event-page__body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.event-page__main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;    /* [Claude Code] prevents grid column from expanding beyond 1fr */
    overflow: hidden; /* [Claude Code] clips content that would otherwise bleed into sidebar */
}

/* [Claude Code] About-section heading row: h2 + edit button side by side */
.about-heading-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}
.about-heading-row h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
}
.about-heading-row + .event-about-text,
.about-heading-row + #about-display,
.about-heading-row + #about-editor { margin-top: 16px; }

/* [Claude Code] Quill editor integration */
#about-editor .ql-toolbar { border-radius: 6px 6px 0 0; border-color: #ccc; }
#about-editor .ql-container { border-color: #ccc; font-family: var(--font-body); font-size: 1rem; line-height: 1.75; overflow: hidden; }
#about-editor .ql-editor { min-height: 160px; padding: 12px 16px; white-space: normal; }
#about-editor .ql-editor p { margin-bottom: 0; }
#about-editor .ql-editor p + p { margin-top: 12px; }

.event-section h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--black);
    border-bottom: 2px solid var(--green);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.event-about-text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--dark);
}

.event-about-text p + p { margin-top: 12px; }

.event-section--links { }

.event-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-links-list li {
    font-size: 1rem;
}

.event-links-list a {
    font-weight: 600;
}

.event-links-note {
    font-size: 0.85rem;
    color: var(--gray);
    margin-left: 6px;
}

/* ── Sidebar cards ── */
.event-page__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-info-card {
    background: var(--light-gray);
    border-radius: var(--radius);
    padding: 20px 22px;
    border-left: 4px solid var(--green);
}

.event-info-card--reg {
    border-left-color: var(--green-dark);
    background: #edf7e8;
}

.event-info-card__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
    margin-bottom: 8px;
}

.event-info-card__main {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 4px;
}

.event-info-card__race-type {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--green-dark);
    margin-top: 10px;
    margin-bottom: 4px;
}

.event-info-card__detail {
    font-size: 0.92rem;
    color: var(--dark);
    line-height: 1.6;
    margin-bottom: 4px;
}

.event-info-card__limits {
    font-size: 0.82rem;
    color: var(--gray);
    margin-top: 6px;
}

.event-info-card__link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--green);
}

.event-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.event-schedule-table td {
    padding: 4px 0;
    color: var(--dark);
}

.event-schedule-table td:first-child {
    color: var(--gray);
    width: 90px;
}

.event-schedule-table td:last-child {
    font-weight: 600;
}

.event-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    margin-bottom: 4px;
}

.category-pill {
    background: var(--white);
    border: 1px solid #ccc;
    border-radius: 99px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dark);
}

.btn--block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 12px;
}

/* [Claude Code] Admin — outline-green button variant */
.btn--outline-green {
    border: 2px solid var(--green);
    color: var(--green);
    background: transparent;
}
.btn--outline-green:hover {
    background: var(--green);
    color: var(--white);
}

@media (max-width: 860px) {
    .event-page__body { grid-template-columns: 1fr; }
    .event-page__sidebar { order: -1; }
    .event-page__header h1 { font-size: 2.2rem; }

    /* [Claude Code] Collapse profile layout before the 380px sidebar column can overflow the grid */
    .profile-layout { grid-template-columns: 1fr; }
}

/* ── Registration ─────────────────────────────────── */ /* [Claude Code] */
.reg-card {
    max-width: 860px;
    margin: 48px auto;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.reg-event-header {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--dark);
    color: var(--white);
}
/* [Claude Code] White background behind logo only; text area keeps dark background */
.reg-event-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 16px 20px;
    flex-shrink: 0;
}
.reg-event-logo { height: 64px; width: auto; border-radius: 0; display: block; }
.reg-event-header-text { padding: 24px 32px; }
.reg-title { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin: 0; color: var(--white); }
.reg-meta  { font-size: 0.95rem; color: #aaa; margin: 4px 0 0; }

.reg-section {
    padding: 28px 32px;
    border-bottom: 1px solid #e5e7eb;
}
.reg-section:last-of-type { border-bottom: none; }
.reg-section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--green);
    margin: 0 0 16px;
}

.reg-optional { font-size: 0.8rem; font-weight: 400; color: var(--gray); font-family: var(--font-body); text-transform: none; letter-spacing: 0; }
.required     { color: var(--danger); }
.field-hint   { font-size: 0.82rem; color: var(--gray); margin-top: 6px; }

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 200px; }

.price-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 14px;
    background: #f0faf0;
    border: 1px solid #c3e6c3;
    border-radius: var(--radius);
    font-size: 0.95rem;
}
.price-amount { font-size: 1.3rem; font-weight: 700; color: var(--green); }
.price-mode-note { color: var(--gray); font-size: 0.85rem; }

/* Racer slots */
.racer-slot {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.racer-slot:last-child { border-bottom: none; }
.racer-slot--self { align-items: center; }
.racer-slot-label {
    font-weight: 600;
    min-width: 90px;
    flex-shrink: 0;
    padding-top: 2px;
}
.racer-self-name { font-size: 1rem; }

.racer-toggle { display: flex; gap: 6px; flex-shrink: 0; padding-top: 2px; }
.racer-panel { flex: 1; min-width: 260px; }
.racer-panel.hidden { display: none; }
.btn--active { background: var(--green) !important; color: var(--white) !important; border-color: var(--green) !important; }

.new-racer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* [Claude Code] Racer autocomplete combobox */
/* [Claude Code] Match padding/border/font of .form-group inputs since .racer-ac-input is nested one level deeper */
.racer-ac { position: relative; width: 100%; }
.racer-ac-input { width: 100%; padding: 11px 14px; border: 1.5px solid #d1d5db; border-radius: var(--radius); font-family: var(--font-body); font-size: 1rem; }

.racer-ac-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0; right: 0;
    z-index: 200;
    background: var(--white);
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    list-style: none;
    margin: 0; padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
}

.racer-ac-dropdown li {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.racer-ac-dropdown li:hover { background: var(--light-gray); }
.ac-id { color: var(--gray); font-size: 0.82rem; }
/* [Claude Code] Already-registered racers — grayed out, cursor blocked */
.racer-ac-dropdown li.ac-taken { color: #bbb; cursor: not-allowed; }
.racer-ac-dropdown li.ac-taken:hover { background: none; }
.ac-taken-label { font-size: 0.75rem; color: #bbb; font-style: italic; margin-left: 6px; }

/* [Claude Code] Event-edit autocomplete dropdown — same look as racer-ac-dropdown but positioned via JS (position:fixed injected inline) */
.ee-ac-dropdown {
    background: var(--white);
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    list-style: none;
    margin: 0; padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
}
.ee-ac-dropdown li {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ee-ac-dropdown li:hover { background: var(--light-gray); }

.fob-chip {
    display: inline-block;
    padding: 2px 10px;
    border: 1px solid var(--green);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--green);
    background: none;
    cursor: pointer;
    margin: 0 4px 4px 0;
    transition: background 0.15s, color 0.15s;
}
.fob-chip:hover { background: var(--green); color: var(--white); }

.reg-submit-row {
    padding: 24px 32px;
    border-top: 1px solid #e5e7eb;
    background: var(--light-gray);
    display: flex;
    justify-content: flex-end;
}

/* Confirmation page */
.reg-card--confirm { text-align: center; }
.confirm-header { padding: 40px 32px 24px; }
.confirm-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--green); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 16px;
}
.confirm-logo-wrap { padding: 0 32px 8px; display: flex; justify-content: center; }
.confirm-event-logo { max-height: 80px; border-radius: 4px; }

.confirm-section {
    padding: 20px 32px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
.confirm-section-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin: 0 0 12px;
}

.confirm-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.confirm-table th { text-align: left; width: 140px; padding: 6px 12px 6px 0; color: var(--gray); font-weight: 500; vertical-align: top; }
.confirm-table td { padding: 6px 0; }
.confirm-email { display: block; font-size: 0.82rem; color: var(--gray); }

.confirm-table--price .price-row--discount td { color: var(--success); }
.confirm-table--price .price-row--total th,
.confirm-table--price .price-row--total td {
    font-size: 1.1rem; font-weight: 700; padding-top: 10px; border-top: 1px solid #e5e7eb;
}

.confirm-actions {
    padding: 28px 32px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.confirm-reg-id { font-size: 0.78rem; color: var(--gray); padding-bottom: 20px; }

@media (max-width: 600px) {
    .reg-section, .reg-submit-row, .confirm-section, .confirm-actions { padding-left: 20px; padding-right: 20px; }
    .reg-event-header { padding: 20px; gap: 14px; }
    .new-racer-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
}

/* ── Admin — Manage Teams ─────────────────────────────── */ /* [Claude Code] */
.team-card {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    margin-bottom: 16px;
    /* [Claude Code] overflow removed so autocomplete dropdowns can escape the card boundary */
}
/* [Claude Code] Clip header children (logos etc.) to the card's top corners instead */
.team-card__header {
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--light-gray);
    flex-wrap: wrap;
}

.team-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-card__name { font-size: 1.05rem; }
.team-card__sub  { font-size: 0.82rem; color: var(--gray); }
.team-card__actions { display: flex; gap: 8px; flex-shrink: 0; }

.team-racers {
    padding: 10px 18px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.team-racer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 3px 0;
}

.team-edit-panel {
    padding: 20px 18px;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
}
.team-edit-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray);
    margin: 0 0 16px;
}
.team-edit-actions { display: flex; gap: 8px; margin-top: 12px; }

.team-edit-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.team-edit-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray);
    margin: 0 0 10px;
}
.team-racer-add-form { display: flex; gap: 8px; align-items: flex-start; }
/* [Claude Code] Full-width autocomplete inside Add Racer row */
.team-racer-ac-full { flex: 1; }

/* [Claude Code] Staged team editor */
.team-staged-hint { font-size: 0.85rem; color: var(--gray); margin: 0 0 10px; line-height: 1.4; }
.team-add-row { display: flex; gap: 8px; align-items: flex-start; }
.team-racer-new { color: var(--green); font-weight: 600; }
.team-racer-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--green);
    background: #e8f5e1;
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 4px;
    font-style: normal;
}
.team-pending-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 10px 14px;
    background: #fff8e1;
    border: 1px solid #f0c040;
    border-radius: 5px;
}
.team-pending-label { font-size: 0.88rem; font-weight: 600; color: #7a5c00; flex: 1; min-width: 160px; }

/* [Claude Code] My Races — registration summary rows inside team card */
.my-race-summary { padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.my-race-summary__row { display: flex; gap: 12px; font-size: 0.92rem; }
.my-race-summary__label { min-width: 70px; font-weight: 600; color: var(--gray); flex-shrink: 0; }
.my-race-locked {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: #92400e;
}
/* [Claude Code] Refund-pending notice on My Races */
.my-race-refund-notice {
    margin-top: 10px;
    padding: 10px 14px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: #065f46;
}
.my-race-refund-notice a {
    color: #047857;
    font-weight: 600;
    white-space: nowrap;
}
.badge--gray { background: #f3f4f6; color: var(--gray); border: 1px solid #e5e7eb; }

.btn--xs { padding: 2px 8px; font-size: 0.78rem; }
.btn--danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn--danger:hover { background: #b91c1c; border-color: #b91c1c; }
.badge--warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge--danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Leaderboard ── [Claude Code] */
.lb-section {
    margin-top: 56px;
    border-top: 2px solid var(--light-gray);
    padding-top: 48px;
}

.lb-block {
    margin-bottom: 48px;
}

.lb-header {
    background: var(--green);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.lb-group-label {
    background: #f8f8f8;
    border-left: 3px solid var(--green);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    margin-top: 0;
}
.lb-block .lb-header + .lb-group-label {
    border-radius: 0;
    margin-top: 0;
}
.lb-table-wrap + .lb-group-label {
    margin-top: 0;
}

.lb-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--light-gray);
    border-top: none;
    margin-bottom: 0;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    white-space: nowrap;
}

/* Header row */
.lb-table thead tr {
    background: var(--black);
    color: #fff;
}

.lb-th {
    padding: 11px 14px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    vertical-align: middle;
}
.lb-th--name { text-align: left; min-width: 160px; }
.lb-th--num  { width: 36px; }
.lb-th--score { width: 58px; }
.lb-th--total { color: #a3e635; }

/* Discipline icon headers */
.lb-th--disc {
    width: 60px;
    padding: 8px 6px;
}
.lb-disc-icon {
    display: block;
    background: var(--green);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
}
.lb-disc-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.06em;
}

/* Body rows */
.lb-td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--light-gray);
    vertical-align: middle;
    text-align: center;
    color: var(--dark);
}
.lb-table tbody tr:last-child .lb-td { border-bottom: none; }
.lb-table tbody tr:hover { background: #fafafa; }

.lb-td--name {
    text-align: left;
    font-weight: 600;
    color: var(--green);
}
.lb-td--num  { color: #999; font-size: 13px; }
.lb-td--div  { font-weight: 600; }
.lb-td--score { font-variant-numeric: tabular-nums; }
.lb-td--total { font-weight: 700; }

/* Responsive */
@media (max-width: 640px) {
    .lb-th, .lb-td { padding: 9px 10px; font-size: 13px; }
    .lb-disc-icon  { width: 28px; height: 28px; font-size: 0.95rem; border-radius: 5px; }
}

/* ── Leaderboard: team name toggle button ── [Claude Code] */
.lb-team-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    color: var(--green);
    text-align: left;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}
.lb-team-toggle:hover { color: #357a1f; }
.lb-team-toggle--open { text-decoration-style: solid; }

/* ── Leaderboard: expand row ── [Claude Code] */
.lb-expand-row { background: #e8fce8; }
.lb-expand-row:hover { background: #e8fce8; } /* override the table hover */

.lb-expand-td {
    padding: 14px 14px;
    vertical-align: top;
    border-bottom: 1px solid #b6e8b6;
}

/* Members column */
.lb-expand-td--members { min-width: 180px; }
.lb-expand-members {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.lb-expand-members li { display: flex; align-items: baseline; gap: 4px; }
.lb-expand-members li::before { content: '•'; color: var(--green); font-weight: 700; }
.lb-expand-racer-name { font-weight: 700; color: #1a4a1a; font-size: 13px; }
.lb-expand-racer-id   { font-size: 11px; color: #555; }

/* Discipline checkpoint columns */
.lb-expand-td--disc { text-align: center; vertical-align: top; }
.lb-expand-disc-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2d6e1a;
    text-decoration: underline;
    margin-bottom: 4px;
}
.lb-expand-disc-cps {
    font-size: 12px;
    color: #1a4fa8;
    line-height: 1.8;
}
.lb-expand-empty { color: #999; font-size: 12px; font-style: italic; }

/* Split times column */
.lb-expand-td--splits { min-width: 140px; }
.lb-expand-splits { font-size: 13px; }
.lb-expand-splits-title {
    font-weight: 700;
    color: #1a4a1a;
    text-decoration: underline;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lb-expand-split-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 1px 0;
    font-size: 12px;
}
.lb-expand-split-leg  { color: #333; font-weight: 600; }
.lb-expand-split-time { color: #555; font-variant-numeric: tabular-nums; }

/* [Claude Code] Scored control list inside expand row discipline cell */
.lb-expand-cps {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    font-size: 12px;
    color: #1a4a1a;
}
.lb-expand-cps li { line-height: 1.6; }

/* [Claude Code] DNS / DNF status labels in total/time cells */
.lb-status--dns { color: #888; font-style: italic; }
.lb-status--dnf { color: #b45309; font-style: italic; }
