/* Weaver tracker — timetables page */

.tt-hero { padding: clamp(2rem, 6vw, 4rem) 0 1.5rem; background:
  radial-gradient(1200px 300px at 85% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%); }
.tt-hero h1 { font-size: var(--step-4); margin-bottom: 0.3em; }
.tt-search.panel-search { padding: 0; background: none; max-width: 640px; margin-top: 1.5rem; }
.tt-search .search-results { left: 0; right: 0; top: calc(100% + 0.4rem); }
.tt-content { padding-bottom: 4rem; min-height: 40vh; }

.tt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 1.5rem 0 1rem; }
.tt-head h2 { margin: 0; font-size: var(--step-3); }
.tt-head p { margin: 0.15rem 0 0; color: var(--ink-3); }
.tt-head .grow { flex: 1; min-width: 220px; }

.tt-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 1rem; }
.tt-controls input[type="date"] {
  font: inherit; font-weight: 700; font-size: 0.88rem; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg-elev); color: var(--ink);
}
.tt-controls .sep { width: 1px; height: 1.6rem; background: var(--line); margin: 0 0.25rem; }
.tt-note { font-size: 0.88rem; color: var(--ink-3); margin: 0.5rem 0 1rem; }

/* Route grid */
.tt-grid-wrap { overflow: auto; max-height: min(78vh, 900px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); box-shadow: var(--shadow); }
.tt-grid { border-collapse: separate; border-spacing: 0; font-size: 0.86rem; width: max-content; min-width: 100%; }
.tt-grid th, .tt-grid td { border-bottom: 1px solid var(--line); padding: 0.35rem 0.55rem; white-space: nowrap; }
.tt-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-sunk); font-family: var(--font-mono); font-size: 0.78rem; text-align: center; color: var(--ink-2); }
.tt-grid tbody th { position: sticky; left: 0; z-index: 1; background: var(--bg-elev); text-align: left; font-weight: 700; min-width: 13rem; max-width: 20rem; white-space: normal; line-height: 1.25; border-right: 1px solid var(--line); }
.tt-grid thead th:first-child { left: 0; z-index: 3; text-align: left; font-family: var(--font-body); }
.tt-grid tbody th small { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.78rem; }
.tt-grid tbody th a { color: var(--ink); text-decoration: none; }
.tt-grid tbody th a:hover { text-decoration: underline; }
.tt-grid td { font-family: var(--font-mono); text-align: center; color: var(--ink); }
.tt-grid td.na { color: var(--line-strong); }
.tt-grid tr.minor th { font-weight: 400; }
.tt-grid tr.minor td { color: var(--ink-2); }
.tt-grid tbody tr:hover th, .tt-grid tbody tr:hover td { background: color-mix(in srgb, var(--brand) 6%, var(--bg-elev)); }
.tt-grid .now { background: color-mix(in srgb, var(--kirklees) 16%, var(--bg-elev)) !important; }
.tt-grid thead th.now { background: var(--kirklees) !important; color: #17201d; }
.key-only tr.minor { display: none; }
.tt-grid thead th a { color: inherit; text-decoration: none; }

/* Stop day view */
.stop-tt { display: grid; gap: 1rem; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.stop-tt .card { padding: 1rem 1.1rem; }
.stop-tt h3 { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-body); font-size: 1.05rem; margin: 0 0 0.6rem; }
.stop-tt h3 small { display: block; color: var(--ink-3); font-weight: 400; font-size: 0.82rem; }
.hours { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 0.86rem; }
.hours li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.5rem; padding: 0.2rem 0; border-bottom: 1px dashed var(--line); margin: 0; }
.hours li:last-child { border-bottom: 0; }
.hours b { color: var(--brand-text); }
.hours span { display: flex; flex-wrap: wrap; gap: 0.15rem 0.7rem; color: var(--ink-2); }
.hours .past { color: var(--ink-3); opacity: 0.6; }

.recent { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media print {
  .fanbar, .site-header, .weave-band, .tt-hero, .tt-controls, .site-footer .footer-grid, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .tt-grid-wrap { max-height: none; overflow: visible; box-shadow: none; border: 0; }
  .tt-grid thead th, .tt-grid tbody th { position: static; }
  .key-only tr.minor { display: none; }
  .card { box-shadow: none; break-inside: avoid; }
}
