:root {
  --page-bg: #ffffff;
  --surface: #f7f7f5;
  --surface-strong: #ffffff;
  --surface-muted: #eeeeeb;
  --ink: #111111;
  --muted: #5f6668;
  --line: #deded8;
  --accent: #f00610;
  --accent-deep: #9f0008;
  --accent-soft: #ffe6e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-height: 92px;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.brand-mark {
  width: 64px;
  height: auto;
}

.topbar-actions {
  position: absolute;
  right: clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-wordmark {
  width: auto;
  height: 64px;
  max-width: min(280px, 46vw);
  object-fit: contain;
}

.exit-access {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 6px;
}

.exit-access:hover,
.exit-access:focus-visible {
  color: #ffffff;
  background: var(--ink);
}

.page-shell {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px clamp(18px, 4vw, 48px) 72px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 38px 0 34px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  min-width: 0;
  max-width: 760px;
}

.eyebrow,
.modal-kicker {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 920px;
  font-size: 72px;
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.route-section {
  min-width: 0;
  padding-top: 38px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
}

.view-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.view-actions .active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.route-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.station-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.station-index {
  display: grid;
  place-items: center;
  min-height: 100%;
  color: var(--accent-deep);
  border-right: 2px solid var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.station-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(17, 17, 17, 0.05);
}

.station-card-main {
  min-width: 0;
}

.station-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.station-type,
.station-date {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.station-type {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.station-date {
  color: var(--ink);
  background: var(--surface-muted);
}

.station-card h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.18;
}

.station-location {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.station-summary {
  max-width: 780px;
  margin: 12px 0 0;
  color: #373737;
  font-size: 16px;
  line-height: 1.55;
}

.station-action {
  min-width: 110px;
  border-radius: 6px;
}

.btn-outline-dark {
  --bs-btn-color: var(--ink);
  --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: var(--ink);
  --bs-btn-hover-border-color: var(--ink);
}

.btn-dark {
  --bs-btn-bg: var(--ink);
  --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: var(--accent-deep);
  --bs-btn-hover-border-color: var(--accent-deep);
}

.status-panel {
  max-width: 760px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.access-panel {
  width: 100%;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(17, 17, 17, 0.05);
}

.access-panel h1 {
  font-size: 46px;
}

.access-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.access-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 24px;
}

.form-field {
  display: grid;
  flex: 1;
  gap: 7px;
}

.form-field span {
  color: #333333;
  font-size: 13px;
  font-weight: 700;
}

.access-code-input {
  max-width: 180px;
  text-transform: uppercase;
}

.restricted-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 24px;
  padding: 14px 16px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid #ffc1c6;
  border-radius: 8px;
}

.restricted-notice span {
  color: #4d4d4d;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-weekday {
  padding: 8px 10px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 2px solid var(--accent);
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 188px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.04);
}

.calendar-day.is-empty {
  background: #fbfbfa;
}

.calendar-date {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.calendar-date strong {
  color: var(--ink);
  font-size: 16px;
}

.calendar-date span,
.calendar-empty {
  color: var(--muted);
  font-size: 13px;
}

.calendar-empty {
  margin: 0;
}

.calendar-slots {
  display: grid;
  gap: 10px;
}

.calendar-slot {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-slot-button {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-slot-button:hover,
.calendar-slot-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.calendar-slot .station-meta-row {
  margin-bottom: 0;
}

.calendar-slot .station-type,
.calendar-slot .station-date {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.calendar-slot h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.calendar-slot .station-location,
.calendar-slot .station-summary {
  margin-top: 0;
  font-size: 14px;
}

.calendar-slot .station-action {
  width: 100%;
  min-width: 0;
}

.status-panel h1 {
  font-size: 42px;
}

.status-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.station-modal {
  border: 0;
  border-radius: 8px;
}

.modal-header {
  align-items: start;
  gap: 20px;
  padding: 26px 30px;
}

.modal-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.modal-body {
  padding: 24px 30px 34px;
}

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

.detail-block {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-block h3 {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 14px;
  text-transform: uppercase;
}

.detail-block p {
  margin: 0;
  color: #303030;
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .topbar {
    gap: 12px;
    min-height: 76px;
    padding-inline: 16px;
  }

  .brand-mark {
    width: 48px;
  }

  .topbar-actions {
    right: 16px;
  }

  .brand-wordmark {
    display: none;
  }

  .page-shell {
    max-width: 360px;
    margin-left: 0;
    margin-right: 0;
    padding-inline: 20px;
    padding-top: 22px;
  }

  h1 {
    font-size: 44px;
  }

  .hero-band,
  .station-card,
  .access-form {
    grid-template-columns: 1fr;
  }

  .access-form {
    display: grid;
  }

  .access-code-input {
    max-width: none;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    margin-top: 4px;
  }

  .view-actions {
    display: grid;
    margin-top: 16px;
  }

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

  .calendar-weekday {
    display: none;
  }

  .hero-meta {
    justify-items: start;
  }

  .station-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .station-index {
    justify-content: start;
    min-height: auto;
    padding-left: 0;
    border-right: 0;
  }

  .station-card {
    display: block;
    padding: 18px;
  }

  .station-action {
    width: 100%;
    margin-top: 18px;
  }

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