/* Cairns Speedway: pit-lane palette. Concrete, deep green ink, flag yellow, car-door number plates. */
:root {
  --ink: #10241b;
  --ink-2: #1b3a2b;
  --concrete: #e4e8e5;
  --paper: #fff;
  --line: #c4ccc7;
  --muted: #536259;
  --green: #00a651;
  --green-d: #00763a;
  --flag: #ffd21f;
  --dirt: #a8321c;
  --head: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--concrete); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); margin: 0; line-height: 1; }
p { margin: 0 0 1rem; }
ul { padding: 0; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; }
.muted { color: var(--muted); }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }
.skip { position: absolute; left: -999px; top: 0; background: var(--flag); color: var(--ink); padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 0; }

/* ---- header ---- */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.brand { font: 900 2rem/1 var(--head); text-decoration: none; letter-spacing: .01em; }
.brand img { height: 64px; width: auto; display: block; }
/* With a logo, the logo sits on the right and the menu on the left. */
.bar.has-logo { flex-direction: row-reverse; padding-block: .5rem; }
.nav ul { display: flex; gap: .15rem; list-style: none; margin: 0; }
.nav a { display: block; padding: .6rem .9rem; text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--flag); }
.nav-toggle { display: none; font: 800 1.1rem var(--head); background: transparent; color: #fff; border: 2px solid #fff; padding: .35rem .9rem; cursor: pointer; }
.checker { height: 12px; background: repeating-conic-gradient(#fff 0 25%, var(--ink) 0 50%) 0 0 / 12px 12px; }

/* ---- number plate: the date, like a car-door number ---- */
.plate { display: inline-flex; flex-direction: column; text-align: center; background: #fff; color: #000; border: .045em solid #000; border-radius: .09em; overflow: hidden; font-family: var(--head); line-height: 1; font-size: 3.4rem; }
.plate .w { font-size: .21em; font-weight: 800; padding: .3em .5em 0; }
.plate .d { font-size: .9em; font-weight: 900; line-height: .92; padding: 0 .16em; }
.plate .m { font-size: .22em; font-weight: 800; background: #000; color: #fff; padding: .32em 0; }

/* ---- hero ---- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background:
  var(--hero-img, none) center / cover,
  repeating-linear-gradient(100deg, transparent 0 46px, rgba(255, 255, 255, .04) 46px 49px); }
.hero:has(.hero-copy)::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(16, 36, 27, .94) 20%, rgba(16, 36, 27, .55)); }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; padding: 4.5rem 0 5rem; }
.hero h1 { font-size: clamp(3.2rem, 9vw, 7rem); font-weight: 900; line-height: .9; text-wrap: balance; margin-bottom: 1.2rem; }
.hero-when { font: 800 clamp(1.6rem, 3.4vw, 2.3rem)/1.1 var(--head); margin-bottom: .6rem; }
.hero-line { font-size: 1.15rem; margin-bottom: .2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero-plate { text-align: center; }
.hero-plate .plate { font-size: clamp(7rem, 16vw, 12rem); transform: rotate(-3deg); animation: drop .7s cubic-bezier(.2, .9, .25, 1.15) both; box-shadow: 0 0 0 .02em #fff; }
.tape { display: inline-block; margin: 1.2rem 0 0; padding: .3rem 1rem; background: var(--flag); color: var(--ink); font: 900 1.6rem/1 var(--head); transform: rotate(2deg); }
@keyframes drop { from { transform: translateY(-40px) rotate(-9deg); opacity: 0; } to { transform: rotate(-3deg); opacity: 1; } }

/* ---- buttons ---- */
.btn { display: inline-block; padding: .75rem 1.9rem .75rem 1.3rem; font: 800 1.2rem/1 var(--head); letter-spacing: .02em; text-decoration: none; background: var(--ink); color: #fff; clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 100%, 0 100%); border: 0; cursor: pointer; }
.btn:hover { background: var(--green-d); }
.btn-flag { background: var(--flag); color: var(--ink); }
.btn-flag:hover { background: #fff; }
/* Every button has the same slanted shape. Secondary buttons differ only in colour:
   white on dark backgrounds, dark green on light ones. */
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--flag); color: var(--ink); }
.btn-ghost-dark { background: var(--ink); color: #fff; }

/* ---- sections ---- */
.section { padding: 3rem 0 1rem; }
.section:last-of-type { padding-bottom: 4rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.section-head h2 { font-size: clamp(2.1rem, 4vw, 2.8rem); font-weight: 800; }
.section-head a { font-weight: 700; }
.page-head { background: var(--ink); color: #fff; padding: 2.8rem 0 2.4rem; }
.page-head h1 { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 900; text-wrap: balance; }
.page-meta { color: #b9c9c0; margin: 0 0 .6rem; font-weight: 600; }
.empty { padding: 2rem 0; color: var(--muted); font-size: 1.15rem; }
.back { margin-top: 2rem; font-weight: 700; }

/* ---- race list (events) ---- */
.race-list { list-style: none; margin: 0; border-top: 4px solid var(--ink); }
.race { display: grid; grid-template-columns: 4.6rem 1fr auto; gap: 1.4rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.race-plate { text-decoration: none; }
.race-plate .plate { font-size: 3.3rem; width: 100%; }
.race-main h3 { font-size: 2rem; font-weight: 800; margin-bottom: .35rem; }
.race-main h3 a { text-decoration: none; }
.race-main h3 a:hover { color: var(--green-d); text-decoration: underline; }
.race-main p { margin: 0; }
.race-past .plate { opacity: .7; }
.badge { display: inline-block; vertical-align: middle; padding: .15rem .55rem; background: var(--ink); color: #fff; font: 800 1rem/1.2 var(--head); letter-spacing: .02em; }
.badge-cancel { background: var(--dirt); }
.badge-warn { background: var(--flag); color: var(--ink); }

/* ---- stories ---- */
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem; }
.story { background: var(--paper); border-top: 6px solid var(--ink); display: flex; flex-direction: column; }
.story img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.story-body { padding: 1rem 1.2rem 1.4rem; }
.story time { color: var(--muted); font-size: .92rem; font-weight: 600; }
.story h3 { font-size: 1.9rem; font-weight: 800; line-height: 1.02; margin: .3rem 0 .6rem; text-wrap: balance; }
.story h3 a { text-decoration: none; }
.story h3 a:hover { color: var(--green-d); }
.story p { margin: 0; color: #2e3f36; }

/* ---- gallery tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.2rem; }
.tile { display: block; background: var(--ink); color: #fff; text-decoration: none; }
.tile img, .tile-empty { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink-2); }
.tile img { transition: opacity .2s; }
.tile:hover img { opacity: .82; }
.tile-text { display: block; padding: .8rem 1rem 1rem; border-top: 5px solid var(--flag); }
.tile-text strong { display: block; font: 800 1.55rem/1.05 var(--head); margin-bottom: .2rem; }
.tile-text span { font-size: .92rem; color: #b9c9c0; }

/* ---- photo wall (justified rows) ---- */
.photos { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 1.6rem 0 0; }
.photos::after { content: ''; flex-grow: 999999; }
.photos li { flex-grow: var(--g); flex-basis: var(--b); background: var(--ink-2); position: relative; }
.photos a { display: block; }
.photos i { display: block; padding-bottom: var(--p); }
.photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photos a:hover img { opacity: .85; }
.gallery-links { margin-top: .4rem; }

/* ---- prose ---- */
.prose { max-width: 68ch; font-size: 1.12rem; }
.prose h2 { font: 800 2.1rem/1.05 var(--head); margin: 2rem 0 .6rem; }
.prose h3 { font: 800 1.6rem/1.1 var(--head); margin: 1.6rem 0 .5rem; }
.prose a { color: var(--green-d); text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .3rem; }
.prose blockquote { margin: 1.4rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 6px solid var(--flag); }
.prose figure { margin: 1.6rem 0; }
.prose figcaption { font-size: .92rem; color: var(--muted); margin-top: .4rem; }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 2rem 0; }
.lead-img { width: 100%; max-height: 520px; object-fit: cover; margin-bottom: 1.8rem; }
.gallery-intro { margin-bottom: 1rem; }

/* ---- event detail ---- */
.event-head { display: flex; align-items: center; gap: 2rem; }
.event-plate .plate { font-size: 6rem; transform: rotate(-3deg); }
.event-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.facts { background: var(--paper); border-top: 6px solid var(--flag); padding: 1.3rem 1.4rem 1.5rem; }
.facts dl { margin: 0 0 .4rem; }
.facts dt { font: 800 1.5rem/1 var(--head); margin-top: 1rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: .25rem 0 0; }
.facts .actions { margin-top: 1.2rem; }
.facts p { margin: 1rem 0 0; }

/* ---- sponsors and links ---- */
.sponsor-band { background: var(--paper); margin-top: 3rem; padding: 2.4rem 0 2.8rem; border-top: 4px solid var(--ink); }
.sponsor-row { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 1.2rem 2.4rem; align-items: center; }
.sponsor-row a { display: flex; align-items: center; min-height: 64px; text-decoration: none; font: 800 1.5rem/1 var(--head); }
.sponsor-row img { max-height: 64px; width: auto; max-width: 200px; object-fit: contain; }
.sponsor-grid { list-style: none; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.sponsor-grid a { display: flex; flex-direction: column; gap: .4rem; height: 100%; padding: 1.2rem; background: var(--paper); border-top: 6px solid var(--ink); text-decoration: none; }
.sponsor-grid a:hover { border-top-color: var(--green); }
.sponsor-grid img { height: 80px; width: auto; max-width: 100%; object-fit: contain; object-position: left; margin-bottom: .4rem; }
.sponsor-grid strong { font: 800 1.5rem/1.05 var(--head); }
.sponsor-grid span { color: var(--muted); font-size: .95rem; }
.link-list { list-style: none; margin: 0 0 2rem; border-top: 3px solid var(--ink); }
.link-list li { padding: .75rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.link-list a { font-weight: 700; color: var(--green-d); }

/* ---- pager ---- */
.pager { display: flex; gap: .4rem; margin: 2rem 0 0; }
.pager a, .pager span { min-width: 2.6rem; padding: .5rem .8rem; text-align: center; font: 800 1.2rem/1 var(--head); background: var(--paper); text-decoration: none; }
.pager span { background: var(--ink); color: #fff; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #dce6e0; margin-top: 4rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 2.5rem; padding: 2.6rem 0 2rem; }
.foot-name { font: 900 2rem/1 var(--head); color: #fff; margin-bottom: .6rem; }
.foot-h { font: 800 1.4rem/1 var(--head); color: #fff; margin-bottom: .6rem; }
.site-footer p { margin: 0 0 .4rem; }
.site-footer ul { list-style: none; margin: 0; }
.site-footer a { color: #fff; }
.foot-base { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.6rem; border-top: 1px solid #2c4a3b; font-size: .92rem; color: #9db0a5; }
.foot-base a { color: #9db0a5; }

/* ---- lightbox ---- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(5, 12, 9, .95); display: grid; place-items: center; }
.lb[hidden] { display: none; }
.lb figure { margin: 0; max-width: 94vw; text-align: center; }
.lb img { max-height: 84vh; max-width: 94vw; margin-inline: auto; object-fit: contain; }
.lb figcaption { color: #e4ece7; padding-top: .7rem; min-height: 2rem; }
.lb button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; font: 400 2.4rem/1 var(--body); width: 3.2rem; height: 3.2rem; cursor: pointer; }
.lb button:hover { background: var(--green-d); }
.lb-x { top: 1rem; right: 1rem; }
.lb-p { left: 1rem; top: 50%; }
.lb-n { right: 1rem; top: 50%; }

/* ---- small screens ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 3.5rem; }
  .hero-plate { text-align: left; order: -1; }
  .hero-plate .plate { font-size: 7rem; }
  .event-layout { grid-template-columns: 1fr; gap: 2rem; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}
/* The menu folds into the Menu button below this width, so a long menu never squeezes the logo. */
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-top: 1px solid #2c4a3b; padding: .5rem 1.25rem 1rem; z-index: 20; }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid #2c4a3b; }
  .site-header { position: relative; }
}
@media (max-width: 760px) {
  .race { grid-template-columns: 4rem 1fr; gap: 1rem; }
  .race-actions { grid-column: 1 / -1; }
  .race-plate .plate { font-size: 2.8rem; }
  .event-head { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .event-plate .plate { font-size: 5rem; }
  .lb-p, .lb-n { top: auto; bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-plate .plate { animation: none; }
}

.banner { background: var(--flag); color: var(--ink); font-weight: 700; text-align: center; padding: .55rem 0; }
.banner a { color: inherit; text-decoration: none; }
.banner a:hover { text-decoration: underline; }
.ticket-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.5rem 0 2.2rem; }

/* ---- hero with a photo: let the photo show, keep the words readable ---- */
.hero-photo { min-height: min(80vh, 640px); display: flex; align-items: center; justify-content: center; }
.hero-photo::before { background: var(--hero-img) var(--hero-pos, center) / cover; }
.hero-photo:has(.hero-copy)::after { background:
  linear-gradient(90deg, rgba(16, 36, 27, .80) 0%, rgba(16, 36, 27, .42) 48%, rgba(16, 36, 27, .06) 100%),
  linear-gradient(0deg, rgba(16, 36, 27, .50), transparent 38%); }
.hero-photo .hero-copy { text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
@media (max-width: 720px) {
  .hero-photo.has-mobile-img::before { background-image: var(--hero-img-m); }
  .hero-photo:has(.hero-copy)::after { background: linear-gradient(0deg, rgba(16, 36, 27, .78), rgba(16, 36, 27, .45)); }
}
.hero-photo .btn { text-shadow: none; }
@media (max-width: 760px) { .brand img { height: 48px; } }

/* ---- calendar ---- */
.view-switch { margin-top: .8rem; display: flex; gap: 1.2rem; font-weight: 700; }
.view-switch [aria-current] { border-bottom: 3px solid var(--flag); }
.view-switch a { color: #fff; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.cal-nav h2 { font-size: clamp(2rem, 5vw, 3rem); }
.cal-btn { padding: .5rem 1rem; border: 2px solid var(--ink); font-weight: 800; text-decoration: none; color: var(--ink); white-space: nowrap; }
.cal-btn:hover { background: var(--ink); color: #fff; }
.cal-today { margin-bottom: 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--paper); }
.cal-head { display: contents; }
.cal-head span { padding: .5rem; background: var(--ink); color: #fff; font: 800 1rem var(--head); letter-spacing: .04em; text-align: center; border-right: 1px solid var(--ink-2); }
.cal-day { min-height: 6.5rem; padding: .35rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-out { background: #f1f3f2; color: var(--muted); }
.cal-num { display: block; font-weight: 700; margin-bottom: .25rem; }
.cal-now .cal-num { display: inline-block; background: var(--ink); color: #fff; padding: 0 .45rem; border-radius: 1em; }
.cal-ev { display: block; margin-bottom: .25rem; padding: .3rem .45rem; background: var(--green); color: #fff; font-weight: 700; font-size: .9rem; line-height: 1.2; text-decoration: none; border-left: 4px solid var(--flag); }
.cal-ev:hover { background: var(--green-d); }
.cal-ev small { display: block; font-weight: 600; opacity: .9; }
.cal-ev-cancelled { background: var(--dirt); text-decoration: line-through; }
.cal-ev-postponed { background: var(--flag); color: var(--ink); border-left-color: var(--ink); }
.cal-list { display: none; }
@media (max-width: 760px) {
  .cal-grid { display: none; }
  .cal-list { display: block; }
  .cal-btn { padding: .4rem .7rem; }
}

/* ---- event types and classes ---- */
:root { --c-race: #c62828; --c-burnouts: #0e9384; --c-other: #1f5fa8; }
.cat-race { --c: var(--c-race); } .cat-burnouts { --c: var(--c-burnouts); } .cat-other { --c: var(--c-other); }
.cal-key { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; list-style: none; margin: 0 0 1rem; font-weight: 700; font-size: .95rem; }
.cal-key li { display: flex; align-items: center; gap: .45rem; }
.cal-key .cat { width: 1rem; height: 1rem; background: var(--c); border-radius: 3px; padding: 0; }
.page-meta .cat { display: inline-block; background: var(--c); color: #fff; padding: .1rem .6rem; margin-right: .5rem; font: 800 1rem/1.3 var(--head); letter-spacing: .03em; }
.cal-c-race { background: var(--c-race); } .cal-c-burnouts { background: var(--c-burnouts); } .cal-c-other { background: var(--c-other); }
.cal-ev:hover { filter: brightness(.88); background-color: inherit; }
.cal-ev-cancelled { background: #55605a !important; }
.cal-ev-postponed { background: var(--flag) !important; color: var(--ink); }
.class-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 2rem; }
.class-list li { padding: .4rem .9rem; background: var(--ink); color: #fff; font: 800 1.15rem/1.2 var(--head); letter-spacing: .02em; }
.row-classes { font-weight: 700; color: var(--green-d); }
.hero-copy .hero-line a { color: #fff; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Wide screens: a long menu wraps onto a second row instead of squashing the logo. */
.brand { flex: 0 0 auto; }
.nav { flex: 1 1 0; min-width: 0; }
.nav ul { flex-wrap: wrap; justify-content: flex-end; }
.bar.has-logo .nav ul { justify-content: flex-start; }
@media (max-width: 1180px) { .nav { flex: 0 0 auto; } }

/* Calendar view / List view toggle: two clear buttons */
.view-switch { display: inline-flex; gap: 0; margin-top: 1.1rem; border: 2px solid #fff; }
.view-switch a, .view-switch [aria-current] { padding: .55rem 1.3rem; font: 800 1.15rem/1 var(--head); letter-spacing: .03em; text-decoration: none; border: 0; }
.view-switch a { color: #fff; background: transparent; }
.view-switch a:hover { background: rgba(255, 255, 255, .16); }
.view-switch [aria-current] { background: var(--flag); color: var(--ink); }

/* ---- Eras Bold ITC mode (switches on when assets/fonts/eras-bold.* exists) ----
   Eras is much wider than the default condensed heading font, so sizes come down to match. */
.has-eras { --head: 'Eras Bold ITC', 'Trebuchet MS', 'Segoe UI', sans-serif; }
.has-eras h1, .has-eras h2, .has-eras h3 { letter-spacing: 0; }
.has-eras .hero h1 { font-size: clamp(2.1rem, 6.4vw, 4.4rem); line-height: 1.05; }
.has-eras .page-head h1 { font-size: clamp(1.9rem, 5.2vw, 3.2rem); line-height: 1.1; }
.has-eras h2, .has-eras .cal-nav h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.1; }
.has-eras .race-main h3 { font-size: 1.4rem; line-height: 1.1; }
.has-eras .hero-when { font-size: clamp(1.15rem, 2.6vw, 1.6rem); }
.has-eras .brand, .has-eras .foot-name { font-size: 1.55rem; }
.has-eras .foot-h { font-size: 1.1rem; }
.has-eras .nav-toggle, .has-eras .btn, .has-eras .pager a, .has-eras .pager span { font-size: 1rem; }
.has-eras .tape { font-size: 1.2rem; }
.has-eras .badge, .has-eras .cal-head span, .has-eras .page-meta .cat { font-size: .82rem; }
.has-eras .tile-text strong, .has-eras .sponsor-row a, .has-eras .sponsor-grid strong, .has-eras .facts dt { font-size: 1.2rem; }
.has-eras .prose h2 { font-size: 1.7rem; }
.has-eras .prose h3 { font-size: 1.3rem; }
.has-eras .class-list li, .has-eras .view-switch a, .has-eras .view-switch [aria-current] { font-size: 1rem; }
.has-eras .race-plate .plate { font-size: 2.7rem; }
.has-eras .plate { font-size: 2.9rem; }
@media (max-width: 760px) { .has-eras .race-plate .plate { font-size: 2.3rem; } .has-eras .hero-plate .plate { font-size: 5.5rem; } }

/* ---- Social Media drop-down ---- */
.nav .has-sub { position: relative; }
.sub-toggle { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: .6rem .9rem; cursor: pointer; }
.sub-toggle::after { content: ' \25BE'; font-size: .85em; }
.sub-toggle:hover, .has-sub.open .sub-toggle { border-bottom-color: var(--flag); }
.nav .sub { display: none; position: absolute; right: 0; top: 100%; min-width: 12rem; margin: 0; padding: .3rem 0; background: var(--ink); border: 1px solid #2c4a3b; border-top: 3px solid var(--flag); z-index: 30; list-style: none; flex-direction: column; }
.nav .sub a { padding: .7rem 1.1rem; border-bottom: 0; white-space: nowrap; }
.nav .sub a:hover { background: var(--ink-2); }
.has-sub:hover .sub, .has-sub.open .sub { display: flex; }
/* Long file names stay on one line in the drop-down but are capped. */
.nav .sub a { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) {
  .nav .sub a { max-width: none; white-space: normal; }
  .sub-toggle { display: block; width: 100%; text-align: left; padding: .8rem 0; border-bottom: 1px solid #2c4a3b; pointer-events: none; }
  .sub-toggle::after { content: ''; }
  .nav .sub { display: flex; position: static; border: 0; padding: 0 0 0 1rem; background: transparent; }
  .nav .sub a { padding: .8rem 0; border-bottom: 1px solid #2c4a3b; }
}
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A little tighter so the full menu, including Social Media, sits on one row on laptops. */
@media (min-width: 1181px) { .nav a, .sub-toggle { padding-left: .68rem; padding-right: .68rem; } .nav .sub a { padding: .7rem 1.1rem; } }

/* Joined hero buttons (same look as the Calendar / List toggle) */
.actions.seg { display: inline-flex; flex-wrap: nowrap; gap: 0; border: 2px solid #fff; }
.actions.seg .btn { clip-path: none; border: 0; margin: 0; background: transparent; color: #fff; }
.actions.seg .btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.actions.seg .btn:first-child, .actions.seg .btn-flag { background: var(--flag); color: var(--ink); }
.actions.seg .btn:first-child:hover, .actions.seg .btn-flag:hover { background: var(--flag); color: var(--ink); filter: brightness(1.05); }
@media (max-width: 480px) { .actions.seg { flex-wrap: wrap; } }

.foot-mission { margin-top: 1.4rem; }
.foot-prose p { margin: 0 0 .6rem; }
.foot-prose a { color: inherit; }

.prose.prose-wide { max-width: 80%; }
@media (max-width: 760px) { .prose.prose-wide { max-width: none; } }

.file-list li { display: grid; gap: .15rem; }
