/*
 * railtymaps.com. Plain CSS, no build step: Cloudflare Pages serves site/ as is.
 * Colors follow the extension (entrypoints/sidepanel/style.css). No web fonts,
 * so nothing loads from anyone else's server.
 */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #475569;
  --bg: #ffffff;
  --surface: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #1d4ed8; /* button fill, white text on it */
  --accent-hover: #1e40af;
  --link: #1d4ed8; /* accent as text */
  --link-hover: #1e3a8a;
  --accent-soft: #eff6ff;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --rail: #fbbf24;
  /* The dark bands (hero, install, footer) stay dark in both themes. */
  --night: #0f172a;
  --night-2: #111c33;
  --night-line: #334155;
  --night-text: #cbd5e1;
  --night-muted: #94a3b8;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 24px);
  --section: clamp(56px, 8vw, 96px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e2e8f0;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --bg: #0b1120;
    --surface: #0e1629;
    --line: #1e293b;
    --line-strong: #334155;
    --link: #60a5fa;
    --link-hover: #93c5fd;
    --accent-soft: #172554;
    --ok: #34d399;
    --ok-soft: #052e25;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  flex: none;
}

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

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

:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h3 {
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link);
}

.h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

/* Only used on the dark bands. */
.btn-ghost {
  border-color: #475569;
  color: #ffffff;
}

.btn-ghost:hover {
  border-color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.text-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------ header */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #ffffff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: #ffffff;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 22px;
  font-size: 15px;
  font-weight: 600;
}

.nav a {
  color: var(--night-text);
  text-decoration: none;
  padding: 12px 0;
}

.nav a:hover {
  color: #ffffff;
}

.nav .nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.nav .nav-cta:hover {
  background: var(--accent-hover);
}

/* On phones the section links live in the footer; the header keeps the button. */
@media (max-width: 760px) {
  .nav .nav-link {
    display: none;
  }
}

.site-header {
  background: var(--night);
  padding-block: 14px;
}

/* ------------------------------------------------------------ hero */

.hero {
  background: var(--night);
  color: #ffffff;
  padding-top: 18px;
  overflow: hidden;
}

.hero-copy {
  max-width: 940px;
  margin: 0 auto;
  padding: 72px var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--night-line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #bfdbfe;
}

.tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rail);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 680px;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--night-text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.fineprint {
  font-size: 14px;
  color: var(--night-muted);
}

.hero-shot {
  margin-top: 56px;
}

.browser {
  margin: 0;
  padding: 10px 10px 0;
  border-radius: 16px 16px 0 0;
  background: #1e293b;
  box-shadow: 0 -10px 60px rgba(29, 78, 216, 0.25);
}

.browser-dots {
  display: flex;
  gap: 7px;
  padding: 4px 6px 12px;
}

.browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #475569;
}

.browser img {
  width: 100%;
  border-radius: 8px 8px 0 0;
}

/* ------------------------------------------------------------ sections */

.section {
  padding-block: var(--section);
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 740px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.step {
  flex: 1 1 300px;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.step h3 {
  margin: 18px 0 8px;
  font-size: 20px;
}

.step p,
.card p {
  color: var(--muted);
}

.features {
  display: flex;
  flex-direction: column;
  gap: var(--section);
}

.feature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}

/* Picture on the left on wide screens; text still comes first when stacked. */
.feature-flip {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-text h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
}

.feature-media {
  flex: 1.4 1 520px;
  min-width: 0;
  margin: 0;
}

.feature-media img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.checks {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink-2);
}

.checks li {
  display: flex;
  gap: 10px;
}

.checks svg {
  color: var(--ok);
  margin-top: 1px;
}

.cards {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  flex: 1 1 250px;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.card h3 {
  margin: 16px 0 6px;
  font-size: 18px;
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--link);
}

.icon-tile-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px;
}

.split-text {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.metros {
  flex: 1.3 1 460px;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metros li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  font-weight: 600;
}

/* A station dot, like the ones on the extension's icon. */
.metros li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border: 2.5px solid var(--link);
  border-radius: 50%;
  background: var(--bg);
}

.metros .more {
  padding-inline: 4px;
  border: 0;
  background: none;
  color: var(--muted);
}

.metros .more::before {
  display: none;
}

.duo {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.panel {
  flex: 1 1 420px;
  min-width: 0;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel h2 {
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.panel .lead {
  font-size: 17px;
}

.panel ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-2);
}

.panel .icon-tile {
  width: 48px;
  height: 48px;
}

/* ------------------------------------------------------------ install */

.band {
  background: var(--night);
  color: #ffffff;
}

.band .lead {
  color: var(--night-text);
}

.band .fineprint {
  margin-top: -4px;
}

.band .btn {
  align-self: flex-start;
}

.install-steps {
  flex: 1.2 1 440px;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--night-line);
  border-radius: 14px;
  background: var(--night-2);
  color: #e2e8f0;
  font-size: 17px;
}

.install-steps .num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rail);
  color: #0f172a;
  font-weight: 800;
}

.install-steps code {
  color: #ffffff;
}

/* ------------------------------------------------------------ FAQ */

.faq {
  max-width: 860px;
}

.faq h2 {
  margin-bottom: 24px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:first-of-type {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------------------------------------ footer */

.footer {
  background: var(--night);
  color: var(--night-text);
}

.footer-inner {
  padding-block: 56px 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 40px;
  border-bottom: 1px solid #1e293b;
}

.footer-cta p {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
}

.footer-about {
  flex: 2 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-about .brand {
  font-size: 18px;
}

.footer-about p {
  max-width: 380px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--night-muted);
}

.footer-about p a {
  color: inherit;
}

.footer-about p a:hover {
  color: #ffffff;
}

.footer-nav {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 64px;
  font-size: 15px;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--night-text);
  text-decoration: none;
}

.footer-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-legal {
  font-size: 14px;
  color: var(--night-muted);
}

/* ------------------------------------------------------------ text pages */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) var(--gutter) var(--section);
}

.doc h1 {
  font-size: clamp(34px, 5vw, 48px);
}

.doc .updated {
  margin-top: 12px;
  color: var(--muted);
}

.doc h2 {
  margin: 44px 0 14px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.doc p,
.doc li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

.doc p {
  margin-top: 16px;
}

.doc ul,
.doc ol {
  margin: 16px 0 0;
  padding-left: 22px;
}

.doc li + li {
  margin-top: 8px;
}

.doc li > ul {
  margin-top: 8px;
}

.doc strong {
  color: var(--ink);
}

.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
}
