/* Runtime branding overrides. The timetable layout and semantic status colours stay shared. */
.schedule-body,
.schedule-page {
  background: var(--brand-background);
  color: var(--brand-text);
}

.schedule-page {
  --brand-blue: var(--brand-accent);
  --brand-blue-text: var(--brand-accent-text);
}

.schedule-hero {
  background: transparent;
  border: 0;
}
.schedule-hero__inner { position: relative; min-height: 108px; justify-content: center; padding-block: 16px; }
.schedule-hero__inner::after {
  content: "";
  position: absolute;
  inset-inline: clamp(1rem, 3vw, 2.75rem);
  bottom: 0;
  border-bottom: 1px solid var(--brand-border);
}
.schedule-brand-card {
  width: auto;
  max-width: min(100%, 320px);
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--brand-text);
}
.schedule-brand-card__crest {
  display: block;
  width: auto;
  max-width: 100%;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 0 1 auto;
}

.schedule-action-button,
.schedule-select,
.schedule-icon-button,
.schedule-header,
.schedule-table-frame,
.departures-board-frame,
.schedule-error-card {
  background: var(--brand-surface);
  border-color: var(--brand-border);
  color: var(--brand-text);
}

.schedule-page .schedule-action-button { color: var(--brand-accent-text); }
.schedule-page .schedule-action-button:hover { background: var(--brand-background); }
.schedule-page .schedule-action-button:focus-visible,
.schedule-brand-card:focus-visible { outline: 3px solid var(--brand-accent-text); outline-offset: 4px; }
.schedule-page .schedule-board-title { color: var(--brand-text); }
.schedule-error-card__code { color: var(--brand-accent-text); }
.schedule-info { border-color: var(--brand-accent); background: var(--brand-surface); color: var(--brand-text); }
.schedule-info > i { color: var(--brand-accent-text); }
.schedule-page .schedule-table,
.schedule-page .departures-board {
  color: var(--brand-text);
  background: var(--brand-surface);
  border-collapse: separate;
  border-spacing: 0;
}
.schedule-page .schedule-table th,
.schedule-page .departures-board th { background: var(--brand-background); border-color: var(--brand-border); }
.schedule-page .schedule-table td,
.schedule-page .departures-board td { border-color: var(--brand-border); }
.schedule-page .departures-board { border-radius: calc(.65rem - 1px) calc(.65rem - 1px) 0 0; }
.schedule-page .departures-board thead tr:first-child th:first-child { border-top-left-radius: calc(.65rem - 1px); }
.schedule-page .departures-board thead tr:first-child th:last-child { border-top-right-radius: calc(.65rem - 1px); }
.schedule-page .departures-board tbody tr:last-child td { border-bottom: 0; }
.schedule-page .departures-board tbody tr.departures-board__row--next td:first-child {
  border-left: 0;
  box-shadow: inset 4px 0 var(--brand-accent);
}
/* The outer frame, its attached legend, cells and controls share one border colour. */
.schedule-page .departures-board-frame,
.schedule-page .departures-board-legend,
.schedule-page .schedule-table-frame,
.schedule-page .schedule-select,
.schedule-page .schedule-action-button,
.schedule-page .schedule-icon-button,
.schedule-page .schedule-error-card,
.schedule-page .schedule-info,
.schedule-page .schedule-header { border-color: var(--brand-border); }
.schedule-page .schedule-header { background: var(--brand-background); }
.schedule-page .schedule-footer { background: var(--brand-background); border-color: var(--brand-border); }
.schedule-page .schedule-footer__simple { color: var(--brand-muted); }

@media (max-width: 640px) {
  .schedule-hero__inner { min-height: 80px; padding-block: 12px; }
  .schedule-brand-card__crest { height: 56px; }
}

@media print {
  .schedule-body, .schedule-page { background: white; color: black; }
}
