/* Site chrome + server-rendered content pages */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.st-body {
  margin: 0; background: #F6F6F7; color: #17191B;
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif; font-size: 15px; line-height: 1.7;
}
.st-body a { color: #A81C24; text-decoration: none; }
.st-body a:hover { text-decoration: underline; }

/* ---- light header ---- */
.st-top { background: #fff; border-bottom: 1px solid #E7E7E9; }
.st-top-in {
  max-width: 1000px; margin: 0 auto; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
}
.st-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: #A81C24; }
.st-brand:hover { text-decoration: none; }
.st-brand svg { width: 24px; height: 24px; flex: none; }
.st-nav { display: flex; gap: 16px; font-size: 14px; font-weight: 600; color: #2A2E31; }
.st-nav a { color: #2A2E31; }
.st-topsearch { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.st-topsearch input {
  width: 190px; padding: 7px 10px; border: 1px solid #DFDFE2; border-radius: 9px;
  font-family: inherit; font-size: 13px; background: #F7F7F8; color: #17191B;
}
.st-topsearch input:focus { outline: none; border-color: #A81C24; background: #fff; }
.st-topsearch button {
  padding: 7px 12px; border: none; border-radius: 9px; background: #A81C24; color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ---- page shell ---- */
.pt-wrap { max-width: 1000px; margin: 0 auto; padding: 18px 14px 30px; }
.pt-h1 { font-size: 24px; font-weight: 800; margin: 0 0 6px; line-height: 1.35; }
.pt-lede { color: #5A6165; margin: 0 0 16px; font-size: 15px; }
.pt-crumbs { font-size: 13px; color: #6E7478; margin: 0 0 10px; }
.pt-crumbs a { color: #6E7478; }

.pt-sec { margin: 22px 0 0; }
.pt-sec > h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.pt-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.pt-sechead h2 { font-size: 18px; font-weight: 800; margin: 0; }
.pt-all { font-size: 13px; font-weight: 700; color: #A81C24; white-space: nowrap; border: 1px solid #EED6D6; background: #fff; border-radius: 999px; padding: 3px 12px; }
.pt-sec > p.pt-sub { color: #5A6165; font-size: 13px; margin: 0 0 10px; }

.pt-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.pt-card {
  background: #fff; border: 1px solid #E9E9EB; border-radius: 12px; padding: 14px 10px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; color: inherit; height: 100%;
}
.pt-card:hover { text-decoration: none; border-color: #E7BFBF; box-shadow: 0 2px 8px rgba(168,28,36,.08); }
.pt-card b { display: block; font-size: 15px; font-weight: 700; color: #A81C24; line-height: 1.45; }
.pt-card span { display: block; color: #5A6165; font-size: 13px; margin-top: 2px; }
.pt-card span.nw { display: inline-block; white-space: nowrap; }

/* ---- tables ---- */
.pt-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #E7E7E9; border-radius: 12px; background: #fff; }
table.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.pt-table th, table.pt-table td { padding: 9px 10px; text-align: start; border-bottom: 1px solid #F0F0F1; white-space: nowrap; }
table.pt-table thead th { background: #FAF3F3; font-size: 12px; font-weight: 700; color: #55665d; }
table.pt-table tbody tr:last-child td { border-bottom: none; }
table.pt-table td.pt-num { font-variant-numeric: tabular-nums; font-weight: 700; }
table.pt-table td.pt-mut { color: #5A6165; font-size: 13px; white-space: normal; }
table.pt-table a.pt-train { font-weight: 700; }

/* stops table on train pages */
table.pt-stops { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 0; }
table.pt-stops th, table.pt-stops td { padding: 8px 10px; border-bottom: 1px solid #F0F0F1; }
table.pt-stops thead th { background: #FAF3F3; font-size: 12px; color: #55665d; font-weight: 700; }
table.pt-stops th:first-child, table.pt-stops td:first-child { text-align: start; }
table.pt-stops th:nth-child(2), table.pt-stops td:nth-child(2),
table.pt-stops th:nth-child(3), table.pt-stops td:nth-child(3) { text-align: center; width: 78px; font-variant-numeric: tabular-nums; }
table.pt-stops td.pt-arr { font-weight: 700; color: #17191B; }
table.pt-stops td.pt-dep { font-weight: 700; color: #A81C24; }
table.pt-stops td.pt-empty { color: #B9BEC2; font-weight: 400; }

.pt-note { background: #fff; border: 1px solid #E9E9EB; border-radius: 12px; padding: 12px 14px; color: #5A6165; font-size: 14px; }
.pt-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; margin-top: 12px; }
.pt-chip {
  background: #fff; border: 1px solid #E7E7E9; border-radius: 10px; padding: 0 12px; height: 42px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; line-height: 1; color: #17191B; box-sizing: border-box; overflow: hidden;
}
.pt-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-chip b { color: #A81C24; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.pt-chip:hover { text-decoration: none; border-color: #E7BFBF; }

/* ---- footer ---- */
.st-foot { border-top: 1px solid #E7E7E9; background: #fff; margin-top: 26px; }
.st-foot-in {
  max-width: 1000px; margin: 0 auto; padding: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
  font-size: 13px; color: #5A6165;
}
.st-foot-note { margin: 0; }
.st-foot-side { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.st-foot-links { display: flex; gap: 14px; }
.st-foot-links a { color: #2A2E31; }
.st-foot-in a:hover { text-decoration: underline; }

/* ---- mobile ---- */
@media (max-width: 560px) {
  body.st-body { font-size: 14px; }
  .st-top-in { padding: 10px 12px; gap: 10px; }
  .st-brand { font-size: 15px; }
  .st-brand svg { width: 22px; height: 22px; }
  .st-nav { margin-inline-start: auto; gap: 12px; font-size: 13px; }
  .st-topsearch { flex: 1 1 100%; order: 3; margin: 0; }
  .st-topsearch input { flex: 1; width: auto; }
  .st-foot-in { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 12px; }
  .st-foot-side { flex-direction: column; gap: 6px; }
  /* trip table fits a phone: drop the duration and note columns, let cells wrap */
  table.pt-table.pt-trips { min-width: 0; }
  .pt-links { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pt-chip { height: 38px; padding: 0 10px; font-size: 12px; }
  table.pt-table.pt-trips th, table.pt-table.pt-trips td { white-space: normal; padding: 7px 5px; font-size: 12px; }
  table.pt-table.pt-trips td.pt-num, table.pt-table.pt-trips th:nth-child(3), table.pt-table.pt-trips th:nth-child(4) { white-space: nowrap; }
  table.pt-table.pt-trips th:nth-child(5), table.pt-table.pt-trips td:nth-child(5),
  table.pt-table.pt-trips th:nth-child(7), table.pt-table.pt-trips td:nth-child(7) { display: none; }
  .pt-wrap { padding: 14px 12px 24px; }
  .pt-h1 { font-size: 20px; }
  .pt-grid { grid-template-columns: 1fr 1fr; }
  .pt-card { padding: 12px 8px; }
  .pt-card b { font-size: 14px; }
  table.pt-table { font-size: 13px; min-width: 520px; }
  table.pt-stops th, table.pt-stops td { padding: 7px 8px; }
  table.pt-stops th:nth-child(2), table.pt-stops td:nth-child(2),
  table.pt-stops th:nth-child(3), table.pt-stops td:nth-child(3) { width: 64px; }
}
