.trains {
  --paper: #f7f4e9;
  --ink: #173d30;
  --green: #154e3c;
  --quiet: #425d50;
  --rule: #acb6a3;
  --stub: #e7e4aa;
  background: var(--paper);
}
.top { background: #e8e9d9; }
.mast nav a[aria-current] { color: #15553e; }
.rail-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(218px,25%); gap: clamp(40px,5.9vw,92px); padding-block: clamp(31px,3.8vw,60px) 55px; }
.sheet { min-width: 0; }
.folio-title { font-size: 20px; font-weight: 650; line-height: 1.18; letter-spacing: -.035em; }
.route-title { display: flex; align-items: flex-start; gap: clamp(13px,2vw,32px); margin: 15px 0 0; }
.station-block { display: grid; grid-template-columns: auto; gap: 6px; }
.station-block strong, .solo-title { font: 400 clamp(66px,7.7vw,112px)/.98 var(--serif); letter-spacing: -.045em; }
.station-block span { font-size: 16px; color: var(--quiet); font-weight: 550; }
.route-rail { --track: #34785c; flex: 1; min-width: 35px; max-width: 155px; height: 15px; position: relative; margin-top: clamp(32px,4.5vw,67px); display: flex; align-items: center; justify-content: space-between; }
.route-rail::before { content: ""; position: absolute; inset-inline: 2px; top: 6px; height: 3px; background: var(--track); }
.route-rail::after { content: ""; position: absolute; left: 50%; top: 2px; width: 9px; height: 9px; border-right: 3px solid var(--track); border-top: 3px solid var(--track); transform: rotate(45deg); }
.route-rail i { width: 14px; height: 14px; border: 3px solid var(--track); border-radius: 50%; background: var(--paper); z-index: 1; }
.route-coverage { margin-top: 16px; color: var(--quiet); }
.train-editor { margin-top: 26px; background: #e8eadb; padding: 15px 19px 20px; }
.mode-tabs { display: flex; gap: 22px; margin-bottom: 14px; }
.mode-tabs label { position: relative; }
.mode-tabs span { display: block; min-height: 31px; padding-block: 2px 5px; font-size: 15px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; color: var(--quiet); }
.mode-tabs input:checked + span { border-color: var(--green); color: var(--ink); }
.rail-fields { display: grid; grid-template-columns: minmax(260px,2.65fr) minmax(126px,1fr) minmax(117px,.85fr); gap: 12px; align-items: end; }
.route-fields { display: grid; grid-template-columns: minmax(0,1fr) 26px minmax(0,1fr); align-items: end; gap: 3px; }
.field { display: grid; gap: 3px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--quiet); display: block; }
.input-wrap { position: relative; min-width: 0; display: block; }
input[type="date"], input[type="text"], select { border: none; border-bottom: 2px solid #728a77; border-radius: 0; min-width: 0; width: 100%; padding: 0 3px; height: 39px; background: transparent; font-size: 16px; font-weight: 600; }
select { appearance: none; padding: 0 20px 0 3px; }
.select-icon { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; pointer-events: none; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }
.swap { padding: 0; border: 0; height: 40px; display: grid; place-items: center; }
.swap:hover { background: #d4dfca; }
.swap .icon { width: 17px; height: 17px; }
.find { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; background: var(--green); border: 0; color: #fffced; padding: 0 12px; font-size: 16px; font-weight: 650; }
.find:hover { background: #0d3a2b; }
.find .icon { width: 17px; height: 17px; }
.form-error { margin-top: 10px; color: #8f3123; font-weight: 600; }
#results { margin-top: 30px; }
#result-heading { font: 400 clamp(35px,3.4vw,50px)/1.03 var(--serif); letter-spacing: -.033em; }
.result-meta { font-size: 15px; margin-top: 6px; }
.board { border-collapse: collapse; width: 100%; text-align: left; margin-top: 15px; font-variant-numeric: tabular-nums; }
.board th { background: var(--ink); color: #f9f6e8; font-size: 13px; font-weight: 550; padding: 8px 12px; }
.board td { border-bottom: 1px solid var(--rule); padding: 12px; line-height: 1.1; }
.board tr:nth-child(even) td { background: #eeefe2; }
.board th:last-child, .board td:last-child { text-align: right; }
.service-time { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.057em; }
.service-time sup { font-size: 13px; letter-spacing: 0; }
.service-cancelled { display: block; color: #86321c; font: 650 13px/1.45 var(--sans); text-decoration: underline; }
.rail-notice { margin: 16px 0; border-top: 1px solid var(--rule); padding-top: 12px; }
.rail-notice summary { cursor: pointer; font-weight: 650; }
.rail-notice p, .rail-notice li { margin-block: 5px; }
.service-num { font-weight: 650; font-size: 16px; }
.duration, .station-cell { color: var(--quiet); }
.duration { font-size: 15px; white-space: nowrap; }
.station-cell { display: block; font-size: 13px; margin-top: 3px; }
.more { padding: 6px 1px; min-height: 44px; display: inline-flex; gap: 8px; align-items: center; margin-top: 6px; font-weight: 650; border: 0; }
.more .icon { width: 15px; }
.more:hover { text-decoration: underline; }
.source-line { margin-top: 7px; font-size: 15px; line-height: 1.45; max-width: 63ch; color: var(--quiet); }
.empty { margin-block: 14px; padding: 16px; background: #e9eadb; }
.rail-margin { min-width: 0; }
.rail-stub { background: var(--stub); position: relative; }
.rail-stub::after { content: ""; height: 9px; position: absolute; bottom: -1px; inset-inline: 0; background: var(--paper); clip-path: polygon(0 100%,0 75%,2.5% 0,5% 75%,7.5% 0,10% 75%,12.5% 0,15% 75%,17.5% 0,20% 75%,22.5% 0,25% 75%,27.5% 0,30% 75%,32.5% 0,35% 75%,37.5% 0,40% 75%,42.5% 0,45% 75%,47.5% 0,50% 75%,52.5% 0,55% 75%,57.5% 0,60% 75%,62.5% 0,65% 75%,67.5% 0,70% 75%,72.5% 0,75% 75%,77.5% 0,80% 75%,82.5% 0,85% 75%,87.5% 0,90% 75%,92.5% 0,95% 75%,97.5% 0,100% 75%,100% 100%); }
.stub-top, .stub-link { display: flex; align-items: center; justify-content: space-between; }
.stub-top { padding: 17px 19px 0; font-size: 14px; font-weight: 650; }
.stub-top .icon { width: 19px; height: 19px; }
#stub-date { display: flex; align-items: center; justify-content: flex-start; gap: 13px; padding: 4px 19px 17px; }
#stub-day { font: 400 clamp(63px,6vw,88px)/.98 var(--serif); letter-spacing: -.065em; }
#stub-date > span { display: grid; font-size: 14px; line-height: 1.35; }
#stub-weekday { font-weight: 650; }
.stub-art img { width: 100%; aspect-ratio: 1.17; object-fit: cover; object-position: 40% 56%; display: block; height: auto; }
.stub-link { color: var(--ink); font-size: 15px; font-weight: 650; text-decoration: none; padding: 13px 17px 23px; }
.stub-link .icon, .change-note .icon { width: 16px; height: 16px; }
.stub-link:hover { text-decoration: underline; }
.change-note { margin: 28px 0 0; }
.change-note h2 { font: 400 32px/1.08 var(--serif); letter-spacing: -.025em; }
.change-note p { margin: 8px 0 10px; max-width: 34ch; }
.change-note a { display: inline-flex; gap: 8px; align-items: center; font-weight: 650; }
@media(max-width:1120px) {
  .rail-layout { grid-template-columns: minmax(0,1fr) minmax(200px,24%); gap: 34px; }
  .rail-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 16px; }
  .route-fields, #number-field { grid-column: 1/-1; }
  .find { min-height: 41px; }
}
@media(max-width:790px) {
  .rail-layout { grid-template-columns: minmax(0,1fr) 178px; gap: 23px; }
  .station-block strong, .solo-title { font-size: clamp(58px,8.5vw,67px); }
  .route-title { gap: 12px; }
  .station-block span { font-size: 14px; }
  .route-rail { margin-top: 33px; }
  .stub-top { padding: 12px 12px 0; }
  #stub-date { padding: 5px 12px 13px; gap: 8px; }
  #stub-day { font-size: 52px; }
  #stub-date > span { font-size: 13px; }
  .stub-link { padding: 11px 12px 20px; font-size: 14px; }
  .change-note h2 { font-size: 28px; }
  .board th, .board td { padding-inline: 7px; }
}
@media(max-width:680px) {
  .rail-layout { display: block; padding-top: 27px; }
  .folio-title { font-size: 19px; }
  .route-title { margin-top: 10px; gap: 13px; }
  .station-block strong, .solo-title { font-size: clamp(54px,12vw,72px); }
  .station-block span { font-size: 13px; }
  .route-rail { min-width: 24px; max-width: 83px; margin-top: 29px; }
  .route-rail i { width: 10px; height: 10px; border-width: 2px; }
  .route-rail::before { height: 2px; }
  .route-rail::after { height: 6px; width: 6px; top: 4px; border-width: 2px; }
  .route-coverage { margin-top: 11px; font-size: 15px; }
  .train-editor { margin-top: 18px; padding: 12px 13px 15px; }
  .rail-fields { gap: 10px 13px; }
  .route-fields { grid-template-columns: minmax(0,1fr) 25px minmax(0,1fr); }
  .mode-tabs { margin-bottom: 10px; }
  #results { margin-top: 24px; }
  #result-heading { font-size: 38px; }
  .result-meta { font-size: 16px; }
  .service-time { font-size: 22px; }
  .service-num, .duration { font-size: 14px; }
  .board th, .board td { padding-inline: 5px; }
  .board th { font-size: 13px; }
  .board td { padding-block: 10px; }
  .rail-margin { margin-top: 28px; }
  .rail-stub { display: grid; grid-template-columns: minmax(160px,1fr) minmax(110px,.82fr); }
  .stub-top { grid-column: 1; grid-row: 1; }
  #stub-date { grid-column: 1; grid-row: 2; }
  .stub-art { grid-column: 2; grid-row: 1/3; }
  .stub-art img { height: 100%; min-height: 80px; aspect-ratio: 1.8; }
  .stub-link { grid-column: 1/-1; }
  .change-note { margin-top: 24px; }
}
@media(max-width:470px) {
  .route-fields { grid-template-columns: minmax(0,1fr) 39px; align-items: center; gap: 6px 10px; }
  .route-fields .field { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 1px; }
  .route-fields .field:last-child { grid-row: 2; }
  .swap { grid-column: 2; grid-row: 1/3; width: 39px; height: 48px; border-radius: 3px; background: #d6dec9; }
  .swap .icon { transform: rotate(90deg); width: 19px; height: 19px; }
}
@media(max-width:359px) {
  .station-block strong, .solo-title { font-size: 46px; }
  .station-block span { font-size: 13px; }
  .route-title { gap: 9px; }
  .board th { font-size: 12px; }
}
