/* Phoenix Community Transport — one stylesheet, no third-party requests. */
:root {
  --bg: #fbf7ef;          /* cream, after a heritage livery */
  --bg-2: #f1e9da;
  --ink: #1f1a17;
  --ink-2: #4a413a;
  --maroon: #7a1f2b;      /* livery band; 9.7:1 on --bg */
  --flame: #b8430f;       /* phoenix accent; 5.1:1 on --bg, large text and rules only */
  --line: #d9ccb6;
  --focus: #1d4ed8;
  --radius: 10px;
  --wrap: 68rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --bg-2: #221c16;
    --ink: #f3ece1;
    --ink-2: #cfc4b4;
    --maroon: #f0a3ac;
    --flame: #ff9b5e;
    --line: #3a3026;
    --focus: #93b4ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--maroon); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-head { border-bottom: 4px solid var(--maroon); background: var(--bg); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 42px; height: 42px; flex: none; }
.brand b { display: block; font-size: 1.2rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.brand span { display: block; font-size: .8rem; color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: 0; padding: 0; }
nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: .35rem 0; display: inline-block; border-bottom: 3px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--flame); }

/* Status notice — this is a proposal */
.notice { background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: .95rem; }
.notice .wrap { padding-top: .6rem; padding-bottom: .6rem; }
.notice strong { color: var(--maroon); }

/* Hero */
.hero { padding: 3rem 0 2.5rem; }
.hero .wrap { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: 1.15fr 1fr; } }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--flame); margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.2; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .4rem; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 38rem; }
.bus-art { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }

.btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn { display: inline-block; padding: .75rem 1.2rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--maroon); }
.btn-primary { background: var(--maroon); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #17130f; } }
.btn-ghost { color: var(--maroon); background: transparent; }

/* Sections and cards */
main { padding-bottom: 3rem; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2rem 0 2.5rem; margin: 2.5rem 0; }
.band h2 { margin-top: .5rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1rem; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.card h3 { margin-top: 0; }
.card p { margin: .3rem 0 0; color: var(--ink-2); }
.facts { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 1.5rem 0 0; padding: 0; list-style: none; }
.facts li { border-left: 4px solid var(--flame); padding: .2rem 0 .2rem .8rem; }
.facts b { display: block; font-size: 1.35rem; line-height: 1.2; }
.facts span { color: var(--ink-2); font-size: .95rem; }
.prose { max-width: 44rem; }
.prose li { margin: .3rem 0; }
.aside { border-left: 4px solid var(--maroon); background: var(--bg-2); padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: 44rem; }

/* Route strip */
.route { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.route li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; font-size: .95rem; }
.route li.town { border-color: var(--maroon); font-weight: 600; }

/* Timetable */
.tt-wrap { overflow-x: auto; margin: 1rem 0 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; padding: .8rem 1rem; font-size: 1.05rem; border-bottom: 2px solid var(--maroon); }
th, td { padding: .5rem .8rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th[scope="row"], thead th:first-child { text-align: left; white-space: normal; font-weight: 600; }
thead th { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
tbody tr:nth-child(even) { background: var(--bg-2); }
tr.town th, tr.town td { font-weight: 700; }
@media (max-width: 30rem) {
  th, td { padding: .45rem .22rem; font-size: .84rem; }
  th[scope="row"] { hyphens: auto; }
  thead th { letter-spacing: .02em; }
  th[scope="row"], thead th:first-child { padding-left: .6rem; }
  td:last-child, thead th:last-child { padding-right: .6rem; }
  thead th .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  caption { padding: .7rem .6rem; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Late bus column — proposed, visibly newer than trips 1–4 */
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--maroon); border: 1px solid var(--maroon); border-radius: 999px; padding: .05rem .45rem; margin-left: .35rem; vertical-align: middle; }
th.late .tag { display: block; margin: .2rem 0 0 auto; width: max-content; }
th.late, td.late { border-left: 2px dashed var(--maroon); background: color-mix(in srgb, var(--maroon) 7%, transparent); }
th.late .short { display: none; }
.late-only { display: none; }
.late-only caption { border-bottom-style: dashed; }
@media (max-width: 30rem) {
  th.late, td.late { display: none; }
  tr.late-row { display: none; }
  .late-only { display: block; }
}

/* Footer */
.site-foot { border-top: 4px solid var(--maroon); background: var(--bg-2); padding: 2rem 0; font-size: .95rem; color: var(--ink-2); }
.site-foot .wrap { display: grid; gap: 1rem; }
@media (min-width: 44rem) { .site-foot .wrap { grid-template-columns: 2fr 1fr; } }
.site-foot p { margin: .2rem 0; }
