﻿@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

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

/* â”€â”€ Design tokens â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  /* Brand */
  --navy:       #0A0F2E;
  --tfl-blue:   #0019A8;
  --tfl-bright: #003FD4;

  /* Surfaces */
  --bg:         #ECEEF4;
  --surface:    #FFFFFF;
  --surface-2:  #F5F6FA;

  /* Text */
  --text:       #0A0F2E;
  --text-2:     #4A5568;
  --muted:      #8896AB;

  /* Semantic */
  --success:    #0A7A3E;
  --success-bg: #E6F4EE;
  --warn:       #915200;
  --warn-bg:    #FFF3E0;
  --danger:     #C41230;
  --danger-bg:  #FDEDEF;

  /* Structure */
  --border:     #D8DDE9;
  --radius:     10px;
  --radius-sm:  6px;

  /* TfL tube line colours â€” authentic */
  --line-bakerloo:            #894E24;
  --line-central:             #DC241F;
  --line-circle:              #FFD329;
  --line-district:            #007229;
  --line-hammersmith-city:    #F3A9BB;
  --line-jubilee:             #868F98;
  --line-metropolitan:        #9B0056;
  --line-northern:            #1C1C1C;
  --line-piccadilly:          #003688;
  --line-victoria:            #009FE0;
  --line-waterloo-city:       #95CDBA;
  --line-elizabeth-line:      #6950A1;
  --line-dlr:                 #00A4A7;
  --line-overground:          #EF7B10;
}

/* â”€â”€ Base â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
}

a { color: var(--tfl-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Page loading bar ────────────────────────────────────────────────────── */
#nav-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--tfl-bright);
  z-index: 9999;
  transition: width .2s ease;
  pointer-events: none;
}
#nav-progress.is-loading {
  animation: nav-progress-indeterminate 1.4s ease infinite;
}
@keyframes nav-progress-indeterminate {
  0%   { width: 0%;   left: 0;    }
  50%  { width: 60%;  left: 20%;  }
  100% { width: 0%;   left: 100%; }
}

/* ── Alert page skeleton ─────────────────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, #e8eaf0 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.alert-skeleton { padding: 1rem 0; }
.alert-skeleton__back  { height: 14px; width: 80px; margin-bottom: 1.5rem; }
.alert-skeleton__label { height: 11px; width: 140px; margin-bottom: .4rem; }
.alert-skeleton__title { height: 22px; width: 75%; margin-bottom: .2rem; }
.alert-skeleton__sub   { height: 13px; width: 100px; margin-bottom: 1.5rem; }
.alert-skeleton__banner {
  height: 72px; border-radius: var(--radius); margin-bottom: 1.25rem;
}
.alert-skeleton__card  {
  height: 130px; border-radius: var(--radius); margin-bottom: 1rem;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DESKTOP: Horizontal top navigation (â‰¥ 768px)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.topnav {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 1.5rem;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.topnav__brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.topnav__brand:hover { text-decoration: none; }

.topnav__badge {
  width: 32px;
  height: 32px;
  background: var(--tfl-blue);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -.02em;
}

.topnav__name {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.015em;
}

.topnav__links {
  display: flex;
  align-items: center;
  gap: .1rem;
  flex: 1;
  justify-content: center;
}

.topnav__link {
  padding: .45rem .95rem;
  border-radius: 6px;
  font-size: .855rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.topnav__link:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.07); text-decoration: none; }
.topnav__link.is-active { color: #fff; background: rgba(255,255,255,.1); font-weight: 600; }

.topnav__actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}

.topnav__cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .42rem 1rem;
  border-radius: 6px;
  background: var(--tfl-blue);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.topnav__cta:hover { background: var(--tfl-bright); text-decoration: none; color: #fff; }

.topnav__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  letter-spacing: .04em;
}
.topnav__avatar:hover { background: rgba(255,255,255,.17); border-color: rgba(255,255,255,.4); text-decoration: none; color: #fff; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PAGE BODY â€” below the top nav on desktop, full height on mobile
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.page-body {
  min-height: calc(100dvh - 60px);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MOBILE BAR â€” compact sticky top bar (< 768px)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.mobilebar { display: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DRAWER OVERLAY + PANEL
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 250;
  opacity: 0;
  transition: opacity .22s;
}
.drawer-overlay.is-visible { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 82vw);
  background: var(--navy);
  z-index: 300;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.drawer__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.7);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.drawer__close:hover { background: rgba(255,255,255,.13); color: #fff; }

.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .85rem .75rem;
}

.drawer__link {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .8rem .9rem;
  border-radius: 9px;
  font-size: .93rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.drawer__link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); text-decoration: none; }
.drawer__link.is-active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; border-left-color: #4F9CF9; }

.drawer__icon { width: 19px; height: 19px; flex-shrink: 0; opacity: .7; }
.drawer__link.is-active .drawer__icon, .drawer__link:hover .drawer__icon { opacity: 1; }

.drawer__spacer { flex: 1; }

.drawer__user {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.drawer__profile {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex: 1;
  padding: .5rem .5rem;
  border-radius: 9px;
  text-decoration: none;
  transition: background .15s;
  min-width: 0;
}
.drawer__profile:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.drawer__profile.is-active { background: rgba(255,255,255,.1); }

.drawer__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  letter-spacing: .04em;
}
.drawer__username {
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer__user-sub { font-size: .72rem; color: rgba(255,255,255,.35); }

.drawer__logout {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: rgba(255,255,255,.35);
  text-decoration: none;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.drawer__logout:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.75); text-decoration: none; }

/* Hamburger button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s;
}
.hamburger:hover { background: rgba(255,255,255,.08); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
}

.mobilebar__link {
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  padding: .38rem .65rem;
  border-radius: 6px;
  transition: all .15s;
}
.mobilebar__link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.mobilebar__link--primary { background: var(--tfl-blue); color: #fff; }
.mobilebar__link--primary:hover { background: var(--tfl-bright); }

@media (max-width: 767px) {
  .topnav { display: none; }
  .page-body { min-height: calc(100dvh - 56px); }

  .mobilebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 1rem;
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }

  .drawer-overlay { display: block; pointer-events: none; }
  .drawer-overlay.is-visible { pointer-events: all; }
}

/* â”€â”€ Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page { max-width: 560px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.page--wide { max-width: 720px; }

/* â”€â”€ Auth layout (two-panel on wide screens) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-shell {
  display: flex;
  min-height: calc(100dvh - 56px);
}

.auth-shell__panel {
  display: none;
  width: 340px;
  flex-shrink: 0;
  background: var(--navy);
  padding: 3rem 2.5rem;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .auth-shell__panel { display: flex; }
}

.auth-shell__panel-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: .75rem;
}

.auth-shell__panel-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
}

.auth-shell__lines {
  display: flex;
  gap: 5px;
  margin-top: 2.5rem;
}

.auth-shell__lines span {
  height: 4px;
  border-radius: 2px;
  flex: 1;
}

.auth-shell__form {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .85rem;
  color: var(--muted);
}
.auth-footer a { color: var(--tfl-blue); font-weight: 500; }

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tfl-blue);
  margin-bottom: 1.25rem;
}

/* â”€â”€ Route cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.route-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: .6rem;
  transition: border-color .15s;
}
.route-card:hover { border-color: var(--tfl-blue); }

.route-card__lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.line-pill {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--border);
}

/* Authentic TfL line colours applied via class */
.line-pill.bakerloo         { background: var(--line-bakerloo); }
.line-pill.central          { background: var(--line-central); }
.line-pill.circle           { background: var(--line-circle); }
.line-pill.district         { background: var(--line-district); }
.line-pill.hammersmith-city { background: var(--line-hammersmith-city); }
.line-pill.jubilee          { background: var(--line-jubilee); }
.line-pill.metropolitan     { background: var(--line-metropolitan); }
.line-pill.northern         { background: var(--line-northern); }
.line-pill.piccadilly       { background: var(--line-piccadilly); }
.line-pill.victoria         { background: var(--line-victoria); }
.line-pill.waterloo-city    { background: var(--line-waterloo-city); }
.line-pill.elizabeth-line   { background: var(--line-elizabeth-line); }
.line-pill.dlr              { background: var(--line-dlr); }
.line-pill.overground       { background: var(--line-overground); }

.route-card__body { flex: 1; min-width: 0; }

.route-card__route {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-card__route span {
  color: var(--muted);
  font-weight: 400;
  margin: 0 .3rem;
}

.route-card__time {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
  letter-spacing: .02em;
}

/* â”€â”€ Route card wrapper (card + actions) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.route-card-wrap {
  margin-bottom: .6rem;
}

.route-card-wrap .route-card {
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
  border-bottom: none;
}

.route-actions {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 1px solid var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.route-action {
  flex: 1;
  padding: .45rem .5rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  transition: background .12s, color .12s;
  border-right: 1px solid var(--border);
}
.route-action:last-child { border-right: none; }
.route-action:hover { background: var(--surface); color: var(--tfl-blue); text-decoration: none; }
.route-action--danger { color: var(--danger); }
.route-action--danger:hover { background: var(--danger-bg); color: var(--danger); }

/* â”€â”€ Forms â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  margin-bottom: .4rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--tfl-blue);
  box-shadow: 0 0 0 3px rgba(0,25,168,.12);
}

.field-error {
  color: var(--danger);
  font-size: .8rem;
  margin-top: .3rem;
}
.login-attempts-warning {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .8rem;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: .4rem .6rem;
  margin-top: .5rem;
}

.form-hint {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .3rem;
}

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, transform .1s;
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--tfl-blue); color: #fff; width: 100%; }
.btn--primary:hover { background: var(--tfl-bright); text-decoration: none; color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--border);
  font-size: .85rem;
  padding: .4rem .8rem;
  width: auto;
}
.btn--ghost:hover { border-color: var(--danger); background: var(--danger-bg); text-decoration: none; }

.btn--sm { padding: .4rem .8rem; font-size: .85rem; width: auto; }

/* â”€â”€ Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .55rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.badge--active   { background: var(--success-bg); color: var(--success); }
.badge--inactive { background: var(--surface-2);  color: var(--muted); }

/* â”€â”€ Flash messages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.flash-wrap { padding: .75rem 1.25rem 0; max-width: 520px; margin: 0 auto; }
.flash {
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: .5rem;
}
.flash--success { background: var(--success-bg); color: var(--success); }
.flash--danger  { background: var(--danger-bg);  color: var(--danger); }
.flash--info    { background: #DBEAFE; color: #1D4ED8; }

/* â”€â”€ Autocomplete â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.autocomplete-wrapper { position: relative; }

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--tfl-blue);
  border-radius: var(--radius-sm);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,25,168,.1);
}

.autocomplete-item {
  padding: .6rem .85rem;
  font-size: .9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-2);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--surface-2); color: var(--tfl-blue); }

/* â”€â”€ Section headers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

/* â”€â”€ Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-state__icon {
  width: 52px;
  height: 52px;
  background: var(--surface-2);
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
}

.empty-state__icon svg { width: 24px; height: 24px; color: var(--muted); }
.empty-state__title { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: .4rem; }
.empty-state__sub { font-size: .875rem; color: var(--muted); margin-bottom: 1.25rem; }

/* â”€â”€ Dividers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* Ensure [hidden] always wins regardless of display overrides in component CSS */
[hidden] { display: none !important; }

/* â”€â”€ Notification permission banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.notification-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface);
  border: 1.5px solid var(--tfl-blue);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}

.notification-banner__icon {
  flex-shrink: 0;
  color: var(--tfl-blue);
  display: flex;
  align-items: center;
}

.notification-banner__text {
  flex: 1;
  font-size: .875rem;
  line-height: 1.35;
}

.notification-banner__text strong {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.notification-banner__text span {
  color: var(--text-2);
  font-size: .8rem;
}

/* â”€â”€ Line selector (route form) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.line-selector {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.line-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
  user-select: none;
}

.line-chip:hover {
  border-color: var(--chip-color, var(--tfl-blue));
  color: var(--text);
}

.line-chip.is-selected {
  border-color: var(--chip-color, var(--tfl-blue));
  border-width: 2px;
  color: var(--text);
  background: var(--surface-2);
}

.line-chip__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* â”€â”€ Alert detail page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.alert-banner {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
}

.alert-banner--warn    { background: var(--warn-bg);    border-color: var(--warn); }
.alert-banner--success { background: var(--success-bg); border-color: var(--success); }
.alert-banner--fallback{ background: var(--surface-2);  border-color: var(--border); }
.alert-banner--info    { background: #eef2ff;            border-color: #6366f1; }

.alert-banner__icon { flex-shrink: 0; margin-top: .1rem; }
.alert-banner--warn    .alert-banner__icon { color: var(--warn); }
.alert-banner--success .alert-banner__icon { color: var(--success); }
.alert-banner--fallback .alert-banner__icon { color: var(--muted); }
.alert-banner--info    .alert-banner__icon { color: #4f46e5; }

.alert-banner__kind {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .3rem;
}
.alert-banner--warn    .alert-banner__kind { color: var(--warn); }
.alert-banner--success .alert-banner__kind { color: var(--success); }
.alert-banner--fallback .alert-banner__kind { color: var(--muted); }
.alert-banner--info    .alert-banner__kind { color: #4338ca; }

/* "Your usual route" card for minor-delay alerts — softer than detour cards
   so the user sees it as informational, not an urgent suggestion. */
.alt-card--usual { background: #eef2ff; border-color: #c7d2fe; }

.alert-banner__desc { font-size: .9rem; color: var(--text); line-height: 1.5; }

.alt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.alt-card__label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--tfl-blue);
  margin-bottom: .5rem;
}

.alt-card__summary {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: .6rem;
}

.alt-card__meta {
  display: flex;
  gap: .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}

/* â”€â”€ Notification history â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.history-date-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .4rem;
}

.history-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .4rem;
  text-decoration: none;
  transition: border-color .12s;
}
.history-row:hover { border-color: var(--tfl-blue); text-decoration: none; }
.history-row--unread { border-left: 3px solid var(--tfl-blue); }

.history-row__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.history-row__icon--warn    { background: var(--warn-bg);    color: var(--warn); }
.history-row__icon--ok      { background: var(--success-bg); color: var(--success); }
.history-row__icon--planned { background: #ede9fe;           color: #7c3aed; }
.history-row__icon--info    { background: var(--surface-2);  color: var(--muted); }

.history-row__body  { flex: 1; min-width: 0; }
.history-row__route {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-row__route span { color: var(--muted); font-weight: 400; margin: 0 .25rem; }
.history-row__desc  { font-size: .78rem; color: var(--muted); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.history-row__right { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex-shrink: 0; }
.history-row__time  { font-size: .75rem; color: var(--muted); font-family: 'Space Mono', monospace; }
.history-row__dot   { width: 8px; height: 8px; border-radius: 50%; background: var(--tfl-blue); }

/* â”€â”€ Welcome / Landing page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.welcome {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.welcome__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}

.welcome__eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--tfl-blue);
  margin-bottom: .75rem;
}

.welcome__headline {
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.1rem;
}

.welcome__sub {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 400px;
  margin-bottom: 2rem;
}

.welcome__cta-group {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.welcome__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.welcome__cta--primary {
  background: var(--navy);
  color: #fff;
}
.welcome__cta--primary:hover { background: var(--tfl-blue); text-decoration: none; color: #fff; }
.welcome__cta--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.welcome__cta--ghost:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }

/* Mock UI graphic */
.welcome__hero-graphic {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(10,15,46,.07);
}

.welcome__lines-display { display: flex; flex-direction: column; gap: .5rem; position: relative; }

.welcome__line-stripe {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .65rem;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: .82rem;
}
.welcome__line-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.welcome__line-name { font-weight: 600; color: var(--text); flex: 1; }
.welcome__line-status { font-size: .72rem; font-weight: 500; }
.welcome__line-status--ok { color: var(--success); }
.welcome__line-status--warn { color: var(--warn); }

.welcome__alert-bubble {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .75rem;
  margin-top: .25rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  border-radius: 8px;
}
.welcome__alert-icon {
  width: 30px; height: 30px;
  background: var(--warn);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.welcome__alert-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--warn);
}
.welcome__alert-sub {
  font-size: .72rem;
  color: var(--text-2);
  margin-top: .05rem;
}

/* How it works */
.welcome__steps {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}
.welcome__steps-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
  margin-bottom: 2rem;
}
.welcome__steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.welcome__step { }
.welcome__step-num {
  font-family: 'Space Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--tfl-blue);
  opacity: .25;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
  line-height: 1;
}
.welcome__step-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}
.welcome__step-body {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* Footer CTA */
.welcome__footer-cta {
  padding: 3.5rem 0 0;
  text-align: center;
}
.welcome__footer-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

/* Welcome responsive */
@media (max-width: 767px) {
  .welcome__hero { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0 2.5rem; }
  .welcome__hero-graphic { display: none; }
  .welcome__steps-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* â”€â”€ Profile page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.profile-hero__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  letter-spacing: -.02em;
}
.profile-hero__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}
.profile-hero__since {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .2rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem .5rem;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-cell__num {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: .3rem;
}
.stat-cell__num--on  { color: var(--success); }
.stat-cell__num--off { color: var(--muted); }
.stat-cell__label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  text-align: center;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.1rem;
}
.profile-card__label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.profile-card__sub {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .15rem;
  line-height: 1.4;
}
.profile-card__divider {
  height: 1px;
  background: var(--border);
  margin: 0 1.1rem;
}
.profile-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background .12s;
}
.profile-card__action:hover {
  background: var(--surface-2);
  color: var(--tfl-blue);
  text-decoration: none;
}

/* â”€â”€ Line status page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.status-grid {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
/* Static good-service card */
.status-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem 1rem .8rem 1.35rem;
  position: relative;
}

/* Expandable disrupted card — wraps <summary> + detail */
details.status-card { display: block; padding: 0; }
details.status-card > summary { list-style: none; }
details.status-card > summary::-webkit-details-marker { display: none; }

.status-card__summary {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem 1rem .8rem 1.35rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .12s;
  position: relative;
}
.status-card__summary:hover { background: var(--surface-2); }
details[open] > .status-card__summary { border-bottom: 1px solid var(--border); }

/* Line colour bar — works in both div and details versions */
.status-card__line-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: 4px 0 0 4px;
}

.status-card__name {
  flex: 1;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}

/* Chevron — rotates when details is open */
.status-card__chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .2s;
}
details[open] > .status-card__summary .status-card__chevron {
  transform: rotate(90deg);
}

/* Expanded detail panel */
.status-card__detail {
  padding: .75rem 1rem .85rem 1.35rem;
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.6;
  border-radius: 0 0 var(--radius) var(--radius);
}

.status-badge {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .055em;
  padding: .25rem .6rem;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.status-badge--good   { background: var(--success-bg); color: var(--success); }
.status-badge--minor  { background: #FFF9E6; color: #7A5C00; }
.status-badge--warn   { background: var(--warn-bg); color: var(--warn); }
.status-badge--severe { background: var(--danger-bg); color: var(--danger); }

.status-legend {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.status-error {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.1rem;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: .875rem;
}

/* â”€â”€ Contact page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.55;
  -webkit-appearance: none;
}
.form-group textarea:focus {
  outline: none;
  border-color: var(--tfl-blue);
  box-shadow: 0 0 0 3px rgba(0,25,168,.12);
}

.contact-success {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--success-bg);
  border: 1.5px solid var(--success);
  border-radius: var(--radius);
}
.contact-success__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-success__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: .3rem;
}
.contact-success__sub { font-size: .875rem; color: var(--text-2); }

/* â”€â”€ Home hint â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.home-hint {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.5;
  padding: .6rem .75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.home-hint svg { flex-shrink: 0; margin-top: .05rem; }

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (min-width: 520px) {
  .page { padding: 2rem 1.5rem 3rem; }
}

/* ── Admin page ────────────────────────────────────────────────────────────── */
.admin-page { padding: 1.5rem 1rem 3rem; max-width: 1100px; margin: 0 auto; }
.admin-header { margin-bottom: 1.5rem; }
.admin-title { font-size: 1.5rem; font-weight: 700; color: var(--text-1); margin: 0 0 .25rem; }
.admin-sub { font-size: .875rem; color: var(--text-2); margin: 0; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: .8rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }

.admin-section { margin-bottom: 2rem; }
.admin-section-title { font-size: 1rem; font-weight: 600; color: var(--text-1); margin: 0 0 .75rem; }

.broadcast-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.broadcast-input {
  flex: 1;
  min-width: 200px;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: .9rem;
}
.broadcast-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.admin-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.admin-table th {
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 600;
  text-align: left;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: .65rem .9rem;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.admin-td--username { font-weight: 600; }

.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.5;
}
.badge--green { background: #d1fae5; color: #065f46; }
.badge--blue  { background: #dbeafe; color: #1e40af; }
.badge--grey  { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

@media (max-width: 520px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card:last-child { grid-column: span 2; }
}

/* ── Route card next check ─────────────────────────────────────────────────── */
.route-card__next-check {
  display: flex;
  align-items: center;
  gap: .2rem;
  font-size: .68rem;
  color: var(--accent);
  font-weight: 500;
}
.route-card__next-check--done {
  color: var(--muted);
  font-weight: 400;
}

/* ── PWA install banner ─────────────────────────────────────────────────────── */
.pwa-install-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin: 0 0 1rem;
  font-size: .85rem;
  color: var(--text-1);
  flex-wrap: wrap;
}
.pwa-install-banner svg { flex-shrink: 0; color: var(--accent); }
.pwa-install-banner span { flex: 1; min-width: 160px; }
.pwa-install-banner__dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  padding: 0 .25rem;
  line-height: 1;
}

/* ── Danger zone ────────────────────────────────────────────────────────────── */
.danger-zone {
  margin-top: 2.5rem;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: #fff5f5;
}
.danger-zone__title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--danger);
  margin: 0 0 .2rem;
}
.danger-zone__sub {
  font-size: .8rem;
  color: var(--text-2);
  margin: 0 0 .9rem;
}
.btn--danger {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.btn--danger:hover { opacity: .88; }

/* ── Profile password toggle ────────────────────────────────────────────────── */
.profile-card__action--btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .9rem;
  color: var(--text-1);
  transition: background .12s;
}
.profile-card__action--btn:hover { background: var(--surface-2); }

.pw-toggle-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.pw-change-section {
  padding: .25rem .9rem 1rem;
  border-top: 1px solid var(--border);
}
.pw-change-section .form-group:first-child { margin-top: .5rem; }

/* ── Bus alternative card ───────────────────────────────────────────────────── */
.alt-card--bus { border-color: #fbbf24; background: #fffbeb; }

.alt-card__label--bus { color: #92400e; }

.alt-card__source-note {
  font-size: .72rem;
  color: #92400e;
  margin-bottom: .5rem;
  font-style: italic;
}

.alt-card__bus-legs {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: .6rem;
}

.bus-leg {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.bus-leg__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: .15rem .4rem;
  background: #1d4ed8;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 4px;
  flex-shrink: 0;
}

.bus-leg__detail {
  font-size: .82rem;
  color: var(--text-2);
}

/* ── Admin section header (title + info icon row) ───────────────────────────── */
.admin-section-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
}
.admin-section-sub {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .75rem;
}

/* ── Info tooltip ────────────────────────────────────────────────────────────── */
.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  font-style: normal;
}
.info-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.55;
  padding: .65rem .85rem;
  border-radius: 6px;
  white-space: normal;
  width: 300px;
  max-width: 90vw;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.info-tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 200;
}
.info-tooltip:hover::after,
.info-tooltip:hover::before,
.info-tooltip:focus::after,
.info-tooltip:focus::before { opacity: 1; }

/* ── Warn button (amber — for simulate action) ──────────────────────────────── */
.btn--warn {
  background: #d97706;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem 1.1rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn--warn:hover { background: #b45309; }

/* ── Location mode tabs (station / address) ─────────────────────────────────── */
.loc-mode-tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: .5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .2rem;
  width: fit-content;
}

.loc-tab {
  font-size: .78rem;
  font-weight: 500;
  padding: .25rem .65rem;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.loc-tab.is-active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ── Step-by-step journey legs ───────────────────────────────────────────────── */
.journey-legs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: .75rem 0 .5rem;
}

.journey-leg {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.journey-leg:last-child { border-bottom: none; }

.journey-leg__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .1rem;
}
.journey-leg__icon--walk { background: var(--surface-2); color: var(--muted); }
.journey-leg__icon--bus  { background: #fef3c7; color: #92400e; }
.journey-leg__icon--rail { background: #eff6ff; color: var(--tfl-blue); }

.journey-leg__body { flex: 1; min-width: 0; }

.journey-leg__main {
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.journey-leg__sub {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .1rem;
}

.bus-badge {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 4px;
  margin-right: .3rem;
  vertical-align: middle;
  letter-spacing: .02em;
}

/* ── Live arrivals widget ────────────────────────────────────────────────────── */
.arrivals-widget {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  margin-top: .4rem;
  font-size: .82rem;
}

.arrivals-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .35rem;
  font-weight: 600;
  color: var(--navy);
  font-size: .78rem;
}

.arrivals-widget__times {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.arrival-chip {
  background: var(--navy);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 20px;
  white-space: nowrap;
}
.arrival-chip--due   { background: var(--danger); }
.arrival-chip--other { background: var(--muted); font-weight: 500; }

.arrivals-refresh-btn {
  font-size: .72rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.arrivals-refresh-btn:hover { color: var(--tfl-blue); }

/* ── Door-to-door alternative card ─────────────────────────────────────────── */
.alt-card--door-to-door {
  border-color: #818cf8;
  background: #eef2ff;
}
.alt-card__label--door-to-door { color: #3730a3; }
.alt-card__source-note--door-to-door {
  font-size: .72rem;
  color: #3730a3;
  margin-bottom: .6rem;
}

/* ── Location button on alert page ─────────────────────────────────────────── */
.from-location-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--tfl-blue);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .4rem .75rem;
  cursor: pointer;
  margin-top: .75rem;
}
.from-location-btn:hover { background: var(--surface-2); }
