/* General */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: cursive;
    background-color: rgb(255, 255, 255);
}

body {
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.pick {
    color: hsl(0, 0%, 0%);
    padding: 10px;
}

:root {
    /* --bg: #0b1020; */
    /* --panel: #111833;
    /* --panel-2: #0f1530; */
    /* --text: #eef1ff;
    --muted: #b6c0ff;
    --brand: #7dd3fc; */
    /* sky-300 */
    /* --brand-2: #a78bfa; */
    /* violet-400 */
    /* --accent: #34d399; */
    /* emerald-400 */
    /* --warn: #fbbf24; */
    /* amber-400 */
    /* --danger: #fb7185; */
    /* rose-400 */
    /* --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --radius-xl: 20px; */
}

/* Light theme (toggle-able) */
.light {
    --bg: #f7f8ff;
    --panel: #ffffff;
    --panel-2: #f3f6ff;
    --text: #0d1225;
    --muted: #445;
    --shadow: 0 10px 22px rgba(0, 0, 0, .08);
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    color: var(--text);
    background: radial-gradient(1200px 800px at 80% -20%, rgba(125, 211, 252, .15), transparent 60%),
        radial-gradient(900px 600px at -10% 10%, rgba(167, 139, 250, .12), transparent 60%),
        var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- Layout --- */
.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(8px);
    background: linear-gradient(180deg, rgba(20, 25, 45, .9), rgba(20, 25, 45, .6));
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    margin: 0px 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: .3px
}

.ball {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 30% 30%, #fff 0 12px, #fffb, transparent 13px),
        radial-gradient(circle at 70% 60%, #fff 0 12px, #fffb, transparent 13px),
        radial-gradient(circle at 45% 80%, #fff 0 12px, #fffb, transparent 13px),
        radial-gradient(circle at 65% 25%, #fff 0 12px, #fffb, transparent 13px),
        radial-gradient(closest-side, #ffe9, #ffd966);
    box-shadow: 0 8px 20px rgba(255, 217, 102, .35);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-6px)
    }
}

.nav a {
    color: var(--text);
    text-decoration: none;
    opacity: .9
}

.nav .util {
    display: flex;
    align-items: center;
    gap: 10px
}

.btn {
    border: 1px solid rgba(255, 255, 255, .14);
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    transition: transform .12s ease, border-color .15s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .28)
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 70px 0 36px
}

.headline {
    font-family: Outfit, Inter, system-ui;
    font-weight: 800;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: .2px;
    margin: 0 0 14px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    color: transparent;
    color: blue;
}

.kicker {
    font-weight: 600;
    color: var(--muted)
}

.hero-card {
    margin-top: 22px;
    background: linear-gradient(160deg, rgba(125, 211, 252, .09), rgba(167, 139, 250, .07)) padding-box,
        linear-gradient(160deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0)) border-box;
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 20px;
}

.grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px
}

@media (max-width: 980px) {
    .grid {
        grid-template-columns: 1fr
    }
}

/* --- Sidebar / TOC --- */
.toc {
    position: flex;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding-right: 10px
}

.toc h3 {
    margin: 0 0 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted)
}

.toc a {
    display: block;
    padding: 8px 10px;
    margin: 6px 0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .06);
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0));
    opacity: .85;
    transition: background .2s ease, transform .1s ease, opacity .2s ease;
}

.toc a.active {
    outline: 2px solid rgba(125, 211, 252, .5);
    background: linear-gradient(180deg, rgba(125, 211, 252, .10), rgba(167, 139, 250, .06));
    opacity: 1
}

.toc a:hover {
    transform: translateX(3px)
}

/* --- Content cards --- */
section.rule {
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 22px;
    margin: 14px 0;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transition: opacity .6s ease, transform .6s ease;
}

section.rule.revealed {
    opacity: 1;
    transform: translateY(0) scale(1)
}

section.rule h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 22px
}

.tag {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0b1220;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    padding: 6px 10px;
    border-radius: 999px
}

/* Accordion */
.accordion {
    margin-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, .12)
}

.acc-item {
    border-bottom: 1px dashed rgba(255, 255, 255, .12)
}

.acc-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 14px 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer
}

.acc-btn:focus {
    outline: 2px solid rgba(125, 211, 252, .4)
}

.acc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}

.acc-panel-inner {
    padding: 0 6px 14px;
    color: var(--muted)
}

/* Inline SVG court */
.court {
    width: min(560px, 100%);
    margin: 10px auto 0;
}

.legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--muted)
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .06);
    padding: 6px 10px;
    border-radius: 999px
}

.chip {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block
}

/* Timeline */
.timeline {
    position: relative;
    margin-top: 10px
}

.timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--brand), transparent)
}

.tl-item {
    position: relative;
    padding-left: 50px;
    margin: 16px 0
}

.tl-item::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--panel);
    border: 2px solid var(--brand)
}

/* Utilities */
.muted {
    color: var(--muted)
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12)
}

.flex {
    display: flex;
    gap: 10px;
    align-items: center
}

.space {
    height: 24px
}

/* Footer */
footer {
    background: #1b4332;
    color: white;
    text-align: center;
    padding: 15px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}

video {
    width: 100%;
}