
:root {
  --navy: #061b3a;
  --navy-2: #0b3d7a;
  --blue: #1868c7;
  --brand: #1050a3;
  --orange: #f57e20;
  --orange-deep: #e06d10;
  --amber: #ffb236;
  --text: #0f172a;
  --muted: #64748b;
  --paper: #ffffff;
  --paper-2: #f8fafc;
  --rule: #e2e8f0;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.78);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-line: rgba(255, 255, 255, 0.16);
  --grad-hero: linear-gradient(155deg, #061b3a 0%, #0b3d7a 35%, #1868c7 100%);
  --grad-dark: linear-gradient(155deg, #061b3a 0%, #0b3d7a 100%);
  --grad-orange: linear-gradient(135deg, #f57e20, #e06d10);
  --radius: 14px;
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
sup.tm { font-size: 0.45em; font-weight: 500; vertical-align: super; letter-spacing: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.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(--orange); outline-offset: 3px; border-radius: 4px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  color: var(--text);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: var(--brand); }
.brand-name b { color: var(--orange-deep); font-weight: 800; }
.brand-tag { display: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.nav { display: none; margin-left: auto; gap: 22px; font-size: 15.5px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--text); }
.nav a:hover { color: var(--brand); }
.topbar .btn { margin-left: auto; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .topbar .btn { margin-left: 0; }
}
@media (min-width: 1100px) { .brand-tag { display: inline; } }

/* ---------- Buttons and forms ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: var(--grad-orange); color: #fff; font-weight: 700; font-size: 15.5px;
  padding: 10px 18px; border-radius: 10px; font-family: inherit; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(245, 126, 32, 0.35);
  text-shadow: 0 1px 1px rgba(120, 50, 0, 0.35);
}
.btn:hover { filter: brightness(1.06); }
.signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.signup input[type="email"] {
  flex: 1 1 240px; min-width: 0; font: inherit; padding: 13px 16px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1); color: #fff;
}
.signup input::placeholder { color: rgba(255, 255, 255, 0.6); }
.signup .btn { padding: 13px 22px; font-size: 16.5px; }
.signup-note { margin-top: 10px; font-size: 14px; color: var(--on-dark-muted); }
.signup-note.ok { font-size: 19px; font-weight: 600; color: #fff; }
.signup-note.problem { color: var(--amber); }

/* ---------- Rail motif ---------- */
.rails-rule { width: 72px; height: 10px; border-top: 2px solid var(--orange); border-bottom: 2px solid var(--orange); margin-bottom: 22px; }
.center .rails-rule { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { background: var(--grad-hero); color: var(--on-dark); padding: 72px 0 0; overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); margin-bottom: 18px; }
.hero h1 { font-size: clamp(46px, 7.4vw, 88px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.0; }
.hero h1 .on-rails { color: var(--orange); white-space: nowrap; }
.hero .sub { margin: 26px 0 30px; font-size: clamp(18px, 2vw, 21px); color: var(--on-dark-muted); max-width: 600px; }
.hero .sub strong { color: #fff; font-weight: 600; }
.hero-shot { margin-top: 64px; padding-bottom: 72px; }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--glass-line); box-shadow: 0 30px 80px rgba(3, 12, 32, 0.5); background: var(--navy); }
.loop-label { font: 600 15px var(--font); fill: #ffffff; }
.loop-num { font: 700 14px var(--font); fill: #ffffff; }
.loop-dev { font: 500 12.5px var(--font); fill: #e3ecfa; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--grad-dark); color: var(--on-dark); }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.025em; }
.lede { margin-top: 16px; font-size: 20px; color: var(--muted); max-width: 760px; }
.dark .lede { color: var(--on-dark-muted); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 44px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.dark .kicker { color: var(--orange); }

.grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 760px) and (max-width: 1039px) { .g5 { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04); }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); }
.dark .card { background: var(--glass); border-color: var(--glass-line); }
.dark .card p { color: var(--on-dark-muted); }
.closing { margin-top: 40px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -0.015em; }
.closing em { font-style: normal; color: var(--orange-deep); }
.dark .closing em { color: var(--orange); }

/* ---------- What a RailBook is ---------- */
.definition { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.45; max-width: 860px; margin-top: 18px; color: var(--text); }
.definition strong { font-weight: 700; }
.kind .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); background: #e8f0fb; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.kind .eg { margin-top: 14px; font-family: var(--mono); font-size: 14px; color: var(--text); background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--orange); border-radius: 8px; padding: 10px 12px; }
.organized { margin: 30px 0 0; font-size: 18px; color: var(--muted); }
.organized strong { color: var(--text); }

.railbook { margin-top: 48px; background: var(--navy); color: var(--on-dark); border-radius: var(--radius); overflow: hidden; border: 1px solid #12356b; }
.railbook-head { padding: 18px 24px; background: var(--navy-2); border-bottom: 1px solid var(--glass-line); }
.railbook-head .t { font-weight: 700; font-size: 18px; }
.railbook-head .m { font-size: 13.5px; color: var(--on-dark-muted); margin-top: 4px; }
.rb-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 16px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.rb-row:last-child { border-bottom: 0; }
@media (min-width: 760px) { .rb-row { grid-template-columns: 170px 1fr; gap: 24px; } }
.rb-step { font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); padding-top: 3px; }
.rb-body { font-family: var(--mono); font-size: 14px; line-height: 1.65; color: #dbe6f8; }
.rb-body .own { color: var(--orange); }
.rb-body .gate { color: var(--amber); }
.caption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.shots-2 { margin-top: 28px; }
.shots-2 .shot { box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16); }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.dark figcaption { color: var(--on-dark-muted); }

/* ---------- How it works ---------- */
.track { position: relative; }
.track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 21px; height: 8px;
  border-top: 2px solid var(--orange); border-bottom: 2px solid var(--orange); opacity: 0.6; display: none;
}
@media (min-width: 1040px) { .track::before { display: block; } }
.step { position: relative; }
.step .n { width: 50px; height: 50px; border-radius: 50%; background: var(--grad-orange); color: #fff; font-weight: 800; font-size: 20px; display: grid; place-items: center; margin-bottom: 18px; position: relative; box-shadow: 0 6px 18px rgba(245, 126, 32, 0.35); }
.step h3 { font-size: 21px; margin-bottom: 8px; color: #fff; }
.step p { color: var(--on-dark-muted); }
.origin { margin-top: 56px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 30px; }
.origin h3 { font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 22px; }
.origin h4 { font-size: 18px; color: #fff; margin-bottom: 6px; }
.origin p { color: var(--on-dark-muted); font-size: 16px; }

/* ---------- Platforms ---------- */
.platform { text-align: left; }
.platform .glyph { width: 46px; height: 46px; color: var(--brand); margin-bottom: 16px; }
.platform h3 { font-size: 19px; margin-bottom: 2px; }
.platform .kind-of { font-size: 13.5px; color: var(--brand); font-weight: 600; margin-bottom: 10px; }
.platform p { font-size: 15.5px; }
.one-way { margin-top: 36px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; text-align: center; letter-spacing: -0.015em; }

/* ---------- Domains ---------- */
.domain { padding: 30px; }
.domain .dtag { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; color: var(--brand); }
.domain .dtag span { color: var(--orange-deep); }
.domain .dname { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.domain h4 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin: 18px 0 6px; }
.domain p { font-size: 16px; }
.domain .lead { font-size: 18px; color: var(--text); margin-bottom: 4px; }
.rb-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rb-list li { font-family: var(--mono); font-size: 13px; line-height: 1.4; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; color: var(--text); }
.rb-list.long { display: grid; gap: 8px; }
@media (min-width: 900px) { .rb-list.long { grid-template-columns: repeat(3, 1fr); } }
.domain .result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--text); font-weight: 600; }
.domain.wide { grid-column: 1 / -1; background: var(--grad-hero); border-color: transparent; color: var(--on-dark); }
.domain.wide .dtag { color: #fff; }
.domain.wide .dtag span, .domain.wide h4 { color: var(--orange); }
.domain.wide .dname, .domain.wide p { color: var(--on-dark-muted); }
.domain.wide .lead, .domain.wide .result { color: #fff; }
.domain.wide .result { border-top-color: var(--glass-line); }
.domain.wide .rb-list li { background: rgba(6, 27, 58, 0.45); border-color: var(--glass-line); color: #eaf1fc; }
.more { margin-top: 44px; }
.more h3 { font-size: 22px; margin-bottom: 18px; }
.more ul { display: flex; flex-wrap: wrap; gap: 10px; }
.more li { border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 15px; }
.more li.own { flex-basis: 100%; margin-top: 14px; background: var(--brand); color: #fff; border-color: var(--brand); border-radius: var(--radius); padding: 24px 30px; font-size: clamp(21px, 2.5vw, 30px); font-weight: 600; line-height: 1.35; }
.more li.own b { color: var(--amber); font-weight: 800; }

/* ---------- Signup band ---------- */
.band { background: var(--brand); color: var(--on-dark); padding: 34px 0; }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.band .line { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.band .line span { color: var(--amber); }

/* ---------- Product sections ---------- */
.product { display: grid; gap: 44px; align-items: start; }
@media (min-width: 980px) { .product { grid-template-columns: 0.9fr 1.1fr; } .product.flip { grid-template-columns: 1.1fr 0.9fr; } }
.checks li { position: relative; padding: 9px 0 9px 32px; border-bottom: 1px solid var(--rule); }
.checks li:last-child { border-bottom: 0; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 14px; height: 6px; border-top: 2px solid var(--orange); border-bottom: 2px solid var(--orange); }
.dark .checks li { border-bottom-color: rgba(255, 255, 255, 0.14); color: var(--on-dark); }
.shot-grid { display: grid; gap: 18px; }
@media (min-width: 620px) { .shot-grid { grid-template-columns: repeat(2, 1fr); } }
.shot-grid .shot { box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16); }
.diagram { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 18px; }
.dg-t { font: 700 15px var(--font); fill: #fff; }
.dg-s { font: 500 13px var(--font); fill: #d3e0f5; }

/* ---------- Trust ---------- */
.trust h3 { font-size: 19px; }
.trust .card { border-top: 3px solid var(--orange); }

/* ---------- Questions ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; font-size: 19px; position: relative; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 26px; font-weight: 400; color: var(--orange-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); }

/* ---------- Final signup and footer ---------- */
.final { background: var(--grad-hero); color: var(--on-dark); padding: 96px 0; text-align: center; }
.final h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; }
.final h2 span { color: var(--orange); }
.final p.lede { color: var(--on-dark-muted); margin: 16px auto 30px; }
.final .signup { margin: 0 auto; justify-content: center; }
.footer { background: var(--brand); color: rgba(255, 255, 255, 0.82); padding: 34px 0; font-size: 14px; }
.footer .wrap { display: grid; gap: 10px; }
.footer .f-brand { color: #fff; font-weight: 700; font-size: 16px; }
.footer .f-brand span { color: var(--amber); }
.footer .f-contact { color: #fff; font-size: 15px; }
.footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: var(--amber); }
.footer .f-privacy { margin-left: 2.5em; white-space: nowrap; }

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

/* ---------- Large platform screenshots ---------- */
.shot-wide { grid-column: 1 / -1; min-width: 0; margin: 12px 0 8px; }
.shot-wide .shot { box-shadow: 0 16px 44px rgba(15, 23, 42, 0.2); }
.shot-wide figcaption { font-size: 16px; text-align: center; text-wrap: balance; }
.shot-wide figcaption strong { color: var(--text); }
.collection .shot-wide, .domain.wide .shot-wide { margin: 28px 0 0; }
.collection .shot-wide .shot, .domain.wide .shot-wide .shot { margin-inline: 0; }
.collection .shot-wide figcaption, .domain.wide .shot-wide figcaption, .hero .shot-wide figcaption { color: var(--on-dark-muted); }
.collection .shot-wide figcaption strong, .domain.wide .shot-wide figcaption strong, .hero .shot-wide figcaption strong { color: #fff; }
.hero .shot-wide { margin-bottom: 0; }
.hero .shot-wide .shot { box-shadow: 0 30px 80px rgba(3, 12, 32, 0.5); }
.hero .shot-wide figcaption { margin-top: 16px; }
.shot-group { margin-top: 34px; padding-top: 26px; border-top: 2px solid rgba(255, 255, 255, 0.38); }
.shot-prompt { max-width: 820px; margin: 0 auto; }
.hero-shot.shot-group { margin-top: 56px; }
.own-line { max-width: 940px; margin: 8px auto 30px; text-align: center; text-wrap: balance; font-size: clamp(21px, 2.5vw, 30px); font-weight: 600; line-height: 1.35; color: #fff; }
.own-line b { color: var(--amber); font-weight: 800; }
.own-line .nb { white-space: nowrap; }
.shot-prompt + .shot { margin-top: 18px; }
.domain.wide .shot-prompt p, .hero .shot-prompt p { font-size: 16px; line-height: 1.6; color: #fff; background: rgba(6, 27, 58, 0.55); border: 1px solid var(--glass-line); border-left: 4px solid var(--orange); border-radius: 10px; padding: 16px 20px; }
.shot-prompt code { font-family: var(--mono); font-size: 0.92em; background: rgba(255, 255, 255, 0.12); border-radius: 4px; padding: 1px 5px; }
.shot-prompt + .shot-wide { margin-top: 14px; }
.mock img { display: block; width: 100%; height: auto; }
.shot-group.on-light .mock img { filter: drop-shadow(0 14px 28px rgba(15, 23, 42, 0.18)); }
.shot-group.on-light { grid-column: 1 / -1; min-width: 0; margin-top: 14px; border-top-color: #cbd5e1; }
.shot-group.on-light .plabel { color: var(--orange-deep); }
.shot-group.on-light .shot-prompt p { font-size: 16px; line-height: 1.6; color: var(--text); background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--orange); border-radius: 10px; padding: 16px 20px; }
.shot-group.on-light .shot-prompt code { background: rgba(15, 23, 42, 0.07); }
.product.solo { grid-template-columns: 1fr; }
@media (min-width: 760px) { .product.solo .checks { columns: 2; column-gap: 44px; } .product.solo .checks li { break-inside: avoid; } }

/* ---------- Screenshot viewer ---------- */
.shot img, img.zoom { cursor: zoom-in; }
img.zoom:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (min-width: 980px) {
  .hero-diagram { margin-left: -48px; }
}
.hero-diagram img { width: 100%; }
.shot img:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; overflow: visible; }
.lightbox::backdrop { background: rgba(3, 12, 32, 0.88); }
.lightbox img {
  width: min(96vw, calc(92vh * var(--ratio, 1.6))); max-width: none; height: auto;
  aspect-ratio: var(--ratio, 1.6); object-fit: contain;
  border-radius: 10px; background: var(--navy); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: fixed; top: 14px; right: 18px; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; border: 1px solid var(--glass-line); background: rgba(6, 27, 58, 0.9);
  color: #fff; font: 400 28px/1 var(--font); cursor: pointer;
}
.lightbox-close:hover { background: var(--orange-deep); }
.lightbox-close:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- Collection callout ---------- */
.collection { margin-top: 56px; background: var(--grad-hero); color: var(--on-dark); border-radius: var(--radius); padding: 34px; }
.collection .kicker { color: var(--orange); }
.collection h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.collection-head p:not(.kicker) { margin-top: 12px; max-width: 780px; color: var(--on-dark-muted); font-size: 18px; }
.collection-flow { display: grid; gap: 24px; margin-top: 28px; }
@media (min-width: 900px) { .collection-flow { grid-template-columns: 0.8fr 1.2fr; } }
.plabel { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.collection .prompt p { font-family: var(--mono); font-size: 16px; line-height: 1.6; color: #fff; background: rgba(6, 27, 58, 0.55); border: 1px solid var(--glass-line); border-left: 4px solid var(--orange); border-radius: 10px; padding: 18px 20px; }
.collection .rb-list li { background: rgba(6, 27, 58, 0.45); border-color: var(--glass-line); color: #eaf1fc; }
.collection .rb-list li.more-chip { background: transparent; border-style: dashed; color: var(--on-dark-muted); }

/* ---------- Privacy notice page ---------- */
.legal { padding: 64px 0 88px; }
.legal .wrap { max-width: 780px; }
.topbar.no-nav .btn { margin-left: auto; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -0.025em; }
.legal .updated { margin-top: 10px; font-size: 15px; color: var(--muted); }
.legal h2 { font-size: 22px; font-weight: 700; margin: 40px 0 10px; }
.legal ul { list-style: disc; padding-left: 22px; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--brand); text-underline-offset: 3px; }
