/* calgarytransittimes.com — minimal, readable, dark-mode friendly.
   No client JS anywhere; this file is the site's entire presentation layer. */

:root {
  --bg: #ffffff;
  --fg: #1a1d21;
  --muted: #5a6068;
  --link: #0b57d0;
  --border: #d6dade;
  --surface: #f4f6f8;
  --warn-bg: #fff3cd;
  --warn-fg: #664d03;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #e6e8eb;
    --muted: #9aa1a9;
    --link: #8ab4f8;
    --border: #3a3f45;
    --surface: #1d2025;
    --warn-bg: #4a3a00;
    --warn-fg: #ffe08a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 0 1rem 2rem;
  max-width: 46rem;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--link);
}

h1 {
  font-size: 1.45rem;
  line-height: 1.3;
  margin: 1.2rem 0 0.6rem;
}

h2 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
}

h3 {
  font-size: 1rem;
  margin: 1rem 0 0.3rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  font-size: 0.95rem;
}

.site-header a {
  text-decoration: none;
}

.answer {
  font-size: 1.05rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.6rem 0 1rem;
  font-variant-numeric: tabular-nums;
}

caption {
  caption-side: top;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 0.3rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.3rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

thead th,
tbody th[scope="row"] {
  background: var(--surface);
  white-space: nowrap;
}

ul,
ol {
  padding-left: 1.4rem;
}

.alerts .alert {
  border: 1px solid var(--border);
  border-left: 4px solid var(--warn-fg);
  background: var(--surface);
  padding: 0.2rem 0.8rem;
  margin: 0.6rem 0;
}

.alerts-as-of {
  color: var(--muted);
  font-size: 0.85rem;
}

.stale-banner {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
}

.stale-banner a {
  color: inherit;
}

.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}
