:root {
    color-scheme: light;
    --ink: #2e1c26;
    --plum: #6c0030;
    --plum-deep: #4a0b28;
    --plum-light: #8b184d;
    --plum-tint: #f8edf3;
    --saffron: #ee990c;
    --cream: #fcf8ef;
    --paper: #fff;
    --teal: #004848;
    --teal-tint: #ebf6f2;
    --gold-tint: #fff0cf;
    --line: #eadde3;
    --muted: #65535c;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cream); color: var(--ink); overflow-wrap: anywhere; }
a { color: var(--teal); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.12; }
.wrap { width: min(63rem, calc(100% - 3rem)); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip:focus { position: absolute; top: .5rem; left: .5rem; z-index: 2; background: white; padding: .6rem; }
.site-header {
    background: var(--paper);
    border-top: .23rem solid var(--plum);
    border-bottom: 1px solid var(--line);
}
.masthead { min-height: 4.45rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 .65rem; }
.brand { display: block; max-width: 100%; width: clamp(8rem, 32vw, 10.5rem); flex-shrink: 0; }
.brand img { width: 100%; height: auto; display: block; }
nav { display: flex; align-items: center; gap: .35rem; }
nav a {
    color: var(--plum);
    font-size: .94rem;
    font-weight: 750;
    padding: .55rem .8rem;
    text-decoration: none;
    white-space: nowrap;
    border-radius: .35rem;
}
nav a:hover, nav a[aria-current] { background: var(--plum-tint); }
.primary-nav { align-self: stretch; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.primary-nav a { align-self: stretch; display: flex; align-items: center; border-radius: 0; border-bottom: .18rem solid transparent; }
.primary-nav .language-link { color: var(--teal); }
.primary-nav a[aria-current] { background: transparent; border-bottom-color: var(--saffron); }
.nav-compact { display: none; }

.daily-heading, .inner-head { margin-block: clamp(1.1rem, 3.2vw, 2.35rem) 1rem; }
.daily-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: .35rem 1rem;
}
.daily-heading h1, .inner-head h1 {
    color: var(--plum-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4.8vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -.048em;
    text-wrap: balance;
}
.daily-heading h1 { font-size: clamp(1.8rem, 4.3vw, 2.7rem); }
.daily-date, .last-updated {
    color: var(--muted);
    font-size: .875rem;
    font-weight: 650;
}
.daily-date { grid-column: 1 / -1; }
.last-updated { grid-column: 2; grid-row: 2; margin-bottom: .22rem; }
.results-notice {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: .4rem;
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    border-left: .2rem solid var(--saffron);
    border-radius: .28rem;
    background: var(--gold-tint);
    color: var(--ink);
    font-size: .9rem;
}
.notice-label { padding: .19rem .45rem; background: var(--plum); color: #fff; border-radius: .22rem; font-size: .875rem; font-weight: 750; }
.results-notice summary { display: flex; align-items: center; gap: .55rem; min-height: 2rem; cursor: pointer; list-style: none; }
.results-notice summary::-webkit-details-marker { display: none; }
.results-notice summary::after { content: ''; width: .5rem; height: .5rem; border: solid var(--plum); border-width: 0 2px 2px 0; margin: 0 .2rem .2rem auto; flex-shrink: 0; transform: rotate(45deg); }
.results-notice[open] summary::after { transform: rotate(225deg); margin-bottom: -.16rem; }
.notice-title { color: var(--plum-deep); font-size: 1rem; font-weight: 750; line-height: 1.4; overflow-wrap: anywhere; }
.notice-copy { min-width: 0; overflow-wrap: anywhere; }
.notice-body { margin-top: .2rem; white-space: pre-line; }
.notice-links { display: flex; flex-wrap: wrap; gap: .2rem .85rem; margin-top: .35rem; }
.results-notice a { font-weight: 650; }
.chart-entry { display: inline-block; font-weight: 750; }

.section-band {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .3rem 1rem;
    margin-bottom: .45rem;
    padding: .65rem .85rem;
    background: var(--gold-tint);
    color: var(--plum-deep);
    border-left: .25rem solid var(--saffron);
    border-radius: .2rem;
    font-size: 1.1rem;
    line-height: 1.3;
}
.section-band h2 { font-size: inherit; }
.section-band a { font-size: .875rem; font-weight: 700; }
.board-toolbar { align-items: center; }
.game-listing-strip { margin-top: .6rem; text-align: center; }
.game-listing-strip a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .35rem 1.25rem;
    border: 1px solid #f0d6b0;
    border-radius: .45rem;
    background: var(--gold-tint);
    color: var(--plum);
    font-size: .9rem;
    font-weight: 750;
}
.game-listing-strip a:hover { border-color: var(--saffron); }
.board-actions, .monthly-actions, .history-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .75rem; }
.inner-head .history-actions { margin-top: .65rem; }
.board-actions input { width: 11.5rem; font-size: .9rem; }
.refresh-form { margin: 0; }
.refresh-form button { background: var(--plum); font-size: .9rem; }
.refresh-form button:hover { background: var(--plum-deep); }
.market-filter-status { margin: .3rem 0 .6rem; color: var(--muted); font-size: .875rem; }
.market-filter-status:empty { margin: 0; }
.home-monthly { margin-top: 1.75rem; scroll-margin-top: .75rem; }
.disclaimer-notice {
    margin: 0 0 .9rem;
    padding: .58rem .72rem;
    border: 1px solid var(--line);
    border-left: .2rem solid var(--plum-light);
    border-radius: .28rem;
    background: var(--plum-tint);
    color: var(--ink);
    font-size: .875rem;
}
.disclaimer-notice a, .site-footer a { font-weight: 700; }
.results-guide {
    margin-top: 1.7rem;
    padding: clamp(.9rem, 3vw, 1.4rem);
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: var(--paper);
}
.results-guide h2 { color: var(--plum-deep); font-size: clamp(1.15rem, 3vw, 1.4rem); }
.results-guide h3 { color: var(--plum-deep); font-size: 1rem; }
.results-guide p { margin-top: .38rem; }
.results-guide > p { max-width: 92ch; }
.results-guide-topics { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 58rem) {
    .results-guide-topics { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; }
    .results-guide-topics > :last-child { border-inline-start: 1px solid var(--line); padding-inline-start: 1.5rem; }
}
.support-content { max-width: 49rem; margin: 1.4rem auto 0; }
.support-content .inner-head { margin-top: 1rem; }
.support-nav { flex-wrap: wrap; gap: .2rem; margin-block: .8rem; }
.support-nav a { padding: .4rem .58rem; }
.support-panel { padding: clamp(.9rem, 3vw, 1.4rem); border: 1px solid var(--line); border-radius: .55rem; background: var(--paper); }
.support-panel h2 { color: var(--plum-deep); font-size: clamp(1.08rem, 3vw, 1.32rem); }
.policy-content p { max-width: 72ch; margin-top: .4rem; }
.policy-content section + section, .policy-content > p { margin-top: 1.1rem; }
.contact-form { display: grid; gap: .35rem; }
.contact-form label { font-weight: 700; }
.contact-form label:not(:first-of-type) { margin-top: .55rem; }
.contact-form label span, .field-help, .contact-meta { color: var(--muted); font-size: .875rem; }
.contact-form label span { font-weight: 500; }
.contact-form textarea { width: 100%; resize: vertical; }
.contact-form button { justify-self: start; margin-top: .5rem; }
.contact-success { background: var(--teal-tint); border-color: #c3ddd4; color: var(--teal); }
.contact-messages { display: grid; gap: .65rem; }
.contact-meta { margin-block: .2rem .45rem; }
.contact-body { margin-block: .5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-delete { margin-top: .65rem; }
.contact-delete summary { color: var(--plum); cursor: pointer; }
.contact-delete form { margin-top: .45rem; }

.board { margin-block: 1.65rem; }
.section-top { display: flex; align-items: end; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; }
.section-top > *, .month-form, .month-form input { min-width: 0; max-width: 100%; }
.section-top h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); color: var(--plum); }
.section-top p { margin-top: .25rem; color: var(--muted); font-size: .94rem; }
.table-frame { border: 1px solid var(--line); border-radius: .65rem; overflow: clip; }
.results-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--paper); }
.result-col { width: 22%; }
.results-table th, .results-table td { padding: .45rem 1rem; text-align: center; }
.results-table th:first-child { text-align: left; }
.results-table thead { background: var(--plum); color: #fffdf7; border-bottom: 1px solid var(--line); }
.daily-table thead, .monthly-table thead { position: sticky; top: 0; z-index: 1; }
.results-table thead .today { background: var(--plum-light); }
.results-table small { display: block; color: var(--muted); font-weight: 500; font-size: .875rem; }
.results-table thead small { color: #fbe0ed; }
.results-table thead a:focus-visible { outline-color: #ffe4a1; }
.results-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.results-table tbody th a { color: var(--ink); text-decoration-color: #b7a0ac; }
.results-table tbody th a:hover { color: var(--plum); text-decoration-color: currentColor; }
.results-table tbody .today { background: var(--teal-tint); }
.results-table .market-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .05rem .6rem; }
.results-table .market-meta a { color: var(--teal); font-weight: 650; text-decoration-color: currentColor; }
.market-name { font-size: 1.06rem; overflow-wrap: anywhere; }
.daily-table tbody th, .daily-table tbody td { padding-block: .57rem; }
.daily-table .market-group th { padding-block: .4rem; border-bottom: 1px solid var(--line); background: var(--plum-tint); color: var(--plum); font-size: .875rem; }
.daily-table .upcoming-group th { background: var(--gold-tint); color: #664415; }
.daily-table .current-group th { background: var(--teal-tint); color: var(--teal); }
.daily-table .featured-market th { box-shadow: inset .19rem 0 var(--saffron); background: #fffbef; }
.next-draw { font-weight: 750; color: #74400e; }
.number { font-size: clamp(1.35rem, 3.3vw, 1.8rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.current { color: var(--teal); }
.pending-number { color: var(--muted); font-weight: 650; }
.muted { color: var(--muted); }
.history-table th:last-child, .history-table td:last-child { width: 28%; }
.message { padding: .8rem 1rem; margin-block: .8rem; color: var(--plum-deep); background: var(--gold-tint); border-radius: .55rem; border: 1px solid #f0d6b0; }

.archive-source { margin-top: .65rem; font-size: .9rem; color: var(--muted); }
button {
    display: inline-block;
    background: var(--teal);
    color: white;
    border: 1px solid transparent;
    border-radius: .5rem;
    font: inherit;
    font-weight: 750;
    padding: .5rem .85rem;
    text-decoration: none;
    cursor: pointer;
}
button:hover { background: #003b3e; }
.inner-head h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); text-wrap: pretty; }
.inner-head p { margin-top: .45rem; color: var(--muted); }
.crumb { display: inline-block; margin-bottom: .5rem; font-weight: 700; }
.year-nav { flex-wrap: wrap; margin-top: 1rem; }
.year-nav a { background: var(--paper); border: 1px solid var(--line); }
.market-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: .75rem 0; }
.market-summary > div { background: var(--paper); border: 1px solid var(--line); border-radius: .55rem; padding: .7rem .8rem; }
.market-summary dt { color: var(--muted); font-size: .9rem; font-weight: 700; }
.market-summary dd { margin: .35rem 0 0; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 1rem; }
.market-list { border: 1px solid var(--line); border-radius: .55rem; overflow: hidden; background: var(--paper); }
.market-list > p { padding: .65rem .85rem; }
.market-item { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .1rem .7rem; padding: .65rem .85rem; color: var(--plum); text-decoration: none; }
.market-item + .market-item { border-top: 1px solid var(--line); }
.market-item:hover strong, .market-item:focus-visible strong { text-decoration: underline; }
.market-item:focus-visible { outline-offset: -3px; }
.market-item span { color: var(--muted); font-size: .875rem; }
.month-form { display: flex; gap: .35rem .5rem; flex-wrap: wrap; align-items: center; }
.month-form label, .editor-panel label { font-weight: 650; }
.chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    align-items: center;
    justify-content: space-between;
    margin-block: .9rem .7rem;
    scroll-margin-top: .75rem;
}
.chart-month-links { flex-wrap: wrap; }
.chart-month-links a { background: var(--paper); border: 1px solid var(--line); }
.chart-month-links .newer-month { margin-inline-start: auto; }
.chart-picker { max-width: 100%; }
.chart-picker select { max-width: 100%; }
.monthly-table th, .monthly-table td { padding-inline: .35rem; }
.monthly-table th:first-child { width: 16%; padding-left: .55rem; }
.monthly-table thead a { color: inherit; overflow-wrap: anywhere; }
.chart-name-short { display: none; }
.monthly-table tbody th { background: #fdf9f3; font-variant-numeric: tabular-nums; }
.monthly-table tbody tr:nth-child(even):not(.current-day) td { background: #fdf8fa; }
.monthly-table .current-day > * { background: var(--teal-tint); }
.monthly-table .current-day .number { color: var(--teal); }
input, select, textarea { min-width: 0; border: 1px solid #b5a2ac; padding: .45rem .55rem; font: inherit; color: var(--ink); border-radius: .4rem; background: white; }
textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.editor-panel { display: grid; gap: .55rem; align-content: start; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; }
main > .editor-panel { margin-top: 1rem; max-width: 32rem; }
.editor-panel h2 { margin-bottom: .4rem; }
.editor-panel button { justify-self: start; }
.editor-panel textarea { resize: vertical; }
.automation-panel { margin-block: 1rem; }
.automation-options { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; min-width: 0; border: 1px solid var(--line); border-radius: .45rem; padding: .5rem .65rem; }
.automation-options label { display: inline-flex; align-items: baseline; gap: .35rem; }
.automation-options input { margin: 0; accent-color: var(--plum); }
.editor-checkbox { display: flex; align-items: center; gap: .45rem; }
.editor-checkbox input { accent-color: var(--plum); }
.schedule-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 8rem) auto; align-items: center; gap: .4rem; }
.schedule-form label { overflow-wrap: anywhere; }
.sign-out { margin-top: 1rem; }
.site-footer { margin-top: 1.75rem; padding: .9rem 0; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; }
.site-footer p { font-size: .9rem; }
.site-footer a { font-size: .9rem; }
.footer-nav { flex-wrap: wrap; gap: .5rem .8rem; }
.footer-nav a { padding: .25rem 0; text-decoration: underline; }

@media (max-width: 42rem) {
    .wrap { width: calc(100% - 1.5rem); }
    .board { margin-block: 1.3rem; }
    .results-table th, .results-table td { padding-inline: .4rem; }
    .results-table th:first-child { padding-left: .65rem; }
    .result-col { width: 25%; }
    .editor-grid { grid-template-columns: minmax(0, 1fr); }
    .section-top:has(.month-form) { align-items: start; flex-direction: column; }
    .nav-full { display: none; }
    .nav-compact { display: inline; }
}

@media (max-width: 35rem) {
    .masthead { min-height: 3.6rem; }
    .brand { width: 7.15rem; }
    .primary-nav a { justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: .4rem .42rem; font-size: .875rem; }
    .daily-heading { column-gap: .4rem; align-items: baseline; }
    .daily-heading, .inner-head { margin-block: .8rem .7rem; }
    .daily-date { grid-column: 1; }
    .last-updated { grid-row: 1; margin-bottom: 0; }
    .daily-heading h1 { grid-column: 1 / -1; grid-row: 2; font-size: clamp(1.55rem, 6.1vw, 2.4rem); text-wrap: initial; }
    .results-notice { margin-top: .2rem; padding: 0 .55rem; }
    .results-notice summary { min-height: 2.75rem; }
    .results-notice[open] .notice-copy { padding-bottom: .6rem; }
    .notice-title { font-size: .9rem; }
    .disclaimer-notice { margin-bottom: .65rem; }
    .board-toolbar { padding: .45rem .6rem; }
    .board-actions input { font-size: 1rem; }
    button, input:not([type="checkbox"], [type="hidden"]), select,
    .support-nav a, .footer-nav a, .year-nav a, .chart-month-links a { min-height: 2.75rem; }
    .support-nav a, .footer-nav a, .year-nav a, .chart-month-links a { display: inline-flex; align-items: center; }
    .daily-table .number { font-size: 1.5rem; }
    .daily-table .market-meta a { display: inline-flex; align-items: center; min-height: 1.75rem; }
    .monthly-table thead th { font-size: min(.875rem, 5vw); white-space: nowrap; }
    .chart-name-full { display: none; }
    .chart-name-short { display: inline; }
    .contact-form button, #result-editor button, #homepage-notice-editor button, #new-market-editor button {
        justify-self: stretch;
    }
    .contact-form, .editor-panel { min-width: 0; }
    .schedule-form { grid-template-columns: minmax(0, 1fr) minmax(0, 7.1rem) auto; }
    .schedule-form button { padding-inline: .6rem; }
}

@media (max-width: 26rem) {
    .masthead { gap: 0 .35rem; }
    .brand { width: 5.35rem; }
    .primary-nav { gap: 0; }
    .primary-nav a { padding-inline: .25rem; }
    nav { gap: .15rem; }
    nav a { font-size: .825rem; padding: .35rem .3rem; }
    .section-top { flex-wrap: wrap; }
    .board-toolbar { align-items: start; flex-direction: column; }
    .board-actions { width: 100%; gap: .5rem; }
    .board-actions input { flex: 1 1 0; width: auto; font-size: 1rem; }
    .monthly-table th, .monthly-table td { padding-inline: .2rem; }
    .monthly-table td .number { font-size: min(1.35rem, 6.5vw); }
    .monthly-table th:first-child { width: 16%; padding-left: .3rem; }
}
