/* =========================================================================
   style-rallies.css
   Rally pages: the listing (rallies/inc.cfm, via template.cfm) and an
   individual rally (common/index-rally.cfm + rally.cfm). Loaded after
   eg-premium.css and built from its tokens and components - eg-pagehead,
   eg-panel, eg-status, eg-chip, eg-date, eg-media, eg-car, eg-rows,
   eg-story - so the rally pages read as the same site as events and news.
   Only what those components don't cover lives here.

     1. Rally page: backdrop and hero
     2. Rally page: panels and content
     3. Rally page: teams
     4. Rally page: the field, sidebar, closing band
     5. Listing
     6. Small screens
   ========================================================================= */

/* ---------- 1. Rally page: backdrop and hero ---------- */

/* The hero image stays a full-bleed backdrop for the whole page; it is fixed
   on desktop (style.css #rally) and set from index-rally.cfm's custom
   properties. */
.eg-rally {
  background-color: var(--bg);
  background-image: var(--rally-hero);
  padding-bottom: clamp(48px, 7vw, 96px);
}

.eg-rally__hero {
  display: flex;
  flex-direction: column;
  min-height: min(82vh, 780px);
  padding: clamp(16px, 3vw, 28px) 0 clamp(40px, 6vw, 72px);
  /* Darkest where the copy sits (lower left), so any photo stays readable. */
  background:
    linear-gradient(90deg, rgba(9, 9, 10, 0.72) 0%, rgba(9, 9, 10, 0.25) 62%, rgba(9, 9, 10, 0) 100%),
    linear-gradient(180deg, rgba(9, 9, 10, 0.35) 0%, rgba(9, 9, 10, 0.1) 35%, rgba(9, 9, 10, 0.85) 100%);
}
.eg-rally--noimg .eg-rally__hero {
  min-height: 0;
  background: radial-gradient(900px 320px at 0% 0%, rgba(var(--accent-rgb), 0.08), transparent 70%);
}
.eg-rally__hero > .ui.container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.eg-rally__hero .eg-article-backlink { margin-bottom: auto; padding-bottom: 3rem; }
.eg-rally__hero .eg-back-btn { background: rgba(9, 9, 10, 0.5); backdrop-filter: blur(6px); }

.eg-rally__head h1.eg-pagehead__title {
  max-width: 18ch;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}
.eg-rally__head .eg-pagehead__lede.eg-rally__lede {
  max-width: 58ch;
  color: rgba(242, 239, 232, 0.86);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* "[Rally] presented by [Brand]" - the Title Sponsor's naming (db/042). */
.eg-rally__presented {
  display: block;
  margin-top: 0.35em;
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent, #c9a96a);
}

/* Sponsors band under the hero: Title Sponsor, then Supporting Partners. */
.eg-rally__sponsors {
  position: relative;
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(16px, 3vw, 32px);
  padding: 1.25rem var(--gutter, 1rem);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 0.75rem);
  background: rgba(12, 12, 14, 0.72);
  backdrop-filter: blur(6px);
}
.eg-rally__splabel {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.6);
}
/* The slot's own "Sponsored" label is kept (FTC); the band label explains the role. */
.eg-rally__sponsors .eg-sp__label { font-size: 0.6rem; }
.eg-rally__banner { position: relative; }
.eg-rally__banner .eg-sp { margin: 1.25rem 0 0; }

.eg-rally__status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.eg-rally__status .eg-status,
.eg-rally__status .eg-chip {
  min-height: 30px;
  padding: 0.45em 0.95em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(9, 9, 10, 0.6);
  backdrop-filter: blur(6px);
}
.eg-rally__status .eg-chip--accent { border-color: rgba(var(--accent-rgb), 0.5); }
.eg-rally__status .eg-chip .icon { margin: 0; height: auto; }

.eg-rally__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem clamp(24px, 4vw, 48px);
  max-width: 820px;
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
}
.eg-rally__facts dt {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font: 600 0.66rem/1.4 var(--font-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eg-rally__facts dd {
  margin: 0;
  color: var(--ink);
  font: 600 1.15rem/1.25 var(--font-display);
  letter-spacing: -0.015em;
}
.eg-rally__facts dd del { margin-left: 0.35rem; color: var(--muted); font-weight: 400; font-size: 0.95rem; }
.eg-rally__facts dd small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font: 400 0.78rem/1.4 var(--font-sans);
  letter-spacing: 0;
}

.eg-rally__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}
.eg-rally__cta .ui.button { margin: 0; min-height: 46px; }
.eg-rally__cta .ui.basic.inverted.button { background: rgba(9, 9, 10, 0.45) !important; backdrop-filter: blur(6px); }

/* ---------- 2. Rally page: panels and content ---------- */
.eg-rally__body { position: relative; }

/* eg-panel, translucent so the backdrop carries down the page. */
/* Same space above as below (adjacent margins collapse, so panels stay
   1.25rem apart and the first one gets room under the hero too). */
.eg-panel.eg-rally__panel {
  margin: 1.25rem 0;
  background: rgba(17, 17, 19, 0.88);
  backdrop-filter: blur(10px);
}
.eg-rally__panel > .eg-panel__head:last-child { margin-bottom: 0; }

.eg-rally__notice { border-color: rgba(232, 144, 138, 0.45); }
.eg-rally__notice .eg-panel__title { color: var(--danger-soft) !important; }

.eg-rally__desc.eg-article-detail__body { margin-top: 0; font-size: 1.02rem; line-height: 1.75; color: var(--ink-2); }
.eg-rally__desc img { max-width: 100%; height: auto; border-radius: var(--radius-lg); }

.eg-rally__safety {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.eg-rally__safety .icon { flex: none; margin: 0.2rem 0 0; color: var(--accent); }
.eg-rally__safety p { margin: 0; }

/* Registration form inside its panel */
.eg-rally__panel .ui.form .ui.dividing.header {
  margin-top: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line) !important;
  color: var(--accent) !important;
  font: 600 0.72rem/1.4 var(--font-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eg-rally__panel .ui.form .ui.dividing.header:first-of-type { margin-top: 0; }
.eg-rally__panel .ui.form .field > .u-muted { margin-top: 0.35rem; font-size: 0.8rem; }
/* Dark fields, the same tokens as the site's modal forms. */
.eg-rally__panel .ui.form input:not([type=checkbox]):not([type=radio]):not([type=file]),
.eg-rally__panel .ui.form select,
.eg-rally__panel .ui.form textarea,
.eg-rally__panel .ui.form .ui.dropdown,
.eg-rally__panel .ui.form input[type=file] {
  background: var(--field-bg) !important;
  border: 1px solid var(--field-border) !important;
  border-radius: var(--field-radius) !important;
  color: var(--ink) !important;
}
.eg-rally__panel .ui.form input::placeholder { color: var(--faint) !important; }
.eg-rally__panel .ui.form input:focus,
.eg-rally__panel .ui.form select:focus { border-color: rgba(var(--accent-rgb), 0.7) !important; }
.eg-rally__panel .ui.form select option { background: var(--panel-elev); color: var(--ink); }
.eg-rally__panel .ui.form .ui.action.input > .button { background: var(--panel-elev); color: var(--ink); box-shadow: inset 0 0 0 1px var(--field-border); }
.eg-rally__panel .ui.form .ui.disabled.input { opacity: 0.6; }
.eg-rally__panel .ui.form .ui.left.icon.input > .icon { color: var(--muted); }
.eg-rally__regmsg.ui.message {
  margin: 1.25rem 0 0;
  background: var(--panel-raise);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45);
}
.eg-rally__regmsg[hidden] { display: none; }
.eg-rally__regactions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; padding: 0; }
.eg-rally__regactions .ui.button { margin: 0; }
.eg-rally__regmsg.ui.message.negative { box-shadow: inset 0 0 0 1px rgba(232, 144, 138, 0.6); color: var(--danger-soft); }

/* Registration (db/047): kit, totals, payment choice, own registration, notify-me */
.eg-rally__kit { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 1rem; }
.eg-rally__kititem .u-muted { margin-top: 0.35rem; font-size: 0.85rem; }
.eg-rally__kitrow { display: flex; gap: 0.5rem; }
.eg-rally__kitrow select { flex: 1 1 auto; min-width: 0; }
.ui.form input.eg-rally__kitqty { width: 5.5rem; flex: 0 0 auto; }
.eg-rally__kitprice { color: var(--accent); font-weight: 600; white-space: nowrap; }
.eg-rally__teamnote { margin: 0.5rem 0 0; }
.eg-rally__kitnote.ui.message { margin: 1rem 0 0; background: var(--panel-raise); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45); }
.eg-rally__mykit { margin-top: 1.75rem; scroll-margin-top: 90px; }
.eg-rally__kitsum { margin-top: 0.5rem; max-width: 320px; }
.eg-rally__kitlist { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--ink-2); }

.eg-rally__sum { margin: 0; display: grid; gap: 0.25rem; }
.eg-rally__sum > div { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-2); }
.eg-rally__sum > div[hidden] { display: none; }
.eg-rally__sum dt, .eg-rally__sum dd { margin: 0; }
.eg-rally__sumtotal { padding-top: 0.4rem; border-top: 1px solid rgba(var(--accent-rgb), 0.35); font-weight: 700; color: var(--ink-1, #fff) !important; }

.eg-rally__payopt { border: 0; padding: 0; margin: 1rem 0; display: grid; gap: 0.6rem; }
.eg-rally__payopt legend { font-weight: 700; margin-bottom: 0.5rem; color: var(--ink-1, #fff); }
.eg-rally__payopt input:disabled + label { opacity: 0.5; }
.eg-rally__depterms { margin-top: 0.25rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--panel-raise); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45); }
.eg-rally__depterms[hidden] { display: none !important; }

.eg-rally__waitnote.ui.message { background: var(--panel-raise); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45); }

.eg-rally__myreg p { color: var(--ink-2); }
.eg-rally__mystate { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.eg-rally__payopts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.eg-rally__payopts .ui.button { margin: 0; }
.eg-rally__payopts .u-muted { flex-basis: 100%; margin: 0; }

.eg-rally__signin p { color: var(--ink-2); }
.eg-rally__signinbtns { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.eg-rally__signinbtns .ui.button { margin: 0; }

.eg-rally__notify { margin-top: 1.5rem; }
.eg-rally__notifylead { color: var(--ink-2); }
.eg-rally__notifyrow { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; }
.eg-rally__notifyrow .field { flex: 1 1 240px; margin: 0 !important; }
.eg-rally__notifyrow .ui.button { margin: 0; }

/* Photos & video */
.eg-rally__videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.eg-rally__videos.is-single { grid-template-columns: minmax(0, 1fr); }
.eg-rally__videos:last-child { margin-bottom: 0; }
.eg-rally__video { margin: 0; min-width: 0; }
.eg-rally__video .eg-yt,
.eg-rally__video .eg-yt-frame { border-radius: var(--radius-lg); overflow: hidden; }
/* .eg-yt is sized for a full-width player; two-up it needs smaller type. */
.eg-rally__videos:not(.is-single) .eg-yt__title { font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.25; }
.eg-rally__videos:not(.is-single) .eg-yt__play { transform: scale(0.8); }

.eg-rally__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The viewer itself is style.css .eg-lightbox (company-gallery.js). */
.eg-rally__photos .eg-media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
.eg-rally__photos img { cursor: zoom-in; }
.eg-rally__photos .eg-media:has(img:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.eg-rally__photocap { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }

/* ---------- 3. Rally page: teams ---------- */
.eg-rally__teammsg {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(232, 144, 138, 0.5);
  border-radius: var(--radius);
  color: var(--danger-soft);
  font-size: 0.9rem;
}
.eg-rally__teammsg[hidden] { display: none; }

.eg-rteams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.eg-rteam {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-raise);
}
.eg-rteam.is-mine { border-color: rgba(var(--accent-rgb), 0.55); }
.eg-rteam__head { display: flex; align-items: center; gap: 0.85rem; }
.eg-rteam__logo {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #26262a, #111113 70%);
  color: var(--accent);
  font: 300 1.4rem/1 var(--font-display);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}
.eg-rteam__logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.eg-rteam__titles { flex: 1; min-width: 0; }
.eg-rteam h3.eg-rteam__name {
  margin: 0;
  color: var(--ink);
  font: 600 1.1rem/1.2 var(--font-display);
  letter-spacing: -0.02em;
}
.eg-rteam__count { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.82rem; }
.eg-rteam__meter { height: 3px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.eg-rteam__meter > span { display: block; height: 100%; background: var(--accent); }
.eg-rteam__desc { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.eg-rteam__roster { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.eg-rteam__roster li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.88rem;
}
.eg-rteam__roster li small { min-width: 0; overflow: hidden; color: var(--faint); font-size: 0.78rem; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.eg-rteam__empty { margin: 0; color: var(--faint); font-size: 0.85rem; }
.eg-rteam > .ui.button { align-self: flex-start; margin: auto 0 0; }
.eg-rteam > button.eg-textlink { align-self: flex-start; margin-top: auto; padding: 0; border: 0; background: none; cursor: pointer; }

/* ---------- 4. Rally page: the field, sidebar, closing band ---------- */
.eg-rally__field {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.75rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.eg-rally__car .eg-media { aspect-ratio: 4 / 3; }
.eg-rally__ig {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}
.eg-rally__ig:hover { color: var(--accent); }
.eg-rally__ig .icon { margin: 0; height: auto; }

.eg-rally__side .eg-panel.eg-rally__panel { padding: clamp(18px, 2.4vw, 26px); }
.eg-rally__side h2.eg-rally__sidehead {
  margin: 0 0 1.1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: 500 0.75rem/1 var(--font-sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.eg-rally__sidehead .u-muted { margin-left: 0.35rem; letter-spacing: 0.1em; }
.eg-rally__when { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.eg-rally__whenrange { color: var(--ink); font-weight: 500; }
.eg-rally__when .u-muted { font-size: 0.85rem; }
.eg-rally__glancelist { display: grid; gap: 0.8rem; margin: 0 0 1.25rem; }
.eg-rally__glancelist > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.eg-rally__glancelist dt { color: var(--muted); font-size: 0.85rem; }
.eg-rally__glancelist dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }
.eg-rally__glancelist dd del { margin-left: 0.25rem; font-weight: 400; }
.eg-rally__glancelist dd small { display: block; color: var(--faint); font-size: 0.75rem; font-weight: 400; }
.eg-rally__glance .ui.fluid.button { margin: 0; }
.eg-rally__side .eg-sponsor-slot,
.eg-rally__side .eg-sp { margin-bottom: 1.25rem; }

.eg-rally-drivers .eg-rally-drivers-list { max-height: 24rem; overflow-y: auto; padding-right: 0.25rem; }
.eg-rally-drivers .eg-row { align-items: center; padding: 0.75rem 0; }
.eg-rally-drivers .eg-avatar { --size: 36px; }
.eg-rally-drivers .eg-row__title { margin: 0 0 0.1rem; }
.eg-rally-drivers .eg-rally__ig { margin: 0 0 0 0.35rem; vertical-align: -1px; }
.eg-rally-drivers .eg-rally-drivers-empty { padding: 0; }

.eg-rally__band {
  margin-top: clamp(32px, 5vw, 64px);
  padding: clamp(32px, 5vw, 64px) var(--gutter);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 220px at 50% 0%, rgba(var(--accent-rgb), 0.1), transparent 70%),
    rgba(17, 17, 19, 0.88);
  backdrop-filter: blur(10px);
  text-align: center;
}
.eg-rally__band h2.eg-display { margin: 0; font-size: clamp(1.9rem, 3.6vw, 3rem); color: var(--ink); }
.eg-rally__band .eg-lede { margin: 1rem auto 1.75rem; }
.eg-rally__band .eg-lede:last-child { margin-bottom: 0; }
.eg-rally__band .ui.button { margin: 0; min-height: 46px; }

/* ---------- 5. Listing (rallies/inc.cfm) ---------- */
.eg-rallies { padding-bottom: clamp(48px, 7vw, 96px); }
.eg-rallies__colhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.eg-rallies__colhead h2 {
  margin: 0;
  color: var(--ink);
  font: 500 0.75rem/1 var(--font-sans) !important;
  letter-spacing: 0.24em !important;
  text-transform: uppercase;
}
.eg-rallies__colhead span { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.eg-rallies__group + .eg-rallies__group { margin-top: clamp(40px, 5vw, 64px); }

/* Next rally: the photo is the hero, copy beside it */
.eg-rally-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.eg-rally-feature > a { display: block; }
.eg-rally-feature .eg-media { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
.eg-rally-feature .eg-eyebrow { margin-bottom: 0.9rem; }
.eg-rally-feature__title {
  display: block;
  margin: 0 0 0.75rem;
  color: var(--ink);
  font: 600 clamp(1.7rem, 3vw, 2.4rem)/1.08 var(--font-display) !important;
  letter-spacing: -0.03em !important;
  text-decoration: none;
}
a.eg-rally-feature__title:hover { color: var(--accent); }
.eg-rally-feature__meta { margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }
.eg-rally-feature h2 { margin: 0; }
.eg-rally-feature__meta span + span:not(.eg-row__tag)::before { content: "\00B7"; margin: 0 0.45em; color: var(--faint); }
.eg-rally-feature__desc { margin: 0 0 1.5rem; color: var(--muted); font-size: 0.98rem; }
.eg-rally-feature__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.eg-rally-feature__actions .ui.button { margin: 0; }

/* Upcoming: story cards in a grid, like the home page's lead article */
.eg-rally-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.eg-rally-cards .eg-story .eg-media { aspect-ratio: 16 / 10; margin-bottom: 1rem; }
.eg-rally-cards .eg-story__title { font-size: 1.3rem; }
.eg-rally-cards .eg-row__tag { margin-left: 0; margin-right: 0.4rem; }
.eg-rally-cards__tags { display: block; margin-top: 0.75rem; }

.eg-rallies .eg-rows .eg-row__title { font-size: 1.02rem; }

/* Past rallies: a small hero left of the date block, the same height (72px). */
.eg-rallies__pastthumb {
  flex: none;
  width: 128px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-elev);
  overflow: hidden;
}
.eg-rallies__pastthumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition: filter 0.3s var(--ease), transform 0.4s var(--ease);
}
.eg-rows .eg-row:hover .eg-rallies__pastthumb img { filter: none; transform: scale(1.04); }

/* ---------- 6. Small screens ---------- */
@media (max-width: 767px) {
  /* No fixed backgrounds on phones: the image covers the hero instead
     (portrait version when there is one) and the page below is solid. */
  .eg-rally { background-image: none !important; background-attachment: scroll !important; }
  .eg-rally .eg-rally__hero {
    min-height: min(92svh, 760px);
    background:
      linear-gradient(180deg, rgba(9, 9, 10, 0.3) 0%, rgba(9, 9, 10, 0.15) 30%, rgba(9, 9, 10, 0.92) 88%, var(--bg) 100%),
      var(--rally-hero-p, var(--rally-hero)) center top / cover no-repeat;
  }
  .eg-rally--noimg .eg-rally__hero { min-height: 0; background: none; }
  .eg-rally__facts { display: grid; grid-template-columns: 1fr 1fr; }
  .eg-rally__cta .ui.button { flex: 1 1 auto; }
  .eg-panel.eg-rally__panel { backdrop-filter: none; background: var(--panel); }

  .eg-rally-feature { grid-template-columns: minmax(0, 1fr); }
  .eg-rallies__pastthumb { width: 96px; }
}
