:root {
  color-scheme: light;
  --navy: #0B1D3A;
  --gold: #C79A43;
  --ivory: #F7F5F0;
  --slate: #2C3340;
  --surface: #FFFFFF;
  --wine: #6A2033;
  --forest: #355243;
  --river: #3F718B;
  --river-soft: #DCEAF1;
  --beige: #EDE2CF;
  --mist: #EEF1F4;
  --line: rgba(44, 51, 64, 0.12);
  --line-strong: rgba(11, 29, 58, 0.16);
  --shadow: 0 24px 60px rgba(11, 29, 58, 0.08);
  --shadow-soft: 0 14px 34px rgba(11, 29, 58, 0.06);
  --body-font: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --heading-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--slate);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at top left, rgba(199, 154, 67, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(63, 113, 139, 0.16), transparent 26%),
    linear-gradient(180deg, #F8F4ED 0%, #F2ECE2 45%, #EEF1EE 100%);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero,
.filters-panel,
.content-section,
.empty-shell {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 252, 247, 0.9);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 245, 240, 0.96)),
    linear-gradient(135deg, rgba(11, 29, 58, 0.06), rgba(199, 154, 67, 0.08));
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -14% 40%;
  height: 220px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(63, 113, 139, 0.08), rgba(11, 29, 58, 0.24)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(-7deg);
  pointer-events: none;
}

.hero-home {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: var(--navy);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.hero-kicker,
.section-kicker,
.hero-panel-kicker,
.filter-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  color: var(--wine);
}

.hero h1,
.filters-panel h2,
.section-heading h2,
.empty-shell h2 {
  margin: 0;
  line-height: 1.02;
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--navy);
}

.hero h1 {
  width: min(12ch, 100%);
  font-size: clamp(3rem, 8vw, 5.8rem);
}

.hero-copy {
  width: min(720px, 100%);
  margin: 18px 0 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: rgba(44, 51, 64, 0.86);
}

.hero-panel {
  position: relative;
  z-index: 1;
  padding: 20px;
  border: 1px solid rgba(11, 29, 58, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(11, 29, 58, 0.08);
  background: rgba(247, 245, 240, 0.92);
}

.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card strong {
  font-size: 1.75rem;
  line-height: 1;
  color: var(--navy);
  font-family: var(--heading-font);
}

.stat-card span {
  margin-top: 6px;
  font-size: 0.92rem;
  color: rgba(44, 51, 64, 0.82);
}

.hero-panel-note,
.section-blurb,
.empty-shell p,
.results-summary {
  line-height: 1.65;
  color: rgba(44, 51, 64, 0.82);
}

.hero-panel-note {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

.route-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.route-strip span {
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(11, 29, 58, 0.08);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
  font-size: 0.94rem;
}

.filters-panel,
.content-section,
.empty-shell {
  margin-top: 26px;
  padding: 28px;
}

.filters-panel h2,
.section-heading h2,
.empty-shell h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.9fr) auto;
  gap: 14px;
  margin-top: 22px;
  align-items: end;
}

.control-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.control-field input,
.control-field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--slate);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.control-field input::placeholder {
  color: rgba(44, 51, 64, 0.52);
}

.control-field input:focus-visible,
.control-field select:focus-visible,
.filter-chip:focus-visible,
.secondary-action:focus-visible,
.card-link:focus-visible,
.archive-details summary:focus-visible {
  outline: 3px solid rgba(63, 113, 139, 0.24);
  outline-offset: 2px;
}

.control-field-actions {
  min-width: 150px;
}

.filter-stack {
  margin-top: 22px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip,
.secondary-action {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.filter-chip {
  padding: 11px 16px;
  background: rgba(11, 29, 58, 0.06);
  color: var(--slate);
}

.filter-chip:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.filter-chip.is-active {
  background: linear-gradient(135deg, var(--navy), #173969);
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 29, 58, 0.18);
}

.secondary-action {
  padding: 12px 18px;
  background: rgba(199, 154, 67, 0.16);
  color: var(--navy);
  font-weight: 700;
}

.results-summary {
  margin: 16px 0 0;
}

.empty-shell {
  text-align: center;
}

.empty-shell p {
  width: min(520px, 100%);
  margin: 12px auto 18px;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.section-blurb {
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card-grid-events {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.guide-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border: 1px solid rgba(11, 29, 58, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 246, 240, 0.95));
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.guide-card:hover,
.guide-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(63, 113, 139, 0.22);
  box-shadow: 0 18px 40px rgba(11, 29, 58, 0.08);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.card-city {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--wine);
}

.card-category {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(11, 29, 58, 0.06);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.badge {
  font-weight: 700;
}

.badge-recommended {
  background: rgba(199, 154, 67, 0.18);
  color: var(--navy);
}

.badge-muted {
  background: rgba(106, 32, 51, 0.12);
  color: var(--wine);
}

.tag {
  background: rgba(53, 82, 67, 0.09);
  color: var(--forest);
}

.card-title {
  margin: 16px 0 0;
  font-size: 1.56rem;
  line-height: 1.08;
  color: var(--navy);
  font-family: var(--heading-font);
}

.card-note,
.card-description,
.card-recommendation {
  margin: 12px 0 0;
  line-height: 1.65;
}

.card-note {
  color: var(--river);
}

.card-description,
.card-recommendation {
  color: rgba(44, 51, 64, 0.84);
}

.card-recommendation {
  padding-left: 14px;
  border-left: 2px solid rgba(199, 154, 67, 0.48);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.meta-grid div {
  min-width: 0;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(11, 29, 58, 0.08);
  background: rgba(239, 241, 244, 0.6);
}

.meta-grid dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: rgba(44, 51, 64, 0.62);
}

.meta-grid dd {
  margin: 6px 0 0;
  color: var(--navy);
  font-size: 0.96rem;
  font-weight: 600;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.card-link {
  display: inline-flex;
  width: fit-content;
  margin-top: auto;
  padding-top: 18px;
  color: var(--river);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

.card-link:hover {
  color: var(--wine);
}

.route-stops {
  margin-top: 18px;
}

.route-stops-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: rgba(44, 51, 64, 0.66);
}

.stop-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(44, 51, 64, 0.82);
  line-height: 1.65;
}

.archive-details {
  border: 1px solid rgba(11, 29, 58, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
}

.archive-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--navy);
  font-weight: 700;
}

.archive-details summary::-webkit-details-marker {
  display: none;
}

.summary-count {
  color: rgba(44, 51, 64, 0.68);
  font-weight: 600;
}

.archive-grid {
  padding: 0 20px 20px;
}

#footer-container {
  width: min(1200px, calc(100% - 28px));
  margin: 14px auto 36px;
}

@media (max-width: 980px) {
  .hero-grid,
  .controls-grid {
    grid-template-columns: 1fr;
  }

  .control-field-actions {
    min-width: 0;
  }
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100%, calc(100% - 22px));
    padding-top: 18px;
  }

  .hero,
  .filters-panel,
  .content-section,
  .empty-shell {
    padding: 22px;
    border-radius: 24px;
  }

  .route-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero h1 {
    width: 100%;
    font-size: clamp(2.5rem, 14vw, 3.8rem);
  }

  .card-grid,
  .card-grid-events {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 460px) {
  .page-shell {
    width: min(100%, calc(100% - 16px));
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .route-strip {
    grid-template-columns: 1fr 1fr;
  }

  .archive-details summary {
    align-items: start;
    flex-direction: column;
  }
}
