/* Shared styles for new The Bus pages. Colors, type, and components
   follow the existing homepage at thebus7779.surge.sh. */

:root {
  --bg: #14081f;
  --panel: #2a1542;
  --panel-top: #33204b;
  --line: #5a3478;
  --gold: #C9A44C;
  --gold-2: #E0C46A;
  --gold-dark: #8A6A24;
  --gold-ink: #1c1608;
  --cream: #f7efe4;
  --muted: #d4c6ea;
  --lede: #f3e9ff;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --font: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 16px 12px 36px;
  color: var(--cream);
  font-family: var(--font);
  line-height: 1.45;
  background:
    url("stars.svg") repeat,
    radial-gradient(1200px 500px at 50% -10%, rgba(201, 164, 76, 0.12), transparent 55%),
    radial-gradient(800px 600px at 100% 100%, rgba(90, 40, 140, 0.45), transparent 50%),
    linear-gradient(180deg, #1a0a28 0%, var(--bg) 40%, #0d0614 100%);
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 20;
  font-weight: 800;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.shell {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  background: #0a0610;
}

.brand-copy { text-decoration: none; color: inherit; min-width: 0; }
.brand-copy strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.brand-copy span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 2px 2px 4px;
  font-size: 0.82rem;
}
.site-nav a {
  color: var(--gold);
  text-underline-offset: 3px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--gold-2); }

.card {
  background: linear-gradient(180deg, var(--panel-top) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

h1, h2 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 { font-size: 1.85rem; margin-bottom: 10px; }
h2 { font-size: 1.2rem; margin-bottom: 8px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; letter-spacing: -0.02em; }

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.02rem; color: var(--lede); margin-bottom: 12px; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

a.primary, a.secondary, button.primary, button.secondary {
  border-radius: 14px;
  padding: 13px 16px;
  font: inherit;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  display: block;
  width: 100%;
  cursor: pointer;
}
a.primary, button.primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--gold-ink);
  font-weight: 800;
  box-shadow: 0 8px 0 var(--gold-dark);
  border: none;
}
a.primary:hover, button.primary:hover { filter: brightness(1.05); }
a.primary:active, button.primary:active {
  transform: translateY(3px);
  box-shadow: 0 5px 0 var(--gold-dark);
}
a.secondary, button.secondary {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--gold);
  font-weight: 600;
}
a.secondary:hover, button.secondary:hover {
  border-color: var(--gold-2);
  color: var(--gold-2);
}

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
}

.note {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
}

.meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 12px; }

a.inline, .source-link, .card a:not(.primary):not(.secondary):not(.brand-copy) {
  color: var(--gold-2);
  text-underline-offset: 3px;
}

.stop-list, .route-list, .activity-list { display: grid; gap: 12px; }

.stop-card, .route-card, .activity-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 12px;
}

footer.card .note { margin-top: 0; text-align: left; }
.route-777 {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Ledger table */
.ledger-wrap { overflow-x: auto; margin: 12px 0; }
table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.ledger th, table.ledger td {
  border: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
table.ledger th {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.22);
}
table.ledger .empty {
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.badge-example {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: #3a2450;
  border: 1px solid var(--gold);
  color: var(--gold-2);
  margin-bottom: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

@media (max-width: 520px) {
  .card { padding: 18px 16px 16px; }
  h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
