/* ui.css: the look of everything built by core/ui.js and core/kit.js: the app's own components (Material 3, as Jetpack Compose draws them in
   City Heartbeat 2.5.1). Numbers are the phone's (parity/specs/design.md), 1 dp = 1 px. Feature screens get this for free; add to it only
   in your own css/<feature>.css with your own class names. */

/* ------------------------------------------------------------------ press and hover feedback (Material ripple, no scale) */
.row--action,
.card--link,
.today-row,
.icon-btn,
.quick-action,
.photo-tile,
.plain-tile,
.hero-tile,
.stop-row__open,
.text-action,
.tabs__tab {
  -webkit-tap-highlight-color: transparent;
}
.row--action:hover,
a.card--link:hover,
button.card--link:hover,
.today-row:is(a, button):hover,
.stop-row__open:hover {
  background-color: rgba(24, 28, 30, 0.04);
}
.row--action:active,
a.card--link:active,
button.card--link:active,
.today-row:is(a, button):active,
.stop-row__open:active {
  background-color: rgba(24, 28, 30, 0.1);
}

/* ------------------------------------------------------------------ cards (ChCard: white, 16 radius, 1 px hairline, no shadow) */
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.card > * + * {
  margin-top: 10px;
}
button.card--button {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.card--link {
  cursor: pointer;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section__head,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}
.section__head h2,
.section-header h2 {
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
}
.section__action {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.section-label {
  padding: 4px 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.screen-title {
  font-size: 26px;
  line-height: 34px;
  font-weight: 600;
}
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 20px;
  color: var(--primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.text-action:hover {
  background: rgba(0, 32, 69, 0.06);
}
.text-action--danger {
  color: var(--error);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.page-head__sub {
  color: var(--on-surface-variant);
  margin-top: 4px;
}
.page-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* The shell's top bar already shows the screen's name, so the old in-page heading stays for screen readers only. */
body[data-bar='on'] .page-head__text > h1 {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body[data-bar='on'] .page-head:not(:has(.page-head__sub, .page-head__actions)) {
  display: none;
}

/* ------------------------------------------------------------------ lists and rows */
.list {
  list-style: none;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}
.list .row:focus-visible {
  outline-offset: -3px;
}
.list > li + li {
  border-top: 1px solid var(--hairline);
}
/* No card around it: rows sit on the page with the app's inset 0.5 px dividers (Me emergency list). */
.list--plain {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.list--plain > li + li {
  border-top: 0;
  position: relative;
}
.list--plain > li + li::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 70px;
  border-top: 0.5px solid rgba(196, 198, 207, 0.5);
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 14px 16px;
  width: 100%;
  text-align: left;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: default;
}
.row--action {
  cursor: pointer;
}
.row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.row__title {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.row__sub {
  color: var(--on-surface-variant);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.row__meta {
  color: var(--on-surface-variant);
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.row__go {
  color: var(--outline);
  display: grid;
  flex: none;
}
.row--urgent .row__title {
  font-weight: 700;
}

.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--tile, 40px);
  height: var(--tile, 40px);
  border-radius: var(--tile-r, 10px);
  background: var(--tile-fill, var(--sc-high));
  color: var(--tile-ink, var(--primary));
}
.icon-tile--tint {
  box-shadow: inset 0 0 0 1px var(--tile-border, transparent);
}

.today-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
}
.today-row:is(a, button) {
  cursor: pointer;
}
.today-row__icon {
  display: grid;
  flex: none;
  color: var(--primary);
}
.today-row__text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.today-row__go {
  display: grid;
  flex: none;
  color: var(--outline);
}
.today-row + .today-row {
  border-top: 1px solid var(--hairline);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--on-surface);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.quick-action__tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--sc-high);
  color: var(--primary);
}
.quick-action:active .quick-action__tile {
  background: var(--sc-highest);
}
.quick-action__label {
  text-align: center;
}

/* Photo tile (Services / Home "For You"), plain Services tile, tall hero tile */
.photo-tile,
.plain-tile,
.hero-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  font: inherit;
}
.photo-tile {
  height: var(--tile-h, 120px);
  border-radius: 16px;
  background: #2a2f36;
}
.photo-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.photo-tile__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.06) 30%, rgba(0, 0, 0, 0.42) 58%, rgba(0, 0, 0, 0.74) 80%, rgba(0, 0, 0, 0.92) 100%);
}
.photo-tile__text {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
}
.photo-tile__title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}
.photo-tile__sub {
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.85);
}
.tile-live {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 5px;
  border-radius: 6px;
  background: #ff3e3e;
  color: #fff;
  font-size: 9px;
  line-height: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}
.plain-tile {
  height: 120px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-variant);
  color: var(--on-surface);
}
.plain-tile__disc {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.plain-tile__text {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  display: flex;
  flex-direction: column;
}
.plain-tile__title {
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
}
.plain-tile__sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--on-surface-variant);
}
.hero-tile {
  min-height: 110px;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--hero-from, #0f3d2e), var(--hero-to, #2e7d32));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}
.hero-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.hero-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1));
}
.hero-tile > :not(.hero-tile__img, .hero-tile__shade) {
  position: relative;
}
.hero-tile__text {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.hero-tile__title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.hero-tile__sub {
  font-size: 13px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.stop-row {
  display: flex;
  align-items: center;
  border-radius: 14px;
  background: var(--m-surface);
  overflow: hidden;
}
.stop-row__open {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.stop-row__text {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.stop-row__name {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}
.stop-row__code {
  font-size: 11px;
  line-height: 16px;
  color: var(--on-surface-variant);
}
.stop-row__dist {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.star-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-surface-variant);
  cursor: pointer;
}
.star-btn--on {
  color: var(--gold);
}

.route-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 900;
  box-shadow: 0 0 0 2px #fff;
}
.route-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

/* Navy hero card ("Stay Connected"), link notice */
.navy-hero {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
}
.navy-hero__disc {
  position: absolute;
  top: -8px;
  right: 8px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.navy-hero__title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
}
.navy-hero__icon {
  display: grid;
}
.navy-hero__body {
  position: relative;
  margin-top: 8px;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.85);
}
.link-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 12px 14px;
  border-radius: 14px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.link-notice__text {
  flex: 1;
  font-size: 15px;
  line-height: 20px;
}
.link-notice .text-action {
  color: var(--on-secondary-container);
}

/* ------------------------------------------------------------------ small pieces */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
  background: var(--sc-high);
  color: var(--on-surface);
}
.badge--info {
  background: var(--info-bg);
  color: var(--info);
}
.badge--good {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.badge--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge--bad {
  background: var(--error-container);
  color: var(--on-error-container);
}
.badge--live {
  background: rgba(31, 169, 113, 0.16);
  color: var(--live);
}
.badge--live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
}
.badge--demo {
  background: #ffb300;
  color: #6b3f00;
}
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill);
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.pill-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pill);
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 10px;
  line-height: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tag--outline {
  background: transparent;
  color: var(--tag);
  box-shadow: inset 0 0 0 1px var(--tag);
}

/* The Material FilterChip: 32 high, 8 radius, 1 px outline; selected = the green pill with a check. The finger target is 48 high. */
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--on-surface-variant);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: default;
}
button.chip,
a.chip {
  cursor: pointer;
}
button.chip::after,
a.chip::after {
  content: '';
  position: absolute;
  inset: -8px -2px;
}
.chip--on,
.chip[aria-pressed='true'] {
  background: var(--secondary-container);
  border-color: transparent;
  color: var(--on-secondary-container);
  padding-left: 8px;
}
button.chip:hover,
a.chip:hover {
  background-color: rgba(24, 28, 30, 0.05);
}
.chip--on:hover,
.chip[aria-pressed='true']:hover {
  background-color: var(--secondary-container);
  filter: brightness(0.97);
}
.chip--suggestion {
  height: 48px;
  padding: 0 16px;
  color: var(--on-surface-variant);
  font-size: 15px;
}
.chip--suggestion::after {
  inset: 0 !important;
}
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  margin-inline: -16px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar {
  display: none;
}

.stat {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 14px 16px;
}
.stat__value {
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-weight: 600;
  font-size: 14px;
  margin-top: 4px;
}
.stat__hint {
  color: var(--on-surface-variant);
  font-size: 12px;
  margin-top: 2px;
}

.kv {
  margin: 0;
  display: grid;
  gap: 0;
}
.kv__row {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
}
.kv__row:first-child {
  border-top: 0;
}
.kv dt {
  color: var(--on-surface-variant);
  font-size: 14px;
}
.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.link {
  color: var(--primary);
  font-weight: 600;
  text-underline-offset: 2px;
}
.link .icon {
  vertical-align: -2px;
  margin-left: 3px;
}
.icon {
  flex: none;
  vertical-align: middle;
}

/* Icon buttons, floating buttons */
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--btn, 48px);
  height: var(--btn, 48px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.icon-btn:hover {
  background: rgba(24, 28, 30, 0.06);
}
.icon-btn:active {
  background: rgba(24, 28, 30, 0.12);
}
.badge-count {
  position: absolute;
  top: 6px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--error);
  color: var(--on-error);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  text-align: center;
}
.fab {
  border-radius: 12px;
  background: var(--m-surface);
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.fab:hover {
  background: var(--sc-low);
}
.fab-ext {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn--icon {
  padding-left: 16px;
}
.btn:hover {
  filter: brightness(1.15);
}
.btn[disabled] {
  background: rgba(24, 28, 30, 0.12);
  color: rgba(24, 28, 30, 0.38);
  border-color: transparent;
  cursor: not-allowed;
  filter: none;
}
.btn--outlined {
  background: transparent;
  border-color: var(--outline);
  color: var(--primary);
}
.btn--outlined:hover {
  background: rgba(0, 32, 69, 0.06);
  filter: none;
}
.btn--outlined[disabled] {
  background: transparent;
  border-color: rgba(24, 28, 30, 0.12);
}
.btn--quiet,
.btn--text {
  background: transparent;
  color: var(--primary);
  padding: 0 12px;
}
.btn--quiet:hover,
.btn--text:hover {
  background: rgba(0, 32, 69, 0.06);
  filter: none;
}
.btn--tonal {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.btn--green {
  background: #2e7d32;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.btn--full {
  display: flex;
  width: 100%;
}
.btn--big {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 16px;
  line-height: 24px;
}
.btn--big.btn--icon {
  padding-left: 20px;
}

/* ------------------------------------------------------------------ inputs */
.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--outline);
  border-radius: 16px;
  background: var(--surface-variant);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.switch__thumb {
  position: absolute;
  top: 50%;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  transform: translateY(-50%);
  transition: left 0.15s, width 0.15s, height 0.15s;
}
.switch[aria-checked='true'] {
  border-color: var(--secondary);
  background: var(--secondary);
}
.switch[aria-checked='true'] .switch__thumb {
  left: 22px;
  width: 24px;
  height: 24px;
  box-shadow: none;
}
.switch:active .switch__thumb {
  width: 28px;
  height: 28px;
}
.switch[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
}

.toggle-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(116, 119, 127, 0.4);
  border-radius: 16px;
  background: var(--m-surface);
  cursor: pointer;
}
.toggle-card--on {
  border-color: var(--secondary);
}
.toggle-card--disabled {
  cursor: default;
}
.toggle-card__text {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.toggle-card__title {
  font-size: 15px;
  line-height: 26px;
  font-weight: 600;
}
.toggle-card__sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--on-surface-variant);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  cursor: pointer;
}
.check__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.check__box {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--on-surface-variant);
  border-radius: 2px;
  color: transparent;
}
.check__input:checked + .check__box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.check__input:focus-visible + .check__box {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.check--radio .check__box {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
}
.check--radio .check__input:checked + .check__box {
  background: transparent;
  border-color: var(--primary);
}
.check--radio .check__input:checked + .check__box::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
input[type='checkbox']:not([role='switch']):not(.check__input) {
  width: 24px;
  height: 24px;
  flex: none;
  accent-color: var(--primary);
}

.slider {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slider__head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.slider__value {
  color: var(--primary);
}
.slider__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --pct: 0%;
}
.slider__input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--primary) var(--pct), var(--sc-highest) var(--pct));
}
.slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
}
.slider__input::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--sc-highest);
}
.slider__input::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--primary);
}
.slider__input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--outline);
  border-radius: 999px;
  overflow: hidden;
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.segmented button + button {
  border-left: 1px solid var(--outline);
}
.segmented button[aria-pressed='true'] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

/* Outlined text field with a floating label (OutlinedTextField: 56 high, 4 radius, 2 px primary when focused) */
.ofield {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ofield__box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid var(--outline);
  border-radius: var(--field-r, 4px);
  background: transparent;
}
.ofield__box:hover {
  border-color: var(--on-surface);
}
.ofield__box:focus-within {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.ofield__input {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  line-height: 24px;
  color: var(--on-surface);
  border-radius: inherit;
}
textarea.ofield__input {
  height: auto;
  min-height: 54px;
  padding-top: 14px;
  padding-bottom: 14px;
  resize: vertical;
}
.ofield__input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0;
}
.ofield__input:focus::placeholder {
  opacity: 1;
}
.ofield__label {
  position: absolute;
  left: 16px;
  top: 50%;
  max-width: calc(100% - 32px);
  padding: 0 4px;
  margin-left: -4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--background);
  color: var(--on-surface-variant);
  font-size: 16px;
  line-height: 24px;
  pointer-events: none;
  transform: translateY(-50%);
  transition: top 0.12s, font-size 0.12s, line-height 0.12s;
}
.ofield__input:focus ~ .ofield__label,
.ofield__input:not(:placeholder-shown) ~ .ofield__label,
.ofield--select .ofield__label {
  top: 0;
  font-size: 12px;
  line-height: 16px;
}
.ofield__input:focus ~ .ofield__label {
  color: var(--primary);
}
.ofield--lead .ofield__label {
  left: 52px;
}
.ofield--lead .ofield__input:focus ~ .ofield__label,
.ofield--lead .ofield__input:not(:placeholder-shown) ~ .ofield__label {
  left: 16px;
}
.ofield__lead {
  display: grid;
  flex: none;
  margin-left: 16px;
  color: var(--on-surface-variant);
}
.ofield--lead .ofield__input {
  padding-left: 12px;
}
.ofield__trail {
  display: grid;
  flex: none;
  margin-right: 4px;
  color: var(--on-surface-variant);
}
.ofield--empty .ofield__trail {
  visibility: hidden;
}
.ofield__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
}
.ofield--select .ofield__trail {
  position: absolute;
  right: 8px;
  pointer-events: none;
}
.ofield__helper {
  padding: 0 16px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.4px;
  color: var(--on-surface-variant);
}
.ofield--error .ofield__box {
  border-color: var(--error);
}
.ofield--error .ofield__helper,
.ofield--error .ofield__label {
  color: var(--error);
}
/* The filled pill search field some lists use (kept for the old class names) */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field__label {
  font-weight: 600;
  font-size: 14px;
}
.field__input {
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: transparent;
  width: 100%;
}
.field__input::placeholder {
  color: var(--on-surface-variant);
  opacity: 1;
}

/* ------------------------------------------------------------------ states: loading, empty, error, stale */
.loading {
  padding: 8px 0;
}
.loading--screen {
  display: grid;
  place-items: center;
  padding: 72px 0;
}
.inline-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--on-surface-variant);
  font-size: 13px;
}
.spinner {
  display: inline-grid;
  flex: none;
  color: var(--primary);
}
.spinner svg {
  animation: spin 1.4s linear infinite;
}
.spinner circle {
  stroke-dasharray: 8 92;
  animation: dash 1.4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes dash {
  0% {
    stroke-dasharray: 4 96;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 62 38;
    stroke-dashoffset: -16;
  }
  100% {
    stroke-dasharray: 4 96;
    stroke-dashoffset: -98;
  }
}
.linear {
  display: block;
  position: relative;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--sc-highest);
}
.linear__bar {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}
.linear--indeterminate .linear__bar {
  width: 40%;
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide {
  from {
    margin-left: -40%;
  }
  to {
    margin-left: 100%;
  }
}

.empty {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--outline-variant);
  border-radius: 16px;
  color: var(--on-surface-variant);
  font-size: 14px;
  line-height: 20px;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
}
.empty-state__disc {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--sc-high);
  color: var(--on-surface-variant);
}
.empty-state h2 {
  font-size: 24px;
  line-height: 32px;
}
.empty-state p {
  max-width: 320px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface-variant);
}
.error-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--card);
}
.error-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--error);
  font-size: 16px;
  line-height: 24px;
}
.error-card p {
  font-size: 13px;
  line-height: 18px;
  color: var(--on-surface-variant);
}
.error-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.error-card__actions:empty {
  display: none;
}
.stale-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 218, 214, 0.55);
  color: var(--error);
  font-size: 11px;
  line-height: 14px;
}

/* Source lines ("Source: X · checked 3 min ago") and the standing disclaimers */
.source-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  color: var(--on-surface-variant);
  font-size: 11px;
  line-height: 16px;
}
.source-note > .icon {
  flex: none;
  margin-top: 1px;
}
.disclaimer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--sc-high);
  color: var(--on-surface);
  font-size: 13px;
  line-height: 18px;
}
.disclaimer > .icon {
  color: var(--primary);
  flex: none;
  margin-top: 0;
}
.disclaimer--transfer-pass,
.disclaimer--photos {
  background: var(--warn-bg);
}
.disclaimer--transfer-pass > .icon,
.disclaimer--photos > .icon {
  color: var(--warn);
}

.figure {
  margin: 0;
}
.figure img {
  width: 100%;
  border-radius: 12px;
  background: var(--sc-high);
}
.figure__credit {
  color: var(--on-surface-variant);
  font-size: 11px;
  line-height: 16px;
  margin-top: 4px;
}
.picture-source {
  position: relative;
  display: block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.picture-source:has(.sr-only:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ tabs (the app has none; kept for screens that still use them), tables */
.tabs__list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 12px;
  scrollbar-width: none;
}
.tabs__tab {
  flex: none;
  min-height: 48px;
  padding: 8px 16px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--on-surface-variant);
  cursor: pointer;
}
.tabs__tab[aria-selected='true'] {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--card);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}
.table caption {
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
}
.table th,
.table td {
  padding: 10px 14px;
  text-align: left;
  border-top: 1px solid var(--hairline);
  vertical-align: top;
}
.table thead th {
  border-top: 0;
  color: var(--on-surface-variant);
  font-weight: 600;
  white-space: nowrap;
}
.table .align-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ overlays: sheet, dialog, toast */
dialog.sheet {
  width: min(100%, var(--col-w));
  max-width: none;
  max-height: min(92dvh, 100% - 24px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-surface);
  overflow: visible;
}
dialog.sheet::backdrop {
  background: rgba(0, 0, 0, 0.32);
}
.sheet__panel {
  position: relative;
  /* measured against the screen, not the sheet: a percentage of a sheet whose own height is "auto" is no limit at all, so a tall sheet
     (Trip options on a 375 x 812 phone) ran off the bottom of the screen with no way to scroll to its last button */
  max-height: min(92dvh, 100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 24px 24px 0 0;
  background: var(--sc-low);
  padding-bottom: calc(32px + var(--safe-bottom));
  transform: translateY(var(--drag, 0px));
  animation: sheet-up 0.28s cubic-bezier(0.2, 0, 0, 1);
  touch-action: pan-y;
}
@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}
.sheet__handle {
  width: 32px;
  height: 4px;
  margin: 16px auto 14px;
  border-radius: 2px;
  background: rgba(67, 71, 78, 0.4);
  cursor: grab;
}
.sheet__content {
  padding: 0 24px;
}
.sheet__title {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
}
.info-sheet__rows {
  margin: 0 0 12px;
}
.info-sheet__row {
  padding: 10px 0;
  border-top: 1px solid rgba(196, 198, 207, 0.6);
}
.info-sheet__row:first-child {
  border-top: 0;
}
.info-sheet dt {
  font-size: 14px;
  line-height: 18px;
  color: var(--on-surface-variant);
}
.info-sheet dd {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.info-sheet__close {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.info-sheet__close .text-action {
  font-size: 16px;
}

dialog.alert-dialog {
  width: min(calc(100% - 48px), 312px);
  padding: 24px;
  border: 0;
  border-radius: 24px;
  background: var(--sc-high);
  color: var(--on-surface);
}
dialog.alert-dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
}
.alert-dialog__title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}
.alert-dialog__body {
  margin-top: 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface-variant);
}
.alert-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--safe-bottom) + 16px);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 360px);
  pointer-events: none;
}
body[data-nav='on'] .toasts {
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
}
.toast {
  max-width: 100%;
  padding: 12px 20px;
  border-radius: 24px;
  background: #313033;
  color: #f4eff4;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  animation: toast-in 0.2s ease-out;
}
.toast--out {
  opacity: 0;
  transition: opacity 0.25s;
}
.toast--bad {
  background: #b3261e;
  color: #fff;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Pull down to search (Home) */
.pull-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 0;
  overflow: hidden;
  opacity: 0;
  color: var(--on-surface-variant);
  font-size: 15px;
  line-height: 24px;
  font-weight: 600;
}
.pull-hint--armed {
  color: var(--primary);
}
.pull-hint--armed .icon,
.pull-hint .icon {
  color: var(--primary);
}
.pull-hint--spring {
  transition: height 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.3s;
}

.map-box {
  width: 100%;
  height: min(70vh, 560px);
  min-height: 280px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--sc-high);
  /* the map's own layers and markers stay inside the box, so they never cover the bottom bar or sheets */
  position: relative;
  isolation: isolate;
}
