:root {
    color: #141414;
    background: #fcfbf8;
    font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }

.masthead {
    display: flex;
    justify-content: flex-end;
    padding: 1.35rem clamp(1.25rem, 5vw, 5rem);
    border-bottom: 1px solid #e9e4d9;
}

.brand {
    color: #8b651e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.65rem, 3.6vw, 2.6rem);
    letter-spacing: -0.045em;
}

main {
    width: min(94%, 92rem);
    margin-inline: auto;
    padding-bottom: 3rem;
}

.race-heading {
    padding: clamp(2rem, 6vw, 4.5rem) 1rem 0;
    text-align: center;
}

.race-heading h1 {
    color: #000;
    font-size: clamp(1.45rem, 2.5vw, 1.875rem);
    font-weight: 600;
}

.race-heading p {
    margin-top: 0.55rem;
    color: #58564e;
    font-size: 0.9375rem;
}

.race-layout {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(0, 3fr) minmax(11rem, 1fr);
    gap: clamp(0.75rem, 2vw, 2rem);
    align-items: start;
    margin-top: clamp(2rem, 5vw, 4rem);
}

.prediction {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
}

.prediction section + section {
    margin-top: 2rem;
}

.prediction h2, .runners h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.picks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.55rem, 2.4vw, 2.5rem);
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.picks-quinte {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.picks-quinte .pick-number {
    font-size: clamp(2.5rem, 6vw, 6rem);
}

.pick-number {
    display: block;
    color: #0c0c0c;
    font-size: clamp(3.35rem, 10vw, 9rem);
    font-weight: 700;
    line-height: 0.98;
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: -0.055em;
}

.pick-horse {
    display: block;
    margin-top: 0.9rem;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.pick-reason, .pending {
    margin-top: 0.5rem;
    color: #4f4d47;
    font-size: 0.875rem;
    line-height: 1.45;
}

.runners {
    grid-column: 1;
    grid-row: 1;
    border-top: 1px solid #ded7c9;
    padding-top: 0.65rem;
}

.runner-list {
    margin: 0.55rem 0 0;
    padding: 0;
    list-style: none;
}

.runner-list li {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #e9e4d9;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.bib { color: #715219; font-weight: 700; }
.rider, .runner-status { display: block; color: #58564e; font-size: 0.8rem; }
.runner-status { font-style: italic; }

@media (max-width: 55rem) {
    .race-layout { grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr); }
    .picks-quinte { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 37.5rem) {
    main { width: min(92%, 36rem); }
    .race-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .prediction { grid-column: 1; }
    .runners { grid-row: 2; }
    .pick-horse { font-size: 0.9rem; }
    .pick-reason { font-size: 0.8rem; }
}

.race-title {
    position: relative;
    display: inline-block;
    max-width: calc(100% - 25rem);
}

.countdown {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.8rem);
    transform: translateY(-50%);
    padding: 0.3rem 0.65rem;
    border: 1px solid #e9e4d9;
    border-radius: 0.35rem;
    color: #715219;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 65rem) {
    .race-title {
        display: inline-flex;
        max-width: 100%;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem 0.8rem;
    }

    .countdown { position: static; transform: none; }
}

.performance { max-width: 63rem; margin: 3rem auto 0; padding: 1.25rem 0; border-top: 1px solid #ded7c9; }
.performance h2 { font-size: 1.25rem; margin-bottom: 0.55rem; }
.performance p, .performance small { color: #58564e; }
.performance dl { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }
.performance dt { font-size: 0.88rem; }
.performance dd { margin: 0.25rem 0 0; font-weight: 700; }
.performance-scroll { overflow-x: auto; }
.performance table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
.performance caption { text-align: left; font-weight: 600; }
.performance td, .performance th { padding: 0.55rem; border-bottom: 1px solid #e9e4d9; }
.performance small { display: block; font-weight: normal; }
