/* A freight working (templates/working.html). Only what site.css doesn't have. */
.hero .btn--primary, .hero .btn--primary:hover { color: var(--ink); }  /* .hero a would turn it paper */

.hero .working-head { padding-bottom: 0; }
.booked-as { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--lede); }
.hero .booked-as a { color: var(--amber); font-size: 17px; }
.hero .train { padding-top: 24px; padding-bottom: 24px; display: block; }
.train .art { width: 100%; height: auto; display: block; }

/* The route strip: timing points in a row. Ink line and dots; the termini are solid ink. */
.route-scroll { overflow-x: auto; }
.route-strip { margin: 0; padding: 0 0 6px; list-style: none; display: flex; min-width: 900px; }
.stop { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.stop .line { position: absolute; top: 9px; left: 0; right: 0; height: 4px; background: var(--ink); }
.stop:first-child .line { left: 50%; }
.stop:last-child .line { right: 50%; }
.stop .dot { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 4px solid var(--ink); background: var(--paper); }
.stop--end .dot { background: var(--ink); }
.stop .name { font-size: 14px; font-weight: 900; text-align: center; }
.stop .time { font-size: 13px; color: var(--muted); }

/* The last ten booked runs */
.runs-table td.run-day, .runs-table td.ran { white-space: nowrap; }
.runs-table td.ran { font-weight: 800; color: var(--ink); }
.hauled-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hauled-in .strong { color: var(--ink); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.no-run .tags { display: none; }   /* the Ran column says it; the phone layout shows the tag instead */

/* Locos this month */
.pool-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 36px; align-items: center; gap: 12px; }
.pool-row .n { text-align: right; }

@media (max-width: 520px) {
  .working-head .intro { flex-basis: 100%; }
  .hero .facts-line { font-size: 16px; line-height: 1.45; }
  .working-head .btn--primary { width: 100%; justify-content: center; }
  /* The loco and its first wagons, as on the phone mock-up: the drawing cropped at the right */
  .hero .train { overflow: hidden; padding-top: 16px; }
  .train .art { width: 173%; max-width: none; }
  .train svg.art--none { width: 100%; max-width: 420px; }

  /* The route turns into a vertical list of stops */
  .route-strip { min-width: 0; flex-direction: column; padding: 0; }
  .stop { flex: none; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 14px; height: 44px; }
  .stop .line { top: 0; bottom: 0; left: 9px; right: auto; width: 4px; height: auto; }
  .stop:first-child .line { top: 50%; left: 9px; }
  .stop:last-child .line { bottom: 50%; right: auto; }
  .stop .name { font-size: 15px; font-weight: 800; text-align: left; }
  .stop--end .name { font-size: 17px; font-weight: 900; }
  .stop .time { font-size: 15px; color: var(--body-2); }

  /* The runs table turns into stacked cards */
  .runs-panel { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .runs-table, .runs-table tbody { display: block; }
  .runs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .runs-table.table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; background: var(--panel); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 10px 14px; margin-bottom: 8px; }
  .runs-table.table td, .runs-table.table td:first-child, .runs-table.table td:last-child { padding: 0; }
  .runs-table td.hauled, .runs-table .hauled-in { display: contents; }
  .runs-table td.run-day { grid-row: 1; grid-column: 1; font-size: 15px; }
  .runs-table .tags { grid-row: 1; grid-column: 2; justify-content: flex-end; }
  .no-run .tags { display: inline-flex; }
  .runs-table .hauled-in > .strong { grid-row: 2; grid-column: 1 / -1; font-size: 16px; }
  .runs-table td.how { grid-row: 3; grid-column: 1 / -1; font-size: 14px; line-height: 1.4; }
  .runs-table td.ran { display: none; }

  .pool-row { grid-template-columns: 60px minmax(0, 1fr) 28px; gap: 10px; }
  .working-facts .facts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .working-facts .facts dt { border-top: 2px solid var(--band); padding-top: 6px; font-size: 13px; }
  .working-facts .facts dt + dd { margin-top: -8px; }
}
