:root {
    --br-blue: #003b7a;
    --br-blue-deep: #002a57;
    --br-blue-ink: #0d2340;
    --br-blue-bright: #0f5fb5;
    --br-blue-pale: #d9ebff;
    --br-panel: #ffffff;
    --br-panel-edge: #c2d6ee;
    --br-surface: #edf4fb;
    --br-surface-2: #e2edf8;
    --br-gold: #f1c54b;
    --br-text: #17283d;
    --br-text-soft: #4f6480;
    --br-heading: #102744;
    --br-page-bg: #e7eef6;
    --br-header-text: #ffffff;
    --br-header-subtle: rgba(255, 255, 255, 0.82);
    --br-border-soft: #d8e4f0;
    --br-item-bg: #f8fbff;
    --br-warning-border: #d8c27a;
    --br-warning-bg: #fff2bf;
    --br-warning-text: #5f4700;
    --br-input-bg: #ffffff;
    --br-input-border: #a8bfdc;
    --br-input-outline: rgba(15, 95, 181, 0.18);
    --br-table-head-bg: #d8e6f5;
    --br-row-alt-bg: #eef5fd;
    --br-row-highlight-bg: #fff2cf;
    --br-row-missing-bg: #fff0f0;
    --br-row-child-bg: #fff8df;
    --br-row-highlight-text: #7a4b00;
    --br-row-muted-text: #666666;
    --br-row-missing-text: #a55a00;
    --br-row-danger-text: #7a2f2f;
    --br-row-child-text: #8a6200;
    --br-popover-bg: rgba(255, 255, 255, 0.96);
    --br-toggle-bg: #edf1f5;
    --br-toggle-muted: #8a8f98;
    --br-contrast-text: #151515;
    --br-gold-border: #b68d17;
    --br-gold-hover: #e4b734;
    --br-danger-bg: #d97b7b;
    --br-danger-text: #2f0f0f;
    --br-danger-border: #a44d4d;
    --br-danger-hover: #c96767;
    --br-bus-bg: #d9bf96;
    --br-bus-border: #8a6732;
    --br-bus-text: #4a3210;
}


html {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --br-blue: #0a2440;
    --br-blue-deep: #081523;
    --br-blue-ink: #d7e5f7;
    --br-blue-bright: #5ea2ea;
    --br-blue-pale: #16314e;
    --br-panel: #102032;
    --br-panel-edge: #27435f;
    --br-surface: #14283c;
    --br-surface-2: #112335;
    --br-text: #e4eef9;
    --br-text-soft: #a9bfd7;
    --br-heading: #f1f6fd;
    --br-page-bg: #0a1624;
    --br-header-text: #ffffff;
    --br-header-subtle: rgba(255, 255, 255, 0.82);
    --br-border-soft: #27435f;
    --br-item-bg: #13283d;
    --br-warning-border: #8e7422;
    --br-warning-bg: #3b3110;
    --br-warning-text: #f0dc96;
    --br-input-bg: #102032;
    --br-input-border: #3a5977;
    --br-input-outline: rgba(94, 162, 234, 0.25);
    --br-table-head-bg: #18314a;
    --br-row-alt-bg: #11263a;
    --br-row-highlight-bg: #3a2f14;
    --br-row-missing-bg: #3a1f1f;
    --br-row-child-bg: #372d12;
    --br-row-highlight-text: #f2d07a;
    --br-row-muted-text: #9eb4cb;
    --br-row-missing-text: #efb1a8;
    --br-row-danger-text: #f2b5b5;
    --br-row-child-text: #e0c26b;
    --br-popover-bg: rgba(16, 32, 50, 0.98);
    --br-toggle-bg: #18314a;
    --br-toggle-muted: #9eb4cb;
    --br-contrast-text: #151515;
    --br-gold-border: #d6ab2d;
    --br-gold-hover: #dfb339;
    --br-danger-bg: #d97b7b;
    --br-danger-text: #2f0f0f;
    --br-danger-border: #a44d4d;
    --br-danger-hover: #c96767;
    --br-bus-bg: #4b3820;
    --br-bus-border: #8f6a37;
    --br-bus-text: #f0d8b0;
}

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

body {
    font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
    line-height: 1.55;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--br-page-bg);
    color: var(--br-text);
}

header {
    background-color: var(--br-blue);
    color: var(--br-header-text);
    padding: 1.35rem 1.5rem 1.2rem;
    text-align: center;
    border-bottom: 10px solid var(--br-gold);
}

.brand-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--br-header-text);
}

header p {
    margin: 0.45rem 0 0;
    color: var(--br-header-subtle);
}

main {
    max-width: 1320px;
    margin: 1.6rem auto 2.5rem;
    padding: 0 1rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(360px, 1fr);
    gap: 1rem;
    align-items: start;
}

.primary-column {
    min-width: 0;
}

.comparison-panel {
    min-width: 0;
}

.comparison-card {
    position: sticky;
    top: 1rem;
}

.comparison-header {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.comparison-header h2 {
    margin: 0;
}

.comparison-subtitle {
    margin: 0.2rem 0 0;
    color: var(--br-text-soft);
    font-size: 0.92rem;
}

.comparison-empty-state {
    position: relative;
    padding: 0.8rem;
    padding-bottom: 1rem;
    border: 1px dashed var(--br-panel-edge);
    border-radius: 10px;
    background: var(--br-surface);
    color: var(--br-text-soft);
    margin-bottom: 0.9rem;
}

.comparison-empty-state-copy {
    padding-right: 1.8rem;
}

.comparison-empty-state-dismiss {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 0;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--br-text-soft);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.comparison-empty-state > .comparison-empty-state-dismiss {
    width: 1.25rem;
    max-width: 1.25rem;
    flex: 0 0 1.25rem;
}

.comparison-empty-state-dismiss:hover {
    background: transparent;
    color: var(--br-blue-deep);
}

.comparison-option-card {
    border-top: 1px solid var(--br-border-soft);
    padding-top: 0.9rem;
    margin-top: 0.9rem;
}

.comparison-option-card:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.comparison-option-header {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.comparison-option-header h3 {
    margin: 0;
}

.comparison-option-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.comparison-option-actions button,
.comparison-footer-actions button,
.comparison-header button {
    width: auto;
}

.comparison-action-danger {
    background-color: var(--br-danger-bg);
    color: var(--br-danger-text);
    border-color: var(--br-danger-border);
}

.comparison-action-danger:hover {
    background-color: var(--br-danger-hover);
}

.comparison-option-total {
    font-weight: 700;
    color: var(--br-blue-deep);
    margin-bottom: 0.7rem;
}

.comparison-option-empty {
    color: var(--br-text-soft);
    font-size: 0.92rem;
}

.comparison-option-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.comparison-item {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.7rem;
    border: 1px solid var(--br-border-soft);
    border-radius: 10px;
    background: var(--br-item-bg);
}

.comparison-item-main {
    min-width: 0;
}

.comparison-item-side {
    flex: 0 0 auto;
    text-align: right;
}

.comparison-item-price {
    font-weight: 700;
    color: var(--br-blue-deep);
    margin-bottom: 0.45rem;
}

.comparison-item-meta {
    color: var(--br-text-soft);
    font-size: 0.9rem;
    margin-top: 0.2rem;
    word-break: break-word;
}

.comparison-footer-actions {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--br-border-soft);
}

.add-option-popover {
    position: absolute;
    z-index: 200;
    min-width: 220px;
    max-width: min(280px, calc(100vw - 16px));
    padding: 0.7rem;
    border: 1px solid var(--br-panel-edge);
    border-radius: 12px;
    background: var(--br-panel);
}

.add-option-popover-title {
    font-weight: 700;
    margin-bottom: 0.55rem;
}

.add-option-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.add-option-choice,
.add-option-new {
    width: 100%;
    text-align: left;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.site-footer {
    max-width: 1320px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    color: var(--br-text-soft);
}

.site-footer a,
.footer-theme-toggle {
    color: var(--br-blue-bright);
    text-decoration: underline;
}

.footer-meta {
    color: var(--br-text-soft);
    white-space: nowrap;
}

.footer-theme-toggle {
    cursor: pointer;
}

.search-box {
    background: var(--br-panel);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--br-panel-edge);
    margin-bottom: 1.2rem;
}

.plusbus-hint {
    margin-top: 0.85rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--br-warning-border);
    background: var(--br-warning-bg);
    color: var(--br-warning-text);
    border-radius: 10px;
}

.search-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.9rem 0.8rem;
    align-items: end;
}

.search-form-grid .form-group {
    margin: 0;
}

.search-form-grid .autocomplete-container:nth-of-type(3) {
    grid-column: 1 / -1;
}

.autocomplete-container {
    position: relative;
}

.autocomplete-picked-display {
    position: absolute;
    left: 1px;
    right: 2.6rem;
    top: 0;
    height: 0;
    display: none;
    align-items: center;
    padding: 0 0.68rem;
    border-radius: 9px;
    color: var(--br-text);
    pointer-events: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.2;
    z-index: 1;
}

.autocomplete-clear-button {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.8rem;
    height: 1.8rem;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--br-panel-edge);
    border-radius: 999px;
    background: var(--br-surface);
    color: var(--br-text-soft);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    z-index: 3;
}

.autocomplete-clear-button:hover {
    background: var(--br-table-head-bg);
    color: var(--br-text);
}

.autocomplete-clear-button:focus-visible {
    outline: 2px solid var(--br-blue-bright);
    outline-offset: 1px;
}

.autocomplete-container input.has-picked-display {
    color: transparent;
    text-shadow: none;
}

.autocomplete-container input {
    padding-right: 2.8rem;
}

.autocomplete-container input.has-picked-display::selection {
    background: transparent;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--br-panel);
    border: 1px solid var(--br-panel-edge);
    border-top: none;
    z-index: 99;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-suggestion {
    width: 100%;
    min-width: 0;
    display: block;
    text-align: left;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid var(--br-surface);
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 0;
    background: var(--br-panel);
    color: var(--br-text);
    font-weight: 400;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover {
    background-color: var(--br-surface);
}

.autocomplete-suggestion.is-active {
    background-color: var(--br-table-head-bg);
}

.suggestion-crs {
    font-weight: bold;
    color: var(--br-blue-bright);
    margin-right: 10px;
    display: inline-block;
    width: 40px;
}

.autocomplete-suggestion small {
    color: var(--br-text-soft);
    font-size: 0.84em;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"] {
    width: 100%;
    padding: 0.58rem 0.68rem;
    border: 1px solid var(--br-input-border);
    border-radius: 8px;
    background: var(--br-popover-bg);
    color: var(--br-text);
}

input[type="date"] {
    width: 100%;
    padding: 0.58rem 0.68rem;
    border: 1px solid var(--br-input-border);
    border-radius: 8px;
    background: var(--br-popover-bg);
    color: var(--br-text);
}

select {
    width: 100%;
    padding: 0.58rem 0.68rem;
    border: 1px solid var(--br-input-border);
    border-radius: 8px;
    background: var(--br-input-bg);
    color: var(--br-text);
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
    outline: 2px solid var(--br-input-outline);
    border-color: var(--br-blue-bright);
}

button {
    background: var(--br-gold);
    color: var(--br-contrast-text);
    border: 1px solid var(--br-gold-border);
    padding: 0.48rem 0.88rem;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 700;
}

button:hover {
    background: var(--br-gold-hover);
}

.secondary-button {
    background: var(--br-gold);
    color: var(--br-contrast-text);
    border: 1px solid var(--br-gold-border);
}

.secondary-button:hover {
    background: var(--br-gold-hover);
}

.journey-swap-button {
    width: 3rem;
    min-width: 3rem;
    padding: 0.48rem 0;
    align-self: end;
    margin-top: 1.7rem;
}

.search-submit-button {
    grid-column: 1 / -1;
}

.detail-header {
    justify-content: flex-start;
}

.detail-header button {
    width: auto;
}

.filter-box {
    background: var(--br-panel);
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--br-panel-edge);
    margin-bottom: 1rem;
    display: flex;
    gap: 0.9rem 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

#station-section .filter-box {
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.7rem;
    gap: 0.55rem 0.8rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.filter-group-class {
    flex: 1 1 26rem;
}

.filter-group-toggles {
    flex: 1 1 20rem;
    justify-content: flex-end;
}

.filter-label {
    font-weight: bold;
    margin: 0;
    min-width: 2.8rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.filter-box label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    cursor: pointer;
    margin: 0;
}

.class-filter-option,
.child-toggle {
    min-height: 2.2rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--br-panel-edge);
    border-radius: 999px;
    background: var(--br-surface);
    box-sizing: border-box;
}

.class-filter-option input,
.child-toggle input {
    margin: 0;
}

.class-filter-option.is-disabled {
    color: var(--br-toggle-muted);
    cursor: not-allowed;
    opacity: 0.6;
    background: var(--br-toggle-bg);
}

.class-filter-option.is-disabled input {
    cursor: not-allowed;
}

.filter-toggles {
    justify-content: flex-end;
}

.fares-group {
    margin-bottom: 2rem;
}

.fares-group h2 {
    color: var(--br-heading);
    border-bottom: 3px solid var(--br-gold);
    padding-bottom: 0.45rem;
    margin-bottom: 0.85rem;
}

table.fares-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--br-popover-bg);
    border: 1px solid var(--br-panel-edge);
    border-radius: 12px;
    overflow: hidden;
}

table.fares-table th, table.fares-table td {
    padding: 0.66rem 0.72rem;
    text-align: left;
    border-bottom: 1px solid var(--br-border-soft);
}

table.fares-table th {
    background: var(--br-table-head-bg);
    font-weight: bold;
    color: var(--br-blue-ink);
}

table.fares-table tr:hover {
    background-color: var(--br-row-alt-bg);
}

table.fares-table tr.child-fare-row,
table.fares-table tr.child-fare-row:hover {
    background-color: var(--br-row-highlight-bg);
}

table.fares-table tr.reverse-missing-row,
table.fares-table tr.reverse-missing-row:hover {
    background-color: var(--br-row-missing-bg);
}

table.fares-table tr.reverse-different-row,
table.fares-table tr.reverse-different-row:hover {
    background-color: var(--br-row-child-bg);
}

.child-fare-label {
    color: var(--br-row-highlight-text);
    font-weight: 600;
}

.original-fare {
    color: var(--br-row-muted-text);
    display: block;
    margin-top: 0.2rem;
}

.fare-asterisk {
    color: var(--br-row-missing-text);
    font-weight: 700;
    margin-left: 0.15rem;
}

.reverse-note {
    color: var(--br-row-danger-text);
    display: block;
    margin-top: 0.2rem;
    font-size: 0.86rem;
}

.reverse-note.is-different {
    color: var(--br-row-child-text);
}

.fare-detail-card {
    background: var(--br-panel);
    padding: 1.15rem;
    border-radius: 14px;
    border: 1px solid var(--br-panel-edge);
}

.fare-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fare-detail-grid div {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.fare-detail-copy h3 {
    margin-top: 0;
    color: var(--br-heading);
}

.restriction-details {
    margin: 0.9rem 0 0;
    padding-left: 1.2rem;
}

.restriction-details li {
    margin-bottom: 0.35rem;
}

.restriction-raw {
    margin-top: 0.6rem;
    padding: 0.75rem;
    background: #edf4fb;
    border: 1px solid #c8d8ea;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-size: 0.88rem;
    line-height: 1.45;
}

.fare-detail-actions {
    margin-top: 1.5rem;
}

.fare-detail-actions button {
    width: auto;
}

.timetable-main {
    max-width: 1320px;
}

#service-section .fare-detail-card {
    padding: 0;
}

#service-section .timetable-page-header,
#service-section .fare-detail-grid {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

#service-section .timetable-page-header,
#station-context {
    padding-top: 1rem;
}

#station-context,
#service-section .fare-detail-grid {
    padding-bottom: 1rem;
}

#station-section .timetable-page-header {
    padding-top: 0.1rem;
}

#station-subtitle {
    margin-bottom: 0.15rem;
}

#station-context {
    padding-top: 0;
    padding-bottom: 0.25rem;
    margin-top: 0.2rem;
}

.untimes-search-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: stretch;
}

.untimes-search-row {
    display: grid;
    gap: 0.8rem;
    align-items: end;
}

.untimes-search-row-primary {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.untimes-search-row-secondary {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.untimes-search-row-secondary > .form-group:first-child {
    width: min(100%, 280px);
    justify-self: start;
}

.untimes-search-row-secondary > .form-group:nth-child(2) {
    width: max-content;
    max-width: 100%;
    justify-self: end;
}

.timetable-page-header h2 {
    margin: 0;
}

.untimes-context {
    margin-top: 0.45rem;
    color: var(--br-text-soft);
}

.untimes-stp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.45rem;
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
    border: 1px solid var(--br-panel-edge);
    background: var(--br-surface);
    color: var(--br-blue-deep);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

.untimes-stp-badge.is-overlay {
    background: var(--br-blue-bright);
    color: #ffffff;
    border-color: var(--br-blue-bright);
}

.untimes-stp-badge.is-cancelled {
    background: var(--br-row-missing-bg);
    color: var(--br-row-danger-text);
    border-color: var(--br-danger-border);
}

.untimes-stp-badge.is-stp {
    background: var(--br-row-child-bg);
    color: var(--br-row-child-text);
}

.untimes-bus-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.45rem;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--br-bus-border);
    background: var(--br-bus-bg);
    color: var(--br-bus-text);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

.untimes-activity-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.45rem;
    padding: 0.08rem 0.42rem;
    border-radius: 999px;
    border: 1px solid var(--br-panel-edge);
    background: var(--br-surface);
    color: var(--br-blue-deep);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

.untimes-activity-pill.is-set-down-only {
    background: var(--br-row-child-bg);
    color: var(--br-row-child-text);
    border-color: var(--br-gold-border);
}

.untimes-activity-pill.is-not-advertised {
    background: #d4351c;
    color: #ffffff;
    border-color: #b10e1e;
}

.untimes-table tr.cancelled-service-row,
.untimes-table tr.cancelled-service-row:hover {
    background: var(--br-row-missing-bg);
    color: var(--br-row-danger-text);
    opacity: 0.7;
}

.cancelled-service-row td {
    text-decoration: line-through;
}

.cancelled-service-row a,
.cancelled-service-row .secondary-link {
    color: inherit;
}

.overlay-service-row td:first-child {
    box-shadow: inset 3px 0 0 var(--br-blue-bright);
}

.untimes-interchanges {
    margin-top: 0.2rem;
    font-size: 0.95em;
}

.untimes-interchange-panel {
    margin-top: 0.25rem;
    padding: 0.65rem 0.8rem 0.75rem;
    border: 1px solid var(--br-border-soft);
    border-radius: 10px;
    background: var(--br-item-bg);
}

.untimes-interchange-header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.untimes-interchange-title {
    color: var(--br-heading);
    font-weight: 700;
}

.untimes-interchange-subtitle {
    color: var(--br-text-soft);
    font-size: 0.92rem;
    line-height: 1.4;
}

.untimes-interchange-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: var(--br-blue-pale);
    color: var(--br-blue-deep);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.untimes-interchange-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.untimes-interchange-item {
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--br-panel-edge);
    border-radius: 8px;
    background: var(--br-panel);
}

.untimes-interchange-route {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--br-text);
    font-weight: 600;
}

.untimes-interchange-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.08rem 0.35rem;
    border: 1px solid var(--br-panel-edge);
    border-radius: 6px;
    background: var(--br-surface);
    color: var(--br-blue-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.untimes-interchange-arrow {
    color: var(--br-text-soft);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.untimes-interchange-minutes {
    flex: 0 0 auto;
    color: var(--br-heading);
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .untimes-interchange-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .untimes-interchange-list {
        flex-direction: column;
    }

    .untimes-interchange-item {
        width: 100%;
        min-width: 0;
    }
}

.untimes-station-table {
    margin-top: 0.85rem;
}

.untimes-date-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
}

.untimes-date-shortcuts {
    display: inline-flex;
    gap: 0.45rem;
    font-size: 0.84rem;
}

.untimes-date-shortcuts a {
    color: var(--br-blue-bright);
    text-decoration: none;
    font-weight: 600;
}

.untimes-date-shortcuts a:hover {
    text-decoration: underline;
}

.untimes-filter-row {
    width: auto;
    display: flex;
    align-items: end;
    justify-content: flex-start;
    gap: 0.7rem 0.8rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.untimes-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 0.45rem;
    padding-right: 15px;
    margin-top: 0;
}

.untimes-checkbox label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
}

.untimes-radio-group {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1 1 14rem;
    min-width: 0;
    max-width: 100%;
    min-inline-size: 0;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 0.96rem;
}

.untimes-radio-group legend {
    flex: 0 0 auto;
    font-weight: 600;
    margin-right: 0.1rem;
}

.untimes-radio-group label {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.35rem;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
}

@media (max-width: 980px) {
    .untimes-search-row-primary {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    }

    .untimes-search-row-secondary {
        grid-template-columns: 1fr;
    }

    .untimes-search-row-secondary > .form-group:first-child,
    .untimes-search-row-secondary > .form-group:nth-child(2) {
        width: auto;
        max-width: none;
        justify-self: stretch;
    }

    .untimes-filter-row {
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

}

@media (max-width: 780px) {
    .untimes-search-row-secondary {
        grid-template-columns: 1fr;
    }

    .untimes-search-row-secondary > .form-group:first-child,
    .untimes-search-row-secondary > .form-group:nth-child(2) {
        width: auto;
        max-width: none;
        justify-self: stretch;
    }

    .untimes-filter-row {
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

}

.secondary-link,
.time-link {
    color: var(--br-blue-bright);
    text-decoration: none;
    font-weight: 600;
}

.secondary-link:hover,
.time-link:hover {
    text-decoration: underline;
}

.untimes-table tr.connection-impossible,
.untimes-table tr.connection-impossible:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.65;
}

.untimes-table tr.connection-missed,
.untimes-table tr.connection-missed:hover {
    background: var(--br-row-missing-bg);
    color: var(--br-row-danger-text);
    opacity: 0.7;
}

.untimes-table tr.pass-time-row,
.untimes-table tr.pass-time-row:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.65;
}

.untimes-table tr.set-down-only-row,
.untimes-table tr.set-down-only-row:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.78;
}

.untimes-table tr.not-advertised-row,
.untimes-table tr.not-advertised-row:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.78;
}

.untimes-table tr.limited-activity-row,
.untimes-table tr.limited-activity-row:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.78;
}

.untimes-table tr.replacement-bus-row,
.untimes-table tr.replacement-bus-row:hover {
    background: color-mix(in srgb, var(--br-bus-bg) 46%, var(--br-panel) 54%);
    color: var(--br-text);
    opacity: 1;
}

.untimes-table tr.set-down-only-row.replacement-bus-row,
.untimes-table tr.set-down-only-row.replacement-bus-row:hover,
.untimes-table tr.set-down-only-row.replacement-bus-row.connection-impossible,
.untimes-table tr.set-down-only-row.replacement-bus-row.connection-impossible:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.78;
}

.untimes-table tr.set-down-only-row.replacement-bus-row.connection-missed,
.untimes-table tr.set-down-only-row.replacement-bus-row.connection-missed:hover {
    background: var(--br-row-missing-bg);
    color: var(--br-row-danger-text);
    opacity: 0.78;
}

.untimes-table tr.not-advertised-row.replacement-bus-row,
.untimes-table tr.not-advertised-row.replacement-bus-row:hover,
.untimes-table tr.not-advertised-row.replacement-bus-row.connection-impossible,
.untimes-table tr.not-advertised-row.replacement-bus-row.connection-impossible:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.78;
}

.untimes-table tr.not-advertised-row.replacement-bus-row.connection-missed,
.untimes-table tr.not-advertised-row.replacement-bus-row.connection-missed:hover {
    background: var(--br-row-missing-bg);
    color: var(--br-row-danger-text);
    opacity: 0.78;
}

.untimes-table tr.limited-activity-row.replacement-bus-row,
.untimes-table tr.limited-activity-row.replacement-bus-row:hover,
.untimes-table tr.limited-activity-row.replacement-bus-row.connection-impossible,
.untimes-table tr.limited-activity-row.replacement-bus-row.connection-impossible:hover {
    background: var(--br-row-alt-bg);
    color: var(--br-row-muted-text);
    opacity: 0.78;
}

.untimes-table tr.limited-activity-row.replacement-bus-row.connection-missed,
.untimes-table tr.limited-activity-row.replacement-bus-row.connection-missed:hover {
    background: var(--br-row-missing-bg);
    color: var(--br-row-danger-text);
    opacity: 0.78;
}

.untimes-table tr.replacement-bus-row.connection-impossible,
.untimes-table tr.replacement-bus-row.connection-impossible:hover {
    background: color-mix(in srgb, var(--br-bus-bg) 38%, var(--br-row-alt-bg) 62%);
}

.untimes-table tr.replacement-bus-row.connection-missed,
.untimes-table tr.replacement-bus-row.connection-missed:hover {
    background: color-mix(in srgb, var(--br-bus-bg) 28%, var(--br-row-missing-bg) 72%);
}

.untimes-row-link {
    display: block;
    width: 100%;
    min-height: 100%;
    color: inherit;
    text-decoration: none;
}

.untimes-row-link:hover {
    text-decoration: none;
}

.untimes-facilities {
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.untimes-future-call {
    margin-top: 0.18rem;
    font-size: 0.84em;
    color: var(--br-text-soft);
}

.untimes-stop-crs-inline {
    display: none;
}

.untimes-table tr.hour-divider-row,
.untimes-table tr.hour-divider-row:hover {
    background: transparent;
}

.untimes-table tr.hour-divider-row td {
    padding: 0.9rem 0.25rem 0.55rem;
    border-bottom: none;
    background: transparent;
    color: var(--br-blue-ink);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    position: relative;
}

.untimes-table tr.hour-divider-row td::before,
.untimes-table tr.hour-divider-row td::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 2.3rem);
    border-top: 1px solid var(--br-panel-edge);
}

.untimes-table tr.hour-divider-row td::before {
    left: 0;
}

.untimes-table tr.hour-divider-row td::after {
    right: 0;
}

@media (max-width: 800px) {
    .untimes-table,
    .untimes-table thead,
    .untimes-table tbody,
    .untimes-table tr,
    .untimes-table th,
    .untimes-table td {
        display: block;
        width: 100%;
    }

    .untimes-table {
        border: none;
        background: transparent;
    }

    .untimes-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .untimes-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .untimes-table tr {
        border: 1px solid var(--br-panel-edge);
        border-radius: 12px;
        background: var(--br-panel);
        overflow: hidden;
    }

    .untimes-table td {
        display: grid;
        grid-template-columns: 5rem minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
        padding: 0.55rem 0.75rem;
        border-bottom: 1px solid var(--br-border-soft);
        min-height: 2.3rem;
        text-align: left;
        white-space: normal;
    }

    .untimes-table td:last-child {
        border-bottom: none;
    }

    .untimes-table td::before {
        position: static;
        display: block;
        width: auto;
        font-weight: 700;
        color: var(--br-blue-ink);
        content: attr(data-label);
    }
}

tbody tr.fare-row {
    cursor: pointer;
}

.bag-action-button {
    width: auto;
    padding: 0.28rem 0.55rem;
    font-size: 0.82rem;
    line-height: 1.2;
}

.bag-remove-button {
    width: auto;
    padding: 0.3rem 0.55rem;
    background-color: #d97b7b;
    color: #2f0f0f;
    border-color: #a44d4d;
}

.bag-remove-button:hover {
    background-color: #c96767;
}

@media (max-width: 720px) {
    #search-form.search-form-grid {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem 0.75rem;
    }

    #search-form.search-form-grid > .form-group:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    #search-form.search-form-grid > .journey-swap-button {
        grid-row: 1;
        grid-column: 2;
        justify-self: center;
        align-self: end;
        width: auto;
        min-width: 3rem;
        margin-top: 1.7rem;
        padding-inline: 0;
    }

    #search-form.search-form-grid > .form-group:nth-child(3) {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    #search-form.search-form-grid > .form-group:nth-child(4) {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    #search-form.search-form-grid > .search-submit-button {
        grid-column: 1 / -1;
        grid-row: 5;
    }

    .search-form-grid {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 0.9fr);
    }

    .search-submit-button {
        grid-column: 1 / -1;
    }

    .journey-swap-button {
        width: auto;
        min-width: 0;
        margin-top: 0;
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .filter-box {
        align-items: stretch;
    }

    .filter-group,
    .filter-group-toggles {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-label {
        min-width: 0;
    }

    .filter-options {
        width: 100%;
    }

    .class-filter-option,
    .child-toggle {
        flex: 1 1 11rem;
        justify-content: center;
    }

    .fare-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.85rem;
    }

    .fare-detail-actions button,
    .comparison-option-actions button,
    .comparison-header button,
    .comparison-footer-actions button {
        width: 100%;
    }

    .comparison-card {
        position: static;
    }

    .comparison-header,
    .comparison-option-header,
    .comparison-item {
        flex-direction: column;
    }

    .comparison-item-side {
        width: 100%;
        text-align: left;
    }

    .untimes-date-label {
        flex-wrap: wrap;
    }

    .untimes-search-row-primary {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    }

    .untimes-search-row-secondary {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
    }

}

html[data-theme="dark"] .comparison-subtitle,
html[data-theme="dark"] .comparison-empty-state,
html[data-theme="dark"] .comparison-option-empty,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .original-fare,
html[data-theme="dark"] .reverse-note,
html[data-theme="dark"] .filter-label,
html[data-theme="dark"] .restriction-details li,
html[data-theme="dark"] .about-card p,
html[data-theme="dark"] .fare-detail-grid span,
html[data-theme="dark"] .fare-detail-copy p {
    font-weight: 500;
}

#loading, #error {
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
}

@media (max-width: 720px) {
    main {
        margin-top: 1rem;
        padding: 0 0.75rem 1.5rem;
    }
}

@media (max-width: 560px) {
    header {
        padding: 1rem 0.85rem 0.9rem;
        border-bottom-width: 8px;
    }

    .brand-mark {
        font-size: clamp(1.7rem, 9vw, 2.25rem);
        letter-spacing: 0.12em;
    }

    header p {
        font-size: 0.92rem;
    }

    main,
    .site-footer {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .search-box,
    .fare-detail-card,
    .filter-box,
    .comparison-item {
        padding: 0.65rem;
    }

    .plusbus-hint {
        padding: 0.65rem 0.7rem;
        font-size: 0.92rem;
    }

    .suggestion-crs {
        width: 34px;
        margin-right: 6px;
    }

    button {
        padding: 0.46rem 0.72rem;
        font-size: 0.92rem;
    }

    .comparison-empty-state > .comparison-empty-state-dismiss {
        width: 1.25rem;
        max-width: 1.25rem;
        min-width: 1.25rem;
        padding: 0;
    }

    .journey-swap-button {
        width: 100%;
        min-width: 0;
    }

    #search-form .journey-swap-button {
        width: auto;
        min-width: 3rem;
        justify-self: center;
    }

    .filter-box {
        padding: 0.7rem;
        gap: 0.7rem;
    }

    .filter-group {
        gap: 0.55rem;
    }

    .class-filter-option,
    .child-toggle {
        min-height: 2rem;
        padding: 0.35rem 0.55rem;
        font-size: 0.92rem;
    }

    .fares-group {
        margin-bottom: 1.4rem;
    }

    .fares-group h2 {
        font-size: 1.05rem;
        margin-bottom: 0.65rem;
    }

    table.fares-table th,
    table.fares-table td,
    .bag-items-table th,
    .bag-items-table td {
        padding: 0.58rem 0.6rem;
        font-size: 0.9rem;
    }

    .fare-detail-grid {
        grid-template-columns: 1fr;
    }

    .restriction-raw {
        font-size: 0.82rem;
    }

    .comparison-header h2,
    .comparison-option-header h3 {
        font-size: 1.05rem;
    }

    .untimes-search-grid {
        gap: 0.75rem 0.65rem;
    }

    .untimes-search-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .untimes-filter-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .untimes-checkbox {
        padding-right: 15px;
    }

    .untimes-radio-group {
        flex-wrap: wrap;
    }
}

/* Final Untimely form overrides so legacy generic form breakpoints don't win. */
@media (max-width: 980px) {
    .untimes-search-row-primary {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 0.82fr);
    }

    .untimes-search-row-secondary {
        grid-template-columns: 1fr;
    }

    .untimes-search-row-secondary > .form-group:first-child,
    .untimes-search-row-secondary > .form-group:nth-child(2) {
        width: auto;
        max-width: none;
        justify-self: stretch;
    }

    .untimes-filter-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .untimes-radio-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 780px) {
    .untimes-search-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .untimes-search-row-secondary > .form-group:first-child,
    .untimes-search-row-secondary > .form-group:nth-child(2) {
        width: auto;
        max-width: none;
        justify-self: stretch;
    }

    .untimes-filter-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .untimes-radio-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    html,
    body {
        min-width: 320px;
    }

    header {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    main,
    .site-footer {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .search-box,
    .fare-detail-card,
    .filter-box,
    .bag-group-card {
        padding: 0.7rem;
    }

    .class-filter-option,
    .child-toggle {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .autocomplete-suggestion {
        padding: 0.58rem 0.68rem;
    }

    table.fares-table th,
    table.fares-table td,
    .bag-items-table th,
    .bag-items-table td {
        padding: 0.52rem 0.55rem;
        font-size: 0.86rem;
    }
}

@media (max-width: 480px) {
    table.fares-table,
    table.fares-table thead,
    table.fares-table tbody,
    table.fares-table tr,
    table.fares-table th,
    table.fares-table td {
        display: block;
        width: 100%;
    }

    table.fares-table {
        border: none;
        background: transparent;
    }

    table.fares-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    table.fares-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    table.fares-table tr {
        border: 1px solid var(--br-panel-edge);
        border-radius: 12px;
        background: var(--br-panel);
        overflow: hidden;
    }

    table.fares-table tr.child-fare-row,
    table.fares-table tr.child-fare-row:hover,
    table.fares-table tr.reverse-missing-row,
    table.fares-table tr.reverse-missing-row:hover,
    table.fares-table tr.reverse-different-row,
    table.fares-table tr.reverse-different-row:hover {
        background-clip: padding-box;
    }

    table.fares-table td {
        position: relative;
        padding: 0.48rem 0.7rem 0.48rem 7rem;
        border-bottom: 1px solid #d9e4f1;
        min-height: 2rem;
        text-align: left;
        white-space: normal;
    }

    table.fares-table td:last-child {
        border-bottom: none;
    }

    table.fares-table td::before {
        position: absolute;
        left: 0.7rem;
        top: 0.48rem;
        width: 5.4rem;
        font-weight: 700;
        color: var(--br-blue-ink);
        content: "";
    }

    #singles-section .fares-table td:nth-child(1)::before,
    #returns-section .fares-table td:nth-child(1)::before,
    #seasons-section .fares-table td:nth-child(1)::before,
    #other-section .fares-table td:nth-child(1)::before {
        content: "Ticket";
    }

    #singles-section .fares-table td:nth-child(2)::before,
    #returns-section .fares-table td:nth-child(2)::before,
    #seasons-section .fares-table td:nth-child(2)::before,
    #other-section .fares-table td:nth-child(2)::before {
        content: "Fare";
    }

    #singles-section .fares-table td:nth-child(3)::before,
    #returns-section .fares-table td:nth-child(3)::before,
    #seasons-section .fares-table td:nth-child(3)::before,
    #other-section .fares-table td:nth-child(3)::before {
        content: "Restrict";
    }

    #singles-section .fares-table td:nth-child(4)::before,
    #returns-section .fares-table td:nth-child(4)::before,
    #seasons-section .fares-table td:nth-child(4)::before,
    #other-section .fares-table td:nth-child(4)::before {
        content: "Route";
    }

    #singles-section .fares-table td:nth-child(5)::before,
    #returns-section .fares-table td:nth-child(5)::before,
    #seasons-section .fares-table td:nth-child(5)::before,
    #other-section .fares-table td:nth-child(5)::before {
        content: "Class";
    }

    #singles-section .fares-table td:nth-child(6)::before,
    #returns-section .fares-table td:nth-child(6)::before,
    #seasons-section .fares-table td:nth-child(6)::before,
    #other-section .fares-table td:nth-child(6)::before {
        content: "Bag";
    }

    .bag-action-button,
    .bag-remove-button {
        width: 100%;
    }

    table.fares-table.untimes-table,
    table.fares-table.untimes-table thead,
    table.fares-table.untimes-table tbody,
    table.fares-table.untimes-table tr,
    table.fares-table.untimes-table th,
    table.fares-table.untimes-table td {
        display: block;
        width: 100%;
    }

    table.fares-table.untimes-table {
        border: none;
        background: transparent;
    }

    table.fares-table.untimes-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    table.fares-table.untimes-table tr {
        border: 1px solid var(--br-panel-edge);
        border-radius: 12px;
        background: var(--br-panel);
        overflow: hidden;
    }

    table.fares-table.untimes-table td {
        display: grid;
        grid-template-columns: 5rem minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
        padding: 0.55rem 0.75rem;
        border-bottom: 1px solid var(--br-border-soft);
        min-height: 2.3rem;
        text-align: left;
        white-space: normal;
    }

    table.fares-table.untimes-table td:last-child {
        border-bottom: none;
    }

    table.fares-table.untimes-table td::before {
        position: static;
        display: block;
        width: auto;
        font-weight: 700;
        color: var(--br-blue-ink);
        content: attr(data-label);
    }
}

@media (max-width: 800px) {
    #station-section table.fares-table.untimes-table tbody {
        gap: 0.55rem;
    }

    #station-section table.fares-table.untimes-table tr {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-template-rows: auto auto;
        gap: 0;
        align-items: stretch;
    }

    #station-section table.fares-table.untimes-table td {
        display: flex;
        flex-direction: column;
        gap: 0.12rem;
        width: auto;
        min-width: 0;
        padding: 0.45rem 0.55rem;
        min-height: 0;
        border-bottom: 1px solid var(--br-border-soft);
        border-right: 1px solid var(--br-border-soft);
    }

    #station-section table.fares-table.untimes-table td::before {
        font-size: 0.68rem;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    #station-section table.fares-table.untimes-table td:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
    #station-section table.fares-table.untimes-table td:nth-child(2) { grid-column: 3 / span 2; grid-row: 1; }
    #station-section table.fares-table.untimes-table td:nth-child(3) { grid-column: 5 / span 4; grid-row: 1; }
    #station-section table.fares-table.untimes-table td:nth-child(4) { grid-column: 9 / span 2; grid-row: 1; }
    #station-section table.fares-table.untimes-table td:nth-child(7) { grid-column: 11 / span 2; grid-row: 1; }

    #station-section table.fares-table.untimes-table td:nth-child(5) { grid-column: 1 / span 4; grid-row: 2; }
    #station-section table.fares-table.untimes-table td:nth-child(6) { grid-column: 5 / span 4; grid-row: 2; }
    #station-section table.fares-table.untimes-table td:nth-child(8) { grid-column: 9 / span 2; grid-row: 2; }
    #station-section table.fares-table.untimes-table td:nth-child(9) { grid-column: 11 / span 2; grid-row: 2; }

    #station-section table.fares-table.untimes-table td:nth-child(5),
    #station-section table.fares-table.untimes-table td:nth-child(6),
    #station-section table.fares-table.untimes-table td:nth-child(8),
    #station-section table.fares-table.untimes-table td:nth-child(9) {
        border-bottom: none;
    }

    #station-section table.fares-table.untimes-table td:nth-child(5),
    #station-section table.fares-table.untimes-table td:nth-child(6),
    #station-section table.fares-table.untimes-table td:nth-child(8) {
        border-right: 1px solid var(--br-border-soft);
    }

    #station-section table.fares-table.untimes-table td:nth-child(9),
    #station-section table.fares-table.untimes-table td:last-child {
        border-right: none;
    }

    #station-section table.fares-table.untimes-table td:nth-child(3),
    #station-section table.fares-table.untimes-table td:nth-child(5),
    #station-section table.fares-table.untimes-table td:nth-child(6) {
        font-weight: 600;
    }

    #station-section table.fares-table.untimes-table tr.hour-divider-row {
        display: block;
        border: none;
        background: transparent;
    }

    #station-section table.fares-table.untimes-table tr.hour-divider-row td {
        display: block;
        width: 100%;
        padding: 0.45rem 0.1rem 0.15rem;
        border: none;
        background: transparent;
    }

    #station-section table.fares-table.untimes-table tr.hour-divider-row td::before {
        content: none;
    }

    #station-section table.fares-table.untimes-table tr.hour-divider-row td::after {
        content: none;
    }

    #service-section table.fares-table.untimes-table tbody {
        gap: 0.6rem;
    }

    #service-section table.fares-table.untimes-table tr:not(.hour-divider-row) {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(3.3rem, auto) minmax(3.3rem, auto) minmax(4rem, auto);
        grid-template-areas:
            "loc loc arr dep"
            "plat line path act";
        gap: 0;
        align-items: stretch;
    }

    #service-section table.fares-table.untimes-table td {
        display: flex;
        flex-direction: column;
        gap: 0.12rem;
        width: auto;
        min-width: 0;
        padding: 0.45rem 0.55rem;
        min-height: 0;
        border-bottom: 1px solid var(--br-border-soft);
        border-right: 1px solid var(--br-border-soft);
    }

    #service-section table.fares-table.untimes-table td::before {
        font-size: 0.68rem;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    #service-section table.fares-table.untimes-table td:nth-child(1) { grid-area: loc; }
    #service-section table.fares-table.untimes-table td:nth-child(2) { display: none; }
    #service-section table.fares-table.untimes-table td:nth-child(3) { grid-area: arr; }
    #service-section table.fares-table.untimes-table td:nth-child(4) { grid-area: dep; }
    #service-section table.fares-table.untimes-table td:nth-child(5) { grid-area: plat; }
    #service-section table.fares-table.untimes-table td:nth-child(6) { grid-area: line; }
    #service-section table.fares-table.untimes-table td:nth-child(7) { grid-area: path; }
    #service-section table.fares-table.untimes-table td:nth-child(8) { grid-area: act; }

    #service-section table.fares-table.untimes-table td:nth-child(1),
    #service-section table.fares-table.untimes-table td:nth-child(3),
    #service-section table.fares-table.untimes-table td:nth-child(4) {
        border-bottom: 1px solid var(--br-border-soft);
    }

    #service-section table.fares-table.untimes-table td:nth-child(8) {
        border-bottom: none;
    }

    #service-section table.fares-table.untimes-table td:nth-child(4),
    #service-section table.fares-table.untimes-table td:nth-child(7),
    #service-section table.fares-table.untimes-table td:nth-child(8) {
        border-right: none;
    }

    #service-section .untimes-stop-location {
        display: flex;
        flex-direction: column;
        gap: 0.14rem;
    }

    #service-section .untimes-stop-name {
        font-weight: 600;
    }

    #service-section .untimes-stop-crs-inline {
        display: inline;
        font-size: 0.82rem;
        color: var(--br-text-soft);
        font-weight: 600;
        letter-spacing: 0.04em;
    }
}

