/* ErgRaces visual system — aligned to Carlos reference screenshots */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #071525;
  --color-primary-deep: #020B16;
  --color-primary-soft: #0B1B2D;
  --color-primary-line: #10253A;
  --color-accent: #09BDF2;
  --color-accent-strong: #00A8DE;
  --color-accent-soft: #E7F8FF;
  --color-surface: #FFFFFF;
  --color-surface-soft: #F8FAFC;
  --color-border: #DDE6EF;
  --color-border-dark: rgba(255, 255, 255, 0.10);
  --color-text-primary: #0B1628;
  --color-text-secondary: #334155;
  --color-text-muted: #64748B;
  --color-text-inverse: #FFFFFF;
  --color-text-inverse-muted: #D7E0EA;
  --color-success-soft: #E8F8F0;
  --color-success: #0077C8;
  --color-virtual-soft: #EAF6FF;
  --color-virtual: #0077C8;
  --color-warning-soft: #FFF3D8;
  --color-warning: #B7791F;

  --font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-display: clamp(3rem, 5vw, 4.1rem);
  --font-size-h1: clamp(2.25rem, 4vw, 3.5rem);
  --font-size-h2: clamp(1.35rem, 2vw, 1.85rem);
  --font-size-h3: 1.05rem;
  --font-size-body: 1rem;
  --font-size-body-sm: 0.875rem;
  --font-size-label: 0.875rem;
  --font-size-micro: 0.75rem;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 88px;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-card: 0 18px 45px rgba(1, 8, 20, 0.18), 0 2px 8px rgba(1, 8, 20, 0.08);
  --shadow-card-soft: 0 10px 26px rgba(2, 10, 24, 0.13);
  --shadow-card-hover: 0 22px 55px rgba(1, 8, 20, 0.24), 0 0 0 1px rgba(9, 189, 242, 0.22);
  --site-max: 1260px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: 1.55;
  color: var(--color-text-inverse);
  background:
    radial-gradient(circle at 78% 8%, rgba(9, 189, 242, 0.12), transparent 30%),
    linear-gradient(180deg, var(--color-primary-deep) 0%, var(--color-primary) 46%, #03101D 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.38), transparent 65%);
}

img,
svg { display: block; }

img { max-width: 100%; }

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover { color: var(--color-accent-strong); }

button,
select,
input { font: inherit; }

:focus-visible {
  outline: 3px solid rgba(9, 189, 242, 0.55);
  outline-offset: 3px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-primary-deep); }
::-webkit-scrollbar-thumb { background: #1B3652; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: #2A4A68; }

.container {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 28px;
}

.text-display {
  font-size: var(--font-size-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.text-h1 {
  font-size: var(--font-size-h1);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.text-h2 {
  font-size: var(--font-size-h2);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.text-h3 {
  font-size: var(--font-size-h3);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.text-label {
  font-size: var(--font-size-label);
  font-weight: 700;
  line-height: 1.1;
}

.text-micro {
  font-size: var(--font-size-micro);
  font-weight: 700;
  line-height: 1.1;
}

.text-muted { color: var(--color-text-inverse-muted); }
.text-accent { color: var(--color-accent); }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  background: rgba(2, 11, 22, 0.94);
  border-bottom: 1px solid var(--color-border-dark);
}

.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.navbar__logo {
  order: 1;
  display: inline-flex;
  align-items: center;
  min-width: 190px;
  color: var(--color-text-inverse);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.navbar__logo span { color: var(--color-text-inverse); }

.navbar__logo-img {
  width: 164px;
  height: auto;
  object-fit: contain;
}

.navbar__nav {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(22px, 3vw, 46px);
  list-style: none;
  margin-left: auto;
}

.navbar__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.91);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 180ms ease, transform 180ms ease;
}

.navbar__nav a:hover,
.navbar__nav a[aria-current='page'] {
  color: var(--color-accent);
}

.navbar__hamburger {
  order: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-left: 10px;
  color: var(--color-accent);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.navbar__hamburger svg {
  width: 34px;
  height: 34px;
  stroke-width: 2.2;
}

/* Homepage hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 382px;
  padding: 28px 0 22px;
  background:
    radial-gradient(circle at 78% 46%, rgba(9, 189, 242, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(4, 17, 31, 0.98) 0%, rgba(2, 11, 22, 1) 56%, rgba(6, 27, 48, 0.98) 100%);
  border-bottom: 1px solid var(--color-border-dark);
}

.hero::before {
  content: '';
  position: absolute;
  width: 430px;
  height: 430px;
  right: 150px;
  top: 68px;
  border: 1px solid rgba(9, 189, 242, 0.22);
  border-radius: 50%;
  opacity: 0.72;
}

.hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -80px;
  width: 430px;
  height: 760px;
  transform: rotate(42deg);
  background: linear-gradient(90deg, transparent, rgba(9, 189, 242, 0.055), transparent 78%);
  opacity: 0.9;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(540px, 0.95fr) minmax(480px, 1.05fr);
  align-items: center;
  gap: 28px;
}

.hero__content { position: relative; z-index: 3; }

.hero__content::after {
  content: '';
  position: absolute;
  right: -175px;
  top: 32px;
  width: 104px;
  height: 104px;
  opacity: 0.28;
  background-image: radial-gradient(circle, var(--color-accent) 2px, transparent 2.5px);
  background-size: 20px 20px;
}

.hero__headline {
  max-width: 660px;
  margin: 0 0 24px;
  color: var(--color-text-inverse);
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.25);
}

.hero__headline-accent,
.hero__headline .accent {
  color: var(--color-accent);
}

.hero__tagline {
  max-width: 460px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.08vw, 1.1rem);
  line-height: 1.5;
  letter-spacing: -0.025em;
}

.hero__art,
.hero__visual {
  position: relative;
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero__art svg,
.hero__visual svg {
  width: min(100%, 680px) !important;
  height: auto !important;
  opacity: 0.86 !important;
  stroke: var(--color-accent) !important;
  filter: drop-shadow(0 0 16px rgba(9, 189, 242, 0.24));
}

.hero__image {
  width: min(100%, 610px);
  height: 286px;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  opacity: 0.96;
  mix-blend-mode: screen;
  filter: saturate(1.08) contrast(1.08);
  mask-image: linear-gradient(90deg, transparent 0%, black 18%, black 88%, transparent 100%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 15px 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  min-width: 200px;
  min-height: 50px;
  color: #FFFFFF;
  background: linear-gradient(180deg, #14C8FF 0%, #08AEEA 100%);
  box-shadow: 0 16px 34px rgba(9, 189, 242, 0.24);
}

.btn--primary:hover {
  color: #FFFFFF;
  background: linear-gradient(180deg, #26D1FF 0%, #09BDF2 100%);
  box-shadow: 0 18px 40px rgba(9, 189, 242, 0.34);
}

.btn--secondary {
  min-height: 40px;
  padding: 10px 16px;
  color: var(--color-accent);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn--secondary:hover {
  color: var(--color-accent-strong);
  border-color: rgba(9, 189, 242, 0.25);
  background: rgba(9, 189, 242, 0.06);
}

/* Homepage sections */
.home-events {
  padding: 24px 0 24px;
  background: linear-gradient(180deg, rgba(3, 16, 29, 0.96), rgba(4, 17, 31, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.home-events__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.home-events__header h2 { color: #FFFFFF; }

.home-events__all,
.home-events__header a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent);
  font-size: 1rem;
  font-weight: 500;
}

.home-events__grid.grid--events,
.grid--events {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.home-events .event-card {
  height: 228px;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  color: var(--color-text-primary);
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFE 100%);
  border: 1px solid rgba(221, 230, 239, 0.92);
  border-radius: 14px;
  box-shadow: var(--shadow-card-soft);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-events .event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(9, 189, 242, 0.55);
  box-shadow: var(--shadow-card-hover);
}

.home-events .event-card__body {
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-events .event-card__title {
  display: -webkit-box;
  min-height: 2.4em;
  margin: 0 0 14px;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.event-card__location {
  margin: 0 0 14px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.3;
}

.home-events .event-card .type-pill {
  margin-top: auto;
  align-self: center;
}

.event-card__link {
  margin-top: auto;
  color: var(--color-accent-strong);
  font-size: 0.875rem;
  font-weight: 800;
}

.home-sections {
  padding: 6px 0 42px;
  background: #03101D;
}

.home-sections__grid.grid--3,
.section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.section-card,
.resource-card,
.card {
  color: var(--color-text-primary);
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFE 100%);
  border: 1px solid rgba(221, 230, 239, 0.95);
  border-radius: 13px;
  box-shadow: var(--shadow-card-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.section-card:hover,
.resource-card:hover,
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(9, 189, 242, 0.55);
  box-shadow: var(--shadow-card-hover);
}

.section-card {
  min-height: 184px;
  padding: 30px 28px 26px;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-areas:
    'icon title'
    'icon desc'
    'icon link';
  column-gap: 22px;
  align-items: start;
}

.section-card__icon {
  grid-area: icon;
  width: 46px;
  height: 46px;
  justify-self: center;
  align-self: start;
  color: var(--color-accent-strong);
  stroke-width: 1.85;
}

.home-sections .section-card:nth-child(2) .section-card__icon {
  transform: translateY(3px);
}

.section-card__title {
  grid-area: title;
  margin: 0 0 8px;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section-card__desc {
  grid-area: desc;
  margin: 0 0 20px;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.section-card__link {
  grid-area: link;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--color-accent-strong);
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .home-sections__grid.grid--3 {
    align-items: stretch;
  }

  .home-sections .section-card {
    min-height: 208px;
    height: 208px;
    grid-template-rows: auto 1fr auto;
  }
}

/* Date badges */
.date-badge {
  position: relative;
  width: 60px;
  min-width: 60px;
  height: 72px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  color: var(--color-text-primary);
  background: linear-gradient(180deg, #FFFFFF 0%, #F6FAFD 100%);
  border: 1px solid #D6E2ED;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82) inset, 0 8px 18px rgba(11, 22, 40, 0.08);
}

.date-badge::before,
.date-badge::after {
  display: none;
}

.date-badge__month {
  display: block;
  width: 100%;
  padding: 8px 4px 7px;
  color: #FFFFFF;
  background: #0077C8;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.date-badge__day {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 5px 4px 4px;
  color: #0B1628;
  font-size: clamp(1.14rem, 1.65vw, 1.48rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.date-badge--compact {
  width: 52px;
  min-width: 52px;
  height: 62px;
  border-radius: 7px;
}

.date-badge--compact .date-badge__month { font-size: 0.56rem; padding: 6px 3px 5px; }
.date-badge--compact .date-badge__day { font-size: 1.22rem; }

.date-badge--range .date-badge__day,
.date-badge--text .date-badge__day {
  font-size: 0.88rem;
  letter-spacing: -0.035em;
}

.date-badge--text .date-badge__day {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Page heroes and inner page template */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 18px;
  background:
    radial-gradient(circle at 84% 18%, rgba(9, 189, 242, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(2, 11, 22, 0.98), rgba(3, 16, 29, 0.98));
  border-bottom: 1px solid var(--color-border-dark);
}

.page-hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -180px;
  width: 360px;
  height: 560px;
  transform: rotate(43deg);
  background: linear-gradient(90deg, transparent, rgba(9, 189, 242, 0.055), transparent 80%);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 2; }

.page-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 104px;
}

.page-hero__content {
  flex: 1 1 0;
  min-width: 0;
  max-width: 640px;
}

.page-hero h1,
.page-hero .text-h1 {
  color: var(--color-accent);
  margin: 0;
}

.page-hero__desc {
  max-width: 530px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  line-height: 1.48;
}

.page-hero__art {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.page-hero__image {
  display: block;
  width: min(100%, 520px);
  height: 210px;
  object-fit: cover;
  object-position: center;
  opacity: 0.92;
  mix-blend-mode: screen;
  filter: saturate(1.08) contrast(1.08);
  mask-image: linear-gradient(90deg, transparent 0%, black 14%, black 86%, transparent 100%);
}

@media (min-width: 1024px) {
  .page-hero .text-h1 {
    white-space: nowrap;
  }
}

/* Events page target system */
.events-listing,
.dense-listing {
  padding: 12px 0 58px;
  background: #03101D;
}

.events-list {
  margin-bottom: 8px;
}

.events-list:last-child {
  margin-bottom: 0;
}

.filter-bar,
.event-filters {
  margin-bottom: 22px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.4fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  color: var(--color-text-primary);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-card-soft);
}

.filter-search,
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.filter-group__label {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-group__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-search__input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--color-text-primary);
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.filter-search__input::placeholder {
  color: var(--color-text-muted);
}

.filter-search__input:hover {
  border-color: rgba(9, 189, 242, 0.45);
}

.filter-search__input:focus-visible {
  background: #FFFFFF;
  border-color: rgba(9, 189, 242, 0.72);
  box-shadow: 0 0 0 4px rgba(9, 189, 242, 0.12);
}

.filter-pill,
.event-filter-select,
.event-filter-button {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.filter-pill:hover,
.event-filter-select:hover {
  color: var(--color-accent-strong);
  border-color: rgba(9, 189, 242, 0.55);
}

.filter-pill.is-active,
.event-filter-button {
  color: #FFFFFF;
  background: linear-gradient(180deg, #15C9FF, #07A9E2);
  border-color: #08AEEA;
  box-shadow: 0 2px 10px rgba(9, 189, 242, 0.28);
}

.events-category {
  margin: 0 0 28px;
}

.events-category__title {
  margin: 26px 0 14px;
  color: #FFFFFF;
  font-size: 1.3rem;
}

.events-list,
.event-list-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px;
  color: var(--color-text-primary);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-card-soft);
}

.event-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--color-text-primary);
  background: transparent;
  border: none;
  border-bottom: 1px solid #EEF3F8;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.events-list .event-row:last-child { border-bottom: none; }

.events-list .event-row:nth-child(even) {
  background: rgba(248, 250, 252, 0.86);
}

.event-row:hover {
  background: rgba(9, 189, 242, 0.06);
  color: var(--color-text-primary);
  box-shadow: inset 0 0 0 1px rgba(9, 189, 242, 0.1);
}

.event-row .date-badge {
  width: 58px;
  min-width: 58px;
  height: 68px;
  border-radius: 10px;
}

.event-row .date-badge__month { font-size: 0.63rem; padding: 7px 4px 6px; }
.event-row .date-badge__day { font-size: 1.34rem; letter-spacing: -0.04em; }

.event-row .date-badge--range .date-badge__day,
.event-row .date-badge--text .date-badge__day {
  font-size: 0.82rem;
}

.event-row .date-badge--text .date-badge__day {
  letter-spacing: 0.05em;
}

.event-row__desc {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.38;
}

.event-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.event-row__main {
  min-width: 0;
  flex: 1;
}

.event-row__title {
  margin: 0 0 2px;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.event-row__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--color-text-secondary);
  font-size: 0.77rem;
  line-height: 1.25;
}

.event-row__location { color: var(--color-text-secondary); }

.event-row__link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  color: var(--color-accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.event-row__link svg {
  flex: 0 0 auto;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: none;
}

.type-pill--in-person {
  color: #0077C8;
  background: #FFFFFF;
}

.type-pill--virtual {
  color: #0077C8;
  background: #FFFFFF;
}

.type-pill--challenge {
  color: #8A5B12;
  background: var(--color-warning-soft);
}

.event-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

.event-status--ongoing {
  color: #0E7490;
  background: #E6F8FD;
}

.event-status--upcoming {
  color: #335C85;
  background: #EEF5FC;
}

.event-status--recent {
  color: #4A5568;
  background: #F2F5F9;
}

/* Resource-card target system for inner pages */
.dense-grid,
.resource-grid {
  column-count: 3;
  column-gap: 16px;
}

.dense-grid > *,
.resource-grid > * {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 16px;
}

.resource-card {
  padding: 24px 24px 22px;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas:
    'icon title'
    'icon desc'
    'icon domain'
    'icon cta';
  column-gap: 18px;
  align-items: start;
}

.resource-card__icon {
  grid-area: icon;
  width: 38px;
  height: 38px;
  color: var(--color-accent-strong);
}

.resource-card__title {
  grid-area: title;
  margin-bottom: 8px;
  color: var(--color-text-primary);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}

.resource-card__description {
  grid-area: desc;
  margin-bottom: 12px;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  line-height: 1.42;
}

.resource-card__domain {
  grid-area: domain;
  margin-bottom: 14px;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
}

.resource-card__cta {
  grid-area: cta;
  color: var(--color-accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

/* Compatibility: current dense category panels become closer to target cards until HTML is rebuilt. */
.category-panel {
  padding: 20px;
  color: var(--color-text-primary);
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFE 100%);
  border: 1px solid rgba(221, 230, 239, 0.95);
  border-radius: 13px;
  box-shadow: var(--shadow-card-soft);
}

.category-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: 0;
}

.category-panel__icon {
  width: 34px;
  height: 34px;
  color: var(--color-accent-strong);
}

.category-panel__title {
  color: var(--color-text-primary);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-transform: none;
}

.category-panel__list {
  display: flex;
  flex-direction: column;
  list-style: none;
}

.category-panel__item {
  border-bottom: 1px solid #EEF3F8;
}

.category-panel__item:last-child { border-bottom: 0; }

.category-panel__link {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 9px;
  row-gap: 2px;
  padding: 8px 0;
  color: var(--color-text-primary);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.24;
  transition: color 150ms ease, transform 150ms ease;
}

.category-panel__link > span:first-child {
  grid-column: 1;
  grid-row: 1;
}

.category-panel__link:hover {
  color: var(--color-accent-strong);
  transform: translateX(2px);
}

.category-panel__meta {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.category-panel__desc {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.78rem;
  color: var(--color-text-muted, #94a3b8);
  line-height: 1.4;
  margin-top: 0.1rem;
  font-weight: 500;
}

.category-panel__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 14px;
  height: 14px;
  color: var(--color-accent-strong);
}

/* Footer */
.footer {
  margin-top: 0;
  padding: 38px 0 42px;
  color: var(--color-text-inverse-muted);
  background: rgba(2, 11, 22, 0.98);
  border-top: 1px solid var(--color-border-dark);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
}

.footer__copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.footer__links li {
  display: flex;
  align-items: center;
}

.footer__links li + li::before {
  content: '|';
  margin: 0 24px;
  color: rgba(255, 255, 255, 0.38);
}

.footer__links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

.footer__links a:hover { color: var(--color-accent); }

.footer__updated {
  justify-self: end;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

/* Grids */
.grid { display: grid; gap: 18px; align-items: start; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

svg.icon { width: 20px; height: 20px; flex-shrink: 0; }
svg.icon--sm { width: 14px; height: 14px; }
svg.icon--md { width: 20px; height: 20px; }
svg.icon--lg { width: 40px; height: 40px; }

/* Month separator */
.month-separator {
  margin: 26px 0 10px;
  padding: 0 0 8px;
  color: #FFFFFF;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.month-separator:first-child {
  margin-top: 0;
}

/* Year-only date badge */
.date-badge--year .date-badge__month {
  font-size: 0.52rem;
  padding: 4px 2px 3px;
}

.date-badge--year .date-badge__day {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.event-row .date-badge--year .date-badge__month {
  font-size: 0.56rem;
  padding: 5px 2px 4px;
}

.event-row .date-badge--year .date-badge__day {
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .filter-bar,
  .event-filters { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 1120px) {
  .navbar { height: 78px; }
  .navbar__logo { min-width: 160px; font-size: 1.65rem; }
  .navbar__nav { gap: 20px; }
  .navbar__nav a { font-size: 0.92rem; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art,
  .hero__visual { min-height: 280px; justify-content: center; }
  .home-events__grid.grid--events,
  .grid--events { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-sections__grid.grid--3,
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dense-grid,
  .resource-grid { column-count: 2; }
}

@media (max-width: 767px) {
  .container { padding: 0 20px; }
  .navbar { height: 66px; }
  .navbar__logo { min-width: auto; font-size: 1.45rem; }
  .navbar__logo-img { width: 150px; }
  .navbar__nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 66px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 18px;
    background: rgba(2, 11, 22, 0.98);
    border-bottom: 1px solid var(--color-border-dark);
  }
  .navbar__nav.is-open { display: flex; }
  .navbar__nav a { min-height: 48px; }
  .navbar__hamburger { display: inline-flex; }
  .navbar__hamburger { width: 44px; height: 44px; }
  .month-separator { font-size: 0.82rem; margin: 20px 0 8px; }
  .hero { min-height: auto; padding: 52px 0 36px; }
  .hero::before { right: -180px; top: 120px; }
  .hero__content::after { display: none; }
  .hero__headline { font-size: clamp(3rem, 13vw, 4.25rem); }
  .hero__tagline { font-size: 1.04rem; }
  .btn--primary { width: 100%; min-width: 0; }
  .hero__art,
  .hero__visual { min-height: 220px; }
  .home-events__header { align-items: flex-start; flex-direction: column; }
  .home-events__grid.grid--events,
  .grid--events,
  .home-sections__grid.grid--3,
  .section-grid,
  .dense-grid,
  .resource-grid,
  .grid--2,
  .grid--3,
  .grid--5 { grid-template-columns: 1fr; }
  .dense-grid,
  .resource-grid { column-count: 1; }
  .home-events .event-card { min-height: 220px; }
  .section-card,
  .resource-card { grid-template-columns: 42px 1fr; padding: 22px; }
  .filter-bar,
  .event-filters { grid-template-columns: 1fr; margin-bottom: 18px; }
  .filter-group__controls { gap: 7px; }
  .page-hero { padding: 26px 0 16px; }
  .page-hero__inner { min-height: auto; align-items: flex-start; flex-wrap: wrap; }
  .page-hero__content { max-width: none; }
  .page-hero__art { flex: 0 0 100%; margin-top: 8px; justify-content: center; }
  .page-hero__image { width: 100%; max-width: 480px; height: 160px; mask-image: linear-gradient(180deg, transparent 0%, black 10%, black 90%, transparent 100%); }
  .event-row { align-items: flex-start; gap: 10px; padding: 10px; }
  .event-row .date-badge { width: 54px; min-width: 54px; height: 64px; }
  .event-row .date-badge__month { font-size: 0.58rem; }
  .event-row .date-badge__day { font-size: 1.2rem; }
  .event-row .date-badge--range .date-badge__day,
  .event-row .date-badge--text .date-badge__day { font-size: 0.74rem; }
  .event-row__body { flex-direction: column; align-items: flex-start; gap: 10px; }
  .event-row__link { align-self: flex-start; }
  .footer__inner { grid-template-columns: 1fr; justify-items: start; }
  .footer__updated { justify-self: start; }
}

@media (max-width: 430px) {
  .hero__headline { font-size: 3rem; }
  .section-card,
  .resource-card { grid-template-columns: 1fr; grid-template-areas: none; }
  .section-card > *,
  .resource-card > * { grid-area: auto; }
  .section-card__icon,
  .resource-card__icon { margin-bottom: 6px; }
}
