:root {
    color-scheme: light;
    --demo-ink: #172724;
    --demo-soft: #60706c;
    --demo-muted: #7b8985;
    --demo-line: #dce6e2;
    --demo-surface: #f4f8f6;
    --demo-accent: #17634f;
    --demo-accent-dark: #0f493a;
    --demo-accent-soft: #e8f3ef;
    --demo-white: #fff;
    --demo-shadow: 0 22px 60px rgba(26, 54, 47, .12);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--demo-white);
    color: var(--demo-ink);
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.demo-context {
    display: flex;
    min-height: 42px;
    padding: 8px max(20px, calc((100vw - 1180px) / 2));
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #14211e;
    color: #d8e2df;
    font-size: 13px;
}

.demo-context strong {
    color: #fff;
}

.demo-context a {
    color: #b9d8ce;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.club-site-header {
    display: grid;
    width: min(calc(100% - 40px), 1180px);
    min-height: 76px;
    margin: 0 auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 38px;
}

.club-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.club-brand > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--demo-accent);
    color: var(--demo-accent);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: -.04em;
}

.club-brand strong {
    font-size: 15px;
    letter-spacing: -.01em;
}

.club-site-header nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.club-site-header nav a {
    position: relative;
    padding: 27px 0 24px;
    color: var(--demo-soft);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.club-site-header nav a[aria-current="page"] {
    color: var(--demo-ink);
}

.club-site-header nav a[aria-current="page"]::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--demo-accent);
    content: "";
}

.club-header-action {
    display: inline-flex;
    min-height: 40px;
    padding: 0 15px;
    align-items: center;
    border: 1px solid var(--demo-accent);
    color: var(--demo-accent-dark);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.club-page-hero {
    display: grid;
    min-height: 300px;
    padding: 58px max(20px, calc((100vw - 1180px) / 2));
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 55px;
    border-top: 1px solid var(--demo-line);
    border-bottom: 1px solid var(--demo-line);
    background: var(--demo-surface);
}

.club-page-hero > div > span,
.club-result-section > header span,
.club-iframe-explanation > div:first-child > span {
    display: block;
    margin-bottom: 8px;
    color: var(--demo-accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.club-page-hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 7vw, 76px);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: 1;
}

.club-page-hero p {
    max-width: 590px;
    margin: 15px 0 0;
    color: var(--demo-soft);
    font-size: 17px;
}

.club-page-hero dl {
    display: grid;
    min-width: 380px;
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #cad8d3;
    border-bottom: 1px solid #cad8d3;
}

.club-page-hero dl div {
    padding: 15px;
    border-right: 1px solid #cad8d3;
}

.club-page-hero dl div:last-child {
    border-right: 0;
}

.club-page-hero dt {
    color: var(--demo-muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.club-page-hero dd {
    margin: 5px 0 0;
    color: var(--demo-ink);
    font-size: 14px;
    font-weight: 800;
}

.club-result-section,
.club-iframe-explanation {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
}

.club-result-section {
    padding: 66px 0 0;
}

.club-result-section > header {
    display: flex;
    margin-bottom: 18px;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.club-result-section h2,
.club-iframe-explanation h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    letter-spacing: -.03em;
    line-height: 1.05;
}

.club-result-section > header p {
    margin: 0 0 3px;
    color: var(--demo-soft);
    font-size: 14px;
}

.club-iframe-frame {
    overflow: hidden;
    border: 1px solid #d5e0dc;
    background: #fff;
    box-shadow: var(--demo-shadow);
}

.club-iframe-frame iframe {
    display: block;
    width: 100%;
    height: 640px;
    border: 0;
    background: #fff;
}

.club-iframe-explanation {
    display: grid;
    padding: 74px 0;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    gap: 80px;
}

.club-iframe-explanation p {
    margin: 0 0 14px;
    color: var(--demo-soft);
    font-size: 16px;
    line-height: 1.65;
}

.club-site-footer {
    display: flex;
    min-height: 90px;
    padding: 20px max(20px, calc((100vw - 1180px) / 2));
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--demo-line);
    background: var(--demo-surface);
    color: var(--demo-soft);
    font-size: 13px;
}

.club-site-footer strong {
    color: var(--demo-ink);
}

/* The embedded result surface. It deliberately borrows the host site's light palette. */
.scorebook-embed {
    min-width: 280px;
    background: #fff;
}

.embed-results {
    width: 100%;
    min-height: 100vh;
    padding: 20px clamp(16px, 4vw, 34px) 24px;
}

.embed-results__brand {
    display: flex;
    min-height: 40px;
    padding-bottom: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--demo-line);
}

.embed-results__brand > span {
    display: grid;
    grid-template-columns: 22px auto;
    align-items: center;
    column-gap: 8px;
}

.embed-results__brand img {
    width: 20px;
    height: 20px;
    grid-row: 1 / 3;
    object-fit: contain;
    opacity: .72;
}

.embed-results__brand small {
    color: var(--demo-muted);
    font-size: 10px;
    line-height: 1.15;
}

.embed-results__brand strong {
    color: #495853;
    font-size: 11px;
    line-height: 1.2;
}

.embed-results__brand > b {
    color: var(--demo-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.embed-results__heading {
    display: grid;
    padding: 25px 0 19px;
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: end;
    gap: 30px;
}

.embed-results__heading > div > span {
    display: block;
    margin-bottom: 5px;
    color: var(--demo-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.embed-results__heading h1 {
    margin: 0;
    color: var(--demo-ink);
    font-size: clamp(27px, 5vw, 40px);
    letter-spacing: -.04em;
    line-height: 1.05;
}

.embed-results__heading p {
    margin: 6px 0 0;
    color: var(--demo-soft);
    font-size: 13px;
}

.embed-results__heading form label {
    display: block;
    margin-bottom: 5px;
    color: var(--demo-soft);
    font-size: 12px;
    font-weight: 750;
}

.embed-results__heading form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 62px;
}

.embed-results__heading select,
.embed-results__heading button {
    min-height: 40px;
    border: 1px solid #cbd9d4;
    background: #fff;
    color: var(--demo-ink);
    font-size: 13px;
}

.embed-results__heading select {
    min-width: 0;
    padding: 7px 28px 7px 9px;
    border-right: 0;
}

.embed-results__heading button {
    background: var(--demo-accent);
    color: #fff;
    font-weight: 800;
}

.embed-results__filter {
    display: flex;
    min-height: 38px;
    margin: 0 0 14px;
    padding: 9px 11px;
    align-items: center;
    gap: 7px;
    border: 1px solid #d8e5e0;
    background: var(--demo-accent-soft);
    color: #536862;
    font-size: 12px;
}

.embed-results__filter > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--demo-accent);
}

.embed-results__filter strong {
    color: var(--demo-accent-dark);
}

.embed-results__table {
    border: 1px solid var(--demo-line);
}

.embed-results__table > header {
    display: flex;
    min-height: 48px;
    padding: 10px 13px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--demo-line);
    background: #fbfdfc;
}

.embed-results__table h2 {
    margin: 0;
    font-size: 15px;
}

.embed-results__table > header span {
    color: var(--demo-muted);
    font-size: 12px;
}

.embed-results__table > div {
    overflow-x: auto;
}

.embed-results__table table {
    width: 100%;
    border-collapse: collapse;
}

.embed-results__table th,
.embed-results__table td {
    height: 48px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--demo-line);
    text-align: left;
}

.embed-results__table tbody tr:last-child td {
    border-bottom: 0;
}

.embed-results__table th {
    color: var(--demo-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.embed-results__table td {
    color: var(--demo-soft);
    font-size: 13px;
}

.embed-results__table td:first-child {
    width: 70px;
    color: var(--demo-ink);
    font-weight: 850;
    text-align: center;
}

.embed-results__table th:first-child {
    text-align: center;
}

.embed-results__table td:last-child {
    color: var(--demo-ink);
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.embed-dog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.embed-dog img {
    width: 19px;
    height: 13px;
    border: 1px solid rgba(23, 39, 36, .12);
    object-fit: cover;
}

.embed-dog strong {
    color: var(--demo-ink);
}

.embed-results__footer {
    display: flex;
    padding: 15px 1px 0;
    align-items: start;
    justify-content: space-between;
    gap: 24px;
    color: var(--demo-muted);
}

.embed-results__footer p {
    max-width: 610px;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.embed-results__footer span {
    font-size: 10px;
    white-space: nowrap;
}

/* The host page and the embedded result window move independently. */
.demo-context,
.club-site-header,
.club-page-hero > div,
.club-page-hero dl,
.club-result-section > header,
.club-iframe-frame,
.club-iframe-explanation {
    animation: demo-host-enter 620ms cubic-bezier(.2, .8, .2, 1) both;
}

.club-site-header { animation-delay: 60ms; }
.club-page-hero > div { animation-delay: 110ms; }
.club-page-hero dl { animation-delay: 170ms; }
.club-result-section > header { animation-delay: 220ms; }
.club-iframe-frame { animation-delay: 290ms; }
.club-iframe-explanation { animation-delay: 350ms; }

.embed-results__brand,
.embed-results__heading,
.embed-results__filter,
.embed-results__table,
.embed-results__footer {
    animation: demo-embed-enter 460ms cubic-bezier(.2, .8, .2, 1) both;
}

.embed-results__heading { animation-delay: 45ms; }
.embed-results__filter { animation-delay: 90ms; }
.embed-results__table { animation-delay: 140ms; }
.embed-results__footer { animation-delay: 190ms; }

.embed-results__filter > span {
    animation: demo-filter-pulse 2.4s ease-in-out infinite;
}

.embed-results__table tbody tr {
    animation: demo-result-row 360ms cubic-bezier(.2, .8, .2, 1) both;
}

.embed-results__table tbody tr:nth-child(1) { animation-delay: 190ms; }
.embed-results__table tbody tr:nth-child(2) { animation-delay: 235ms; }
.embed-results__table tbody tr:nth-child(3) { animation-delay: 280ms; }
.embed-results__table tbody tr:nth-child(4) { animation-delay: 325ms; }

@keyframes demo-host-enter {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes demo-embed-enter {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: none; }
}

@keyframes demo-result-row {
    from { opacity: 0; transform: translateX(-7px); }
    to { opacity: 1; transform: none; }
}

@keyframes demo-filter-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(23, 99, 79, .08); }
    50% { box-shadow: 0 0 0 6px rgba(23, 99, 79, .13); }
}

@media (max-width: 760px) {
    .demo-context {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .club-site-header {
        width: calc(100% - 24px);
        min-height: 66px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .club-site-header nav {
        display: none;
    }

    .club-page-hero {
        min-height: 0;
        padding: 42px 14px;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .club-page-hero dl {
        min-width: 0;
    }

    .club-page-hero dl div {
        padding: 10px;
    }

    .club-result-section,
    .club-iframe-explanation {
        width: calc(100% - 24px);
    }

    .club-result-section {
        padding-top: 42px;
    }

    .club-result-section > header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .club-iframe-frame iframe {
        height: 720px;
    }

    .club-iframe-explanation {
        padding: 52px 0;
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .club-site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .embed-results {
        padding: 15px 12px 20px;
    }

    .embed-results__brand > b {
        display: none;
    }

    .embed-results__heading {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .embed-results__table th:nth-child(3),
    .embed-results__table td:nth-child(3) {
        display: none;
    }

    .embed-results__table th,
    .embed-results__table td {
        padding-right: 8px;
        padding-left: 8px;
    }

    .embed-results__footer {
        flex-direction: column;
        gap: 8px;
    }

    .embed-results__footer span {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .demo-context,
    .club-site-header,
    .club-page-hero > div,
    .club-page-hero dl,
    .club-result-section > header,
    .club-iframe-frame,
    .club-iframe-explanation,
    .embed-results__brand,
    .embed-results__heading,
    .embed-results__filter,
    .embed-results__table,
    .embed-results__footer,
    .embed-results__filter > span,
    .embed-results__table tbody tr {
        animation: none !important;
    }
}
