.brand-logo-frame {
  display: block;
  width: 190px;
  height: 50px;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: 190px;
  height: auto;
}

.sidebar .brand-logo-frame {
  height: 64px;
}

body.sidebar-mini .brand-logo-frame {
  width: 42px;
}

@media (max-width: 991.98px) {
  .topbar .brand-logo-frame {
    width: 42px;
  }
}

/* MapRail content pages */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  margin: 0 0 .35rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.page-kicker {
  margin: 0 0 .35rem;
  color: var(--ny-primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.maprail-card {
  border: 1px solid var(--ny-border);
  border-radius: var(--ny-radius);
  background: var(--ny-card);
  box-shadow: var(--ny-shadow-sm);
  overflow: hidden;
}

.maprail-card .card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ny-border);
  background: transparent;
}

.maprail-card .card-body { padding: 1.35rem; }
.search-card { max-width: 1180px; }
.form-label { margin-bottom: .4rem; color: var(--ny-muted); font-size: .78rem; font-weight: 700; }

.board-toggle { display: inline-flex; gap: .4rem; }
.board-toggle .btn-check:checked + .btn-outline-primary {
  border-color: var(--ny-primary);
  background: var(--ny-primary);
  color: #fff;
  box-shadow: 0 5px 14px rgba(var(--ny-primary-rgb), .28);
}
.board-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.board-notice { padding: .75rem 1.25rem; border-bottom: 1px solid var(--ny-border); color: var(--ny-muted); font-size: .82rem; }
.train-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--ny-border); }
.table-responsive + .train-pagination { border-top: 1px solid var(--ny-border); border-bottom: 0; }
.section-title { font-size: 1rem; }

.maprail-table { color: var(--ny-body); --bs-table-bg: transparent; --bs-table-color: var(--ny-body); --bs-table-border-color: var(--ny-border); }
.maprail-table thead th {
  padding: .8rem 1rem;
  background: var(--ny-hover);
  color: var(--ny-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
.maprail-table tbody td { padding: .85rem 1rem; vertical-align: middle; }
.maprail-table tbody tr:last-child td { border-bottom: 0; }
.maprail-table tbody tr:hover { background: var(--ny-hover); }
.time-cell { font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.service-link { display: inline-flex; align-items: center; font-weight: 700; white-space: nowrap; }
.table-key { margin: .8rem .25rem 0; color: var(--ny-muted); font-size: .78rem; }
.cancelled-service td { color: var(--ny-muted); }
.cancelled-service .service-link { text-decoration: line-through; }

.result-list { display: grid; gap: .75rem; }
.result-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid var(--ny-border);
  border-radius: 12px;
  color: var(--ny-body);
  transition: border-color .15s, transform .15s, background .15s;
}
.result-item:hover { border-color: var(--ny-primary); background: var(--ny-hover); transform: translateY(-1px); color: var(--ny-body); }
.result-item small { display: block; margin-top: .2rem; color: var(--ny-muted); }
.result-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: rgba(var(--ny-primary-rgb), .12); color: var(--ny-primary); font-size: 1.2rem; flex: 0 0 auto; }
.empty-state { padding: 2.5rem 1rem !important; color: var(--ny-muted); text-align: center; }
.empty-state .empty-icon { display: block; margin-bottom: .5rem; color: var(--ny-primary); font-size: 2.5rem; }

.service-time { color: var(--ny-primary); }
.service-cancelled { display: flex; align-items: center; gap: .55rem; }
.service-cancelled i { font-size: 1.2rem; }
.service-meta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.service-meta > span { display: grid; grid-template-columns: auto auto; column-gap: .65rem; align-items: center; padding: .75rem 1rem; border: 1px solid var(--ny-border); border-radius: 12px; background: var(--ny-card); }
.service-meta i { grid-row: 1 / 3; color: var(--ny-primary); font-size: 1.25rem; }
.service-meta small { color: var(--ny-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.service-meta strong { font-size: .86rem; }
.planning-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.planning-grid > div { padding: .85rem; border-radius: 10px; background: var(--ny-hover); }
.planning-grid dt { margin-bottom: .25rem; color: var(--ny-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.planning-grid dd { margin: 0; font-weight: 700; }
.station-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.station-services-card { min-width: 0; }
.station-services-card .table { min-width: 760px; }
.station-disruption { display: flex; align-items: flex-start; gap: .75rem; border: 1px solid rgba(245,158,11,.35); background: rgba(245,158,11,.1); color: var(--ny-body); }
.station-disruption > i { color: var(--ny-warning); font-size: 1.4rem; line-height: 1.2; }
.service-alert-row td { padding-top: .65rem; padding-bottom: .65rem; background: rgba(245,158,11,.08); color: var(--ny-body); font-size: .8rem; }
.service-alert-row i { margin-right: .35rem; color: var(--ny-warning); }
.station-directory-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1.25rem; }
.station-directory-accordion { min-width: 0; }
.station-directory-accordion .accordion-item { overflow: hidden; border-color: var(--ny-border); }
.station-directory-accordion .accordion-button { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; }
.station-directory-accordion .accordion-button::after { margin-left: .25rem; }
.station-directory-accordion .accordion-body { padding: .5rem 1rem; }
.station-directory-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--ny-border); color: var(--ny-body); font-weight: 600; }
.station-directory-link:last-child { border-bottom: 0; }
.station-directory-link:hover { color: var(--ny-primary); }
.station-directory-link small { color: var(--ny-muted); font-family: 'JetBrains Mono', monospace; }
.disruption-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: 1rem; }
.disruption-summary-grid > div { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.25rem; border: 1px solid var(--ny-border); border-radius: 12px; background: var(--ny-card); color: var(--ny-muted); font-size: .82rem; font-weight: 700; }
.disruption-summary-count { color: var(--ny-primary); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.8rem; font-weight: 800; }
.disruption-list { padding: 0 1.25rem; }
.disruption-row { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--ny-border); }
.disruption-row:last-child { border-bottom: 0; }
.disruption-row h3 { margin: 0; font-size: 1rem; line-height: 1.5; }
.disruption-row h3 a { color: var(--ny-body); }
.disruption-row h3 a:hover { color: var(--ny-primary); }
.disruption-row-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 10px; font-size: 1.2rem; }
.disruption-row-icon.is-live { background: rgba(245,158,11,.14); color: var(--ny-warning); }
.disruption-row-icon.is-planned { background: rgba(91,61,240,.1); color: var(--ny-primary); }
.disruption-row-arrow { align-self: center; font-size: 1.4rem; }
.disruption-detail-heading h1 { max-width: 1100px; font-size: clamp(1.7rem, 3vw, 2.6rem); }
.disruption-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; gap: 1.25rem; }
.disruption-copy { line-height: 1.75; }
.disruption-copy h2, .disruption-copy h3, .disruption-copy h4 { margin-top: 1.6rem; margin-bottom: .65rem; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.05rem; }
.disruption-copy > :last-child { margin-bottom: 0; }
.disruption-facts > div { padding: .7rem 0; border-bottom: 1px solid var(--ny-border); }
.disruption-facts > div:last-child { border-bottom: 0; }
.disruption-facts dt { color: var(--ny-muted); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.disruption-facts dd { margin: .2rem 0 0; font-weight: 700; }
.cookie-notice[hidden] { display: none !important; }
.cookie-notice { position: fixed; z-index: 1090; right: 1.25rem; bottom: 1.25rem; left: calc(var(--ny-sidebar-w, 264px) + 1.25rem); display: flex; align-items: center; gap: 1rem; max-width: 980px; margin: 0 auto; padding: 1rem 1.15rem; border: 1px solid var(--ny-border); border-radius: 14px; background: var(--ny-card); box-shadow: 0 18px 50px rgba(15,23,42,.22); }
.cookie-notice-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: rgba(91,61,240,.1); color: var(--ny-primary); font-size: 1.35rem; }
.cookie-notice-copy { flex: 1; }
.cookie-notice-copy strong { display: block; margin-bottom: .2rem; font-family: 'Plus Jakarta Sans', sans-serif; }
.cookie-notice-copy p { margin: 0; color: var(--ny-muted); font-size: .82rem; line-height: 1.55; }
.cookie-notice-actions { display: flex; align-items: center; gap: 1rem; white-space: nowrap; }
.legal-copy .card-body { max-width: 1100px; padding: clamp(1.25rem, 3vw, 2.25rem); }
.legal-copy h2 { margin-top: 1.8rem; margin-bottom: .65rem; font-size: 1.1rem; }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p { line-height: 1.75; }
.cookie-table { min-width: 760px; }
.about-hero .card-body { max-width: 1050px; padding: clamp(1.4rem, 3vw, 2.4rem); font-size: 1.02rem; line-height: 1.8; }
.about-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.about-feature-grid .card-body { height: 100%; }
.about-feature-grid h2 { margin: .85rem 0 .55rem; font-size: 1.05rem; }
.about-feature-grid p { margin: 0; color: var(--ny-muted); line-height: 1.65; }
.about-feature-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: rgba(91,61,240,.1); color: var(--ny-primary); font-size: 1.35rem; }
.maprail-footer { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.maprail-footer-grid { display: grid; grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(130px, 1fr)); align-items: start; gap: 1.5rem 2rem; width: 100%; }
.maprail-footer-brand { display: flex; flex-direction: column; gap: .35rem; }
.maprail-footer-brand strong { font-size: 1.1rem; }
.maprail-footer-brand span { color: var(--ny-muted); font-size: .75rem; }
.maprail-footer nav { display: flex; flex-direction: column; gap: .45rem; }
.maprail-footer nav strong { color: var(--ny-heading); font-family: 'Plus Jakarta Sans', sans-serif; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.maprail-footer nav a { color: var(--ny-muted); font-size: .75rem; }
.maprail-footer nav a:hover { color: var(--ny-primary); }
.maprail-error-page { background: var(--ny-bg); background-image: var(--ny-bg-pattern); }
.maprail-error-logo { display: block; width: 190px; max-height: 72px; margin: 0 auto 1.5rem; }
.timetable-table th:not(:first-child), .timetable-table td:not(:first-child) { text-align: center; }
.location-cell { position: relative; min-width: 220px; padding-left: 2.4rem !important; font-weight: 650; }
.route-dot { position: absolute; left: 1rem; top: 50%; width: 10px; height: 10px; border: 2px solid var(--ny-primary); border-radius: 50%; background: var(--ny-card); transform: translateY(-50%); }
.route-dot-success { border-color: var(--ny-success); box-shadow: 0 0 0 3px rgba(var(--ny-success-rgb), .12); }
.route-dot-warning { border-color: var(--ny-warning); box-shadow: 0 0 0 3px rgba(var(--ny-warning-rgb), .14); }
.route-dot-danger { border-color: var(--ny-danger); box-shadow: 0 0 0 3px rgba(var(--ny-danger-rgb), .12); }
.delay-badge { min-width: 4.5rem; font-family: inherit; font-style: normal; }
.delay-badge em { font-style: normal; font-weight: 600; }

@media (max-width: 767.98px) {
  .page { padding: 1.15rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading > .btn { width: 100%; }
  .board-toolbar { align-items: stretch; flex-direction: column; }
  .board-toolbar form { width: 100%; }
  .board-toolbar form > div { flex: 1; }
  .result-item { flex-wrap: wrap; }
  .service-meta > span { flex: 1 1 180px; }
}
@media (max-width: 1199.98px) {
  .station-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 991.98px) {
  .station-directory-columns { grid-template-columns: 1fr; }
  .disruption-detail-grid { grid-template-columns: 1fr; }
  .cookie-notice { left: 1rem; right: 1rem; bottom: 1rem; }
}
@media (max-width: 575.98px) {
  .disruption-summary-grid { grid-template-columns: 1fr; }
  .disruption-row-icon { display: none; }
  .cookie-notice { align-items: flex-start; flex-wrap: wrap; }
  .cookie-notice-icon { display: none; }
  .cookie-notice-actions { justify-content: space-between; width: 100%; }
  .about-feature-grid { grid-template-columns: 1fr; }
  .maprail-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
