:root { --ink: #153f3b; --teal: #16685c; --paper: #f6f5ef; --line: #d8dfd8; }
body { background: var(--paper); color: #243e39; font-family: "Segoe UI", sans-serif; line-height: 1.5; }
header { background: var(--ink); padding: 28px 28px 60px; position: relative; overflow: hidden; }
header::after { content: ''; position: absolute; width: 420px; height: 420px; border: 1px solid #ffffff14; border-radius: 50%; top: -170px; right: -80px; box-shadow: 0 0 0 48px #ffffff05, 0 0 0 96px #ffffff04; pointer-events: none; }
.header-inner { max-width: 1100px; margin: auto; position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-decoration: none; color: #fff; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: #e8eea4; color: var(--ink); border-radius: 8px; font-size: 23px; }
.source-link { float: right; color: #d2e3dc; font-size: 12px; padding-top: 5px; text-underline-offset: 4px; }
header h1 { font-size: clamp(32px, 4vw, 49px); line-height: 1.12; letter-spacing: -.04em; margin-top: 27px; font-weight: 650; }
header h1 span { color: #e8eea4; }
header p { margin-top: 18px; font-size: 14px; color: #d2e3dc; opacity: 1; }
header p span { padding: 0 12px; color: #e8eea4; }
main { max-width: 1156px; margin: -26px auto 48px; padding: 0 28px; position: relative; }
.card { border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px #153f3b08; padding: 30px; }
h2 { color: var(--ink); letter-spacing: -.025em; font-size: 26px; }
.planner-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 25px; }
.eyebrow { font-size: 10px; letter-spacing: .15em; font-weight: 700; color: var(--teal); margin: 0 0 4px; }
.planner-heading h2 { margin: 0; }
.planner-note { color: #64776e; font-size: 13px; }
#search-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; }
.departure-field, .journey-field, .destination-field { grid-column: 1; }
.departure-field { grid-row: 1; }
.journey-field { grid-row: 2; }
.destination-field { grid-row: 3; }
.dates-field { grid-column: 2; grid-row: 1 / 4; background: #f8f9f5; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.field-label { font-size: 13px; font-weight: 650; margin-bottom: 9px; }
.form-control { background: #fff; border-color: #cbd5cd; color: var(--ink); border-radius: 8px; min-height: 45px; font: inherit; font-size: 14px; }
.destination-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.destination-grid--eurostar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.destination-option label { background: #fff; border-color: var(--line); border-radius: 8px; padding: 11px 10px; }
.destination-option label strong { font-size: 13px; color: var(--ink); }
.destination-option label span { font-size: 11px; color: #62756c; line-height: 1.4; }
.destination-option input:checked + label { background: #edf5ef; border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); transform: none; }
.destination-option input:hover + label { border-color: var(--teal); box-shadow: none; }
#search-form .form-row { grid-column: 1 / -1; grid-template-columns: 1fr; margin-bottom: 18px; }
#search-form .form-row .field-label { color: #5b7167; font-weight: 500; }
#search-form .form-row .form-group { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#search-form .form-row .form-control { width: 110px; flex-shrink: 0; }
.search-action { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.search-action p { font-size: 13px; color: #62756c; margin: 0; }
.btn-primary { background: var(--ink); border-radius: 8px; min-height: 48px; font-size: 14px; padding: 12px 24px; }
.btn-primary span { margin-left: 28px; font-size: 20px; }
.btn-primary:hover { background: #22695c; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid #b18a20; outline-offset: 4px; }
.destination-option input:focus-visible + label { outline: 3px solid #b18a20; outline-offset: 3px; box-shadow: none; }
.planner-card .cal-btn { max-width: 42px; max-height: 42px; font-size: 13px; }
.planner-card .cal-btn.cal-selected { background: var(--teal) !important; }
.planner-card .cal-hint { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; }
.planner-card .cal-cta { color: var(--teal); }
.planner-card .cal-nav-btn { width: 34px; height: 34px; }
.back-link { padding-top: 24px; }
.date-nav { flex-wrap: wrap; }
.chip-current, .btn-group-option.active { background: var(--teal); border-color: var(--teal); }
.results-table { font-variant-numeric: tabular-nums; }
.results-table th { color: var(--ink); background: #f8f9f5; }
.btn-nav, .btn-secondary, .select-inline { border-radius: 6px; min-height: 36px; }
@media (max-width: 900px) {
 #search-form { column-gap: 22px; }
 .journey-field .destination-grid { grid-template-columns: 1fr; }
 .journey-field .destination-option label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
 .destination-grid--eurostar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .planner-note { display: none; }
}
@media (max-width: 640px) {
 header { padding: 20px 20px 48px; }
 header h1 { margin-top: 24px; font-size: 35px; }
 header p { font-size: 11px; }
 header p span { padding: 0 4px; }
 .source-link { font-size: 11px; }
 .brand { font-size: 9px; letter-spacing: .08em; gap: 7px; }
 main { padding: 0 14px; }
 .card { padding: 20px 16px; border-radius: 12px; }
 #search-form { display: flex; flex-direction: column; }
 .planner-heading { padding-bottom: 18px; margin-bottom: 20px; }
 .journey-field .destination-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 .journey-field .destination-option label { display: block; padding: 10px 7px; }
 .journey-field .destination-option label strong { font-size: 12px; }
 .destination-grid--eurostar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .dates-field { padding: 14px; }
 #search-form .form-row .form-group { align-items: flex-start; }
 .search-action { flex-direction: column; align-items: stretch; }
 .search-action p { text-align: center; font-size: 12px; }
 .btn-primary { width: 100%; }
 .date-nav { gap: 8px; font-size: 13px; }
 .date-nav-label { min-width: auto; }
 .results-table td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* Keep both transfer settings together for a return journey. */
@media (min-width: 641px) {
  #search-form:has(#journey-return:checked) #outbound-connection-fields { grid-column: 1; }
  #search-form:has(#journey-return:checked) #return-connection-fields { grid-column: 2; }
  #search-form:has(#journey-return:checked) #outbound-connection-fields,
  #search-form:has(#journey-return:checked) #return-connection-fields { grid-row: 4; }
  #search-form:has(#journey-return:checked) .form-row .form-group { display: block; }
  #search-form:has(#journey-return:checked) .form-row .form-control { width: 100%; }
}
/* Results: put the comparison ahead of the supporting timetable detail. */
.results-page header { padding-bottom: 42px; }
.results-page header h1 { font-size: 25px; margin-top: 18px; }
.results-page header h1 br { display: none; }
.results-page header h1 span { margin-left: 6px; }
.results-page header p { margin-top: 10px; }
.results-page main { padding-bottom: 90px; }
.leg-navigation { display: flex; gap: 12px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.leg-navigation a { display: flex; flex: 1; gap: 8px; justify-content: space-between; padding: 12px; background: #f2f6f1; border-radius: 8px; font-size: 13px; font-weight: 650; text-decoration: none; }
.leg-navigation span { font-weight: 400; }
.journey-section { scroll-margin-top: 16px; }
.journey-section h2 { font-size: 22px; margin: 4px 0; }
.results-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin: 22px 0 12px; font-size: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.journey-count { margin-right: auto; font-weight: 650; }
.detail-control, .sort-control { display: flex; gap: 8px; align-items: center; }
.detail-control input { accent-color: var(--teal); width: 16px; height: 16px; }
.journey-section:not(.show-details) .journey-detail, .journey-section:not(.show-details) .fare-inactive { display: none; }
.journey-section .results-table th { font-size: 12px; font-weight: 650; padding: 14px 12px; }
.journey-section .results-table td { padding: 18px 12px; vertical-align: top; }
.journey-section .results-table .journey-times { font-size: 16px; color: var(--ink); }
.journey-section .results-table tbody tr { background: #fff; border-color: var(--line); }
.journey-section .results-table tbody tr:nth-child(even) { background: #fafbf8; }
.journey-section .results-table tbody tr.row-unreachable { background: #f6f6f3; }
.journey-section .results-table .col-transfer { font-size: 13px; }
.journey-section .results-table .transfer-duration::after { content: ' in London'; font-size: 11px; color: #62756c; }
.journey-section .results-table td:last-child { min-width: 155px; }
.journey-section .results-table .total-price { display: block; margin-top: 4px; white-space: normal; }
.journey-section .results-table .total-price > .text-green { font-size: 21px; color: var(--ink); }
.journey-section .results-table .text-red, .journey-section .results-table .text-blue { color: #52685e; font-size: 13px; }
.journey-section .results-table .text-green[title] { font-size: 13px; }
.fare-badge, .speed-badge { font-size: 10px; font-weight: 650; display: inline-block; background: #edf4e8; color: #345d2c; padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
.fare-badge { display: block; width: fit-content; margin: 4px 0; }
.select-journey { display: block; width: 100%; margin-top: 10px; border: 1px solid #aac5b8; color: var(--teal); background: #fff; border-radius: 6px; padding: 8px 10px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
.select-journey:hover { background: #eaf4ed; }
.row-selected .select-journey { background: var(--teal); color: #fff; border-color: var(--teal); }
.journey-section .results-table tbody tr.row-selected { background: #edf6ed !important; box-shadow: inset 3px 0 var(--teal); }
#selection-bar { border-top-color: var(--teal); }
@media (max-width: 900px) and (min-width: 641px) {
 .results-page main { padding: 0 12px 90px; }
 .journey-section { padding: 20px 12px; }
 .journey-section .results-table td { padding: 14px 6px; }
 .journey-section .results-table .journey-times { white-space: normal; font-size: 14px; }
 .journey-section .results-table td:last-child { min-width: 130px; }
 .journey-section .results-table .nowrap { white-space: normal; }
}
@media (max-width: 640px) {
 .results-page header h1 { font-size: 21px; }
 .results-page header h1 span { display: block; margin: 4px 0 0; }
 .leg-navigation { flex-direction: column; }
 .leg-navigation a { font-size: 12px; }
 .journey-section h2 { font-size: 20px; }
 .results-toolbar { gap: 12px; }
 .journey-count { width: 100%; }
 .sort-control { flex-wrap: wrap; }
 .journey-section .results-table tr { border-radius: 10px; margin-bottom: 16px; }
 .journey-section .results-table td { padding: 12px; }
 .journey-section .results-table .col-transfer { background: #f1f5ef; padding: 10px 12px; }
 .journey-section .results-table td:last-child { text-align: left; background: #f8faf6; }
 .journey-section .results-table td:last-child > .mobile-label { display: none; }
 .journey-section .results-table td:last-child > br { display: none; }
 .journey-section .results-table .total-price { display: inline-block; float: right; margin: 0 0 8px 8px; }
 .fare-badge { display: inline-block; margin-left: 4px; }
 .select-journey { clear: both; min-height: 42px; }
}

.journey-section.show-details .journey-detail.mobile-hide { display: inline !important; }

.rail-notices { margin-top: 8px; white-space: normal; overflow-wrap: anywhere; font-size: 0.875rem; }
.rail-notices details { padding: 8px; margin-top: 4px; background: #fff5e6; border-left: 3px solid #a34700; border-radius: 4px; }
.rail-notices summary { cursor: pointer; color: #853900; font-weight: 600; }
.rail-notices p { margin: 8px 0; }
