/* ============================================================
   Events · the /events page (pinned hero, Next up, archive) and the
   home page's #events poster wall
   Markup inside the <!-- events:* --> markers is generated from
   content/events.json by tools/sync_events.py; the rest is hand-written.
   Colours are the theme layer's roles (site.css), so both pages follow the
   reader's theme with nothing stated twice here.
   ============================================================ */

/* ---------- The calendar stub ----------
   Shared by the archive's index and records. A navy ticket with
   a gold head: navy and gold are a pair in either theme, so the stub keeps its
   own ground and inks rather than following the page (the way the badge does).
   It is aria-hidden; the date is written out in full beside it. */
.ev-stub {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--s-1);
  padding: var(--s-4) var(--s-2) var(--s-3);
  border-top: 4px solid var(--ca-gold-500);
  border-radius: var(--r-1);
  background: var(--ca-navy-700);
  color: var(--ca-paper);
  text-align: center;
}
.ev-stub-m {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ca-gold-500); /* 6.09 on navy-700 */
}
.ev-stub-d {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-11);
  line-height: 1;
  white-space: nowrap;
}
/* "9–10" is twice as wide as "17" and the column is fixed */
.ev-stub--range .ev-stub-d {
  font-size: var(--t-9);
}
.ev-stub-w {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ca-navy-100); /* 12.1 on navy-700 */
  white-space: nowrap;
}
/* weekday over year: two short lines fit the card's narrow stub */
.ev-stub-d + .ev-stub-w {
  margin-top: var(--s-1);
}
.ev-stub-w + .ev-stub-w {
  margin-top: calc(var(--s-1) * -1);
}

/* ---------- Chips and the kicker line ---------- */
.ev-kick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  margin: 0;
}
.ev-chip {
  display: inline-block;
  padding: var(--pad-2xs);
  border-radius: var(--r-1);
  background: var(--wash-gold);
  color: var(--gold-ink); /* gold-700 on gold-50 5.2 · gold-300 on #241d0e 9.6 */
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
/* The one chip that is news. A red ground with its own white ink: a brand
   pair, the same in both themes, like the primary button. */
.ev-chip--next {
  background: var(--ca-red-500);
  color: #fff; /* 7.15 */
}
.ev-place {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- /events top: the pinned wall ----------
   The poster wall at night: the home page's paste-up bricks on the deep navy, with
   the three newest posters pinned in a fan beside the headline, newest in
   front. They are the home page's posters at reading size (24px titles), and
   each one links to its section further down the page. */
.ev-hero {
  position: relative;
  isolation: isolate;
  background: var(--inverse-deep);
  color: var(--ink-inverse);
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 6vw, 4.5rem);
  border-bottom: 3px solid var(--ca-gold-500);
}
/* The same brick courses as the home wall (.ev-home::before), drawn the same
   way: a mask over a fill. The ground here is dark in both themes, so the
   mortar is a fixed faint white rather than --rule. */
.ev-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.08);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2296%22%20height%3D%2248%22%3E%3Cpath%20d%3D%22M0%20.5H96M0%2024.5H96M.5%200V24.5M48.5%2024.5V48%22%20stroke%3D%22%23000%22%20fill%3D%22none%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2296%22%20height%3D%2248%22%3E%3Cpath%20d%3D%22M0%20.5H96M0%2024.5H96M.5%200V24.5M48.5%2024.5V48%22%20stroke%3D%22%23000%22%20fill%3D%22none%22/%3E%3C/svg%3E");
  -webkit-mask-size: 96px 48px;
  mask-size: 96px 48px;
  pointer-events: none;
}
.ev-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 35rem);
  column-gap: var(--s-7);
  row-gap: var(--s-6);
  align-items: center;
}
.ev-hero-copy {
  display: grid;
  gap: var(--s-3);
}
.ev-hero .display {
  color: var(--ink-inverse); /* 17.41 on inverse-deep, light · 18.3 dark */
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}
.ev-hero .lead {
  max-width: 48ch;
}
.ev-pin {
  position: relative;
  height: 20rem;
}
.ev-pin .ev-poster {
  position: absolute;
  width: 12.5rem;
  padding: var(--s-5) var(--s-3) var(--s-3);
  gap: var(--s-2);
}
.ev-pin .ev-poster-t {
  font-size: var(--t-8);
  line-height: 1.06;
}
.ev-pin .ev-poster-k,
.ev-pin .ev-poster-stars,
.ev-pin .ev-poster-d {
  font-size: var(--t-2);
}
/* The fan, newest in front. Each overlaps the next by about 1.5rem, so every
   title stays readable. */
.ev-pin .ev-poster:nth-child(1) {
  right: 0;
  top: 2.25rem;
  z-index: 3;
  --tilt: 4.5deg;
}
.ev-pin .ev-poster:nth-child(2) {
  left: calc(50% - 6.25rem);
  top: var(--s-2);
  z-index: 2;
  --tilt: 1.5deg;
}
.ev-pin .ev-poster:nth-child(3) {
  left: 0;
  top: 2.75rem;
  z-index: 1;
  --tilt: -5deg;
}
.ev-pin .ev-poster:hover,
.ev-pin .ev-poster:has(a:focus-visible) {
  z-index: 6;
}
/* .on-dark recolours links, on hover to gold; a poster keeps its own ink
   (navy 14.96 on the paper poster, at rest and on hover). */
.ev-pin .ev-poster-t a,
.ev-pin .ev-poster-t a:hover {
  color: inherit;
}
@media (max-width: 900px) {
  .ev-hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .ev-pin {
    width: 100%;
    max-width: 35rem;
    justify-self: center;
  }
}
/* Phones: the fan becomes a row you swipe, newest first, every title whole.
   The next poster peeks in from the edge to show there is more. */
@media (max-width: 520px) {
  .ev-pin {
    height: auto;
    max-width: none;
    width: auto;
    justify-self: stretch;
    display: flex;
    gap: var(--s-5);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding: var(--s-5) var(--gutter) var(--s-6);
  }
  .ev-pin .ev-poster {
    position: relative;
    inset: auto;
    flex: none;
    scroll-snap-align: center;
  }
}

/* ---------- Next up ----------
   An empty poster space taped to the wall, and an invitation to follow along.
   Once an event is booked the space becomes its date stub and the strip
   carries the event: title, when and where, Save my seat, Add to calendar. */
.ev-next {
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
  padding-block: var(--s-5);
}
.ev-next-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-4) var(--s-6);
  align-items: center;
}
.ev-slot {
  position: relative;
  width: 4.5rem;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border: 2px dashed var(--edge); /* 3.76 on white, 6.22 on dark panel: a boundary, 1.4.11 */
  border-radius: 2px;
  rotate: -3deg;
  color: var(--ca-gold-500);
  font-size: var(--t-8);
  line-height: 1;
}
/* the tape */
.ev-slot::before {
  content: "";
  position: absolute;
  top: calc(var(--s-2) * -1);
  left: 50%;
  width: 2.75rem;
  height: 0.9rem;
  translate: -50% 0;
  rotate: 4deg;
  background: rgba(209, 149, 43, 0.35);
}
/* Booked: the space fills with the event's date stub. A drawing in the
   brand's own pair, the same in both themes. */
.ev-slot--date {
  aspect-ratio: auto;
  gap: 2px;
  padding: var(--s-3) var(--s-1) var(--s-2);
  border: 0;
  border-top: 4px solid var(--ca-gold-500);
  border-radius: var(--r-1);
  background: var(--ca-navy-700);
  box-shadow: 0 8px 18px rgba(1, 19, 47, 0.25);
}
.ev-slot--date::before {
  display: none;
}
.ev-slot--date span {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ca-navy-100); /* 11.96 on navy-700 */
}
.ev-slot--date span:first-child {
  font-size: var(--t-2);
  color: var(--ca-gold-500); /* 6.09 on navy-700 */
}
.ev-slot--date b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-9);
  line-height: 1;
  white-space: nowrap;
  color: var(--ca-paper); /* 14.96 on navy-700 */
}
/* "1–2" is twice as wide as "17" and the stub is fixed */
.ev-slot--range b {
  font-size: var(--t-7);
}
.ev-slot--range span:last-child {
  letter-spacing: 0.04em;
}
.ev-next-copy .eyebrow {
  margin: 0;
}
.ev-next-h {
  margin: var(--s-1) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-8);
  line-height: 1.15;
  color: var(--ink); /* 15.88 on panel, light · 15.79 dark */
  text-wrap: balance;
}
.ev-next-text {
  margin: var(--s-1) 0 0;
  color: var(--ink-2); /* 12.23 on panel, light · 12.79 dark */
  text-wrap: pretty;
}
.ev-next-actions {
  flex-wrap: nowrap;
}
.ev-next-actions .btn svg {
  flex: none;
  width: 16px;
  height: 16px;
}
@media (max-width: 900px) {
  .ev-next-wrap {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ev-next-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  .ev-next-actions .btn {
    width: 100%;
  }
}

/* ---------- The archive ----------
   The index of cards, then the events themselves: the sections that ran on
   the home page (partials/events/), or a generated .ev-solo record. */
.ev-archive .sec-head {
  margin-bottom: var(--s-6);
}
.ev-covered,
.ev-cards {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* A past event with no hand-built section gets this record, as a section of
   its own between the others. The rule above it stands in for the change of
   ground the hand-built ones make. */
.ev-solo {
  border-top: 1px solid var(--rule);
}
.ev-solo .ev-rec {
  padding-block: 0;
}
.ev-rec {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 19rem);
  gap: var(--s-6);
  align-items: start;
  padding-block: var(--s-7);
}
.ev-title {
  margin: var(--s-3) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}
.ev-sum {
  margin: var(--s-3) 0 0;
  max-width: 62ch;
  font-size: var(--t-5);
  line-height: 1.6;
  color: var(--ink-2);
}
.ev-sub {
  margin: var(--s-5) 0 0;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.ev-covered {
  margin-top: var(--s-2);
  max-width: 62ch;
  border-top: 1px solid var(--rule-soft);
}
.ev-covered li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--s-3);
  padding-block: var(--s-2);
  border-bottom: 1px solid var(--rule-soft);
}
.ev-covered li::before {
  content: "\2605" / "";
  grid-row: 1 / span 2;
  color: var(--ca-gold-500);
  font-size: var(--t-1);
  line-height: 1.9;
}
.ev-cv-t {
  font-weight: 600;
  color: var(--ink);
}
.ev-cv-d {
  font-size: var(--t-3);
  color: var(--ink-3);
}
.ev-actions {
  margin-top: var(--s-5);
}
.ev-note {
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.ev-side {
  display: grid;
  gap: var(--s-4);
}
.ev-fig {
  margin: 0;
}
.ev-fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  box-shadow: var(--e-2);
}
.ev-facts {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: var(--pad-lg);
  border-top: 3px solid var(--ca-gold-500);
  border-radius: var(--r-1);
  background: var(--cream);
}
.ev-facts dt {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ev-facts dd {
  margin: var(--s-0) 0 0;
  font-size: var(--t-3);
  line-height: 1.45;
  color: var(--ink);
}
.ev-empty {
  color: var(--ink-3);
}

/* Measured: below ~1040px the third column squeezes the summary under 40ch,
   so the facts drop under the copy and lie flat beside the flyer. */
@media (max-width: 1040px) {
  .ev-rec {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    row-gap: var(--s-5);
  }
  .ev-side {
    grid-column: 2;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    align-items: start;
  }
  .ev-fig {
    max-width: 18rem;
  }
}
@media (max-width: 640px) {
  .ev-rec {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
    padding-block: var(--s-6);
  }
  .ev-side {
    grid-column: auto;
  }
  /* The stub lies down into a ticket edge above the title. */
  .ev-rec > .ev-stub {
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
    width: fit-content;
    padding: var(--s-2) var(--s-4);
    border-top: 0;
    border-left: 4px solid var(--ca-gold-500);
  }
  .ev-rec > .ev-stub .ev-stub-d {
    font-size: var(--t-8);
  }
}

/* ---------- Home: #events ---------- */
.ev-home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
  margin-bottom: var(--s-6);
}
.ev-home-head .sec-head {
  margin-bottom: 0;
}
.ev-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--s-5);
}
.ev-cards > li {
  display: flex;
}
/* The title's link is stretched over the card, so the whole card is the
   target (2.5.8) while the link's name stays the title alone. */
.ev-card {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-4);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-1);
  background: var(--panel);
  box-shadow: var(--e-2);
  transition: box-shadow 0.2s var(--ca-ease), translate 0.2s var(--ca-ease);
}
.ev-card:hover {
  box-shadow: var(--e-3);
  translate: 0 -2px;
}
.ev-card .ev-stub {
  padding: var(--s-3) var(--s-1) var(--s-2);
}
.ev-card .ev-stub-d {
  font-size: var(--t-9);
}
.ev-card .ev-stub--range .ev-stub-d {
  font-size: var(--t-8);
}
.ev-card-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.ev-card-title {
  margin: var(--s-2) 0 0;
  font-weight: 700;
  font-size: var(--t-7);
  line-height: 1.25;
  color: var(--ink);
}
.ev-card-title a {
  color: inherit;
  text-decoration: none;
}
.ev-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-1);
}
.ev-card:hover .ev-card-title a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--ca-gold-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
.ev-card-text {
  margin: var(--s-2) 0 0;
  font-size: var(--t-4);
  line-height: 1.5;
  color: var(--ink-2);
}
.ev-card-when {
  margin: auto 0 0;
  padding-top: var(--s-3);
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
@media (max-width: 480px) {
  .ev-home-all {
    width: 100%;
  }
  .ev-card {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: var(--s-3);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ev-card {
    transition: none;
  }
  .ev-card:hover {
    translate: none;
  }
}

/* ---------- Home: the poster wall ----------
   Each event is a printed poster taped to the wall, its ground set by its kind
   (tools/sync_events.py, TONES): workshops on Torch Red with a paper keyline,
   trainings on Capitol Navy with gold rays, conventions on paper in a navy
   frame. Red and navy never touch: the cream wall sits between them.
   The posters are pictures, so they keep their own palette in both themes
   (audit_theme.py lists .ev-poster with the other fixed drawings); the wall
   and the captions follow the page. */
.ev-home {
  position: relative;
  isolation: isolate;
}
/* The paste-up wall: faint staggered brick courses, like the city walls flyers
   get pasted to, fading in over the section's first 10rem. The bricks are a
   mask over a fill of --rule, so the mortar lines take the theme's own rule
   colour (limestone on cream, #334566 on the dark page) and never need a
   second, dark-only drawing. Courses are 24px with a 96px brick, offset by
   half a brick every other course. */
.ev-home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--rule);
  opacity: 0.75;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2296%22%20height%3D%2248%22%3E%3Cpath%20d%3D%22M0%20.5H96M0%2024.5H96M.5%200V24.5M48.5%2024.5V48%22%20stroke%3D%22%23000%22%20fill%3D%22none%22/%3E%3C/svg%3E"), linear-gradient(to bottom, transparent, #000 10rem);
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2296%22%20height%3D%2248%22%3E%3Cpath%20d%3D%22M0%20.5H96M0%2024.5H96M.5%200V24.5M48.5%2024.5V48%22%20stroke%3D%22%23000%22%20fill%3D%22none%22/%3E%3C/svg%3E"), linear-gradient(to bottom, transparent, #000 10rem);
  -webkit-mask-size: 96px 48px, auto;
  mask-size: 96px 48px, auto;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  pointer-events: none;
}
/* After "What Citizen Activate does": the same cream ground, so the two
   sections' paddings stacked into one empty band with no seam. The gap closes
   up, a gold rule runs the full width where the wall begins, and a navy tab
   with the site's three gold stars hangs from it, like the Quick Book tab.
   The tab is a drawing in the brand's own pair (gold on navy, 6.09), so it
   keeps those colours in both themes; its gold edge holds it apart from the
   dark page, where navy alone would sink into the ground. */
.ca-what:has(+ .ev-home) {
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.ca-what + .ev-home {
  padding-top: 0;
  border-top: 2px solid var(--ca-gold-500);
}
.ca-what + .ev-home > .wrap::before {
  content: "\2605\2002\2605\2002\2605" / "";
  display: block;
  width: fit-content;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  padding: var(--s-2) var(--s-5) var(--s-3);
  border: 2px solid var(--ca-gold-500);
  border-top: 0;
  border-radius: 0 0 var(--r-2) var(--r-2);
  background: var(--ca-navy-700);
  color: var(--ca-gold-500);
  font-size: var(--t-2);
  line-height: 1;
  box-shadow: 0 6px 14px rgba(1, 19, 47, 0.18);
}
.ev-home .ev-home-head {
  margin-bottom: var(--s-7);
}
.ev-wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
}
.ev-wall > li {
  display: grid;
  align-content: start;
  gap: var(--s-4);
}
.ev-poster {
  --tilt: 0deg;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--s-3);
  aspect-ratio: 4 / 5;
  padding: var(--s-5) var(--s-4) var(--s-4);
  border-radius: 2px;
  text-align: center;
  rotate: var(--tilt);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08), 0 14px 28px rgba(1, 19, 47, 0.28);
  transition: rotate 0.25s var(--ca-ease), translate 0.25s var(--ca-ease), box-shadow 0.25s var(--ca-ease);
}
/* the tape */
.ev-poster::before {
  content: "";
  position: absolute;
  top: calc(var(--s-3) * -1);
  left: 50%;
  z-index: 2;
  width: 5.5rem;
  height: var(--s-5);
  translate: -50% 0;
  rotate: calc(var(--tilt) * -2 + 2deg);
  background: rgba(248, 230, 180, 0.82);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.ev-poster:hover,
.ev-poster:has(a:focus-visible) {
  rotate: 0deg;
  translate: 0 -4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08), 0 22px 40px rgba(1, 19, 47, 0.34);
}
.ev-poster-k {
  margin: 0;
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: var(--t-3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ev-poster-t {
  align-self: center;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.05;
  text-wrap: balance;
}
/* The title's link covers the poster, so the whole sheet is the target and
   the link's name is the title alone. */
.ev-poster-t a {
  color: inherit;
  text-decoration: none;
}
.ev-poster-t a::after {
  content: "";
  position: absolute;
  inset: 0;
}
/* The ring goes round the whole sheet (the link's stretched box), not the
   title's words; the red poster's own outline is its keyline. */
.ev-poster-t a:focus-visible {
  outline-color: transparent;
}
.ev-poster-t a:focus-visible::after {
  outline: 3px solid var(--ca-focus);
  outline-offset: 5px;
  border-radius: 2px;
}
.on-dark .ev-poster-t a:focus-visible::after {
  outline-color: var(--ca-focus-dark);
}
.ev-poster-foot {
  display: grid;
  gap: var(--s-2);
}
.ev-poster-stars {
  margin: 0;
  font-size: var(--t-3);
  letter-spacing: 0.4em;
}
.ev-poster-d {
  display: grid;
  gap: var(--s-0);
  margin: 0;
  padding: var(--s-2);
  border-radius: 2px;
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: var(--t-4);
  line-height: 1.15;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ev-poster-d span {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--t-1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ev-poster-cap {
  justify-self: center;
  max-width: 30ch;
  margin: 0;
  font-size: var(--t-4);
  line-height: 1.5;
  text-align: center;
  color: var(--ink-2);
}

/* Torch Red, paper keyline: white 7.15 on red; red on paper 6.74 */
.ev-poster--red {
  --tilt: -1.6deg;
  background: var(--ca-red-500);
  color: #fff;
  outline: 2px solid var(--ca-paper);
  outline-offset: -10px;
}
.ev-poster--red .ev-poster-k,
.ev-poster--red .ev-poster-stars {
  color: var(--ca-gold-100); /* 5.78 on red */
}
.ev-poster--red .ev-poster-d {
  background: var(--ca-paper);
  color: var(--ca-red-500);
}
/* Capitol Navy with gold rays: paper 15.0 on navy; navy-900 on gold 7.09 */
.ev-poster--navy {
  --tilt: 1.2deg;
  background: var(--ca-navy-700) repeating-conic-gradient(from 0deg at 50% 118%, rgba(209, 149, 43, 0.16) 0 4deg, transparent 4deg 12deg);
  color: var(--ca-paper);
  box-shadow: inset 0 0 0 3px var(--ca-gold-500), 0 14px 28px rgba(1, 19, 47, 0.28);
}
.ev-poster--navy:hover,
.ev-poster--navy:has(a:focus-visible) {
  box-shadow: inset 0 0 0 3px var(--ca-gold-500), 0 22px 40px rgba(1, 19, 47, 0.34);
}
.ev-poster--navy .ev-poster-k,
.ev-poster--navy .ev-poster-stars {
  color: var(--ca-gold-500); /* 6.09 on navy */
}
.ev-poster--navy .ev-poster-d {
  background: var(--ca-gold-500);
  color: var(--ca-navy-900);
}
/* Paper in a navy frame with a gold inner line: navy 15.0 on paper */
.ev-poster--paper {
  --tilt: -0.6deg;
  background: var(--ca-paper);
  color: var(--ca-navy-700);
  box-shadow: inset 0 0 0 3px var(--ca-navy-700), inset 0 0 0 7px var(--ca-paper), inset 0 0 0 9px var(--ca-gold-500), 0 14px 28px rgba(1, 19, 47, 0.28);
}
.ev-poster--paper:hover,
.ev-poster--paper:has(a:focus-visible) {
  box-shadow: inset 0 0 0 3px var(--ca-navy-700), inset 0 0 0 7px var(--ca-paper), inset 0 0 0 9px var(--ca-gold-500), 0 22px 40px rgba(1, 19, 47, 0.34);
}
.ev-poster--paper .ev-poster-k {
  color: var(--ca-red-500); /* 6.74 on paper */
}
.ev-poster--paper .ev-poster-stars {
  color: var(--ca-gold-500);
}
.ev-poster--paper .ev-poster-d {
  background: var(--ca-navy-700);
  color: var(--ca-paper);
}

/* Measured: below ~860px three posters squeeze the longest title (Tennessee
   New School Board Member Orientation) to six lines, so they stack. */
@media (max-width: 860px) {
  .ev-wall {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-7);
    justify-items: center;
  }
  .ev-wall > li {
    width: min(100%, 21rem);
  }
}
/* On a phone a 4:5 sheet of each is three screens of wall; the posters keep
   their width and lose some height instead. */
@media (max-width: 480px) {
  .ev-poster {
    aspect-ratio: auto;
    min-height: 17rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ev-poster {
    transition: none;
  }
  .ev-poster:hover,
  .ev-poster:has(a:focus-visible) {
    translate: none;
  }
}
