.y2-page {
    font-family: 'Lato', sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #f5f7fb 0%, #e7efff 100%);
    color: #0b1d46;
}

.y2-prizes-page .y2-content a {
    text-decoration: underline;
}

.y2-prizes-page .y2-subnav a {
    text-decoration: none;
}

.y2-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    box-sizing: border-box;
}

.y2-hero {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 14px 38px rgba(16, 72, 99, 0.14);
    color: #0b1d46;
}

.y2-hero h1 {
    font-size: 38px;
    font-weight: 550;
    margin: 0 0 16px;
    text-align: center;
}

.y2-hero h2 {
    font-size: 28px;
    margin: 32px 0 12px;
}

.y2-hero p,
.y2-hero ul {
    font-size: 17px;
    line-height: 1.7;
    margin: 0 0 16px;
    color: #1b2e4a;
}

.y2-hero ul {
    padding-left: 24px;
}

.y2-hero li+li {
    margin-top: 10px;
}

.y2-large-text {
    display: block;
    font-size: 22px;
    font-weight: 700;
    margin: 20px 0;
}

.y2-hero-img {
    display: flex;
    justify-content: center;
    margin: 12px 0 28px;
}

.y2-hero-img img {
    width: 100%;
    max-width: 540px;
    max-height: 540px;
    object-fit: contain;
}

.y2-hero-cta {
    display: flex;
    justify-content: center;
    margin: 24px 0 8px;
}

.y2-cta-btn {
    font-size: 18px;
    background: #78206e;
    color: #ffffff;
    padding: 16px 28px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    border: 2px solid #78206e;
    transition: all 0.2s ease;
}

.y2-cta-btn:hover {
    background: #ffffff;
    color: #78206e;
}

.y2-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 12px 0 8px;
}

.y2-subnav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(16, 72, 99, 0.12);
    background: #ffffff;
    color: #0b1d46;
    font-weight: 550;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.y2-subnav a::after {
    content: "›";
    margin-left: 10px;
    font-weight: 800;
    color: #78206e;
    transition: transform 0.2s ease;
}

.y2-subnav a:hover {
    border-color: #78206e;
    color: #78206e;
    box-shadow: 0 10px 22px rgba(120, 32, 110, 0.14);
    transform: translateY(-2px);
}

.y2-subnav a:hover::after {
    transform: translateX(4px);
}

.y2-subnav-top {
    margin-bottom: 24px;
}

.y2-section-title {
    font-size: 26px;
    margin: 36px 0 18px;
    font-weight: 700;
}

.y2-text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.y2-card {
    background: #f7f9ff;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid #dce6ff;
}

.y2-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.y2-image-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin: 38px auto 0;
}

.y2-circle {
    width: clamp(240px, 28vw, 360px);
    height: clamp(240px, 28vw, 360px);
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 36px rgba(16, 72, 99, 0.2);
    background: #78206e;
    border: 3px solid #78206e;
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.y2-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.y2-hover-text {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 18px;
    text-align: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.y2-circle:hover img {
    opacity: 0;
}

.y2-circle:hover .y2-hover-text {
    opacity: 1;
}

.y2-subsection {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 28px rgba(16, 72, 99, 0.12);
    margin-top: 24px;
}

.y2-subsection h2 {
    font-size: 24px;
    margin: 0 0 16px;
    color: #0b1d46;
}

.rules-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.rules-list li {
    position: relative;
    padding: 16px 16px 16px 44px;
    margin-bottom: 12px;
    background: #f7f9ff;
    border-radius: 12px;
    border-left: 4px solid #78206e;
    line-height: 1.7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rules-list li:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(120, 32, 110, 0.12);
}

.rules-list li::before {
    content: "✓";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 20px;
    height: 20px;
    background: #78206e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.rules-list li strong {
    color: #78206e;
    font-weight: 700;
}

.rules-list li em {
    font-style: italic;
    color: #0b1d46;
    font-weight: 550;
}

.y2-page table {
    margin-top: 20px;
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.y2-page th,
.y2-page td {
    border: 1px solid #d8e2f2;
    padding: 10px;
    text-align: left;
    font-size: 15px;
}

.y2-page th {
    background: #f0f4ff;
    font-weight: 700;
    color: #15386f;
}

.y2-page details {
    background: #f7f9ff;
    border: 1px solid #d6e4ff;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    box-shadow: none;
}

.y2-page details summary {
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    font-size: 18px;
    color: #173670;
}

.y2-page details summary::-webkit-details-marker {
    display: none;
}

.y2-page details summary::before {
    content: "➕";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.y2-page details[open] summary::before {
    content: "➖";
    transform: rotate(180deg);
}

.winners-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 6px 0 20px;
}

.y2-winners-page {
    background: linear-gradient(135deg, #f5f7fb 0%, #e7efff 100%);
}

.y2-winners-page .winners-spotlight {
    border: 1px solid #dce6ff;
    box-shadow: 0 10px 24px rgba(16, 72, 99, 0.12);
    background: #ffffff;
}

.winner-summary-card {
    background: #f8fbff;
    border: 1px solid #e3e8f0;
    border-radius: 14px;
    padding: 14px 14px 10px;
    box-shadow: none;
}

.winner-summary-card::before {
    content: none;
}

.winner-summary-card h2 {
    margin-top: 0;
    font-size: 22px;
    color: #12366f;
}

.winner-summary-list {
    margin: 0;
    padding-left: 20px;
}

.winner-summary-list li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #1f355c;
}

.winner-summary-list li strong {
    color: #0f2450;
}

.leaderboard-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 14px;
}

.leaderboard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.leaderboard-header-row h2 {
    margin: 0;
}

.leaderboard-header-row .leaderboard-controls {
    margin: 0;
}

.leaderboard-sections {
    margin-top: 14px;
}

.leaderboard-toggle-btn {
    border: 1px solid #d4deee;
    background: #ffffff;
    color: #183764;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.leaderboard-toggle-btn:hover {
    background: #f3f8ff;
    border-color: #9ebce8;
    color: #11315f;
}

.leaderboard-toggle-btn:active {
    background: #eaf2ff;
}

.leaderboard-toggle-btn:focus-visible {
    outline: 2px solid #0074e0;
    outline-offset: 2px;
}

.y2-page .raw-leaderboard-scroll {
    overflow-x: auto;
}

.y2-page .raw-leaderboard-scroll table {
    width: max-content;
    min-width: 2200px;
}

.y2-page details.raw-leaderboard th,
.y2-page details.raw-leaderboard td {
    white-space: nowrap;
}

.y2-page details table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.y2-page details table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.y2-page details table td,
.y2-page details table th {
    font-size: 14px;
}

.y2-winners-page .winners-spotlight details table {
    border: 1px solid #c7d7f0;
}

.y2-winners-page .winners-spotlight details table thead th {
    background: #1c3f75;
    color: #ffffff;
    border-color: #1c3f75;
}

.y2-winners-page .winners-spotlight details table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.y2-winners-page .winners-spotlight details table tbody tr:nth-child(even) td {
    background: #edf3ff;
}

.raw-data-note {
    display: none;
    margin: 6px 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff5db;
    border: 1px solid #efd9a0;
    color: #4f3b09;
    font-size: 14px;
    line-height: 1.45;
}

.emoji-list {
    list-style: none;
    padding-left: 0;
}

.emoji-list li {
    position: relative;
    padding-left: 26px;
}

.emoji-list li:nth-child(1)::before {
    content: "🥇";
    position: absolute;
    left: 0;
}

.emoji-list li:nth-child(2)::before {
    content: "🥈";
    position: absolute;
    left: 0;
}

.emoji-list li:nth-child(3)::before {
    content: "🥉";
    position: absolute;
    left: 0;
}

.y2-large-text,
.event-date,
.event-location {
    color: #4a5b77;
}

.event-date {
    font-style: italic;
}

.flash-event {
    animation: flash-event 1.5s infinite;
    border-radius: 4px;
    padding: 2px 4px;
}

@keyframes flash-event {

    0%,
    50%,
    100% {
        background-color: transparent;
    }

    25%,
    75% {
        background-color: rgba(255, 0, 0, 0.16);
    }
}

@media (max-width: 900px) {
    .y2-hero h1 {
        font-size: 30px;
    }

    .y2-subnav {
        gap: 10px;
    }

    .y2-subnav a {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .y2-circle {
        width: 210px;
        height: 210px;
    }

    .y2-hover-text {
        font-size: 16px;
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .y2-content {
        padding: 28px 16px 60px;
    }

    .y2-subnav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 10px;
    }

    .y2-subnav a {
        width: 100%;
        min-height: 48px;
        padding: 10px 12px;
        font-size: 0.92rem;
        text-align: center;
    }

    .y2-subnav a:first-child {
        grid-column: 1 / -1;
    }

    .y2-hero {
        padding: 22px;
    }

    .y2-hero-img {
        margin: 0 0 22px;
    }

    .y2-hero-img img {
        max-width: 100%;
        max-height: none;
        height: auto;
        object-fit: contain;
    }

    .y2-image-row {
        gap: 14px;
    }

    .y2-circle {
        width: min(100%, 320px);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .raw-data-note {
        display: block;
    }

    .winner-summary-card h2 {
        font-size: 20px;
    }

    .leaderboard-toggle-btn {
        width: 100%;
    }

    .leaderboard-header-row {
        align-items: stretch;
        flex-direction: column;
    }
}

.y1-iframe-wrap iframe {
    height: 820px;
}

/* Legacy hooks mapped to Y2 look */
.y1-label {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(120, 32, 110, 0.1);
    color: #78206e;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.y1-pill-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.y1-pill-list li {
    padding: 8px 12px;
    background: #f4f6ff;
    border-radius: 10px;
    border: 1px solid #dce6ff;
    font-weight: 600;
    color: #2b3c61;
}

.y1-hero-title h1 {
    margin: 4px 0;
}

.y1-hero-title p {
    margin: 0;
    color: #24395d;
}

.y1-embed {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(16, 72, 99, 0.12);
    margin-top: 24px;
}

.y1-embed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.y1-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #fff2f8;
    color: #b01779;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 12px;
}

.highlight-block {
    background: #f7f9ff;
    border: 1px solid #dce6ff;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0;
    color: #24395d;
}

/* Layout fixes for Year 1 pages */
.y1-content .y2-hero-cta {
    gap: 16px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    margin: 24px 0 16px;
}

.video-container {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.video-container iframe {
    width: min(100%, 820px);
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(12, 35, 78, 0.18);
}

/* Extra spacing when circle rows sit near footer (AAAI page) */
.y2-image-row {
    margin-bottom: 60px;
}

@media (max-width: 640px) {
    .y1-content .y2-hero-cta {
        flex-wrap: wrap;
    }
}

.leaderboard-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.leaderboard-group h3 {
    margin: 0 0 8px;
}

.leader-list {
    list-style: disc;
    padding-left: 22px;
    margin: 0;
    color: #0b1d46;
    font-weight: 700;
}

.leader-list li + li {
    margin-top: 6px;
}

.leader-list li {
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
}

.leader-list li:hover {
    color: #4a2255;
}

.leader-list li[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 100%;
    margin-top: 10px;
    border: 8px solid transparent;
    border-top-color: #f8fafc;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 6;
}

.leader-list li[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 22px;
    transform: translateY(-6px) scale(0.98);
    background: rgba(248, 250, 252, 0.96);
    color: #0b1d46;
    padding: 12px 14px;
    border-radius: 12px;
    white-space: pre-line;
    box-shadow: 0 12px 26px rgba(0,0,0,0.2);
    border: 2px solid #cbd5e1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5;
    min-width: 240px;
    max-width: min(360px, calc(100vw - 60px));
    line-height: 1.5;
}

.leader-list li[data-tooltip]:hover::before,
.leader-list li[data-tooltip]:hover::after,
.leader-list li[data-tooltip]:focus-visible::before,
.leader-list li[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (max-width: 640px) {
    .leader-list li[data-tooltip]::before {
        left: 10px;
        top: 100%;
        margin-top: 8px;
        border: 8px solid transparent;
        border-top-color: #f8fafc;
        border-right-color: transparent;
        transform: translateY(0) scale(1);
    }

    .leader-list li[data-tooltip]::after {
        left: 0;
        right: auto;
        top: 100%;
        margin-top: 18px;
        transform: translateY(0) scale(0.98);
    }

    .leader-list li[data-tooltip]:hover::before,
    .leader-list li[data-tooltip]:hover::after,
    .leader-list li[data-tooltip]:focus-visible::before,
    .leader-list li[data-tooltip]:focus-visible::after {
        transform: translateY(0) scale(1);
    }
}
