:root {
    --brand: #546353;
    --brand-deep: #3f4d40;
    --orange: #f1871f;
    --red: #e84527;
    --gold: #fac015;
    --ink: #202620;
    --muted: #667067;
    --line: #dce1dc;
    --soft: #f5f7f5;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(31, 43, 32, .08);
}

* { box-sizing: border-box; }
html { background: var(--white); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; background: var(--white); }
a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
.shell { width: min(1500px, calc(100% - 36px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); position: sticky; top: 0; z-index: 20; }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: min(310px, 54vw); height: auto; max-height: 54px; object-fit: contain; object-position: left center; }
.header-title { color: var(--brand); font-weight: 700; letter-spacing: .04em; }

.main-content { min-height: calc(100vh - 150px); padding-block: 28px 64px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; margin-bottom: 30px; }
.breadcrumbs a { color: var(--muted); }

.hero, .page-heading { max-width: 880px; padding: 42px 0 28px; }
.page-heading.compact { padding-top: 18px; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 4.2rem); line-height: 1; color: var(--brand); letter-spacing: -.035em; }
h1 span { color: var(--orange); }
.hero p:last-child, .page-heading p:last-child { max-width: 760px; font-size: 1.08rem; color: var(--muted); line-height: 1.6; }

.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.event-card { min-height: 190px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: end; justify-content: space-between; gap: 20px; text-decoration: none; background: linear-gradient(145deg, #fff, #f8faf8); box-shadow: var(--shadow); transition: transform .16s ease, border-color .16s ease; }
.event-card:hover { transform: translateY(-2px); border-color: var(--orange); color: var(--brand-deep); }
.event-card-kicker { color: var(--red); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.event-card h2 { margin: 6px 0; font-size: 1.55rem; color: var(--brand); }
.event-card p { margin: 0; color: var(--muted); }
.event-card-arrow { font-size: 2rem; color: var(--orange); }

.year-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.year-card { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 3px 12px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--white); }
.year-card:hover { border-color: var(--orange); }
.year-card strong { font-size: 1.65rem; color: var(--brand); }
.year-card span { color: var(--muted); font-size: .88rem; }
.year-card-arrow { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 1.4rem !important; color: var(--orange) !important; }

.external-card, .filter-panel, .notice { border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); padding: 24px; }
.external-card { max-width: 760px; }
.external-card h2 { margin-top: 0; color: var(--brand); }
.button-row, .archive-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.button-primary { background: var(--brand); color: white; }
.button-primary:hover { background: var(--brand-deep); color: white; }
.button-secondary { background: white; color: var(--brand); border-color: var(--brand); }
.button-disabled { background: #e7eae7; color: #7a827b; cursor: default; }

.filter-panel { margin-bottom: 20px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.filter-grid label { display: grid; gap: 7px; color: var(--brand-deep); font-weight: 700; font-size: .88rem; }
.filter-grid select, .filter-grid input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #bbc5bc; border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.filter-grid select:focus, .filter-grid input:focus { outline: 3px solid rgba(241,135,31,.22); border-color: var(--orange); }
.search-field { grid-column: span 2; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.filter-footer { margin-top: 14px; display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: .9rem; }

.results-wrap { width: 100%; overflow: visible; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.results-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .93rem; background: white; }
.results-table th, .results-table td { padding: 10px 11px; border-bottom: 1px solid #e8ece8; text-align: left; vertical-align: middle; white-space: nowrap; }
.results-table thead th { position: sticky; top: 78px; z-index: 10; background: var(--brand); color: white; font-size: .82rem; letter-spacing: .02em; }
.results-table tbody tr:nth-child(even):not(.group-row) td { background: #fafbfa; }
.results-table tbody tr:hover:not(.group-row) td { background: #fff9ea; }
.results-table .group-row th { position: sticky; top: 114px; z-index: 9; background: #e9eee9; color: var(--brand-deep); font-weight: 800; border-bottom-color: #cbd4cc; }
.results-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.results-table .time { text-align: right; font-variant-numeric: tabular-nums; }
.results-table .name { font-weight: 700; }
.results-table .action { text-align: center; }
.results-table .action a { font-weight: 700; }

.notice { display: flex; flex-direction: column; gap: 5px; margin: 20px 0; }
.notice-error { background: #fff2ef; border-color: #f0b2a7; }
.notice strong { color: var(--brand-deep); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); padding: 22px 0 34px; font-size: .9rem; }

@media (max-width: 980px) {
    .event-grid { grid-template-columns: 1fr; }
    .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .results-table thead th { top: 78px; }
    .results-table .group-row th { top: 114px; }
}

@media (max-width: 620px) {
    .shell { width: min(100% - 22px, 1500px); }
    .header-inner { min-height: 68px; }
    .brand img { width: 62vw; max-height: 45px; }
    .header-title { font-size: .78rem; }
    .main-content { padding-top: 18px; }
    .hero { padding-top: 24px; }
    .year-grid, .filter-grid { grid-template-columns: 1fr; }
    .search-field { grid-column: auto; }
    .search-row { grid-template-columns: 1fr; }
    .filter-footer { flex-direction: column; }
    .results-table { font-size: .86rem; }
    .results-table th, .results-table td { padding: 9px 8px; }
    .results-table thead th { top: 68px; }
    .results-table .group-row th { top: 100px; }
}
