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

        :root {
            --primary: #2c3e50;
            --blue: #3498db;
            --red: #e74c3c;
            --green: #27ae60;
            --amber: #f39c12;
            --light-bg: #f8f9fa;
            --border: #e0e0e0;
            --text: #333;
            --muted: #666;
            --white: #fff;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: var(--light-bg);
            color: var(--text);
            line-height: 1.6;
        }

        header {
            background: var(--primary);
            color: var(--white);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-inner {
            max-width: 1080px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative;
        }

        .header-scroll-nav {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            gap: 0.65rem;
            opacity: 0;
            transition: opacity 0.25s ease;
            white-space: nowrap;
            pointer-events: none;
        }

        .header-scroll-nav.visible { opacity: 1; }

        .header-title {
            font-size: 0.88rem;
            font-weight: 600;
            pointer-events: none;
        }

        .header-group-link {
            color: rgba(255,255,255,0.78);
            text-decoration: none;
            font-size: 0.74rem;
            border: 1px solid rgba(255,255,255,0.35);
            border-radius: 999px;
            padding: 0.12rem 0.55rem;
            pointer-events: auto;
            transition: color 0.2s, border-color 0.2s;
        }

        .header-group-link:hover {
            color: var(--white);
            border-color: rgba(255,255,255,0.6);
        }

        .header-inner a {
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            font-size: 0.9rem;
            transition: color 0.2s;
        }

        .header-inner a:hover { color: var(--white); }

        .lang-toggle {
            display: flex;
            align-items: center;
            gap: 4px;
            background: rgba(255,255,255,0.12);
            border-radius: 20px;
            padding: 3px;
        }

        .lang-btn {
            background: none;
            border: none;
            color: rgba(255,255,255,0.6);
            font-size: 0.8rem;
            font-weight: 600;
            padding: 3px 10px;
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
            letter-spacing: 0.03em;
        }

        .lang-btn.active { background: rgba(255,255,255,0.25); color: var(--white); }
        .lang-btn:hover:not(.active) { color: rgba(255,255,255,0.85); }

        .hero {
            background: linear-gradient(135deg, var(--primary) 0%, #1a6fa3 100%);
            color: var(--white);
            padding: 3rem 2rem 2.5rem;
            text-align: center;
        }

        .tournament-badge {
            display: inline-block;
            background: rgba(255,255,255,0.15);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 20px;
            padding: 0.3rem 1rem;
            font-size: 0.8rem;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            margin-bottom: 1rem;
        }

        .hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
        .hero .subtitle { color: rgba(255,255,255,0.75); font-size: 1rem; }

        .group-nav { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.25rem; }
        .group-nav a {
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            font-size: 0.82rem;
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 20px;
            padding: 0.25rem 0.9rem;
            transition: color 0.2s, border-color 0.2s;
        }
        .group-nav a:hover { color: var(--white); border-color: rgba(255,255,255,0.6); }

        main { max-width: 1080px; margin: 0 auto; padding: 2rem; }

        section {
            background: var(--white);
            border-radius: 10px;
            border: 1px solid var(--border);
            padding: 1.75rem;
            margin-bottom: 1.5rem;
        }

        section h2 {
            font-size: 1.05rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 1.25rem;
            padding-bottom: 0.6rem;
            border-bottom: 2px solid var(--blue);
        }

        img.flag {
            width: 24px; height: 16px; object-fit: cover; border-radius: 2px;
            vertical-align: middle; display: inline-block;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
        }

        img.flag-lg {
            width: 32px; height: 21px; object-fit: cover; border-radius: 2px;
            vertical-align: middle; display: inline-block;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
        }

        img.flag-xl {
            width: 44px; height: 29px; object-fit: cover; border-radius: 3px;
            vertical-align: middle; display: inline-block;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
        }

        .standings { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

        .standings th {
            text-align: left;
            font-weight: 600;
            color: var(--muted);
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 0.4rem 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        .standings th.num, .standings td.num { text-align: center; }

        .standings td { padding: 0.65rem 0.75rem; border-bottom: 1px solid #f0f0f0; }
        .standings td.num { color: var(--muted); }
        .standings tr:last-child td { border-bottom: none; }
        .standings tr.qualified td { background: #f0faf4; }
        .standings tr.qualified td:first-child { border-left: 3px solid var(--green); padding-left: 0.6rem; }
        .standings tr.eliminated td { background: #fff8f8; }
        .standings tr.eliminated td:first-child { border-left: 3px solid var(--red); padding-left: 0.6rem; }

        .team-cell { display: flex; align-items: center; gap: 0.6rem; }

        .pts-cell { font-weight: 700; font-size: 1rem; color: var(--primary); text-align: center; }

        .badge {
            display: inline-block;
            font-size: 0.7rem;
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            font-weight: 600;
            white-space: nowrap;
        }

        .badge-qualified { background: #d4edda; color: #155724; }
        .badge-contender { background: #fff3cd; color: #856404; }
        .badge-danger    { background: #fde8e8; color: #9b2226; }

        .fixtures-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

        .fixture-card {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 1rem;
            text-align: center;
            border: 1px solid var(--border);
        }

        .fixture-card .round-label {
            font-size: 0.72rem; color: var(--muted);
            text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6rem;
        }

        .fixture-card .matchup {
            display: flex; align-items: center; justify-content: center;
            gap: 0.75rem; font-size: 0.95rem; font-weight: 600;
        }

        .fixture-card .vs { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
        .fixture-card .matchup-names { font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; }

        .team-section { margin-bottom: 1.5rem; }
        .team-section:last-child { margin-bottom: 0; }

        .team-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
        .team-header h3 { font-size: 1rem; font-weight: 600; color: var(--primary); }

        .scenario-list { list-style: none; margin-bottom: 0.9rem; }

        .scenario-list > li {
            padding: 0.5rem 0.75rem;
            border-left: 3px solid var(--border);
            margin-bottom: 0.5rem;
            font-size: 1rem;
        }

        .scenario-list > li.green { border-left-color: var(--green); background: #f6fff9; border-radius: 0 4px 4px 0; }
        .scenario-list > li.amber { border-left-color: var(--amber); background: #fffcf5; border-radius: 0 4px 4px 0; }
        .scenario-list > li.red   { border-left-color: var(--red);   background: #fff8f8; border-radius: 0 4px 4px 0; }

        .sub-scenarios { list-style: none; margin: 0.4rem 0 0 1rem; }

        .sub-scenarios li {
            font-size: 1rem;
            padding: 0.2rem 0 0.2rem 0.6rem;
            border-left: 2px solid #ddd;
            margin-bottom: 0.2rem;
        }

        .verdict {
            background: #f0f6fc;
            border-radius: 6px;
            padding: 0.7rem 1rem;
            font-size: 1rem;
            color: var(--primary);
            border-left: 3px solid var(--blue);
        }

        .team-divider { border: none; border-top: 1px dashed var(--border); margin: 1.5rem 0; }

        /* ── Outcomes grid ── */
        .outcomes-legend {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-bottom: 1.25rem;
            font-size: 0.85rem;
        }

        .outcomes-legend .legend-label { color: var(--muted); margin-right: 0.5rem; }

        .badge-through-lg      { background: #d4edda; color: #155724; display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 600; }
        .badge-likely-lg       { background: #c8edd4; color: #166534; display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 600; }
        .badge-maybe-lg        { background: #fff3cd; color: #856404; display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 600; }
        .badge-unlikely-lg     { background: #fde8cc; color: #7c3a00; display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 600; }
        .badge-out-lg          { background: #fde8e8; color: #9b2226; display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 600; }

        .outcomes-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 1.25rem;
        }

        .outcome-card {
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: hidden;
        }

        .outcome-card-header {
            background: #f0f4f8;
            padding: 0.5rem 0.75rem;
            font-size: 0.75rem;
            color: var(--primary);
            font-weight: 500;
            line-height: 1.4;
            border-bottom: 1px solid var(--border);
        }

        .outcome-card-header strong { font-weight: 700; }
        .outcome-card-header .winner { font-weight: 700; color: var(--green); }

        .outcome-team-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.35rem 0.75rem;
            font-size: 0.85rem;
            border-bottom: 1px solid #f5f5f5;
        }

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

        .outcome-team-name {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-weight: 500;
        }

        .outcome-right {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .outcome-pts {
            font-size: 0.8rem;
            color: var(--muted);
            min-width: 26px;
            text-align: right;
        }

        .badge-sm-through       { background: #d4edda; color: #155724; font-size: 0.65rem; padding: 0.1rem 0.45rem; border-radius: 8px; font-weight: 600; white-space: nowrap; }
        .badge-sm-strong-maybe  { background: #c8edd4; color: #166534; font-size: 0.65rem; padding: 0.1rem 0.45rem; border-radius: 8px; font-weight: 600; white-space: nowrap; }
        .badge-sm-maybe         { background: #fff3cd; color: #856404; font-size: 0.65rem; padding: 0.1rem 0.45rem; border-radius: 8px; font-weight: 600; white-space: nowrap; }
        .badge-sm-maybe-not     { background: #fde8cc; color: #7c3a00; font-size: 0.65rem; padding: 0.1rem 0.45rem; border-radius: 8px; font-weight: 600; white-space: nowrap; }
        .badge-sm-out           { background: #fde8e8; color: #9b2226; font-size: 0.65rem; padding: 0.1rem 0.45rem; border-radius: 8px; font-weight: 600; white-space: nowrap; }

        .outcomes-note {
            background: #f0f6fc;
            border-left: 3px solid var(--blue);
            border-radius: 6px;
            padding: 0.7rem 1rem;
            font-size: 0.88rem;
            color: var(--primary);
        }

        footer { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.85rem; }
        footer a { color: var(--blue); text-decoration: none; }
        footer a:hover { text-decoration: underline; }

        @media (max-width: 650px) {
            main { padding: 1rem; }
            .hero h1 { font-size: 1.4rem; }
            section { padding: 1.25rem; }
            .fixtures-grid { grid-template-columns: 1fr; }
            .outcomes-grid { grid-template-columns: 1fr; }
            .header-scroll-nav { display: none; }

            /* Keep the first standings table readable on narrow screens. */
            .standings { font-size: 0.8rem; }
            .standings th,
            .standings td { padding: 0.42rem 0.35rem; }
            .standings th:last-child,
            .standings td:last-child { display: none; }
            .team-cell { gap: 0.4rem; }
            .pts-cell { font-size: 0.9rem; }
        }
