:root {
  --blue: #005397;
  --green: #01784e;
  --red: #cc3333;
  --ink: #161716;
  --muted: #65707b;
  --line: #dde3e7;
  --paper: #fff;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  display: flex;
  width: min(calc(100% - 2rem), 76rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-inline: auto;
}

.header-inner {
  min-height: 4.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 1.35rem;
  aspect-ratio: 404 / 311;
  flex: 0 0 auto;
  overflow: hidden;
}

.brand-mark::before {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 408.416%;
  aspect-ratio: 1650 / 600;
  background: currentColor;
  color: var(--ink);
  content: '';
  animation: mark-cycle 16s linear infinite;
  mask: url('/assets/transitway-logo.png') center / 100% 100% no-repeat;
  transform: translate(-37.758%, -28.167%);
}

@keyframes mark-cycle {
  0%,
  22% {
    color: var(--ink);
  }
  25%,
  47% {
    color: var(--blue);
  }
  50%,
  72% {
    color: var(--green);
  }
  75%,
  97% {
    color: var(--red);
  }
  100% {
    color: var(--ink);
  }
}

.header-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.header-nav a,
.footer-nav a {
  text-decoration: none;
}

.header-nav a:hover,
.footer-nav a:hover,
.header-nav a:focus-visible,
.footer-nav a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

main {
  min-height: calc(100vh - 8.9rem);
}

.route-marks {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1.45rem;
}

.route-marks span {
  width: 2rem;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--blue);
}

.route-marks span:nth-child(2) {
  background: var(--green);
}

.route-marks span:nth-child(3) {
  background: var(--red);
}

.policy {
  width: min(calc(100% - 2rem), 48rem);
  margin-inline: auto;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.policy-header {
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.policy h1,
.landing h1,
.not-found h1 {
  margin: 0;
  color: #1d2228;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.updated {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.summary {
  max-width: 38rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.55;
}

.policy section {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}

.policy h2 {
  margin: 0;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.policy section p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.68;
}

.policy section p + p {
  margin-top: -0.65rem;
}

.policy section a,
.landing a,
.not-found a {
  color: var(--blue);
  font-weight: 700;
}

.landing,
.not-found {
  display: grid;
  width: min(calc(100% - 2rem), 60rem);
  min-height: calc(100vh - 8.9rem);
  align-content: center;
  margin-inline: auto;
  padding-block: 4rem;
}

.landing h1,
.not-found h1 {
  max-width: 12ch;
}

.landing p,
.not-found p {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 4.5rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

@media (max-width: 39rem) {
  .policy section {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .policy section p {
    grid-column: 1;
  }

  .policy section p + p {
    margin-top: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark::before {
    animation: none;
  }
}
