:root {
    color-scheme: light;
    --ink: #142a36;
    --muted: #78878a;
    --paper: #f5f6f2;
    --white: #fff;
    --line: #e7ebe5;
    --green: #c9ef77;
    --green-dark: #193b34;
    --blue: #dceef0;
    --orange: #f6e8d4;
    --red: #b64739;
    --shadow: 0 16px 42px rgb(20 42 54 / 8%);
    --nav-height: 76px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--paper);
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(ellipse at 92% -12%, rgb(201 239 119 / 23%), transparent 32rem),
        var(--paper);
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #78a849;
    outline-offset: 3px;
}

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
}

.topbar {
    position: sticky;
    z-index: 5;
    top: 0;
    display: flex;
    width: 100%;
    height: 66px;
    align-items: center;
    justify-content: space-between;
    padding: max(8px, env(safe-area-inset-top)) max(20px, calc((100vw - 600px) / 2));
    background: rgb(245 246 242 / 88%);
    border-bottom: 1px solid rgb(231 235 229 / 82%);
    backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; overflow: hidden; background: #081a34; border-radius: 12px; }
.brand-mark .icon { width: 20px; height: 20px; stroke-width: 2; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -.7px; }
.brand-name span { margin-left: 2px; color: #63854b; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.network-status { display: inline-flex; align-items: center; gap: 6px; color: #77868a; font-size: 11px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; background: #e9b64d; border-radius: 50%; }
.network-status.is-online .status-dot { background: #71b76c; }
.network-status.is-offline .status-dot { background: #d46b5c; }
.update-notice { display: flex; width: min(100% - 32px, 560px); align-items: center; justify-content: space-between; gap: 12px; margin: 10px auto 0; padding: 10px 12px; color: #355142; background: #edf4df; border: 1px solid #dce8d1; border-radius: 12px; font-size: 11px; }
.update-notice[hidden] { display: none; }
.update-notice button { min-height: 36px; padding: 0 11px; color: #fff; background: #345b44; border: 0; border-radius: 9px; font-size: 10px; font-weight: 700; cursor: pointer; }
.icon-button { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.icon-button:hover { background: rgb(20 42 54 / 6%); }
.icon-button .icon { width: 20px; height: 20px; }

.screen {
    width: min(100%, 600px);
    flex: 1 0 auto;
    margin: 0 auto;
    padding: 22px 20px calc(var(--nav-height) + 32px + env(safe-area-inset-bottom));
    animation: screen-in .22s ease both;
}

.screen:focus { outline: none; }
.offline-screen { max-width: 430px; margin: 12vh auto 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.offline-illustration { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 20px; color: #405d45; background: #edf4df; border-radius: 17px; }
.offline-illustration .icon { width: 28px; height: 28px; }
.offline-screen h1 { margin: 0 0 8px; font: 800 24px/1.2 Manrope, sans-serif; letter-spacing: -.7px; }
.offline-screen > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.offline-feature-list { display: grid; gap: 8px; margin: 17px 0 3px; }
.offline-feature-list p { display: grid; gap: 3px; margin: 0; padding: 11px; background: #f7f8f4; border-radius: 11px; }
.offline-feature-list strong { font-size: 11px; }
.offline-feature-list span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.install-dialog { position: fixed; inset: auto 0 0; width: min(100%, 520px); max-width: none; max-height: min(80dvh, 500px); margin: 0 auto; padding: 10px 20px max(24px, env(safe-area-inset-bottom)); overflow: auto; color: var(--ink); background: var(--paper); border: 0; border-radius: 25px 25px 0 0; box-shadow: 0 -16px 48px rgb(15 34 39 / 18%); }
.install-dialog::backdrop { background: rgb(13 28 32 / 46%); backdrop-filter: blur(3px); }
.install-instructions { padding: 14px; color: #385340; background: #edf4df; border-radius: 14px; font-size: 13px; font-weight: 650; line-height: 1.6; }
.install-dialog .detail-subtitle { margin-bottom: 8px; }
.screen-header { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.screen-header h1 { margin: 0; font: 800 26px/1.15 Manrope, sans-serif; letter-spacing: -1.1px; }
.screen-header .icon-button { margin-right: -8px; }
.eyebrow { margin: 0 0 7px; color: #788984; font-size: 10px; font-weight: 700; letter-spacing: 1.55px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.welcome-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 6px 0 18px; }
.welcome-row h1 { max-width: 390px; margin: 0; font: 800 clamp(27px, 7vw, 35px)/1.12 Manrope, sans-serif; letter-spacing: -1.5px; }
.welcome-row p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.date-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; white-space: nowrap; color: #566a69; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 700; }
.date-pill .icon { width: 14px; height: 14px; }
.date-picker-label { display: block; margin: 0 0 7px; color: #788984; font-size: 11px; font-weight: 700; }
.date-picker { width: 100%; min-height: 48px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }

.hero-card {
    position: relative;
    isolation: isolate;
    overflow: visible;
    padding: 22px 20px 20px;
    color: #f7fbef;
    background: #193b39;
    border-radius: 25px;
    box-shadow: var(--shadow);
}

.hero-card::after {
    position: absolute;
    z-index: -1;
    top: -50px;
    right: 0;
    width: 190px;
    height: 190px;
    content: "";
    background: radial-gradient(circle, rgb(201 239 119 / 18%), transparent 68%);
    pointer-events: none;
}

.hero-card .eyebrow { color: #b8cbad; }
.hero-card h2 { position: relative; z-index: 1; max-width: 300px; margin: 0 0 8px; font: 700 23px/1.2 Manrope, sans-serif; letter-spacing: -.65px; }
.hero-card > p:not(.eyebrow) { position: relative; z-index: 1; max-width: 290px; margin: 0 0 20px; color: #c6d5cb; font-size: 13px; line-height: 1.55; }
.hero-search {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 11px;
    padding: 0 14px;
    color: #7d8b8b;
    background: #fff;
    border: 0;
    border-radius: 15px;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}
.hero-search:hover { box-shadow: 0 8px 24px rgb(0 0 0 / 15%); transform: translateY(-1px); }
.hero-search .icon { width: 20px; height: 20px; }
.hero-search span { flex: 1; font-size: 13px; }
.hero-search kbd { padding: 4px 7px; color: #7f8a89; background: #f4f6f2; border: 1px solid #ebefea; border-radius: 6px; font: 600 10px "DM Sans", sans-serif; }

.trip-search-form { position: relative; z-index: 1; display: grid; gap: 9px; }
.station-picker { position: relative; }
.picker-label { display: block; margin: 0 0 6px; color: #c6d5cb; font-size: 11px; font-weight: 700; }
.picker-control { display: flex; min-height: 48px; align-items: center; gap: 9px; padding: 0 12px; color: #62736d; background: #fff; border: 1px solid transparent; border-radius: 13px; }
.picker-control:focus-within { border-color: #9ebb82; box-shadow: 0 0 0 3px rgb(201 239 119 / 22%); }
.picker-control .icon { width: 17px; height: 17px; color: #74877a; }
.picker-control input[type="search"] { width: 100%; min-width: 0; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 13px; }
.picker-control input::placeholder { color: #929e9d; }
.swap-stations { display: grid; width: 36px; height: 36px; place-items: center; justify-self: end; margin: -7px 8px; color: #315241; background: var(--green); border: 0; border-radius: 12px; cursor: pointer; }
.swap-stations .icon { width: 19px; height: 19px; }
.station-suggestions { position: absolute; z-index: 8; top: calc(100% + 5px); right: 0; left: 0; overflow: auto; max-height: 240px; padding: 5px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.station-suggestions[hidden] { display: none; }
.station-option { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: transparent; border: 0; border-radius: 10px; text-align: left; cursor: pointer; }
.station-option:hover, .station-option:focus-visible { background: #f3f6ef; }
.station-option strong, .station-option small { display: block; }
.station-option strong { font-size: 12px; }
.station-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.station-option > .icon { width: 16px; height: 16px; transform: rotate(-45deg); }
.station-option-message { margin: 0; padding: 11px; color: #65756e; font-size: 11px; line-height: 1.5; }
.station-option-message button { padding: 0; color: #456a3a; background: transparent; border: 0; font-weight: 700; cursor: pointer; }
.trip-search-form .date-picker-label { margin: 4px 0 -3px; color: #c6d5cb; }
.trip-search-form .date-picker { min-height: 46px; }
.bus-search-button { width: 100%; margin-top: 2px; }
.form-message { min-height: 0; margin: 0; color: #ffe4c5; font-size: 11px; }
.form-message:not(:empty) { min-height: 17px; }

.quick-bus-lookup { margin: 21px 0 5px; }
.quick-bus-lookup .section-heading { margin-top: 0; margin-bottom: 5px; }
.quick-bus-lookup .detail-subtitle { font-size: 11px; }
.quick-bus-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.quick-bus-form .search-field { min-width: 0; flex: 1; }
.quick-bus-form .secondary-button { flex: 0 0 auto; margin: 0; }
.quick-bus-results { display: grid; gap: 8px; margin-top: 9px; }
.quick-bus-result, .recent-bus-card { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 11px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.quick-bus-result > span:nth-child(2), .recent-bus-card > span:nth-child(2) { min-width: 0; flex: 1; }
.quick-bus-result strong, .quick-bus-result small, .recent-bus-card strong, .recent-bus-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-bus-result strong, .recent-bus-card strong { font-size: 11px; }
.quick-bus-result small, .recent-bus-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.tracking-unavailable { color: #89744d; font-size: 9px; font-weight: 700; text-align: right; }
.recent-bus-list { display: grid; gap: 8px; }
.recent-bus-card { width: 100%; text-align: left; cursor: pointer; }
.recent-bus-card > .icon { width: 16px; height: 16px; transform: rotate(-45deg); }

.bus-result-list { display: grid; gap: 11px; margin-top: 12px; }
.search-summary { margin: 8px 0 13px; color: #677772; font-size: 12px; font-weight: 650; }
.bus-result-card { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 22px rgb(20 42 54 / 3%); }
.bus-result-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bus-result-head .result-code { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-status { padding: 5px 8px; color: #456a3a; background: #edf4df; border-radius: 999px; font-size: 9px; font-weight: 750; }
.bus-result-card h2 { margin: 12px 0 3px; font: 750 16px Manrope, sans-serif; }
.bus-result-route, .bus-result-stations { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.bus-result-stations { margin-top: 4px; color: #425f52; font-weight: 650; }
.bus-result-stations span { padding: 0 4px; color: #86948d; }
.bus-result-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 14px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bus-result-times small, .bus-result-times strong, .bus-trip-details small, .bus-trip-details strong { display: block; }
.bus-result-times small, .bus-trip-details small { margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.bus-result-times strong, .bus-trip-details strong { font-size: 12px; }
.tracking-state { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: #7b725d; font-size: 10px; }
.tracking-state .icon { width: 14px; height: 14px; }
.bus-result-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.bus-result-actions > * { min-width: 0; flex: 1; margin: 0; }
.bus-result-actions .primary-button { text-decoration: none; }
.bus-result-actions button:disabled { color: #7f8882; background: #eef0ec; cursor: not-allowed; }
.bus-result-actions .booking-unavailable { flex: 1 0 100%; color: #765d2b; font-size: 11px; line-height: 1.4; }
.bus-trip-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 13px; padding: 13px; background: #f5f7f2; border-radius: 13px; }
.bus-trip-details[hidden] { display: none; }
.bus-trip-details p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 15px 0 27px; }
.quick-card { display: flex; min-height: 91px; align-items: center; gap: 11px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; transition: transform .16s ease, border-color .16s ease; }
.quick-card:hover { border-color: #c7d7bb; transform: translateY(-2px); }
.quick-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; color: #34554b; background: #edf4df; border-radius: 13px; }
.quick-card:nth-child(2) .quick-icon { background: var(--blue); }
.quick-card:nth-child(3) .quick-icon { background: var(--orange); }
.quick-card strong { display: block; font-size: 12px; }
.quick-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.quick-card .icon { width: 19px; height: 19px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 25px 0 13px; }
.section-heading h2 { margin: 0; font: 750 17px/1.25 Manrope, sans-serif; letter-spacing: -.45px; }
.text-button { display: inline-flex; min-height: 38px; align-items: center; gap: 5px; padding: 4px 0 4px 8px; color: #557a42; background: transparent; border: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.text-button .icon { width: 15px; height: 15px; }

.search-field { display: flex; height: 50px; align-items: center; gap: 10px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.search-field:focus-within { border-color: #9ebb82; box-shadow: 0 0 0 3px rgb(201 239 119 / 22%); }
.search-field .icon { width: 19px; height: 19px; color: #7c8988; }
.search-field input { width: 100%; min-width: 0; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; }
.search-field input::placeholder { color: #929e9d; }

.route-list, .alert-list, .schedule-list { display: grid; gap: 10px; }
.route-card { display: block; width: 100%; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 18px; text-align: left; cursor: pointer; transition: border-color .16s ease, transform .16s ease; }
.route-card:hover { border-color: #c4d5b6; transform: translateY(-1px); }
.route-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.route-code { display: inline-flex; align-items: center; padding: 5px 8px; color: #315241; background: #edf4df; border-radius: 8px; font-size: 10px; font-weight: 800; letter-spacing: .3px; }
.route-name { margin: 9px 0 5px; font: 700 15px/1.35 Manrope, sans-serif; letter-spacing: -.2px; }
.route-endpoints { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.route-endpoints .icon { width: 14px; height: 14px; color: #8ca17c; }
.route-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; color: #7b8886; font-size: 10px; }
.route-meta span { display: inline-flex; align-items: center; gap: 4px; }
.route-meta .icon { width: 13px; height: 13px; }
.card-chevron { color: #87958f; }
.card-chevron .icon { width: 18px; height: 18px; transform: rotate(-45deg); }

.empty-state, .error-state, .feature-state { padding: 23px 18px; background: #fff; border: 1px solid var(--line); border-radius: 20px; text-align: center; }
.empty-illustration { display: grid; width: 58px; height: 58px; place-items: center; margin: 0 auto 13px; color: #46694e; background: #edf4df; border-radius: 19px; }
.empty-illustration .icon { width: 27px; height: 27px; }
.empty-state h3, .error-state h3, .feature-state h3 { margin: 0 0 6px; font: 750 15px Manrope, sans-serif; letter-spacing: -.2px; }
.empty-state p, .error-state p, .feature-state p { max-width: 330px; margin: 0 auto; color: var(--muted); font-size: 12px; line-height: 1.6; }
.retry-button, .primary-button, .secondary-button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 8px; margin-top: 15px; padding: 0 16px; border: 0; border-radius: 13px; font-size: 12px; font-weight: 700; cursor: pointer; }
.primary-button { color: #17362f; background: var(--green); }
.primary-button:hover { background: #bde565; }
.secondary-button { color: var(--ink); background: #f0f3ed; }
.retry-button { color: #345b44; background: #edf4df; }

.skeleton { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.skeleton::after { display: block; height: 94px; content: ""; background: linear-gradient(100deg, transparent 20%, #edf1eb 45%, transparent 70%); animation: shimmer 1.25s infinite; transform: translateX(-100%); }
.skeleton.hero-skeleton::after { height: 182px; }

.track-hero { padding: 22px 20px 18px; color: #f8faef; background: #193b39; border-radius: 24px; }
.track-hero .eyebrow { color: #b8cbad; }
.track-hero h2 { margin: 0 0 8px; font: 750 23px/1.2 Manrope, sans-serif; letter-spacing: -.65px; }
.track-hero p { margin: 0; color: #c6d5cb; font-size: 12px; line-height: 1.6; }
.track-orbit { position: relative; display: grid; width: 154px; height: 154px; place-items: center; margin: 24px auto 18px; }
.orbit-ring { position: absolute; inset: 0; border: 1px solid rgb(201 239 119 / 20%); border-radius: 50%; }
.orbit-ring::before, .orbit-ring::after { position: absolute; inset: 14px; content: ""; border: 1px dashed rgb(201 239 119 / 28%); border-radius: 50%; }
.orbit-ring::after { inset: 31px; border-style: solid; border-color: rgb(201 239 119 / 16%); }
.orbit-core { display: grid; width: 62px; height: 62px; place-items: center; color: #193b39; background: var(--green); border-radius: 22px; }
.orbit-core .icon { width: 30px; height: 30px; }
.track-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 14px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.track-note .icon { width: 18px; height: 18px; margin-top: 2px; color: #68874c; }
.track-note strong { display: block; margin-bottom: 4px; font-size: 12px; }
.track-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.route-detail-head { margin: -4px 0 17px; }
.back-button { display: inline-flex; min-height: 40px; align-items: center; gap: 5px; margin-left: -9px; padding: 0 10px 0 5px; color: #557a42; background: transparent; border: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.back-button .icon { width: 18px; height: 18px; }
.detail-title { margin: 10px 0 6px; font: 800 27px/1.14 Manrope, sans-serif; letter-spacing: -1px; }
.detail-subtitle { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.detail-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 17px 0; }
.summary-cell { padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.summary-cell small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.summary-cell strong { font: 700 13px Manrope, sans-serif; }
.stops-card { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.stops-card h2 { margin: 0 0 14px; font: 750 15px Manrope, sans-serif; }
.stop-item { position: relative; display: grid; grid-template-columns: 19px 1fr auto; min-height: 51px; align-items: start; gap: 10px; }
.stop-item:not(:last-child)::after { position: absolute; top: 16px; bottom: -1px; left: 7px; width: 1px; content: ""; background: #dce5d8; }
.stop-dot { position: relative; z-index: 1; width: 15px; height: 15px; margin-top: 2px; background: #fff; border: 4px solid #a6c778; border-radius: 50%; }
.stop-item:first-of-type .stop-dot, .stop-item:last-child .stop-dot { border-color: #56805b; }
.stop-name { font-size: 12px; font-weight: 650; }
.stop-address { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.stop-coordinates { margin-top: 3px; color: #819087; font-size: 9px; font-variant-numeric: tabular-nums; }
.stop-duration { color: #849087; font-size: 10px; }
.bus-title-link { padding: 0; color: inherit; background: transparent; border: 0; font: inherit; text-align: left; cursor: pointer; }
.bus-title-link:hover { color: #557a42; }
.bus-result-card > .secondary-button { margin-top: 12px; }
.operator-card { margin-top: 13px; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 17px; }
.operator-card .eyebrow { margin-bottom: 6px; }
.operator-card h2 { margin: 0; font: 750 15px Manrope, sans-serif; }
.operator-card p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.trip-stops-card { margin-top: 13px; }
.trip-detail-actions { margin: 14px 0 4px; }
.trip-detail-actions > * { min-height: 45px; }
.geometry-card { overflow: hidden; margin-top: 13px; padding: 13px; background: #eef4e9; border-radius: 15px; }
.geometry-card svg { display: block; width: 100%; height: 88px; }

.screen:has(.tracking-page) { width: min(100%, 1100px); }
.tracking-page { max-width: 100%; }
.tracking-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 5px 0 14px; }
.tracking-heading h1 { margin: 0; font: 800 24px/1.15 Manrope, sans-serif; letter-spacing: -.8px; }
.tracking-heading p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.freshness-badge { flex: 0 0 auto; padding: 7px 10px; color: #64734b; background: #edf3df; border-radius: 999px; font-size: 10px; font-weight: 750; }
.freshness-badge[data-freshness="live"] { color: #236442; background: #e0f3e7; }
.freshness-badge[data-freshness="delayed"] { color: #85642b; background: #faf0d8; }
.freshness-badge[data-freshness="stale"] { color: #70534a; background: #f0e9e5; }
.freshness-badge[data-freshness="completed"] { color: #4a6374; background: #e5edf2; }
.tracking-map-shell { position: relative; overflow: hidden; background: #e9eee7; border: 1px solid #dfe6dc; border-radius: 20px; isolation: isolate; }
.tracking-map { width: 100%; height: clamp(310px, 44dvh, 500px); }
.tracking-map-notice { position: absolute; z-index: 500; right: 12px; bottom: 12px; left: 12px; margin: 0; padding: 10px 12px; color: #5d4d31; background: rgb(255 250 235 / 95%); border: 1px solid #eadcbd; border-radius: 11px; font-size: 11px; line-height: 1.45; }
.tracking-map-notice[hidden] { display: none; }
.tracking-map-notice .text-button { min-height: 28px; margin-left: 4px; font-size: 10px; }
.map-recenter { position: absolute; z-index: 500; right: 12px; bottom: 12px; display: grid; width: 42px; height: 42px; place-items: center; color: #243d35; background: #fff; border: 1px solid #e6ebe3; border-radius: 13px; box-shadow: 0 3px 12px rgb(20 42 54 / 15%); cursor: pointer; }
.tracking-map-notice:not([hidden]) + .map-recenter { bottom: 72px; }
.map-attribution-note { margin: 5px 2px 12px; color: #87918a; font-size: 9px; text-align: right; }
.map-attribution-note a { color: #647d67; text-decoration: underline; text-underline-offset: 2px; }
.tracking-panel { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 7px 20px rgb(20 42 54 / 4%); }
.tracking-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tracking-panel-heading .eyebrow { margin-bottom: 4px; }
.tracking-panel-heading h2 { margin: 0; font: 750 16px/1.3 Manrope, sans-serif; }
.tracking-panel-heading p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.panel-toggle { min-height: 40px; padding: 0 12px; color: #456447; background: #f0f5e8; border: 0; border-radius: 11px; font-size: 11px; font-weight: 700; cursor: pointer; }
.tracking-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.follow-control { display: flex; align-items: center; gap: 7px; color: #435c4b; font-size: 11px; font-weight: 650; }
.follow-control input { width: 17px; height: 17px; accent-color: #547a48; }
.tracking-error { margin: 10px 0; padding: 10px; color: #804b3e; background: #fff1ed; border-radius: 10px; font-size: 11px; }
.progress-unavailable { margin: 0 0 14px; padding: 11px; color: #6f674d; background: #faf6e9; border-radius: 11px; font-size: 11px; line-height: 1.5; }
.progress-summary { margin: 0 0 15px; padding: 12px; background: #f3f7ed; border: 1px solid #e4ecd9; border-radius: 13px; }
.progress-summary-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.progress-summary-heading > span:first-child { min-width: 0; }
.progress-summary-heading small, .progress-summary-heading strong { display: block; }
.progress-summary-heading small { margin-bottom: 4px; color: #788273; font-size: 9px; font-weight: 750; letter-spacing: .06em; }
.progress-summary-heading strong { font: 750 13px Manrope, sans-serif; }
.progress-eta { color: #5c6e54; font-size: 10px; line-height: 1.5; text-align: right; }
.progress-track { height: 6px; margin-top: 12px; overflow: hidden; background: #dfe8d5; border-radius: 99px; }
.progress-track span { display: block; height: 100%; background: #64864d; border-radius: inherit; transition: width .25s ease; }
.progress-caption, .progress-nearest { display: block; margin-top: 5px; color: #788273; font-size: 9px; }
.tracking-stop[data-progress-state="passed"] .tracking-stop-marker { color: #fff; background: #62844c; border-color: #62844c; }
.tracking-stop[data-progress-state="current"] .tracking-stop-marker { color: #315241; background: #e7f2d9; border-color: #84a765; box-shadow: 0 0 0 3px #edf4e5; }
.tracking-stop[data-progress-state="unknown"] .tracking-stop-marker { color: #909890; background: #f3f4f2; border-color: #e5e8e4; }
.tracking-stops h3, .tracking-announcements h3 { margin: 0 0 10px; font: 750 13px Manrope, sans-serif; }
.tracking-stops h3 span { color: var(--muted); font-weight: 500; }
.tracking-stop { position: relative; display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: start; gap: 10px; min-height: 47px; }
.tracking-stop:not(:last-child)::after { position: absolute; top: 21px; bottom: -1px; left: 11px; width: 1px; content: ""; background: #dce5d8; }
.tracking-stop-marker { position: relative; z-index: 1; display: grid; width: 23px; height: 23px; place-items: center; color: #53744b; background: #f0f5e8; border: 1px solid #dce8d1; border-radius: 50%; font-size: 9px; font-weight: 700; }
.tracking-stop strong, .tracking-stop small { display: block; }
.tracking-stop strong { padding-top: 3px; font-size: 11px; }
.tracking-stop small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.tracking-announcements { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tracking-announcements .alert-card { margin-top: 8px; padding: 12px; }
.tracking-loading { display: grid; gap: 10px; }
.tracking-page > .error-state { margin: 25px 0; }
.tracking-page .track-note { margin-bottom: 13px; }
.tracking-panel.is-collapsed { padding-bottom: 10px; }
.bus-marker { background: transparent; border: 0; }
.bus-marker > span { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; background: #2f704a; border: 3px solid #fff; border-radius: 15px; box-shadow: 0 3px 13px rgb(20 42 54 / 35%); }
.bus-marker .icon { width: 22px; height: 22px; }
.bus-marker-delayed > span { background: #a5772d; }
.bus-marker-stale > span { background: #77736c; }
.bus-marker-completed > span, .bus-marker-unavailable > span { background: #65756a; }

.alert-card { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 17px; }
.alert-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.alert-tag { display: inline-flex; align-items: center; gap: 5px; color: #886b37; font-size: 10px; font-weight: 700; }
.alert-tag .icon { width: 14px; height: 14px; }
.alert-date { color: #909b97; font-size: 10px; }
.alert-card h3 { margin: 0 0 6px; font: 700 14px/1.4 Manrope, sans-serif; }
.alert-card p { margin: 0; color: #71807e; font-size: 12px; line-height: 1.6; white-space: pre-line; }
.alert-detail-button { margin-top: 7px; }
.push-opt-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 13px 14px; background: #edf4df; border: 1px solid #dfe9d4; border-radius: 15px; }
.push-opt-in[hidden] { display: none; }
.push-opt-in strong { display: block; font-size: 12px; }
.push-opt-in p { margin: 4px 0 0; color: #71807e; font-size: 10px; line-height: 1.5; }
.push-opt-in .secondary-button { min-height: 39px; flex: 0 0 auto; margin: 0; padding: 0 11px; font-size: 10px; }
.announcement-detail-dialog { position: fixed; inset: auto 0 0; width: min(100%, 520px); max-width: none; max-height: min(82dvh, 620px); margin: 0 auto; padding: 10px 20px max(24px, env(safe-area-inset-bottom)); overflow: auto; color: var(--ink); background: var(--paper); border: 0; border-radius: 25px 25px 0 0; box-shadow: 0 -16px 48px rgb(15 34 39 / 18%); }
.announcement-detail-dialog::backdrop { background: rgb(13 28 32 / 46%); backdrop-filter: blur(3px); }
.announcement-detail-dialog h2 { margin: 0 0 7px; font: 800 21px/1.25 Manrope, sans-serif; }
.announcement-detail-description { margin: 14px 0; color: #536462; font-size: 13px; line-height: 1.7; white-space: pre-line; }

.profile-card { display: flex; align-items: center; gap: 13px; padding: 17px; background: #193b39; border-radius: 21px; color: #f7fbef; }
.profile-avatar { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; color: var(--ink); background: var(--green); border-radius: 17px; }
.profile-avatar .icon { width: 23px; height: 23px; }
.profile-card h2 { margin: 0 0 4px; font: 700 15px Manrope, sans-serif; }
.profile-card p { margin: 0; color: #bdcec1; font-size: 11px; }
.settings-list { display: grid; gap: 8px; }
.setting-row { display: flex; width: 100%; min-height: 58px; align-items: center; gap: 12px; padding: 10px 13px; background: #fff; border: 1px solid var(--line); border-radius: 15px; text-align: left; cursor: pointer; }
.setting-row:hover { border-color: #cbd9c2; }
.setting-icon { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; color: #547046; background: #edf4df; border-radius: 12px; }
.setting-icon .icon { width: 18px; height: 18px; }
.setting-copy { flex: 1; }
.setting-copy strong { display: block; font-size: 12px; }
.setting-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.setting-chevron { color: #9aa59f; }
.setting-chevron .icon { width: 17px; height: 17px; transform: rotate(-45deg); }
.toggle { width: 40px; height: 23px; padding: 3px; background: #dfe5df; border: 0; border-radius: 99px; cursor: pointer; }
.toggle::after { display: block; width: 17px; height: 17px; content: ""; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgb(0 0 0 / 14%); transition: transform .18s ease; }
.toggle[aria-checked="true"] { background: #7ea957; }
.toggle[aria-checked="true"]::after { transform: translateX(17px); }
.about-footer { margin: 20px 0 5px; color: #97a29d; font-size: 10px; text-align: center; }

.schedule-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.schedule-time { min-width: 58px; color: #385c47; font: 800 14px Manrope, sans-serif; }
.schedule-info { min-width: 0; flex: 1; }
.schedule-info strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-info small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.schedule-frequency { padding: 5px 7px; color: #658048; background: #f0f5e8; border-radius: 7px; font-size: 9px; font-weight: 700; white-space: nowrap; }

.bottom-nav {
    position: fixed;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    padding: 8px max(11px, calc((100vw - 600px) / 2)) calc(8px + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 92%);
    border-top: 1px solid #e8ece6;
    box-shadow: 0 -8px 24px rgb(20 42 54 / 4%);
    backdrop-filter: blur(18px);
}
.nav-item { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #85918e; border-radius: 13px; font-size: 9px; font-weight: 600; transition: color .16s ease; }
.nav-item .icon { width: 20px; height: 20px; stroke-width: 1.8; }
.nav-item[aria-current="page"] { color: #355a43; }
.nav-item[aria-current="page"] .icon { padding: 1px; stroke-width: 2.2; }

.search-dialog {
    position: fixed;
    inset: auto 0 0;
    width: min(100%, 600px);
    max-width: none;
    max-height: min(82dvh, 700px);
    margin: 0 auto;
    padding: 10px 20px max(24px, env(safe-area-inset-bottom));
    overflow: auto;
    background: var(--paper);
    border: 0;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -16px 48px rgb(15 34 39 / 18%);
}
.search-dialog::backdrop { background: rgb(13 28 32 / 46%); backdrop-filter: blur(3px); }
.dialog-grip { width: 40px; height: 4px; margin: 0 auto 15px; background: #d8dfd7; border-radius: 99px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.dialog-heading h2 { margin: 0; font: 800 22px Manrope, sans-serif; letter-spacing: -.7px; }
.dialog-heading .eyebrow { margin-bottom: 4px; }
.dialog-search { background: #fff; }
.search-results { display: grid; gap: 8px; margin-top: 13px; }
.search-result { display: flex; width: 100%; align-items: center; gap: 11px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: left; cursor: pointer; }
.search-result:hover { border-color: #c7d7bb; }
.result-code { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; color: #315241; background: #edf4df; border-radius: 12px; font-size: 10px; font-weight: 800; }
.result-copy { min-width: 0; flex: 1; }
.result-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.result-copy small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.search-spinner { display: none; width: 16px; height: 16px; border: 2px solid #e5e9e3; border-top-color: #68874c; border-radius: 50%; animation: spin .7s linear infinite; }
.search-field.is-loading .search-spinner { display: block; }

.toast { position: fixed; z-index: 30; right: 16px; bottom: calc(var(--nav-height) + 18px + env(safe-area-inset-bottom)); left: 16px; width: fit-content; max-width: min(420px, calc(100vw - 32px)); margin: 0 auto; padding: 12px 16px; color: #fff; background: #193b39; border-radius: 12px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.icon-button.is-refreshing .icon { animation: spin .8s linear infinite; }
.bottom-nav, .topbar { -webkit-user-select: none; user-select: none; }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

@keyframes screen-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 720px) {
    .topbar { height: 74px; }
    .screen { padding-top: 35px; padding-bottom: 45px; }
    .welcome-row { margin-top: 0; }
    .welcome-row h1 { font-size: 38px; }
    .hero-card { padding: 27px; }
    .hero-card h2 { font-size: 27px; }
    .route-list, .alert-list, .schedule-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-detail-head { margin-top: 0; }
    .bottom-nav { position: sticky; bottom: 0; width: min(100%, 600px); min-height: 68px; margin: 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; }
    .nav-item { flex-direction: row; gap: 7px; font-size: 11px; }
    .toast { bottom: 88px; }
    .search-dialog { bottom: 30px; border-radius: 25px; }
    .dialog-grip { display: none; }
    .tracking-page { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); align-items: start; column-gap: 18px; }
    .tracking-page > .back-button, .tracking-heading, .tracking-loading { grid-column: 1 / -1; }
    .tracking-map-shell { grid-column: 1; grid-row: 3 / span 2; }
    .tracking-map { height: min(68dvh, 650px); }
    .map-attribution-note { grid-column: 1; }
    .tracking-panel { grid-column: 2; grid-row: 3 / span 2; }
}

@media (min-width: 1024px) {
    .screen { width: min(100%, 700px); }
    .topbar { padding-right: max(20px, calc((100vw - 700px) / 2)); padding-left: max(20px, calc((100vw - 700px) / 2)); }
    .bottom-nav { width: min(100%, 700px); }
    .welcome-row h1 { max-width: 500px; }
    .quick-card { min-height: 100px; padding: 17px; }
    .route-list, .alert-list, .schedule-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
