/* MelbTracker: brand navy #002a5b and blue #0079e9 from the logo, light and dark themes */
:root {
  --navy: #002a5b;
  --blue: #0079e9;
  --yellow: #ffbe00;
  --red: #e5352b;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0b1b33;
  --muted: #5b6b82;
  --border: #e2e8f0;
  --link: #0068c9;
  --header-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 1px 2px rgba(11, 27, 51, 0.06), 0 6px 24px rgba(11, 27, 51, 0.06);
  --radius: 16px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #121b2d;
  --surface-2: #19243a;
  --text: #e6edf7;
  --muted: #94a3b8;
  --border: #243149;
  --link: #5eb1ff;
  --header-bg: rgba(11, 18, 32, 0.9);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 700; }
.skip-link:focus { top: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.header-inner { max-width: 1440px; margin: 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 20px; padding: 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 10px; box-shadow: 0 0 0 1px var(--border); }
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.w-melb { color: var(--navy); }
.w-tracker { color: var(--blue); }
:root[data-theme="dark"] .w-melb { color: #fff; }
:root[data-theme="dark"] .w-tracker { color: #3d9bff; }
.main-nav { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { padding: 8px 13px; border-radius: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.main-nav a[aria-current] { color: var(--navy); background: rgba(0, 121, 233, 0.1); }
:root[data-theme="dark"] .main-nav a[aria-current] { color: #fff; background: rgba(61, 155, 255, 0.18); }
.theme-toggle {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 13px var(--font); cursor: pointer;
}
.theme-toggle svg { width: 16px; height: 16px; fill: currentColor; }

@media (max-width: 760px) {
  :root { --header-h: 104px; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 14px 0; gap: 8px 12px; }
  .main-nav { order: 3; width: calc(100% + 28px); margin: 0 -14px; padding: 0 10px 8px; }
  .theme-label { display: none; }
}

/* ---------- Layout ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px 48px; }
.page-head { padding: 26px 0 18px; display: grid; gap: 10px; }
.lead { font-size: 16.5px; color: var(--muted); max-width: 820px; }
.crumbs { padding-top: 18px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.grid-2 .card { margin-top: 18px; }

.card { margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 16px 18px 12px; }
.card-head p { font-size: 13.5px; }
.count { display: inline-block; min-width: 26px; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; vertical-align: middle; }
.empty { padding: 22px 18px; color: var(--muted); text-align: center; }
.error { margin: 18px 0; padding: 14px 16px; border-radius: 12px; background: rgba(229, 53, 43, 0.1); color: var(--red); font-weight: 600; }

/* ---------- Controls ---------- */
input[type="search"], input[type="date"], select {
  height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: 500 14px var(--font);
}
input[type="search"] { width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 121, 233, 0.2); }
.date-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.search.small { min-width: 220px; }
.button {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; border: 0;
  background: var(--blue); color: #fff; font: 700 14px var(--font); cursor: pointer;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.ghost { background: var(--surface-2); color: var(--text); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--blue); }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); gap: 2px; }
.segmented button { border: 0; padding: 7px 12px; border-radius: 9px; background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Chips, dots, badges ---------- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
a.chip:hover { text-decoration: none; background: rgba(0, 121, 233, 0.12); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }
.td-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 3px 8px; border-radius: 8px;
  color: #fff; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums;
}
.td-badge.light-bg { color: #0b1b33; }
.line-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; color: #fff; white-space: nowrap; }
.line-pill.light-bg { color: #0b1b33; }
a.line-pill:hover { text-decoration: none; filter: brightness(1.08); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-running { background: rgba(22, 163, 74, 0.14); color: #15803d; }
.badge-scheduled { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.badge-idle { background: var(--surface-2); color: var(--muted); }
.badge-finished { background: var(--surface-2); color: var(--muted); }
:root[data-theme="dark"] .badge-running { color: #4ade80; }
:root[data-theme="dark"] .badge-scheduled { color: #fbbf24; }

.show-more { display: block; width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--link); font: 700 14px var(--font); cursor: pointer; }
.show-more:hover { background: var(--surface-2); }
td .show-more { border-top: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap.scroll { max-height: 480px; overflow-y: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.data th, .data td { padding: 10px 14px; text-align: left; border-top: 1px solid var(--border); white-space: nowrap; }
.data th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-top: 0; }
.data tbody tr:hover { background: var(--surface-2); }
.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat .sub { color: var(--muted); font-size: 13px; }
.stat-row .card { margin: 0; }

/* ---------- Live page ---------- */
.live { display: grid; grid-template-columns: 400px 1fr; height: calc(100dvh - var(--header-h)); min-height: 520px; }
.live-panel { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--border); }
.panel-head { display: grid; gap: 10px; padding: 18px 18px 12px; border-bottom: 1px solid var(--border); }
.panel-head h1 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.live-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); animation: pulse 2s infinite; }
.pulse.stale { background: #f59e0b; animation: none; }
.pulse.down { background: var(--red); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-row select { width: 100%; }
.train-list { flex: 1; overflow-y: auto; padding: 4px 0 8px; }
.train-list.flat { padding: 0 0 8px; }
.group-title { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 10px 18px 6px; background: var(--surface); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.train {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px;
  width: 100%; padding: 9px 18px; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.train:hover, .train.selected { background: var(--surface-2); }
.train .t-main { display: grid; gap: 2px; min-width: 0; }
.train .t-fleet { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; }
.train .t-sets { font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.train .t-age { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.panel-note { padding: 10px 18px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); }
.live-map { position: relative; min-height: 0; }
.live-map .map { position: absolute; inset: 0; }
.legend {
  position: absolute; left: 12px; bottom: 28px; z-index: 2; max-width: calc(100% - 24px);
  padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 12px; font-weight: 600;
}
.legend summary { cursor: pointer; font-weight: 800; }
.legend details[open] summary { margin-bottom: 6px; }
.legend-items { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.legend-items span { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 900px) {
  .live { display: flex; flex-direction: column-reverse; height: auto; }
  .live-map { height: 56vh; min-height: 340px; }
  .live-panel { border-right: 0; }
  .train-list { overflow: visible; }
}

/* ---------- Maps ---------- */
.map { background: var(--surface-2); }
.map-card { margin-top: 6px; height: min(58vh, 560px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.map-card .map { width: 100%; height: 100%; }
.maplibregl-popup-content { padding: 12px 14px; border-radius: 12px; font: 13px/1.45 var(--font); color: #0b1b33; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18); }
.popup { display: grid; gap: 4px; min-width: 200px; }
.popup .p-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.popup .p-sets a { font-family: var(--mono); font-size: 12px; }
.popup .p-links { display: flex; gap: 12px; margin-top: 4px; font-weight: 700; }

/* ---------- Fleet ---------- */
.fleet-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fleet-card { display: grid; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; }
a.fleet-card:hover { text-decoration: none; border-color: var(--blue); }
.fleet-card h2 { display: flex; align-items: center; gap: 8px; }
.fleet-card .big { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; }
.matrix { border-collapse: separate; border-spacing: 4px; padding: 0 14px 16px; font-size: 13px; }
.matrix th { padding: 4px 8px; font-weight: 700; color: var(--muted); text-align: left; white-space: nowrap; }
.matrix thead th { writing-mode: vertical-rl; transform: rotate(180deg); height: 120px; text-align: left; font-size: 12.5px; }
.matrix td { min-width: 44px; height: 36px; border-radius: 8px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.matrix td.zero { color: var(--muted); font-weight: 500; }

/* ---------- Line changes ---------- */
.change-list { display: grid; }
.change {
  display: grid; grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 2fr); align-items: center; gap: 12px;
  padding: 11px 18px; border-top: 1px solid var(--border);
}
.change:first-child { border-top: 0; }
.change .c-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.change .c-set { display: grid; gap: 2px; min-width: 0; }
.change .c-set a { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.change .c-set a.chip { font-family: var(--font); justify-self: start; }
.change .c-move { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.change .arrow { color: var(--muted); font-weight: 800; }
.change-list.compact .change { padding: 9px 18px; grid-template-columns: 64px 1fr; }
section.change-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.time-group { padding: 10px 18px 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
@media (max-width: 640px) {
  .change { grid-template-columns: 52px 1fr; }
  .change .c-move { grid-column: 2; }
}

/* ---------- Coupling changes ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 4px; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 14px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a[aria-current] { background: var(--blue); color: #fff; }
.change.coupling { grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 2fr); align-items: start; }
.change.coupling .c-set { gap: 6px; }
.change.coupling .c-set a.chip { font-family: var(--font); justify-self: start; }
.c-detail { display: grid; gap: 3px; font-size: 13.5px; min-width: 0; }
.c-detail .mono a, .c-detail a.mono { overflow-wrap: anywhere; }
.kind-coupled { background: rgba(0, 121, 233, 0.14); color: #0062bd; }
.kind-split { background: rgba(229, 53, 43, 0.12); color: #c0261d; }
.kind-swapped { background: rgba(245, 158, 11, 0.16); color: #b45309; }
:root[data-theme="dark"] .kind-coupled { color: #5eb1ff; }
:root[data-theme="dark"] .kind-split { color: #ff8a80; }
:root[data-theme="dark"] .kind-swapped { color: #fbbf24; }
@media (max-width: 640px) { .change.coupling { grid-template-columns: 52px 1fr; } .change.coupling .c-detail { grid-column: 2; } }
.xt2-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 18px 0; padding: 10px 12px; border-radius: 12px; background: rgba(124, 58, 237, 0.08); border: 1px solid rgba(124, 58, 237, 0.25); font-size: 13px; }
.xt2-head { display: flex; align-items: center; gap: 8px; width: 100%; }
.xt2-train { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font: 600 12.5px var(--font); cursor: pointer; }

/* ---------- Set timeline ---------- */
.timeline { position: relative; margin: 6px 18px 14px; height: 74px; }
.tl-track { position: absolute; left: 0; right: 0; top: 18px; height: 30px; border-radius: 8px; background: var(--surface-2); }
.tl-seg { position: absolute; top: 18px; height: 30px; min-width: 3px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
a.tl-seg:hover { filter: brightness(1.15); }
.tl-tick { position: absolute; top: 52px; font-size: 11px; color: var(--muted); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.tl-tick::before { content: ""; position: absolute; left: 50%; top: -6px; height: 5px; border-left: 1px solid var(--border); }
.tl-change { position: absolute; top: 4px; width: 2px; height: 48px; background: var(--red); border-radius: 2px; }
.tl-coupling { position: absolute; top: 4px; width: 2px; height: 48px; background: var(--blue); border-radius: 2px; }
.tl-coupling::after { content: ""; position: absolute; top: -2px; left: -4px; width: 10px; height: 10px; border-radius: 2px; background: var(--blue); }
.tl-change::after { content: ""; position: absolute; top: -2px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chips a { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; }
.day-chips a[aria-current] { background: var(--blue); color: #fff; }
.day-list { display: grid; }
.day-row { display: grid; grid-template-columns: 130px 70px 1fr; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border); color: inherit; }
.day-row:first-child { border-top: 0; }
a.day-row:hover { background: var(--surface-2); text-decoration: none; }
.day-row .lines { display: flex; flex-wrap: wrap; gap: 6px; }
#set-now:empty { display: none; }
.now-banner { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: rgba(22, 163, 74, 0.1); font-weight: 600; }

/* ---------- Line page ---------- */
.line-head h1 { display: flex; align-items: center; gap: 12px; }
.line-swatch { width: 14px; height: 34px; border-radius: 6px; flex: none; }
.mix { display: grid; gap: 14px; padding: 0 18px 18px; }
.mix-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.mix-bar span { height: 100%; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 600; }
.mix h3 { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }

/* ---------- Trips page ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters:empty { display: none; }

/* ---------- About ---------- */
.prose { max-width: 780px; margin: 22px auto 0; padding: 28px 32px 32px; font-size: 16px; line-height: 1.7; }
.prose.center { text-align: center; }
.prose h1 { margin-bottom: 12px; }
.prose h2 { margin: 28px 0 8px; font-size: 20px; }
.prose p, .prose ul, .prose dl { margin: 0 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose dt { font-weight: 800; }
.prose dd { margin: 0 0 12px; color: var(--muted); }
.about-logo { display: block; width: min(100%, 560px); margin: 0 auto 18px; border-radius: 14px; background: #fff; }
@media (max-width: 640px) { .prose { padding: 20px 18px 24px; } .container { padding: 0 14px 40px; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); }
.live ~ .site-footer { margin-top: 0; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 32px 20px 12px; display: grid; grid-template-columns: 1.3fr 2fr 1fr 1fr; gap: 28px; }
.footer-about p { margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 320px; }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.footer-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.site-footer li a { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.legal { max-width: 1240px; margin: 0 auto; padding: 14px 20px 30px; color: var(--muted); font-size: 12.5px; }
.legal a { color: var(--muted); text-decoration: underline; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }

/* About page live stats */
.about-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 8px; }
.about-stats .stat { box-shadow: none; }
.about-stats .value { font-size: 24px; }
@media (max-width: 640px) { .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
