/* Stopwise site styles. One file, no external fonts, no inline styles
   (the Content-Security-Policy in _headers blocks them). Light only:
   charcoal and white with a gold accent (see brand/README.md). */

:root {
  color-scheme: light;
  --ground: #FFFFFF;
  --surface: #F5F5F4;
  --sunk: #ECECEB;
  --ink: #232323;
  --muted: #5C5C5C;
  --rule: #D9D9D8;
  --primary: #232323;
  --on-primary: #FFFFFF;
  --primary-hover: #000000;
  --signal: #F4B63F;
  --on-signal: #232323;
  --band: #232323;
  --on-band: #FFFFFF;
  --on-band-muted: #C8C8C8;
  --link: #232323;
  --focus: #232323;
  --code-bg: #ECECEB;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
/* --focus is charcoal, the same as --band; switch to white on dark panels. */
.band :focus-visible, .demo-panel :focus-visible { outline-color: var(--on-band); }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* Skip link */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* Header */
.site-header .wrap {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.logo { width: 40px; height: 24px; flex: none; }
.logo .stroke { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.logo .start { fill: var(--ground); stroke: currentColor; stroke-width: 3; }
.logo .end { fill: var(--signal); stroke: currentColor; stroke-width: 3; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 8px;
}
.site-nav a:hover { background: var(--sunk); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
@media (max-width: 560px) {
  .site-nav a { padding: 0 7px; font-size: 14px; }
}

/* Draft banner */
.draft-banner { background: var(--signal); color: var(--on-signal); }
.draft-banner .wrap { padding-top: 12px; padding-bottom: 12px; font-size: 15px; }
.draft-banner strong { font-size: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-weight: 700; font-size: 17px; text-decoration: none;
}
.btn:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-signal { background: var(--signal); color: var(--on-signal); }
.btn-signal:hover { background: #E7A62B; color: var(--on-signal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px;
  border-radius: 999px; border: 2px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none;
}
.btn-ghost:hover { background: var(--sunk); color: var(--ink); }

/* Home: hero */
.hero {
  padding-top: 40px; padding-bottom: 72px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 48px 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero h1 {
  margin: 0; font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.02;
  letter-spacing: -0.035em; font-weight: 800; text-wrap: balance;
}
.lede { margin: 0; max-width: 34em; font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); text-wrap: pretty; }
.small-note { margin: 0; font-size: 15px; color: var(--muted); }

/* Home: chat illustration (fixed light colours inside the card on purpose) */
.demo { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.demo-panel { background: var(--band); border-radius: 28px; padding: clamp(16px, 4vw, 28px); display: flex; flex-direction: column; gap: 14px; }
.bubble-user {
  margin: 0; align-self: flex-end; max-width: 85%; background: #F1F1F0; color: #232323;
  padding: 11px 16px; border-radius: 18px 18px 4px 18px; font-size: 16px;
}
.bubble-bot { margin: 0; align-self: flex-start; max-width: 90%; color: var(--on-band); font-size: 16px; }
.card { background: #FFFFFF; color: #232323; border-radius: 18px; overflow: hidden; }
.card-main { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.card-times { display: flex; align-items: center; gap: 12px; }
.card-stop { display: flex; flex-direction: column; gap: 2px; }
.card-stop-end { text-align: right; }
.card-time { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.card-name { font-size: 14px; color: #5C5C5C; }
.card-line { flex: 1 1 60px; min-width: 40px; height: 3px; background: #232323; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 15px; }
.card-rule { border-top: 2px dashed #D0D0CF; margin: 0 14px; }
.card-foot { padding: 12px 18px 16px; font-size: 13px; color: #5C5C5C; display: flex; flex-direction: column; gap: 4px; }
.demo figcaption { font-size: 14px; color: var(--muted); }

/* Home: sections */
.section { padding-top: 72px; padding-bottom: 72px; scroll-margin-top: 12px; }
.section-surface { background: var(--surface); }
.section h2 {
  margin: 0 0 40px; font-size: clamp(1.8rem, 4.5vw, 2.75rem); line-height: 1.1;
  letter-spacing: -0.03em; font-weight: 800;
}
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 36px 0;
}
.steps li { display: flex; flex-direction: column; gap: 16px; }
.step-track { display: flex; align-items: center; }
.step-dot {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.step-dot-first { background: var(--signal); color: var(--on-signal); }
.step-dot-last { background: var(--ink); color: var(--surface); }
.step-bar { flex: 1; height: 3px; background: var(--ink); }
.step-body { padding-right: 28px; display: flex; flex-direction: column; gap: 6px; }
.step-body h3 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.step-body p { margin: 0; color: var(--muted); }

.mission-body { max-width: 40em; display: flex; flex-direction: column; gap: 16px; }
.mission-body p { margin: 0; }
.mission-body .lede { margin-bottom: 4px; }

.two-col {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 40px 64px; align-items: start;
}
.two-col h2 { margin-bottom: 28px; }
.route { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.route li { display: flex; gap: 16px; }
.route-track { display: flex; flex-direction: column; align-items: center; }
.route-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ink); background: var(--ground); }
.route-dot-now { background: var(--signal); }
.route-bar { flex: 1; width: 3px; background: var(--ink); }
.route p { margin: 0; padding-bottom: 22px; }
.route li:last-child p { padding-bottom: 0; }
.route span { color: var(--muted); }

.facts { margin: 0; display: flex; flex-direction: column; }
.facts div { padding: 24px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.facts div:first-child { border-top: 3px solid var(--ink); }
.facts dt { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.facts dd { margin: 0; color: var(--muted); }

.band { background: var(--band); color: var(--on-band); }
.band .wrap {
  padding-top: 48px; padding-bottom: 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
}
.band-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 8px; }
.band h2 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.15; }
.band p { margin: 0; color: var(--on-band-muted); max-width: 38em; }
.band a:not(.btn) { color: var(--on-band); }

.audiences { display: flex; flex-direction: column; }
.audiences div { padding: 20px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.audiences div:last-child { border-bottom: 1px solid var(--rule); }
.audiences h3 { margin: 0; font-size: 19px; }
.audiences p { margin: 0; color: var(--muted); }
.contact-box {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 20px;
  padding: clamp(20px, 4vw, 32px); display: flex; flex-direction: column; gap: 14px;
}
.contact-box h3 { margin: 0; font-size: 20px; }
.contact-box p { margin: 0; color: var(--muted); }
.contact-box .big { font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

/* Document pages */
.doc { max-width: 46rem; padding-top: 32px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(2rem, 5.5vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 16px; }
.doc h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); line-height: 1.2; letter-spacing: -0.02em; margin: 44px 0 12px; scroll-margin-top: 12px; }
.doc h3 { font-size: 1.15rem; margin: 30px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc .lede { margin-bottom: 20px; }
.meta { color: var(--muted); font-size: 15px; }

.notice {
  border: 2px solid var(--rule); border-radius: 14px; background: var(--surface);
  padding: 16px 18px; margin: 20px 0;
}
.notice p:last-child { margin-bottom: 0; }
.attribution { border-color: var(--ink); }
.attribution p { margin: 0 0 6px; font-weight: 600; }

.toc { background: var(--surface); border-radius: 14px; padding: 16px 18px; margin: 24px 0; }
.toc h2 { margin: 0 0 8px; font-size: 1rem; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 16rem; }

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: 0; }
th { background: var(--sunk); font-weight: 700; }

/* Placeholders that must be filled before the privacy notice goes live. */
.ph {
  background: #F4B63F; color: #232323; font-weight: 700;
  padding: 0.05em 0.3em; border-radius: 4px; outline: 2px dashed #232323; outline-offset: 1px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.editor-note {
  border: 2px dashed var(--signal); border-radius: 12px; padding: 12px 16px; margin: 14px 0;
  font-size: 15px;
}
.editor-note p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap {
  padding-top: 32px; padding-bottom: 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px;
  font-size: 15px; color: var(--muted);
}
.foot-about { flex: 1 1 380px; display: flex; flex-direction: column; gap: 6px; }
.foot-about strong { color: var(--ink); }
.foot-about p { margin: 0; max-width: 40em; }
.foot-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.foot-links a:hover { color: var(--ink); }

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