/* ===== ROOT VARIABLES ===== */
:root {
    --th-dark: #0f1923;
    --th-dark-secondary: #1a2733;
    --th-dark-tertiary: #243447;
    --th-blue: #2563eb;
    --th-blue-hover: #1d4ed8;
    --th-blue-light: #3b82f6;
    --th-blue-glow: rgba(37, 99, 235, 0.3);
    --th-gray-100: #f1f5f9;
    --th-gray-200: #e2e8f0;
    --th-gray-300: #cbd5e1;
    --th-gray-400: #a8b8cc;
    --th-gray-500: #8494a7;
    --th-gray-600: #475569;
    --th-white: #ffffff;
    --th-accent: #06b6d4;
    --th-success: #10b981;
    --th-warning: #f59e0b;
}

/* ===== BASE ===== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--th-dark);
    color: var(--th-gray-300);
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    color: var(--th-blue-light);
    text-decoration: none;
}

a:hover {
    color: var(--th-blue);
}

/* ===== NAVBAR ===== */
.th-navbar {
    background: linear-gradient(135deg, var(--th-dark) 0%, var(--th-dark-secondary) 100%);
    padding: 0.6rem 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--th-dark-tertiary);
}

.th-navbar .navbar-brand {
    color: var(--th-white);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.th-navbar .navbar-brand:hover {
    color: var(--th-blue-light);
}

.th-navbar .navbar-brand .brand-icon {
    width: 34px;
    height: 34px;
    background: var(--th-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.th-navbar .nav-link {
    color: var(--th-gray-300) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.th-navbar .nav-link:hover,
.th-navbar .nav-link:focus {
    color: var(--th-white) !important;
    background: var(--th-dark-tertiary);
}

.th-navbar .nav-link.active {
    color: var(--th-white) !important;
    background: var(--th-dark-tertiary);
}

.th-navbar .navbar-toggler {
    border-color: var(--th-gray-500);
    padding: 0.25rem 0.5rem;
}

.th-navbar .navbar-toggler-icon {
    filter: invert(1);
}

.th-navbar .btn-create-tournament {
    background: var(--th-blue);
    color: var(--th-white) !important;
    border: none;
    padding: 0.45rem 1.1rem !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.th-navbar .btn-create-tournament:hover {
    background: var(--th-blue-hover);
    color: var(--th-white) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--th-blue-glow);
}

.th-navbar .nav-auth .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem !important;
}

.th-navbar .btn-login {
    border: 1px solid var(--th-gray-500) !important;
    margin-right: 0.5rem;
}

.th-navbar .btn-login:hover {
    border-color: var(--th-gray-300) !important;
}

.th-navbar .btn-register {
    background: var(--th-blue) !important;
    color: var(--th-white) !important;
    border: none;
}

.th-navbar .btn-register:hover {
    background: var(--th-blue-hover) !important;
}

/* ===== HERO SECTION ===== */
.th-hero {
    background: linear-gradient(160deg, var(--th-dark) 0%, var(--th-dark-secondary) 40%, #1e3a5f 100%);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.th-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--th-blue-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.th-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.th-hero h1 {
    color: var(--th-white);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.th-hero h1 .text-gradient {
    background: linear-gradient(135deg, var(--th-blue-light) 0%, var(--th-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.th-hero p.lead {
    color: var(--th-gray-400);
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 520px;
}

/* Not scoped to .th-hero — the same button is used in .th-page-header and .th-cta.
   Scoping it caused the CTA to render as an unstyled (invisible) Bootstrap .btn. */
.btn-hero-primary {
    background: var(--th-blue);
    color: var(--th-white);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.btn-hero-primary:hover,
.btn-hero-primary:focus {
    background: var(--th-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--th-blue-glow);
    color: var(--th-white);
}

.btn-hero-secondary {
    background: transparent;
    color: var(--th-gray-300);
    border: 1px solid var(--th-gray-500);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.btn-hero-secondary:hover,
.btn-hero-secondary:focus {
    border-color: var(--th-gray-300);
    color: var(--th-white);
    background: var(--th-dark-tertiary);
}

/* Page headers use a slightly smaller variant of the same button. */
.th-page-header .btn-hero-primary {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
}

/* Hero bracket preview */
.th-hero-bracket {
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
}

.bracket-line {
    position: absolute;
    background: var(--th-blue);
    border-radius: 2px;
}

.bracket-match {
    background: var(--th-dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--th-gray-300);
}

.bracket-match.winner {
    border-color: var(--th-blue);
    background: rgba(37, 99, 235, 0.1);
}

.bracket-match .team-name {
    font-weight: 500;
}

.bracket-match .score {
    font-weight: 700;
    color: var(--th-white);
    min-width: 20px;
    text-align: right;
}

.bracket-match.winner .team-name {
    color: var(--th-white);
}

.bracket-round-label {
    color: var(--th-gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    text-align: center;
}

/* ===== STATS BAR =====
   The marketing sections below were the one place light surfaces leaked into an
   otherwise dark app; they now use the same palette as the rest of the site. */
.th-stats {
    background: var(--th-dark-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem 0;
}

.th-stat-item {
    text-align: center;
}

.th-stat-item .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--th-white);
    line-height: 1.2;
}

.th-stat-item .stat-label {
    color: var(--th-gray-400);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FEATURES ===== */
.th-features {
    padding: 5rem 0;
    background: var(--th-dark);
}

.th-section-title {
    font-weight: 800;
    color: var(--th-white);
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.th-section-subtitle {
    color: var(--th-gray-400);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.th-feature-card {
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    transition: all 0.25s ease;
}

.th-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    border-color: var(--th-blue);
}

.th-feature-card .feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--th-blue) 0%, var(--th-blue-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--th-white);
    font-size: 1.25rem;
}

.th-feature-card h5 {
    font-weight: 700;
    color: var(--th-white);
    margin-bottom: 0.6rem;
}

.th-feature-card p {
    color: var(--th-gray-400);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== HOW IT WORKS ===== */
.th-how-it-works {
    padding: 5rem 0;
    background: var(--th-dark-secondary);
}

.th-step {
    text-align: center;
    padding: 1.5rem;
    position: relative;
}

.th-step .step-number {
    width: 56px;
    height: 56px;
    background: var(--th-blue);
    color: var(--th-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0 auto 1.25rem;
    position: relative;
}

.th-step .step-number::after {
    content: '';
    position: absolute;
    width: 64px;
    height: 64px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: -4px;
    left: -4px;
}

.th-step h5 {
    font-weight: 700;
    color: var(--th-white);
    margin-bottom: 0.5rem;
}

.th-step p {
    color: var(--th-gray-400);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== FORMATS SECTION ===== */
.th-formats {
    padding: 5rem 0;
    background: var(--th-dark);
}

.th-format-card {
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.75rem;
    text-align: center;
    height: 100%;
    transition: all 0.25s ease;
}

.th-format-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--th-blue);
}

.th-format-card .format-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--th-blue);
}

.th-format-card h5 {
    font-weight: 700;
    color: var(--th-white);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.th-format-card p {
    color: var(--th-gray-400);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== LEGAL / LONG-FORM TEXT ===== */
.th-legal h5 {
    color: var(--th-white);
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
}

.th-legal h5:first-of-type {
    margin-top: 0.5rem;
}

.th-legal p,
.th-legal li {
    color: var(--th-gray-400);
    line-height: 1.7;
}

.th-legal ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.th-legal li {
    margin-bottom: 0.5rem;
}

.th-legal strong {
    color: var(--th-gray-300);
}

/* ===== CTA ===== */
.th-cta {
    background: linear-gradient(160deg, var(--th-dark) 0%, var(--th-dark-secondary) 40%, #1e3a5f 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.th-cta::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--th-blue-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.th-cta h2 {
    color: var(--th-white);
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.th-cta p {
    color: var(--th-gray-400);
    font-size: 1.1rem;
}

/* ===== FOOTER ===== */
.th-footer {
    background: var(--th-dark);
    color: var(--th-gray-400);
    padding: 3.5rem 0 1.5rem;
    border-top: 1px solid var(--th-dark-tertiary);
}

.th-footer h6 {
    color: var(--th-white);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.th-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.th-footer ul li {
    margin-bottom: 0.5rem;
}

.th-footer ul li a {
    color: var(--th-gray-400);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.th-footer ul li a:hover {
    color: var(--th-white);
}

.th-footer .footer-brand {
    color: var(--th-white);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.th-footer .footer-brand .brand-icon {
    width: 30px;
    height: 30px;
    background: var(--th-blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.th-footer .footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--th-gray-500);
    max-width: 300px;
}

.th-footer-bottom {
    border-top: 1px solid var(--th-dark-tertiary);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.85rem;
    color: var(--th-gray-500);
}

/* ===== GENERAL PAGE CONTENT ===== */
.th-page-header {
    background: linear-gradient(135deg, var(--th-dark) 0%, var(--th-dark-secondary) 100%);
    padding: 3rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.th-page-header h1 {
    color: var(--th-white);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.th-page-header p {
    color: var(--th-gray-400);
    margin-bottom: 0;
}

/* Dark page wrapper (used on content pages) */
.th-dark-page {
    background: linear-gradient(170deg, var(--th-dark) 0%, var(--th-dark-secondary) 100%);
    min-height: calc(100vh - 60px);
}

/* Dark form controls (for cards on dark backgrounds) */
.th-card .form-control,
.th-card .form-select {
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--th-white);
}

.th-card .form-control::placeholder {
    color: var(--th-gray-400);
}

.th-card .form-control:focus,
.th-card .form-select:focus {
    background: var(--th-dark-tertiary);
    border-color: var(--th-blue);
    color: var(--th-white);
    box-shadow: 0 0 0 3px var(--th-blue-glow);
}

.th-card .form-floating > label {
    color: var(--th-gray-400);
}

/* Bootstrap 5.3 draws the floating-label notch with a ::after using --bs-body-bg
   (white), which renders as a white pill over dark inputs. Match the input instead. */
.th-card .form-floating > .form-control:focus ~ label::after,
.th-card .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.th-card .form-floating > .form-select ~ label::after {
    background-color: var(--th-dark-tertiary);
}

.th-card .form-floating > .form-control:focus ~ label,
.th-card .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--th-gray-300);
}

.th-card .form-check-input {
    background-color: var(--th-dark-tertiary);
    border-color: rgba(255, 255, 255, 0.2);
}

.th-card .form-check-input:checked {
    background-color: var(--th-blue);
    border-color: var(--th-blue);
}

.th-card .form-check-label {
    color: var(--th-gray-300);
}

/* ===== CARDS ===== */
.th-card {
    background: var(--th-dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.25s ease;
    color: var(--th-gray-300);
}

.th-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.th-card h4, .th-card h5, .th-card h6, .th-card strong {
    color: var(--th-white);
}

/* ===== BUTTONS ===== */
.btn-th-primary {
    background: var(--th-blue);
    color: var(--th-white);
    border: none;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-th-primary:hover {
    background: var(--th-blue-hover);
    color: var(--th-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--th-blue-glow);
}

/* Light text: this button only ever sits on a dark surface. --th-gray-600 was
   dark-on-dark (~1.5:1) and read as a disabled control. */
.btn-th-secondary {
    background: transparent;
    color: var(--th-gray-300);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-th-secondary:hover,
.btn-th-secondary:focus {
    border-color: var(--th-blue);
    color: var(--th-white);
    background: rgba(37, 99, 235, 0.15);
}

/* ===== FOCUS STATES ===== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--th-blue);
}

/* In a floating-label field the resting label already acts as the placeholder, so the real
   placeholder must stay invisible until the label floats up on focus — otherwise the two
   sit on top of each other. */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: transparent;
    text-align: start;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    color: var(--th-gray-500);
}

/* ===== WIZARD ===== */
.wizard-page {
    background: linear-gradient(170deg, var(--th-dark) 0%, var(--th-dark-secondary) 50%, #1a2d42 100%);
    min-height: calc(100vh - 60px);
    padding: 2rem 0 4rem;
}

.wizard-progress {
    display: flex;
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.wizard-step-indicator {
    flex: 1;
    text-align: center;
    padding: 0.85rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--th-gray-500);
    background: var(--th-dark-tertiary);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    position: relative;
}

.wizard-step-indicator:last-child {
    border-right: none;
}

.wizard-step-indicator.active {
    color: var(--th-white);
    background: var(--th-blue);
}

.wizard-step-indicator.completed {
    color: var(--th-success);
    background: rgba(16, 185, 129, 0.1);
}

.wizard-step-indicator .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--th-gray-500);
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.4rem;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.wizard-step-indicator.active .step-num {
    background: rgba(255, 255, 255, 0.25);
    color: var(--th-white);
}

.wizard-step-indicator.completed .step-num {
    background: var(--th-success);
    color: var(--th-white);
}

.wizard-step {
    animation: wizardFadeIn 0.3s ease;
}

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

/* Dark wizard card */
.wizard-card {
    background: var(--th-dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
}

.wizard-card h4 {
    color: var(--th-white);
}

.wizard-card .form-label {
    color: var(--th-gray-300);
}

.wizard-card .form-control,
.wizard-card .form-select {
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--th-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-card .form-control::placeholder {
    color: var(--th-gray-400);
}

.wizard-card .form-control:focus,
.wizard-card .form-select:focus {
    background: var(--th-dark-tertiary);
    border-color: var(--th-blue);
    color: var(--th-white);
    box-shadow: 0 0 0 3px var(--th-blue-glow);
}

.wizard-card .form-select option {
    background: var(--th-dark-secondary);
    color: var(--th-white);
}

.wizard-card .form-check-input {
    background-color: var(--th-dark-tertiary);
    border-color: rgba(255, 255, 255, 0.2);
}

.wizard-card .form-check-input:checked {
    background-color: var(--th-blue);
    border-color: var(--th-blue);
}

.wizard-card .form-check-label {
    color: var(--th-gray-300);
}

.wizard-card .text-muted {
    color: var(--th-gray-500) !important;
}

.wizard-card input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
}

.wizard-nav .btn-th-secondary {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--th-gray-300);
}

.wizard-nav .btn-th-secondary:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--th-white);
    background: rgba(255, 255, 255, 0.05);
}

/* Bracket type cards (dark) */
.bracket-type-option {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--th-dark-tertiary);
}

.bracket-type-option:hover {
    border-color: var(--th-blue-light);
    background: rgba(37, 99, 235, 0.08);
}

.bracket-type-option.selected {
    border-color: var(--th-blue);
    background: rgba(37, 99, 235, 0.15);
    box-shadow: 0 0 0 3px var(--th-blue-glow);
}

/* These cards are keyboard-focusable (role=radio), so they need a visible focus ring. */
.bracket-type-option:focus-visible {
    outline: 3px solid var(--th-white);
    outline-offset: 2px;
}

.bracket-type-option .bracket-icon {
    font-size: 2rem;
    color: var(--th-blue-light);
    margin-bottom: 0.75rem;
}

.bracket-type-option h6 {
    font-weight: 700;
    color: var(--th-white);
    margin-bottom: 0.35rem;
}

.bracket-type-option p {
    font-size: 0.85rem;
    color: var(--th-gray-400);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Label/description on the left, switch pinned to the right. Avoids Bootstrap's
   .form-check negative left margin, which pushed the control outside the padded box. */
.th-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.th-switch-row-text {
    flex: 1 1 auto;
    min-width: 0;
}

.th-switch-row-control {
    flex: 0 0 auto;
    padding-left: 0;
    min-height: auto;
    margin-bottom: 0;
}

.th-switch-row-control .form-check-input {
    margin-left: 0;
    float: none;
    width: 2.75rem;
    height: 1.5rem;
    cursor: pointer;
}

/* Team list (dark) */
.team-list-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    animation: wizardFadeIn 0.2s ease;
}

.team-list-item .team-number {
    width: 28px;
    height: 28px;
    background: var(--th-blue);
    color: var(--th-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.team-list-item .team-name {
    flex: 1;
    font-weight: 500;
    color: var(--th-gray-200);
}

.team-list-item .btn-remove-team {
    background: none;
    border: none;
    color: var(--th-gray-500);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.team-list-item .btn-remove-team:hover {
    color: #ef4444;
}

.team-counter {
    font-size: 0.9rem;
    color: var(--th-gray-400);
    font-weight: 600;
}

.team-counter .current-count {
    color: var(--th-blue-light);
}

.team-counter.full .current-count {
    color: var(--th-success);
}

/* Review (dark) */
.review-section {
    margin-bottom: 1.25rem;
}

.review-section h6 {
    font-weight: 700;
    color: var(--th-blue-light);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.95rem;
}

.review-row:last-child {
    border-bottom: none;
}

.review-row .review-label {
    color: var(--th-gray-500);
}

.review-row .review-value {
    font-weight: 600;
    color: var(--th-white);
}

.review-teams-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.review-team-badge {
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--th-gray-200);
}

/* ===== STATUS FILTER BAR ===== */
.status-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem;
    background: var(--th-dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.status-filter {
    flex: 1 1 auto;
    min-width: max-content;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--th-gray-400);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
}

.status-filter:hover {
    color: var(--th-white);
    background: rgba(255, 255, 255, 0.04);
}

.status-filter.active {
    color: var(--th-white);
    background: var(--th-dark-tertiary);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Status pills (on cards) */
.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-upcoming, .status-filter-upcoming.active {
    background: rgba(148, 184, 204, 0.15);
    color: #a8b8cc;
}
.status-filter-upcoming.active { border-color: rgba(148, 184, 204, 0.3); }

.status-open, .status-filter-open.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--th-blue-light);
}
.status-filter-open.active { border-color: rgba(37, 99, 235, 0.4); }

.status-in-progress, .status-filter-progress.active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--th-warning);
}
.status-filter-progress.active { border-color: rgba(245, 158, 11, 0.4); }

.status-completed, .status-filter-completed.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--th-success);
}
.status-filter-completed.active { border-color: rgba(16, 185, 129, 0.4); }

/* ===== WINNERS' PODIUM =====
   Shown once a tournament has a champion. Ranks are laid out 1-2-3 in the markup and
   rearranged to 2-1-3 here, so the reading order stays correct while the picture reads as a
   podium. Heights encode the placing, which is the whole point of the shape. */
.podium-banner {
    background: linear-gradient(135deg, #14100c 0%, #241d10 35%, #3d3113 65%, #14100c 100%);
    border-bottom: 3px solid var(--th-warning);
    position: relative;
    overflow: hidden;
    padding: 2rem 0 0;
}

.podium-banner::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22) 0%, transparent 70%);
    top: -420px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.podium-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: var(--th-warning);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.75rem;
}

.podium-heading .bi { font-size: 1.15rem; }

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.podium-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 1 13rem;
    min-width: 0;
}

/* Silver left, gold centre, bronze right — the arrangement everyone already recognises. */
.podium-gold   { order: 2; }
.podium-silver { order: 1; }
.podium-bronze { order: 3; }

.podium-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0 0.4rem 0.7rem;
    text-align: center;
    min-width: 0;
    max-width: 100%;
}

.podium-medal { line-height: 1; }
.podium-medal .bi { font-size: 1.6rem; }

.podium-name {
    color: var(--th-white);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.25;
    /* Team names are free text and can be long; wrap rather than push the podium sideways. */
    overflow-wrap: anywhere;
}

.podium-place {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.podium-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 10px 10px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.podium-rank {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    opacity: 0.75;
}

/* The step heights are the ranking. */
.podium-gold   .podium-block { height: 8.5rem; }
.podium-silver .podium-block { height: 6rem; }
.podium-bronze .podium-block { height: 4.5rem; }

.podium-gold .podium-medal .bi,
.podium-gold .podium-place,
.podium-gold .podium-rank { color: var(--th-warning); }

.podium-gold .podium-medal .bi { filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.55)); }
.podium-gold .podium-name { text-shadow: 0 2px 20px rgba(245, 158, 11, 0.35); }
.podium-gold .podium-block {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.28) 0%, rgba(245, 158, 11, 0.06) 100%);
}

.podium-silver .podium-medal .bi,
.podium-silver .podium-place,
.podium-silver .podium-rank { color: #cbd5e1; }

.podium-silver .podium-block {
    border-color: rgba(203, 213, 225, 0.35);
    background: linear-gradient(180deg, rgba(203, 213, 225, 0.20) 0%, rgba(203, 213, 225, 0.04) 100%);
}

.podium-bronze .podium-medal .bi,
.podium-bronze .podium-place,
.podium-bronze .podium-rank { color: #cd7f32; }

.podium-bronze .podium-block {
    border-color: rgba(205, 127, 50, 0.4);
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.22) 0%, rgba(205, 127, 50, 0.05) 100%);
}

.podium-subtitle {
    color: var(--th-gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 1rem 0 1.25rem;
}

/* A podium of one or two still has to look deliberate rather than truncated. */
.podium-step:only-child { flex-basis: 18rem; }

@media (max-width: 576px) {
    /* Too narrow for three columns: fall back to the reading order, with a bar whose length
       carries the ranking instead of its height. */
    .podium { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .podium-step { flex-basis: auto; order: 0; flex-direction: row; align-items: center; gap: 0.75rem; }
    .podium-team { flex-direction: row; align-items: baseline; gap: 0.5rem; padding: 0; text-align: left; flex: 1 1 auto; }
    .podium-medal .bi { font-size: 1.1rem; }
    .podium-name { font-size: 0.98rem; }
    .podium-block {
        order: -1;
        width: 2.6rem;
        flex: 0 0 2.6rem;
        height: auto;
        align-self: stretch;
        border-radius: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding: 0.5rem 0;
    }
    .podium-gold .podium-block,
    .podium-silver .podium-block,
    .podium-bronze .podium-block { height: auto; }
    .podium-rank { font-size: 1.25rem; }
}

/* The 3rd place match sits beside the final rather than in the round flow, so it gets a
   divider to show it is not the next round. */
.bracket-round-third {
    border-left: 1px dashed rgba(255, 255, 255, 0.14);
    padding-left: 1.25rem;
}

.podium-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 10% 20%, var(--th-warning) 0.15rem, transparent 0.15rem),
        radial-gradient(circle at 85% 30%, var(--th-blue-light) 0.15rem, transparent 0.15rem),
        radial-gradient(circle at 25% 70%, var(--th-success) 0.15rem, transparent 0.15rem),
        radial-gradient(circle at 75% 80%, var(--th-warning) 0.12rem, transparent 0.12rem),
        radial-gradient(circle at 50% 15%, var(--th-blue-light) 0.1rem, transparent 0.1rem),
        radial-gradient(circle at 40% 90%, var(--th-warning) 0.13rem, transparent 0.13rem),
        radial-gradient(circle at 90% 60%, var(--th-success) 0.12rem, transparent 0.12rem);
    background-size: 300px 300px;
    opacity: 0.5;
    animation: confettiDrift 12s linear infinite;
}

@keyframes confettiDrift {
    0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
    100% { background-position: 30px 60px, -30px 50px, 40px -30px, -20px 40px, 50px 30px, -40px 30px, 30px -50px; }
}

/* ===== TOURNAMENT DETAILS ===== */
.tournament-detail-header {
    background: linear-gradient(160deg, var(--th-dark) 0%, var(--th-dark-secondary) 40%, #1e3a5f 100%);
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.tournament-detail-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--th-blue-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.td-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.td-badge-sport {
    background: var(--th-blue);
    color: var(--th-white);
}

.td-badge-bracket {
    background: var(--th-dark-tertiary);
    color: var(--th-gray-300);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.td-badge-teams {
    background: rgba(16, 185, 129, 0.15);
    color: var(--th-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.td-title {
    color: var(--th-white);
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.td-description {
    color: var(--th-gray-400);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 600px;
}

.td-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    color: var(--th-gray-400);
    font-size: 0.9rem;
}

.td-meta span {
    display: inline-flex;
    align-items: center;
}

.td-meta i {
    color: var(--th-gray-500);
}

.btn-td-back {
    background: var(--th-dark-tertiary);
    color: var(--th-gray-300);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-td-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--th-white);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-td-danger {
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-td-danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #fca5a5 !important;
}

.btn-th-danger {
    background: #dc2626;
    color: var(--th-white);
    border: none;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-th-danger:hover {
    background: #b91c1c;
    color: var(--th-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Team grid */
.td-team-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.td-team-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.td-team-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.td-team-number {
    width: 30px;
    height: 30px;
    background: var(--th-blue);
    color: var(--th-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 0.85rem;
    flex-shrink: 0;
}

.td-team-name {
    flex: 1;
    font-weight: 600;
    color: var(--th-gray-200);
    font-size: 0.95rem;
}

.td-team-seed {
    font-size: 0.8rem;
    color: var(--th-gray-400);
    font-weight: 500;
    background: var(--th-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.td-team-remove {
    background: transparent;
    border: none;
    color: var(--th-gray-500);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.td-team-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Sidebar info card */
.td-info-card {
    background: var(--th-dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.td-info-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.td-info-header {
    background: var(--th-dark-tertiary);
    color: var(--th-white);
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.td-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.td-info-row:last-child {
    border-bottom: none;
}

.td-info-label {
    color: var(--th-gray-500);
    font-weight: 500;
}

.td-info-value {
    color: var(--th-white);
    font-weight: 600;
}

.td-organizer-avatar {
    width: 42px;
    height: 42px;
    background: var(--th-dark-tertiary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--th-gray-400);
    flex-shrink: 0;
}

/* ===== BRACKET DISPLAY ===== */
.bracket-container {
    overflow-x: auto;
    padding: 1rem 0;
}

.bracket-grid {
    display: flex;
    gap: 2rem;
    min-width: fit-content;
    align-items: stretch;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    min-width: 210px;
}

.bracket-round-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--th-gray-500);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.bracket-round-matches {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    gap: 0.5rem;
}

.bracket-match-card {
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.bracket-match-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.bracket-team {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

.bracket-team:last-child {
    border-bottom: none;
}

.bracket-team.winner {
    background: rgba(37, 99, 235, 0.15);
}

.bracket-team .team-seed {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--th-gray-500);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.bracket-team.winner .team-seed {
    background: var(--th-blue);
    color: var(--th-white);
}

.bracket-team .team-name {
    flex: 1;
    font-weight: 500;
    color: var(--th-gray-200);
}

.bracket-team .team-name.tbd {
    color: var(--th-gray-500);
    font-style: italic;
}

.bracket-team.winner .team-name {
    font-weight: 700;
    color: var(--th-white);
}

.bracket-match-number {
    font-size: 0.65rem;
    color: var(--th-gray-500);
    text-align: center;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

/* Bracket section tabs */
.bracket-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.bracket-tabs .nav-link {
    color: var(--th-gray-500);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px 8px 0 0;
}

.bracket-tabs .nav-link.active {
    color: var(--th-blue-light);
    background: var(--th-dark-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-color: var(--th-dark-tertiary);
}

.bracket-tabs .nav-link:hover:not(.active) {
    color: var(--th-gray-300);
    background: rgba(255, 255, 255, 0.04);
}

/* Grand final special styling */
.grand-final-card {
    max-width: 300px;
    margin: 2rem auto;
}

.grand-final-card .bracket-match-card {
    border: 2px solid var(--th-warning);
}

.grand-final-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--th-warning);
    margin-bottom: 0.5rem;
}

.grand-final-label i {
    margin-right: 0.25rem;
}

/* Connector lines between rounds */
.bracket-match-wrapper {
    position: relative;
}

/* Clickable match cards */
.bracket-match-card {
    position: relative;
}

.bracket-match-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.bracket-match-card.clickable:hover {
    border-color: var(--th-blue);
    box-shadow: 0 0 0 2px var(--th-blue-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.bracket-match-card.completed {
    border-color: rgba(37, 99, 235, 0.25);
}

.match-edit-hint {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--th-blue-light);
    font-size: 0.6rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.bracket-match-card.clickable:hover .match-edit-hint {
    opacity: 1;
}

/* Score box — always visible */
.team-score-box {
    font-weight: 700;
    color: var(--th-white);
    min-width: 32px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.4rem;
    margin-left: 0.5rem;
    margin-right: -0.5rem;
    margin-top: -0.5rem;
    margin-bottom: -0.5rem;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bracket-team.winner .team-score-box {
    background: rgba(37, 99, 235, 0.2);
    color: var(--th-white);
}

.score-placeholder {
    color: var(--th-gray-500);
    font-weight: 500;
}

.match-set-scores {
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
}

.set-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--th-gray-300);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.match-modifier {
    padding: 0.25rem 0.75rem;
    background: rgba(245, 158, 11, 0.08);
    border-top: 1px solid rgba(245, 158, 11, 0.15);
}

.modifier-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--th-warning);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Standings card */
.standings-card {
    background: var(--th-dark-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.standings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(180deg, var(--th-dark-tertiary) 0%, rgba(36, 52, 71, 0.6) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.standings-header h6 {
    color: var(--th-white);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.standings-header h6 i {
    color: var(--th-warning);
}

.standings-advance-info {
    color: var(--th-success);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

.advance-marker {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--th-success);
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* Standings table — overrides Bootstrap defaults */
.standings-table {
    background: transparent;
    --bs-table-bg: transparent;
    --bs-table-color: var(--th-gray-200);
    --bs-table-border-color: rgba(255, 255, 255, 0.06);
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

.standings-table table {
    color: var(--th-gray-200);
    margin-bottom: 0;
    background: transparent;
}

.standings-table thead {
    background: var(--th-dark);
}

.standings-table thead th {
    background: var(--th-dark);
    color: var(--th-gray-400);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    border-bottom: 2px solid rgba(37, 99, 235, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.7rem 0.5rem;
    white-space: nowrap;
}

.standings-table thead th:last-child {
    border-right: none;
}

.standings-table thead th:nth-last-child(1) {
    color: var(--th-blue-light);
    background: rgba(37, 99, 235, 0.1);
}

.standings-table tbody td {
    background: transparent;
    color: var(--th-gray-200);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.5rem;
    font-size: 0.88rem;
    vertical-align: middle;
}

.standings-table tbody td:last-child {
    border-right: none;
    background: rgba(37, 99, 235, 0.06);
    color: var(--th-white);
}

.standings-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.standings-table tbody tr:nth-child(even) td:last-child {
    background: rgba(37, 99, 235, 0.09);
}

.standings-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.standings-table tbody tr:hover td:last-child {
    background: rgba(37, 99, 235, 0.15);
}

.standings-table tbody tr:last-child td {
    border-bottom: none;
}

.standings-table tbody td:first-child {
    color: var(--th-gray-400);
    font-weight: 700;
    text-align: center;
    width: 36px;
}

.standings-table .standings-advance td {
    background: rgba(16, 185, 129, 0.08) !important;
}

.standings-table .standings-advance td:last-child {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--th-white);
}

.standings-table .standings-advance:hover td {
    background: rgba(16, 185, 129, 0.13) !important;
}

.standings-table .standings-advance:hover td:last-child {
    background: rgba(16, 185, 129, 0.22) !important;
}

.standings-table .standings-advance td:first-child {
    border-left: 3px solid var(--th-success);
    padding-left: calc(0.5rem - 3px);
    color: var(--th-success);
}

/* Round Robin / Group Stage rounds */
.rr-round-header {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--th-blue-light);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== MANAGE ACCOUNT NAV ===== */
.manage-nav .manage-nav-link {
    color: var(--th-gray-400);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.manage-nav .manage-nav-link:hover {
    color: var(--th-white);
    background: var(--th-dark-tertiary);
}

.manage-nav .manage-nav-link.active {
    color: var(--th-white);
    background: var(--th-blue);
}

.manage-nav .manage-nav-link i {
    width: 1.25rem;
    text-align: center;
}

/* ===== MATCH RESULT MODAL ===== */
#matchResultModal .set-label {
    color: var(--th-gray-300);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
}

#matchResultModal .set-rule-hint {
    color: var(--th-gray-400);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: lowercase;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

#matchResultModal .set-divider {
    color: var(--th-gray-500);
    font-weight: 700;
    font-size: 1.1rem;
}

#matchResultModal .set-input {
    background: var(--th-dark-tertiary);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--th-white);
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

#matchResultModal .set-input:focus {
    background: var(--th-dark-tertiary);
    border-color: var(--th-blue);
    color: var(--th-white);
    box-shadow: 0 0 0 3px var(--th-blue-glow);
}

#matchResultModal .set-input.is-valid {
    border-color: var(--th-success);
    background-image: none;
    padding-right: 0.75rem;
}

#matchResultModal .set-input.is-invalid {
    border-color: #ef4444;
    background-image: none;
    padding-right: 0.75rem;
}

#matchResultModal .set-status {
    font-size: 0.75rem;
    min-height: 1.1rem;
    line-height: 1.1rem;
}

#matchResultModal .set-status .text-success { color: var(--th-success) !important; }
#matchResultModal .set-status .text-danger { color: #f87171 !important; }
#matchResultModal .set-status .text-muted { color: var(--th-gray-500) !important; }

#matchResultModal .set-score-row.row-extra {
    opacity: 0.5;
}

#matchResultModal .set-score-row.row-valid .set-input {
    background: rgba(16, 185, 129, 0.06);
}

#matchResultModal .set-score-row.row-invalid .set-input {
    background: rgba(239, 68, 68, 0.06);
}

#matchResultModal #mrSaveBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--th-gray-600);
    box-shadow: none;
    transform: none;
}

#matchResultModal #mrSaveBtn:disabled:hover {
    background: var(--th-gray-600);
    transform: none;
    box-shadow: none;
}

/* ===== CUSTOM MODAL ===== */
.th-modal-content {
    background: var(--th-dark-secondary);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.th-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--th-blue) 0%, var(--th-blue-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
    color: var(--th-white);
    box-shadow: 0 8px 24px var(--th-blue-glow);
}

.th-modal-title {
    font-weight: 800;
    color: var(--th-white);
    margin-bottom: 0.5rem;
}

.th-modal-text {
    color: var(--th-gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.th-modal-warning {
    color: var(--th-warning);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.th-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.th-modal-actions .btn {
    min-width: 130px;
    padding: 0.6rem 1.5rem;
}

.modal-backdrop.show {
    backdrop-filter: blur(4px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .th-hero {
        padding: 3rem 0 2.5rem;
    }

    .th-hero h1 {
        font-size: 2.2rem;
    }

    .th-hero p.lead {
        font-size: 1.05rem;
    }

    .th-hero-bracket {
        margin-top: 2.5rem;
    }

    .th-section-title {
        font-size: 1.8rem;
    }

    .th-stat-item {
        margin-bottom: 1rem;
    }

    .th-stat-item .stat-number {
        font-size: 1.5rem;
    }
}

/* ===== SCHEDULE REORDER (drag & drop) ===== */
.reorder-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Scoring PIN — read off a screen and typed into a phone, so it needs to be unmistakable. */
.scoring-pin {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.45rem;
    text-align: center;
    color: var(--th-white);
    background: var(--th-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.6rem 0.5rem;
    margin-bottom: 0.85rem;
    /* The tracking adds a trailing gap that makes the block look off-centre. */
    text-indent: 0.45rem;
}

/* A match currently being counted courtside. */
.bracket-match-card.is-live {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
    position: relative;
}

.match-live-badge {
    position: absolute;
    top: -9px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    z-index: 2;
}

.match-live-badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    animation: liveBlink 1.4s ease-in-out infinite;
}

@keyframes liveBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.bracket-match-card.is-live .live-points {
    color: #fca5a5;
    font-weight: 800;
}

/* Draggable team rows in the seeding panel (Details page, before the draw). */
.seed-item {
    cursor: grab;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.seed-item:hover {
    border-color: var(--th-blue);
}

.seed-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    box-shadow: 0 0 0 2px var(--th-blue-glow);
}

.seed-handle {
    color: var(--th-gray-500);
    font-size: 1.05rem;
    line-height: 1;
    flex: 0 0 auto;
    margin-right: 0.4rem;
}

.seed-moves {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: auto;
    flex: 0 0 auto;
}

.seed-moves .btn {
    padding: 0.15rem 0.45rem;
    line-height: 1;
}

.reorder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--th-dark-secondary);
    border: 1px solid var(--th-dark-tertiary);
    border-radius: 8px;
    cursor: grab;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.reorder-item:hover {
    border-color: var(--th-blue);
}

.reorder-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    box-shadow: 0 0 0 2px var(--th-blue-glow);
}

.reorder-handle {
    color: var(--th-gray-500);
    font-size: 1.1rem;
    line-height: 1;
    flex: 0 0 auto;
}

.reorder-slot {
    flex: 0 0 auto;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0.6rem;
    background: var(--th-dark-tertiary);
    border-radius: 6px;
}

.reorder-slot-time {
    color: var(--th-white);
    font-weight: 600;
    font-size: 0.85rem;
}

.reorder-slot-court {
    color: var(--th-gray-500);
    font-size: 0.75rem;
}

.reorder-match {
    flex: 1 1 auto;
    min-width: 0;
}

.reorder-section {
    display: block;
    color: var(--th-gray-500);
    font-size: 0.72rem;
}

.reorder-moves {
    flex: 0 0 auto;
    display: flex;
    gap: 0.25rem;
}

.reorder-moves .btn {
    padding: 0.15rem 0.45rem;
    line-height: 1;
}

@media (max-width: 575px) {
    .reorder-item {
        flex-wrap: wrap;
    }

    .reorder-match {
        flex-basis: 100%;
        order: 3;
    }
}

/* Times are stored as venue wall-clock with no offset, so every surface that shows one is
   tagged with the zone it belongs to (CET in winter, CEST in summer). */
.tz-flag {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--th-gray-400);
    text-transform: none;
    vertical-align: middle;
}

/* ===== Per-team fixture page ===== */

.td-team-link {
    color: var(--th-white);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.28);
}

.td-team-link:hover,
.td-team-link:focus-visible {
    color: var(--th-blue-light);
    border-bottom-color: var(--th-blue-light);
}

/* The next fixture is the reason a player opens this page, so it gets the weight. */
.team-next {
    border-left: 3px solid var(--th-blue);
}

.team-next-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--th-gray-500);
    margin-bottom: 0.5rem;
}

.team-next-when {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.team-next-time {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    color: var(--th-white);
    font-variant-numeric: tabular-nums;
}

.team-next-date { color: var(--th-gray-300); }

.team-next-versus {
    margin-top: 0.6rem;
    font-size: 1.05rem;
    color: var(--th-gray-200);
}

.team-next-meta {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--th-gray-500);
}

.team-result {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}

.team-result-won { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.team-result-lost { background: rgba(239, 68, 68, 0.14); color: #f87171; }
.team-result-draw { background: rgba(148, 163, 184, 0.18); color: var(--th-gray-300); }

.team-row-live > td { background: rgba(37, 99, 235, 0.10); }

/* ===== Bracket keyboard accessibility ===== */

/* The cards are divs acting as buttons, so they need a focus ring of their own — without it
   a keyboard user tabs through the bracket blind. */
.bracket-match-card.clickable:focus-visible,
.bracket-container:focus-visible {
    outline: 3px solid var(--th-blue-light);
    outline-offset: 2px;
}

/* The bracket scrolls horizontally, so it is a scrollable region and must be reachable by
   keyboard to be scrolled at all. */
.bracket-container:focus:not(:focus-visible) {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .bracket-match-card,
    .bracket-match-card.clickable {
        transition: none;
    }
}

/* ===== Result history (audit trail) ===== */

.audit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 22rem;
    overflow-y: auto;
}

.audit-item {
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.audit-item:last-child { border-bottom: 0; }

.audit-match {
    font-size: 0.8rem;
    color: var(--th-gray-300);
    margin-bottom: 0.2rem;
}

.audit-change {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.audit-verb {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: rgba(37, 99, 235, 0.18);
    color: var(--th-blue-light);
}

.audit-verb-cleared { background: rgba(148, 163, 184, 0.18); color: var(--th-gray-300); }
.audit-verb-forfeit { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }

.audit-score { color: var(--th-gray-200); font-variant-numeric: tabular-nums; }

/* The superseded score, shown struck through so the change reads at a glance. */
.audit-was {
    color: var(--th-gray-500);
    text-decoration: line-through;
}

.audit-meta {
    font-size: 0.72rem;
    color: var(--th-gray-500);
    margin-top: 0.2rem;
}

/* ===== Language switcher ===== */

.lang-switch {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    overflow: hidden;
}

.lang-option {
    background: transparent;
    border: 0;
    color: var(--th-gray-400);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}

.lang-option + .lang-option { border-left: 1px solid rgba(255, 255, 255, 0.16); }

.lang-option:hover { color: var(--th-white); background: rgba(255, 255, 255, 0.06); }

.lang-option.is-current {
    background: var(--th-blue);
    color: #fff;
}

.lang-option:focus-visible {
    outline: 2px solid var(--th-blue-light);
    outline-offset: -2px;
}

/* ===== Live badge clipping fix =====
   .bracket-match-card sets overflow:hidden so child backgrounds respect the rounded corners.
   That also clips the LIVE badge, which is deliberately positioned above the top edge
   (top: -9px) — it ended up trapped inside the card and half-hidden.

   Only live cards need to overhang, and a live match has no winner yet, so no child row is
   painting into the corners: letting just these cards overflow is safe. */
.bracket-match-card.is-live {
    overflow: visible;
}

/* The badge sits above the card, so the row needs headroom or the scroll container clips it.
   overflow-x:auto forces the other axis to compute as auto, so this is not merely cosmetic. */
.bracket-round-matches {
    padding-top: 10px;
}

/* Same reason at the top of the whole bracket. */
.bracket-container {
    padding-top: 1.25rem;
}

/* Make the live state read at a glance rather than as a hairline: a full ring plus a soft
   halo, so it is visible against the dark card without relying on a 1px border. */
.bracket-match-card.is-live {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.55), 0 0 12px rgba(239, 68, 68, 0.25);
}

/* Sets won, shown next to the live points. Muted relative to the points so the number being
   counted right now stays dominant. */
.live-sets {
    display: inline-block;
    min-width: 1.1em;
    margin-right: 0.35rem;
    padding: 0 0.25rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.10);
    color: var(--th-gray-300);
    font-size: 0.78em;
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .match-live-badge .dot { animation: none; }
}

/* ===== Scoring link fallback (QR panel) ===== */

.qr-link-row { margin-top: 0.75rem; text-align: left; }

.qr-link-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--th-gray-500);
    margin-bottom: 0.25rem;
}

.qr-link-box { display: flex; gap: 0.35rem; }

.qr-link-input {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--th-dark);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    color: var(--th-gray-200);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.72rem;
    padding: 0.35rem 0.5rem;
}

.qr-link-copy {
    flex: 0 0 auto;
    background: var(--th-dark);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    color: var(--th-gray-300);
    padding: 0.35rem 0.6rem;
    cursor: pointer;
}

.qr-link-copy:hover { color: var(--th-white); border-color: var(--th-blue); }

.qr-link-open {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--th-blue-light);
}

/* ===== Join confirmation ===== */

.join-success { text-align: center; border-left: 3px solid var(--th-success); }

.join-success-icon {
    font-size: 2.5rem;
    color: var(--th-success);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.join-success-title {
    color: var(--th-white);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.join-success-text {
    color: var(--th-gray-400);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.join-success-hint {
    color: var(--th-gray-500);
    font-size: 0.78rem;
    margin: 1rem 0 0;
}

/* LIVE and WALKOVER read as uppercase, but that is presentation — the resource key is
   sentence case so it does not collide with the ordinary "Live" / "Walkover" labels
   (.NET resource lookup cannot distinguish keys that differ only by case). */
.match-live-badge,
.modifier-badge {
    text-transform: uppercase;
}

/* ===== STATUS PAGE (404 and friends) ===== */
.status-code {
    display: block;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--th-blue-light);
    opacity: 0.35;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.status-next-title {
    color: var(--th-white);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.status-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.status-links li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-links li:last-child { border-bottom: none; padding-bottom: 0; }

.status-links a {
    color: var(--th-white);
    font-weight: 600;
}

.status-links a:hover { color: var(--th-blue-light); }

.status-links span {
    color: var(--th-gray-400);
    font-size: 0.85rem;
}

/* Contact form honeypot. Off-screen rather than display:none — some bots skip hidden fields
   but happily fill one that is merely positioned away, which is exactly who this is for.
   aria-hidden and tabindex="-1" on the markup keep it away from real users either way. */
.contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
