/* Four documentary plates share one baseline and retain their own natural light. */
.journey-plates { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 2px; }
.journey-plate { min-width: 0; color: var(--ink); text-decoration: none; }
#atlas .journey-plate figure { margin: 0; }
#atlas .journey-plate img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 0; }
#atlas .journey-plate figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 13px 11px 13px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-align: left; font: 500 clamp(15px,1.25vw,20px)/1.45 var(--serif); }
.plate-arrow { color: var(--brass-text); font: 14px var(--sans); }
.journey-plate:hover figcaption, .journey-plate:focus-visible figcaption { background: var(--paper-soft); }

.china-crest { display: inline-block; width: 1.18em; height: 1.18em; margin-inline-end: .32em; vertical-align: -.2em; color: #91632e; flex: none; }
.fleet-keys { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.fleet-key { display: inline-flex; align-items: center; color: #624d34; }
.fleet-key small { font: inherit; }
.price-row.china-row { box-shadow: inset 2px 0 #c6ac84; }
.price-row.is-own { background: #eee4d2; box-shadow: inset 3px 0 #96703c; }
.price-row.is-own .price-name::before { display: none; }
tr.china-row:not(.is-own) td:first-child { box-shadow: inset 1px 0 #c9b391; }
.fleet-key .china-crest { width: 19px; height: 19px; }
.rail-history { margin-top: clamp(54px,7vw,100px); }
.rail-history .section-heading { margin-bottom: 24px; }
.history-board { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #d3c8b5; background: #f6f2e9; }
.history-paper { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .65; }
.history-eras { display: grid; grid-template-columns: 1.12fr 1fr .98fr 1.15fr; padding: clamp(20px,2.2vw,38px); gap: 0; }
.history-era { min-width: 0; padding-inline: clamp(13px,1.65vw,26px); }
.history-era + .history-era { border-left: 1px solid #bba88a; }
.history-era:first-child { padding-left: 0; }
.history-era:last-child { padding-right: 0; }
.history-era h3 { display: flex; flex-direction: column; gap: 3px; margin: 0 0 15px; color: var(--ink); font: 500 clamp(18px,1.55vw,25px)/1.35 var(--serif); }
.era-years { color: #765a34; font: 500 14px/1.3 var(--eyebrow-font); font-variant-numeric: tabular-nums; letter-spacing: .055em; }
.history-list { display: grid; }
.history-node { display: grid; grid-template-columns: clamp(47px,4.4vw,70px) 1fr; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 7px 2px; border: 0; border-top: 1px solid #c9bfae; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.history-node img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.history-node[aria-pressed="true"], .history-node:hover, .history-node:focus-visible { background: #f5ead7; }
.history-node-text, .history-name, .history-date, .history-place { display: block; }
.history-date { color: #66563f; font: 500 13px/1.35 var(--eyebrow-font); font-variant-numeric: tabular-nums; }
.history-date small, .history-place { margin-inline-start: 3px; font: 11px/1.4 var(--sans); color: #655845; }
.history-place { margin: 2px 0 0; }
.history-name { margin-top: 2px; font: 500 clamp(14px,1.05vw,17px)/1.3 var(--serif); }
.history-flagship .history-name { color: #774f20; font-weight: 700; }
.history-era:first-child .history-node { display: block; padding: 10px 0; }
.history-era:first-child .history-node img { aspect-ratio: 1.35; margin-bottom: 10px; }
.history-era:first-child .history-name { font-size: 19px; }
.history-tabs { display: none; }
@media screen and (min-width:761px) and (max-width:1050px) {
 .history-eras { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 0; }
 .history-era:nth-child(3) { padding-left: 0; border-left: 0; }
 .history-era:nth-child(2) { padding-right: 0; }
}
@media screen and (max-width:760px) {
 .journey-plates { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 4px; }
 #atlas .journey-plate figcaption { padding: 8px 4px 8px 0; }
 .rail-history .section-heading { margin-bottom: 16px; }
 .history-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid #cbbfa9; }
 .history-tabs button { min-height: 46px; padding: 3px 1px; border: 0; border-bottom: 2px solid transparent; color: #60533f; background: #f7f3ebc9; font: 13px/1.3 var(--eyebrow-font); }
 .history-tabs [aria-selected="true"] { border-color: #865f2e; color: #322718; background: #eee4d2; }
 .history-eras { display: block; padding: 18px; }
 .history-era, .history-era + .history-era { padding: 0; border: 0; }
 .history-era h3 { margin-bottom: 12px; }
 .history-era .era-years { display: none; }
 .history-era .history-node { grid-template-columns: 78px 1fr; min-height: 67px; }
 .history-era:first-child .history-node img { aspect-ratio: 2.2; }
 .history-name { font-size: 17px; }
 .history-date { font-size: 14px; }
 .fleet-keys { display: grid; gap: 6px; }
 .fleet-key { flex-wrap: wrap; }
 .price-meta { gap: 5px; }
}
@media print {
 .brief-journey-plates { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm 3mm; }
 .brief-atlas .brief-journey-plates figure { margin: 2mm 0; }
 .brief-atlas .brief-journey-plates img { width: 100%; height: 54mm; object-fit: cover; border: 0; }
 .brief-atlas .brief-journey-plates figcaption { text-align: left; font: 11pt var(--serif); }
 .brief-page .china-crest { color: #886332; }
}

/* Place the engraved scale in the board's bottom margin below the last node. */
.history-paper { inset: 0 auto auto 0; height: 131.5%; object-fit: fill; }
@media screen and (max-width:760px) {
  .history-paper { width: auto; max-width: none; min-width: 100%; left: 50%; transform: translateX(-50%); }
}
@media print {
  .brief-history { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3mm; margin: 5mm 0 0; }
  .brief-history > div { border-top: .75pt solid #9b835f; padding-top: 1.5mm; }
  .brief-history dt { font: 500 8pt var(--sans); color: #785a35; }
  .brief-history dd { margin: 1mm 0 0; font: 9pt/1.45 var(--serif); }
  .brief-history dd:last-child { color: #554d42; font: 7.8pt/1.45 var(--sans); }
}
@media print {
  .brief-atlas .brief-illustration > img { width: 100%; height: auto; }
}
