/* Portal-inspired shell. Keep functional and accessibility styles in style.css. */
:root {
  --green: #087f3e;
  --lime: #e8f8ed;
  --line: #e3e5e8;
  --muted: #606872;
  --paper: #fff;
  color: #20242a;
  background: #fff;
}
body { background: #fff; color: #20242a; }
.top { height: 66px; padding: 0 max(28px, calc((100% - 1200px) / 2)); border: 0; }
.brand { color: #008a3c; gap: 9px; font-size: 26px; letter-spacing: -1px; }
.brand-icon { width: 35px; height: 35px; color: #00a747; background: transparent; border-radius: 0; }
.brand-icon svg { width: 31px; height: 31px; stroke-width: 2.4; }
.brand-sub { color: #69717a; font-size: 13px; letter-spacing: -.2px; margin-left: 5px; }
.service-status { display: flex; align-items: center; gap: 7px; color: #5d6670; font-size: 12px; }
.service-status > span { width: 6px; height: 6px; border-radius: 50%; background: #03c75a; }
main { max-width: 1256px; padding: 10px 28px 0; }
.portal-heading { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; }
.portal-heading h1 { margin: 0; color: #3e454d; font-size: 20px; font-weight: 500; letter-spacing: -.6px; }
.portal-heading h1 strong { color: #00893e; font-weight: 800; }
.destination-search {
  width: min(100%, 720px); display: flex; align-items: center; gap: 20px;
  text-align: left; border: 2px solid #03c75a; border-radius: 44px;
  min-height: 78px; padding: 12px 25px; background: #fff; color: #20242a;
  box-shadow: 0 3px 10px #03c75a07; white-space: normal;
}
.destination-search:hover:not(:disabled) { background: #f8fefa; filter: none; box-shadow: 0 3px 14px #008a3c12; }
.search-home { flex-shrink: 0; color: #03b54f; display: flex; }
.search-home svg { width: 36px; height: 36px; stroke-width: 2.3; }
.search-journey { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.search-origin { color: #626b74; font-size: 12px; font-weight: 500; line-height: 1.5; }
.search-origin > span { margin-left: 5px; color: #008c40; }
#portal-destination { font-size: 22px; line-height: 1.4; letter-spacing: -.5px; overflow-wrap: anywhere; }
.search-end { display: flex; align-items: center; gap: 15px; color: #078140; flex-shrink: 0; }
.search-end span { font-size: 12px; font-weight: 600; }
.search-end svg { width: 27px; height: 27px; }
.portal-heading .portal-caption { color: #68717a; font-size: 13px; margin: -3px 0 0; }
.app-tabs { display: flex; justify-content: center; gap: 20px; background: transparent; border: 0; position: static; padding: 20px 0 25px; margin: 0; box-shadow: none; }
.app-tabs button, .app-tabs button[aria-selected=true] { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 0 1 76px; padding: 0; background: transparent; border: 0; border-radius: 12px; color: #404851; min-height: 76px; }
.app-tabs button:hover:not(:disabled) { filter: none; background: transparent; }
.nav-icon { display: grid; place-items: center; width: 50px; height: 50px; background: #fff; border: 1px solid #e8ebed; border-radius: 17px; box-shadow: 0 2px 5px #162b2010; color: #0a9b4a; transition: border-color .15s, background .15s; }
.nav-icon svg { width: 26px; height: 26px; }
.nav-label { font-size: 14px; line-height: 1.4; font-weight: 600; }
.app-tabs button[aria-selected=true] { color: #087f3e; font-weight: 700; }
.app-tabs button[aria-selected=true] .nav-icon { background: #e9fbf0; color: #008d3e; border-color: #8de3b0; box-shadow: 0 2px 7px #00aa4610; }
.app-tabs button:hover .nav-icon { border-color: #03c75a; }
.simple-home { gap: 18px; }
.home-primary, .route-comparison, .panel, .voice-panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 2px 6px #1e332505; }
.home-primary { padding: 26px; }
.home-destination { align-items: center; gap: 16px; margin-bottom: 5px; }
.home-destination > div { min-width: 0; }
.home-destination .eyebrow { color: #606b72; font-size: 13px; letter-spacing: 0; }
.home-destination h2 { color: #20262b; font-size: 23px; letter-spacing: -.7px; margin: 5px 0 8px; overflow-wrap: anywhere; }
.destination-marker { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #f0f9f3; color: #0a9950; }
.destination-marker svg { width: 24px; height: 24px; }
.simple-home #commute-mode-label { border-radius: 5px; background: #eaf8ef; color: #087f3e; font-size: 12px; margin: 0 0 7px; padding: 4px 8px; }
.simple-home #home-data-note { color: #626d75; margin: 0 0 18px; }
#commute-error:empty { display: none; }
.route-preferences { padding: 0; gap: 0; border-bottom: 1px solid #e6e9e7; border-radius: 0; background: transparent; margin-bottom: 16px; }
.route-preference { border-radius: 0; min-height: 45px; color: #65706b; padding: 8px 12px; font-size: 15px; }
.route-preference[aria-pressed=true] { background: transparent; color: #087f3e; border-color: transparent; border-bottom: 3px solid #03b650; box-shadow: none; }
.simple-home #commute-result > .route-hero { background: #f1faf4; color: #253b2e; border: 1px solid #d8eedf; border-radius: 13px; padding: 24px; margin-top: 0; }
.route-hero .route-eyebrow { color: #387249; font-size: 13px; margin-bottom: 12px; }
.simple-home .commute-bus h3.route-duration { color: #293e30; }
.route-duration strong, .home-primary .route-duration strong { font-size: 66px; color: #087f3e; letter-spacing: -3px; }
.route-meta { color: #53675b; font-size: 13px; }
.route-leg { border-color: #cce6d3; color: #526b5a; background: #ffffff80; }
.route-hero-single .route-leg { border-left-color: #b9d9c2; }
.route-leg-vehicles { color: #14572e; font-size: 22px; }
.route-step-label { color: inherit; }
.simple-home .route-hero .primary { background: #087f3e; color: #fff; border: 1px solid #087f3e; border-radius: 9px; min-height: 52px; font-size: 17px; }
.route-hero .route-actions .secondary { background: #fff; color: #27653b; border: 1px solid #b6d8c0; border-radius: 9px; min-height: 52px; }
.route-guidance { border-color: #cce3d2; }
.route-guidance summary { color: #2b5539; font-size: 14px; }
.route-timeline li { color: #34523e; }
.route-timeline li:before { background: #d7f0df; color: #1d6035; }
.route-hero .route-guidance .small { color: #526b5a; }
.route-access-note { color: #405b48; border-color: #b5d3bc; background: #fff; }
.simple-home .home-main-actions { gap: 10px; margin-top: 16px; }
.simple-home .home-main-actions button { background: #fff; border-color: #dfe4e1; color: #3f4e45; min-height: 48px; border-radius: 9px; font-size: 15px; }
.home-secondary-actions { justify-content: center; gap: 22px; margin-top: 7px; }
.home-secondary-actions button { color: #68716b; font-size: 13px; }
.route-comparison { padding: 25px; }
.home-kicker { color: #727a81; font-size: 12px; letter-spacing: 0; margin-bottom: 5px; }
.comparison-heading h2 { color: #242b30; font-size: 21px; }
.comparison-symbol { background: #f3f5f6; color: #69727b; width: 34px; height: 34px; font-size: 21px; }
.comparison-help { font-size: 13px; color: #677079; margin: 10px 0 16px; }
.route-comparison-note { border-radius: 7px; background: #f5f7f8; color: #58636d; padding: 10px 12px; margin-bottom: 8px; font-size: 12px; }
.route-option { border: 0; border-bottom: 1px solid #edf0ee; border-radius: 0; background: #fff; padding: 15px 6px; margin: 0; color: #26332b; }
.route-option:hover:not(:disabled) { background: #f5fbf7; filter: none; border-color: #d9e8df; }
.route-option-time { font-size: 25px; color: #252e28; letter-spacing: -.8px; }
.route-option-meta { font-size: 12px; color: #69746c; background: #f4f6f5; padding: 3px 8px; border-radius: 5px; }
.route-option-buses { color: #344c3c; font-size: 16px; margin: 7px 0 0; }
.route-option-action { color: #087f3e; font-size: 12px; margin-top: 5px; }
.route-other-options summary { text-align: center; font-size: 13px; color: #637169; min-height: 44px; }
.simple-home #home-more, .simple-home #home-bus-catalog { border-radius: 12px; border-color: var(--line); padding: 5px 20px; }
.simple-home #home-more > summary, .simple-home #home-bus-catalog > summary { color: #46554c; font-size: 14px; }
.voice-panel { background: #f8fcfa; }
.voice-main-actions button:first-child { background: #087f3e; }
.voice-main-actions button:nth-child(2) { background: #e5f8ec; }
.voice-answer { border-left-color: #03b650; }
footer { color: #69736d; border-color: #eceeed; padding: 24px 0; margin-top: 28px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #007a3c; outline-offset: 4px; }
@media (min-width: 1100px) {
  .simple-home { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 22px; row-gap: 16px; }
  .home-primary { grid-column: 1; grid-row: 1 / span 3; padding: 27px; }
  .route-comparison { grid-column: 2; grid-row: 1; margin: 0; }
  .simple-home #home-bus-catalog { grid-column: 2; grid-row: 2; margin: 0; }
  .simple-home #home-more { grid-column: 2; grid-row: 3; margin: 0; }
  .home-main-actions { grid-template-columns: 1fr 1fr; }
  body[data-text-size=largest] .simple-home { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
@media (min-width: 641px) and (max-width: 1099px) {
  main { max-width: 840px; }
  .top { padding: 0 28px; }
}
@media (max-width: 640px) {
  .top { height: 58px; padding: 0 18px; }
  .brand { font-size: 22px; gap: 5px; }
  .brand-icon { width: 29px; height: 29px; }
  .brand-icon svg { width: 27px; height: 27px; }
  .brand-sub { display: none; }
  .service-status { font-size: 11px; }
  main { padding: 8px 16px calc(var(--mobile-nav-height, 82px) + 24px); }
  .portal-heading { align-items: stretch; gap: 12px; margin-bottom: 20px; }
  .portal-heading h1 { font-size: 18px; text-align: left; padding: 0 2px; }
  .destination-search { min-height: 68px; padding: 11px 15px; gap: 12px; border-radius: 23px; }
  .search-home svg { width: 28px; height: 28px; }
  .search-origin { font-size: 11px; }
  #portal-destination { font-size: 17px; }
  .search-end svg { width: 23px; height: 23px; }
  #portal-search-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .portal-heading .portal-caption { display: none; }
  .app-tabs { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 15; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 6px 9px calc(7px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e2e8e4; box-shadow: 0 -2px 14px #153d3505; }
  .app-tabs button, .app-tabs button[aria-selected=true] { gap: 2px; min-height: 57px; padding: 3px 0; }
  .nav-icon { width: 34px; height: 30px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; }
  .nav-icon svg { width: 23px; height: 23px; }
  .app-tabs button[aria-selected=true] .nav-icon { background: #e5f8ec; box-shadow: none; }
  .nav-label { font-size: 12px; }
  .home-primary { padding: 18px; border-radius: 14px; }
  .home-destination h2 { font-size: 20px; }
  .home-destination .eyebrow { font-size: 12px; }
  .destination-marker { display: none; }
  .simple-home #home-data-note { margin-bottom: 12px; }
  .simple-home #commute-result > .route-hero { padding: 18px; }
  .route-duration strong, .home-primary .route-duration strong, .route-hero-single .route-duration strong { font-size: 50px; }
  .route-hero-single .route-leg-vehicles { font-size: 18px; }
  .route-actions { grid-template-columns: 1.2fr 1fr; }
  .route-hero .route-actions button { padding: 10px 6px; }
  .simple-home .route-hero .primary { font-size: 15px; }
  .simple-home .home-main-actions button { font-size: 14px; }
  .home-secondary-actions { gap: 15px; }
  .route-comparison { padding: 20px; margin-top: 16px; }
  .comparison-heading h2 { font-size: 20px; }
  footer { font-size: 11px; }
}
@media (max-width: 359px) {
  main { padding-left: 12px; padding-right: 12px; }
  .home-primary { padding: 14px; }
  .destination-search { gap: 9px; padding-left: 12px; padding-right: 12px; }
  .search-home { display: none; }
  .simple-home #commute-result > .route-hero { padding: 15px; }
  .home-secondary-actions { flex-wrap: wrap; gap: 5px 15px; }
}
/* Respect user-selected large text and contrast over the default visual theme. */
body[data-text-size=largest] .destination-search { border-radius: 22px; }
body[data-text-size=largest] .search-end { flex-direction: column; }
body[data-text-size=largest] .search-end svg { display: none; }
body[data-text-size=largest] .route-hero-single { display: block; }
body[data-text-size=largest] .route-hero-single .route-leg { border-left: 0; padding-left: 0; }
body[data-text-size=largest] .route-actions { grid-template-columns: 1fr; }
body.high-contrast .service-status, body.high-contrast .brand, body.high-contrast .brand-icon,
body.high-contrast .portal-heading h1, body.high-contrast .portal-heading h1 strong,
body.high-contrast .destination-search *, body.high-contrast .nav-icon,
body.high-contrast .home-destination *, body.high-contrast .route-option *,
body.high-contrast .simple-home .route-hero *, body.high-contrast .comparison-heading * { color: #fff; }
body.high-contrast .destination-search, body.high-contrast .nav-icon,
body.high-contrast .destination-marker, body.high-contrast .route-comparison-note,
body.high-contrast .simple-home #commute-result > .route-hero { background: #000; border-color: #fff; }
body.high-contrast .simple-home .route-hero .primary { background: #ffeb66; color: #000; border-color: #ffeb66; }
body.high-contrast .app-tabs button[aria-selected=true] .nav-icon { background: #000; outline: 2px solid #ffeb66; }
body.high-contrast .route-preference[aria-pressed=true] { border-bottom-color: #ffeb66; }
body.high-contrast svg circle[fill=white] { fill: #000; }
/* Senior mode uses the same navigation geometry, with readable text sizing. */
body.senior-mode main .app-tabs button,
body.senior-mode main .app-tabs button[aria-selected=true] { padding: 0; background: transparent; color: #404851; border: 0; min-height: 76px; }
body.senior-mode main .app-tabs button[aria-selected=true] { color: #087f3e; }
body[data-text-size=largest] .app-tabs button { flex-basis: 100px; }
body.high-contrast.senior-mode main .app-tabs button[aria-selected=true] { background: #000!important; color: #fff!important; }
@media (max-width: 640px) {
  .top { min-height: 58px; padding-block: 0; flex-wrap: nowrap; }
  body.senior-mode main .app-tabs button,
  body.senior-mode main .app-tabs button[aria-selected=true] { padding: 3px 0; min-height: 57px; }
}
