@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #04558f;
  --blue-dark: #153a5b;
  --blue-light: #eef5fb;
  --ink: #142b40;
  --muted: #425d73;
  --line: #c8d8e5;
  --surface: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #f7fafd; color: var(--ink); font: 16px/1.5 "Montserrat", "Instrument Sans", system-ui, sans-serif; }
.wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
header { background: var(--blue); border-bottom: 5px solid #c6e0f2; color: #fff; padding: 38px 0 42px; }
.brand-logo { display: block; width: clamp(208px, 40vw, 320px); max-width: 100%; height: auto; margin-bottom: 24px; }
h1 { margin: 0 0 12px; font-size: clamp(2.35rem, 6vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; }
header p { color: #eef6ff; margin: 0; }
main.wrap { padding: 32px 0 36px; }
.calendar-embed, .calendar-embed body { background: transparent; }
.calendar-embed header { display: none; }
.calendar-embed main.wrap { width: 100%; padding: 0 0 4px; }
.calendar-embed .calendar-heading, .calendar-embed #notice, .calendar-embed #page-label { color: #fff; }
.calendar-heading { margin: 0 0 16px; color: var(--blue-dark); font-size: clamp(1.45rem, 4vw, 2.1rem); line-height: 1.18; letter-spacing: -.025em; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #3081bf; outline-offset: 2px; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px 22px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.filters label, .filters legend { display: block; padding: 0; font-size: .85rem; font-weight: 750; }
.filters select, .filters input { display: block; width: 100%; min-width: 0; min-height: 40px; margin-top: 5px; border: 1px solid #a7bdcf; border-radius: 5px; background: #fff; padding: 7px 9px; font-size: .875rem; font-weight: 500; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.date-inputs, .display-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.date-inputs { margin-top: 1px; }
.date-inputs label { color: var(--muted); font-size: .72rem; }
.date-inputs input { margin-top: 2px; }
.quick-dates { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.quick-dates button { border: 1px solid transparent; background: none; color: var(--blue); border-radius: 4px; padding: 2px 6px; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.quick-dates button[aria-pressed=true] { border-color: #b6d0e3; background: var(--blue-light); }
.segmented { display: flex; margin-top: 5px; }
.segmented button { flex: 1; min-height: 40px; border: 1px solid #a7bdcf; background: #fff; color: var(--blue); font-size: .82rem; font-weight: 750; padding: 5px 4px; }
.segmented button:first-child { border-radius: 5px 0 0 5px; }
.segmented button:last-child { border-radius: 0 5px 5px 0; }
.segmented button[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; }
.clear { justify-self: start; border: 0; border-radius: 4px; background: none; color: var(--blue); font-size: .835rem; font-weight: 750; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }
#notice { margin: 10px 0 15px; color: var(--muted); font-size: .88rem; }
.events { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 16px; }
.event-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.event-date { display: block; margin: 0; padding: 9px 13px; font-size: .82rem; font-weight: 800; color: var(--blue-dark); background: #f0f6fc; }
.event-art { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: #f7fafd; border-bottom: 1px solid var(--line); }
.event-art img { display: block; width: 100%; height: 100%; max-height: 165px; object-fit: contain; }
.event-info { flex: 1; padding: 13px; }
.event-sport, .event-time, .event-location, .event-reason { margin: 0; }
.event-sport { font-size: .76rem; font-weight: 700; color: var(--muted); }
.event-info h3 { color: var(--blue); font: 600 clamp(1.28rem, 1.16rem + .32vw, 1.48rem)/1.22 "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; letter-spacing: .005em; margin: 5px 0 8px; overflow-wrap: anywhere; }
.event-info h3 a { color: inherit; text-underline-offset: 3px; }
.event-time, .event-location, .event-reason { font-size: .83rem; color: var(--muted); }
.event-time { margin-bottom: 3px; }
.event-status { display: inline-block; margin-top: 8px; border-radius: 4px; padding: 1px 6px; background: #dcecf8; color: var(--blue-dark); font-size: .75rem; font-weight: 750; }
.event-links { display: flex; flex-wrap: wrap; align-items: start; gap: 8px; padding: 12px 13px; background: var(--blue-light); border-top: 1px solid var(--line); }
.event-action, .add-calendar summary { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border: 1px solid var(--blue); border-radius: 5px; padding: 6px 8px; font-size: .79rem; font-weight: 750; line-height: 1.3; }
.event-action { background: var(--blue); color: #fff; text-decoration: none; }
.event-action:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.add-calendar { max-width: 100%; }
.add-calendar summary { color: var(--blue); background: var(--surface); cursor: pointer; list-style: none; }
.add-calendar summary::-webkit-details-marker { display: none; }
.add-calendar summary::after { content: ""; width: 6px; height: 6px; margin-left: 8px; transform: translateY(-1px) rotate(45deg); border: solid currentColor; border-width: 0 1.5px 1.5px 0; }
.add-calendar[open] summary::after { transform: translateY(2px) rotate(225deg); }
.add-calendar summary:hover { background: #dcecf8; }
.calendar-options { display: grid; gap: 6px; padding: 8px 1px 0; text-align: left; }
.calendar-options a { color: var(--blue); font-size: .79rem; font-weight: 700; text-underline-offset: 3px; }
.events.is-list { grid-template-columns: 1fr; }
.events.is-list .event-card { display: grid; grid-template-columns: minmax(110px, 20%) minmax(0, 1fr) minmax(150px, 27%); grid-template-rows: auto 1fr; }
.is-list .event-date { grid-column: 1; grid-row: 1; }
.is-list .event-art { grid-column: 1; grid-row: 2; border-bottom: 0; }
.is-list .event-info { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.is-list .event-links { grid-column: 3; grid-row: 1 / 3; align-content: center; justify-content: center; text-align: center; }
.empty { grid-column: 1 / -1; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 18px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 20px; }
.pagination button { border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--blue); font-size: .86rem; font-weight: 750; padding: 7px 12px; }
#page-label { font-size: .85rem; font-weight: 700; }
.visually-hidden { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; margin: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

@media (max-width: 930px) {
  .events { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { gap: 14px; }
}
@media (max-width: 720px) {
  .wrap { width: min(100% - 28px, 1160px); }
  .events { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .dates { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .events { grid-template-columns: 1fr; }
  .display-options { grid-column: 1 / -1; }
  .events.is-list .event-card { grid-template-columns: minmax(95px, 28%) minmax(0, 1fr); }
  .is-list .event-links { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; }
}

.calendar-upcoming .filters, .calendar-upcoming #notice, .calendar-upcoming #results-title, .calendar-upcoming #status { display: none; }
.calendar-upcoming:not(.calendar-framed), .calendar-upcoming:not(.calendar-framed) body { background: #214f85; }
.calendar-upcoming.calendar-embed:not(.calendar-framed) main.wrap { padding: 18px; }
.upcoming-list { display: grid; gap: 13px; color: #fff; }
.upcoming-event { display: grid; align-items: start; grid-template-columns: clamp(65px, 25%, 116px) minmax(0, 1fr); gap: 13px; }
.upcoming-thumb img { display: block; width: 100%; max-height: 90px; aspect-ratio: 4 / 3; object-fit: contain; object-position: left top; }
.upcoming-info h3 { margin: 0 0 4px; color: #fff; font: 550 .97rem/1.3 "Montserrat", "Instrument Sans", system-ui, sans-serif; overflow-wrap: anywhere; }
.upcoming-info h3 a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
.upcoming-info h3 a:hover { text-decoration: underline; }
.upcoming-info p { margin: 0; color: #fff; font-size: .8rem; line-height: 1.38; }
.upcoming-info p + p { margin-top: 2px; }
.upcoming-list .empty { padding: 0; background: transparent; border: 0; }
.upcoming-more { margin: 4px 0 0; }
.upcoming-more a { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; border: 1px solid #fff; border-radius: 6px; padding: 10px 18px; color: #fff; font-size: .95rem; font-weight: 750; text-decoration: none; }
.upcoming-more a::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.upcoming-more a:hover { background: rgb(255 255 255 / 15%); }
.upcoming-list a:focus-visible { outline-color: #fff; }
