/* ============================================================
   Roaminder — "wayfinding" world.
   Loads after site.css and v2.css and re-skins them: same class
   names, new material. Swap its <link> for another world's and
   the site changes look.

   Ground   pale map paper
   Sign     deep navy signage panels, white lettering
   Lines    the brand teal plus four route colours
   ============================================================ */

:root,
html:root[data-theme] {
  --sign:     #0F2A44;
  --sign-2:   #16385A;
  --ground:   #F4F7F6;
  --ground-2: #E4ECEA;
  --paper:    #FFFFFF;
  --ink:      #0F2A44;
  --pop:      #087A77;
  --pop-lt:   #14BDB6;
  --l-teal:   #14BDB6;
  --l-blue:   #2F6FED;
  --l-green:  #2EA66A;
  --l-amber:  #F59E0B;
  --l-red:    #E5484D;

  --bg:        var(--ground);
  --bg-2:      var(--ground-2);
  --surface:   var(--paper);
  --surface-2: var(--ground-2);
  --border:    #CBD9D6;
  --border-2:  #9FB6B2;

  --text:  var(--ink);
  --muted: #3F566B;
  --faint: #5A7085;

  --teal-300: var(--pop);
  --teal-400: var(--pop);
  --teal-500: var(--pop);
  --teal-600: var(--pop);
  --teal-700: var(--pop);
  --sky:      var(--pop);
  --amber:    var(--l-amber);
  --amber-soft: var(--ink);

  --grad-teal: var(--pop);
  --grad-warm: var(--l-teal);
  --glow-teal: none;
  --shadow-lg: 0 22px 28px -20px rgba(15,42,68,.5);
  --shadow-md: 0 10px 16px -12px rgba(15,42,68,.4);

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 14px; --r-pill: 8px;

  --focus: var(--pop);

  --font: "Barlow", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Condensed", "Barlow", "Arial Narrow", sans-serif;
}

body { background: var(--bg); color: var(--text); font-weight: 500; font-size: 18px; }
/* faint street grid */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(rgba(15,42,68,.045) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(90deg, rgba(15,42,68,.045) 1px, transparent 1px) 0 0 / 72px 72px;
}
main, header, footer { position: relative; z-index: 1; }

::selection { background: var(--l-teal); color: var(--sign); }
html { scrollbar-color: #9FB6B2 var(--ground); accent-color: var(--pop); }
input, textarea { caret-color: var(--pop); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

a { color: var(--pop); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
a:hover { color: var(--l-blue); }
.brand, .nav-links a, .nav-cta, .nav-mylist, .skip, .fe-os, .foot-links a, .faq-q, .btn, .storebtn { text-decoration: none; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.005em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(3rem, 7.4vw, 6rem); }
h2 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.1; }
h4 { font-family: var(--font); font-weight: 800; }
.hero h1 { font-size: clamp(3rem, 7.4vw, 6rem); }
p, li { text-wrap: pretty; }
.lede, .big-lede { color: var(--muted); }
.big-lede { font-size: clamp(1.2rem, 2.3vw, 1.5rem); font-weight: 500; }
.faint { color: var(--faint); }
.kicker { font-weight: 800; }
.eyebrow { display: none; }

/* the one emphasis device: a destination sign inline in the headline */
.grad-text, .amber-text, .tag-ink {
  background: var(--sign); color: #fff; -webkit-background-clip: border-box; background-clip: border-box;
  padding: .0em .2em .04em; margin-inline: -.02em; border-radius: 10px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.tag-ink { display: inline-block; }

/* ---------- buttons ---------- */
.btn { border-radius: var(--r-md); font-weight: 700; letter-spacing: .01em; border: 2px solid var(--sign); box-shadow: none; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--pop); color: #fff; border-color: var(--pop); box-shadow: 0 8px 14px -8px rgba(8,122,119,.7); }
.btn-primary:hover { color: #fff; background: var(--sign); border-color: var(--sign); }
.btn-ghost { background: transparent; color: var(--sign); border-color: var(--sign); backdrop-filter: none; }
.btn-ghost:hover { background: var(--sign); color: #fff; }
.btn-amber { background: var(--l-amber); color: var(--sign); border-color: var(--l-amber); }
.pill-note { background: var(--sign); border-color: var(--sign); color: #fff; }
.pill-note .dot { background: var(--l-teal); animation: none; }
.storebtn { background: var(--paper); border: 2px solid var(--sign); color: var(--sign); }
.storebtn:hover { color: var(--sign); border-color: var(--sign); }

/* ---------- header: the sign bar, with the route stripe under it ---------- */
.site-header { background: var(--sign); backdrop-filter: none; border-bottom: 0; --text: #fff; --muted: #BFD3E6; --faint: #9FB6CC; color: #fff; }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; pointer-events: none; opacity: 1;
  background: linear-gradient(90deg, var(--l-teal) 0 20%, var(--l-blue) 20% 40%, var(--l-green) 40% 60%, var(--l-amber) 60% 80%, var(--l-red) 80% 100%);
}
.nav { height: 78px; }
.brand img.mark, .brand:hover img.mark { box-shadow: none; }
.brand-tag { color: var(--muted); }
.site-header .nav-links a { color: #fff; border-radius: var(--r-sm); }
.site-header .nav-links a:hover, .site-header .nav-links a.active { color: var(--sign); background: #fff; }
.site-header .nav-cta { background: var(--l-teal); color: var(--sign); border-radius: var(--r-sm); box-shadow: none; }
.site-header .nav-cta:hover { background: #fff; color: var(--sign); filter: none; }
.site-header .nav-mylist { border: 2px solid #fff; color: #fff; border-radius: var(--r-sm); }
.site-header .nav-mylist:hover { background: #fff; color: var(--sign); }
.site-header .nav-mylist b { color: var(--l-teal); }
.site-header .nav-mylist:hover b { color: var(--pop); }
.nav-mylist .pre { color: var(--muted); }
.site-header .nav-mylist:hover .pre { color: var(--faint); }
.site-header .nav-links .only-menu.cta { color: var(--l-teal); }
.icon-btn { background: transparent; border-color: #3B587A; color: #BFD3E6; border-radius: var(--r-sm); }
.icon-btn:hover { color: var(--sign); background: #fff; border-color: #fff; }
.theme-toggle { display: none; }
@media (max-width: 900px) {
  .nav-links { background: var(--sign); border-bottom: 6px solid var(--l-teal); border-radius: 0; }
  .site-header .nav-links a { color: #fff; }
}
.skip { background: var(--l-teal); color: var(--sign); border: 2px solid var(--sign); }

section { overflow-x: clip; }
.divider { background: var(--border); height: 2px; }

/* ---------- paper surfaces ---------- */
.card, .faq-item, .stat, .scene {
  background: var(--paper); color: var(--ink); border: 2px solid var(--border); border-radius: var(--r-lg); box-shadow: none;
  --text: var(--ink); --muted: #3F566B;
}
.card::after { content: none; }
.card:hover { transform: none; box-shadow: var(--shadow-md); border-color: var(--border-2); }
.card-accent { border-color: var(--border); box-shadow: none; }
.stats { background: var(--border); border: 2px solid var(--border); border-radius: var(--r-lg); }
.step-num { background: var(--l-teal); color: var(--sign); border-radius: 50%; font-family: var(--display); font-weight: 800; }
.ico, .ico.amber { background: var(--l-teal); border: 0; color: var(--sign); border-radius: var(--r-md); }

.ms-tab i svg, .ms-gear svg { width: 1em; height: 1em; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ms-tab i { display: grid; place-items: center; }
.ms-gear { color: var(--app-muted); }

.checks li { color: var(--muted); }
.checks li::before { background: var(--l-green); border-radius: 50%; }
.checks li::after { border-color: #fff; }
.checks b { color: var(--text); }

.mphone, .phone { background: #172129; box-shadow: 0 0 0 2px var(--sign), var(--shadow-lg); }
.phone::before { content: none; }
.plus-chip { box-shadow: none; }
.roami-hero { box-shadow: 0 0 0 4px var(--l-teal); }
.ms-ball { box-shadow: 0 0 0 3px rgba(56,189,248,.35); }
.phone-float { animation-duration: 8s; }

/* ---------- Fred: on the departures screen ---------- */
.fred { border: 6px solid var(--sign); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); background: var(--sign); }
.fred-bar, .fred-credit { background: var(--sign); color: #fff; --text: #fff; --muted: #BFD3E6; --border: #3B587A; --surface: var(--sign); }
.fred-credit { color: #9FB6CC; }
.fred-credit a { color: #BFD3E6; }
.fred-play, .scene-bar .play { background: var(--l-teal); color: var(--sign); }
.fred-prog i, .fred-track i { background: var(--l-teal); }
.fred-track::before { background: #3B587A; }
.fred-cc[aria-pressed="true"] { border-color: var(--l-teal); color: var(--l-teal); }
.fred-cc, .fred-fs { color: #fff; border-color: #3B587A; }
.fred-time { color: #BFD3E6; }
.fred-end .btn-ghost { color: #fff; border-color: #fff; }
.fred-end .btn-ghost:hover { background: #fff; color: var(--sign); }
.fred-end .btn-primary { background: var(--l-teal); color: var(--sign); border-color: var(--l-teal); }
.scene { background: var(--sign); border-color: var(--sign); }
.scene-bar { background: var(--sign); color: #fff; --muted: #BFD3E6; --text: #fff; border-top-color: #3B587A; }
.chapters i { background: #3B587A; }
.chapters i.on { background: var(--l-teal); }

/* ---------- FAQ ---------- */
.faq-q { color: var(--ink); font-weight: 800; }
.faq-q:hover { color: var(--pop); }
.faq-q .chev { color: var(--ink); }
.faq-item.open { border-color: var(--pop); }
.faq-item.open .faq-q .chev { color: var(--pop); }
.faq-a p { color: #3F566B; }
.faq-item a { color: var(--pop); }
.replica { background: var(--pop); color: #fff; }
.replica.plain { background: var(--ground-2); color: var(--ink); border: 2px solid var(--border-2); }
.faq-group > h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }

/* ---------- forms ---------- */
.field label { color: var(--ink); }
.field input, .field textarea, .field select { background: #fff; border: 2px solid var(--sign); color: var(--ink); border-radius: var(--r-sm); }
.field input:focus, .field textarea:focus { border-color: var(--pop); box-shadow: none; outline: 3px solid var(--pop); outline-offset: 2px; }
.form-note { background: #fff; border: 2px solid var(--l-amber); color: var(--ink); }
.form-ok { background: #fff; border: 2px solid var(--l-green); color: #1F7A4C; }

/* ---------- CTA band: the big exit sign ---------- */
.cta-band {
  background: var(--sign); color: #fff; border: 0; border-radius: var(--r-xl);
  --text: #fff; --muted: #BFD3E6; box-shadow: var(--shadow-lg); overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: linear-gradient(90deg, var(--l-teal) 0 20%, var(--l-blue) 20% 40%, var(--l-green) 40% 60%, var(--l-amber) 60% 80%, var(--l-red) 80% 100%);
}
.cta-band h2 { color: #fff; }
.cta-band .lede { color: #BFD3E6; }
.cta-band .btn-primary { background: var(--l-teal); color: var(--sign); border-color: var(--l-teal); box-shadow: none; }
.cta-band .btn-primary:hover { background: #fff; border-color: #fff; color: var(--sign); }
.cta-band .btn-ghost { color: #fff; border-color: #fff; }
.cta-band .btn-ghost:hover { background: #fff; color: var(--sign); }
.cta-band a:not(.btn) { color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--sign); border-top: 6px solid var(--l-teal); --text: #fff; --muted: #BFD3E6; --faint: #9FB6CC; --border: #2C4A6C; color: #fff; }
.site-footer a { color: var(--l-teal); }
.foot-grid h4 { color: var(--l-teal); }
.foot-links a { color: #BFD3E6; }
.foot-links a:hover { color: #fff; }
.foot-bottom { border-top-color: #2C4A6C; color: var(--faint); }

/* ---------- prose / legal ---------- */
.prose h3 { color: var(--ink); font-family: var(--font); font-weight: 800; }
.prose p, .prose li, .prose td { color: #2C4258; }
.prose strong { color: var(--ink); }
.prose th { background: var(--sign); color: #fff; }
.prose table { border: 2px solid var(--sign); background: #fff; }
.prose th, .prose td { border-bottom-color: var(--border); }
.prose blockquote { border: 2px solid var(--l-teal); background: #fff; border-radius: var(--r-md); }
.privacy-list li span { color: var(--l-red); }
.mbrowser, .mwidget { box-shadow: var(--shadow-lg); border-color: var(--border); }

/* ============================================================
   the route map — the hero
   ============================================================ */
.hero-grid { align-items: center; }
.hero .receipt { display: none; }
.hero-buy { display: grid; gap: 14px; justify-items: start; margin-top: 30px; }
.hero-buy .btn { font-size: 1.15rem; padding: 17px 34px; }
.hero-buy .aside { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 700; }
@media (max-width: 940px) { .hero-art { order: 0; } }

.hero-map { display: block; background: #fff; border: 3px solid var(--sign); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; max-width: 560px; margin-inline: auto; }
.map-head { display: flex; justify-content: space-between; align-items: center; background: var(--sign); color: #fff; padding: 12px 18px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; text-transform: uppercase; }
.map-tag { font-family: var(--font); font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: #BFD3E6; }
.hero-map svg { display: block; width: 100%; height: auto; padding: 8px 6px 4px; }
.hero-map .route-halo { fill: none; stroke: #DCE8E6; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; }
.hero-map .route { fill: none; stroke: var(--l-teal); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: drawRoute 2.2s .3s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes drawRoute { to { stroke-dashoffset: 0; } }
.hero-map .stop { fill: #fff; stroke: var(--sign); stroke-width: 6; }
.hero-map .ping { fill: none; stroke: var(--l-red); stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.hero-map .rider { fill: var(--l-red); stroke: #fff; stroke-width: 3; }
.hero-map .here-tag { fill: var(--l-red); }
.hero-map .here-txt { fill: #fff; font-family: var(--font); font-weight: 800; font-size: 15px; letter-spacing: .06em; }
.hero-map .st-name { fill: var(--sign); font-family: var(--display); font-weight: 800; font-size: 30px; }
.hero-map .st-sub { fill: #3F566B; font-family: var(--font); font-weight: 600; font-size: 17px; }
.hero-map .best-tag { fill: var(--l-amber); }
.hero-map .best-txt { fill: var(--sign); font-family: var(--font); font-weight: 800; font-size: 14px; letter-spacing: .06em; }
@media (prefers-reduced-motion: reduce) {
  .hero-map .route { animation: none; stroke-dashoffset: 0; }
  .hero-map .ping, .hero-map .rider { display: none; }
}

/* ---------- search field → sorted directory ---------- */
.on-ink { background: var(--ground-2); }
.sortdemo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); align-items: center; }
.typebox {
  background: #fff; color: var(--ink); border: 3px solid var(--sign); border-radius: var(--r-lg);
  padding: 16px 20px 20px; font-family: var(--font); font-weight: 600; font-size: 1.25rem; line-height: 1.45;
  box-shadow: var(--shadow-md);
}
.typebox small { display: block; font-weight: 800; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--pop); margin-bottom: 6px; }
.typebox .caret { display: inline-block; width: 3px; height: 1.05em; background: var(--l-red); vertical-align: -.15em; margin-left: 2px; animation: ebBlink 1s steps(1) infinite; }
.sortdemo .arrow { width: clamp(44px, 6vw, 84px); color: var(--pop); }
.sortdemo .arrow svg { width: 100%; height: auto; display: block; fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .sortdemo { grid-template-columns: 1fr; }
  .sortdemo .arrow { transform: rotate(90deg); justify-self: center; width: 56px; }
}

/* the directory board */
.receipt {
  position: relative; width: 100%; max-width: 420px; margin-inline: auto;
  background: var(--sign); color: #fff; border-radius: var(--r-lg);
  font-family: var(--font); font-size: 1.1rem; line-height: 1.35; font-weight: 600;
  padding: 18px 22px 16px; box-shadow: var(--shadow-lg);
  --text: #fff; --muted: #BFD3E6;
}
.receipt .r-group {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 6px;
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: .03em; text-transform: uppercase; color: #fff; line-height: 1;
}
.receipt .r-group:first-child { margin-top: 2px; }
.receipt .r-group::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--line, var(--l-teal)); flex: none; box-shadow: inset 0 0 0 4px rgba(255,255,255,.0); }
.receipt .r-group[data-line="1"] { --line: var(--l-teal); }
.receipt .r-group[data-line="2"] { --line: var(--l-amber); }
.receipt .r-group[data-line="3"] { --line: var(--l-red); }
.receipt hr { display: none; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0 7px 38px; border-bottom: 1px solid rgba(255,255,255,.14); text-transform: none; }
.receipt .r-row .r-q { color: #BFD3E6; font-weight: 500; }
.receipt .r-note { color: #9FB6CC; font-size: .85rem; font-weight: 500; text-align: right; margin: 10px 0 0; }
.receipt::before, .receipt::after { content: none; }

/* ---------- the directory: also in the app ---------- */
.ledger { margin: 0; padding: 4px 26px 8px; }
.ledger .lrow { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; --line: var(--l-teal); }
.ledger .lrow:nth-child(5n+2) { --line: var(--l-blue); }
.ledger .lrow:nth-child(5n+3) { --line: var(--l-green); }
.ledger .lrow:nth-child(5n+4) { --line: var(--l-amber); }
.ledger .lrow:nth-child(5n+5) { --line: var(--l-red); }
.ledger .lrow + .lrow { border-top: 2px solid var(--border); }
.ledger dt { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: .01em; flex: none; color: var(--ink); text-transform: none; }
.ledger dt::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--line); flex: none; }
.ledger .lead { flex: 1; min-width: 12px; border-bottom: 3px dotted var(--border-2); transform: translateY(-5px); }
.ledger dd { margin: 0; text-align: right; max-width: 34ch; font-family: var(--font); font-weight: 500; font-size: 1.02rem; line-height: 1.4; }
@media (max-width: 640px) {
  .ledger { padding-inline: 18px; }
  .ledger .lrow { flex-wrap: wrap; }
  .ledger .lead { display: none; }
  .ledger dd { flex-basis: 100%; text-align: left; padding-left: 32px; }
}
.receipt.ledger-sheet { max-width: 920px; padding: 0; background: #fff; color: var(--ink); border: 3px solid var(--sign); overflow: hidden; --text: var(--ink); --muted: #3F566B; font-weight: 500; }
.ledger-sheet .receipt-title { display: flex; justify-content: space-between; align-items: center; background: var(--sign); color: #fff; padding: 14px 26px; font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: .03em; text-transform: uppercase; }
.ledger-sheet .receipt-title span:last-child { font-family: var(--font); font-size: .82rem; letter-spacing: .1em; color: var(--l-teal); }
.ledger-sheet .ledger-foot { padding: 6px 26px 26px; display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.ledger-sheet .faint { color: #5A7085; }
.receipt.ledger-sheet .r-row { padding-left: 0; }
@media (max-width: 480px) { .ledger-sheet .receipt-title span:last-child { display: none; } }

/* icons that replaced emoji inside the app mockups */
.ms-tile .em { width: 30px; height: 30px; color: var(--app-primary); display: block; }
.ms-tile .em svg, .ms-rec .ph svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ms-tiles .ms-tile .em { width: 40px; height: 40px; margin-inline: auto; }
.ms-rec .ph { color: #2B1A06; }
.ms-rec .ph svg { width: 34px; height: 34px; }
.ms-gear { display: grid; place-items: center; }
.ms-gear svg { width: 15px; height: 15px; }

/* feature minis: pictogram tiles on a directory */
.minicards, .minicards.grid { gap: 0 clamp(28px, 5vw, 64px); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (min-width: 900px) { .minicards { grid-template-columns: repeat(2, 1fr); } }
.mini { --line: var(--pop); background: transparent; border: 0; border-top: 2px solid var(--border-2); border-radius: 0; box-shadow: none; padding: 20px 0 22px; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; align-items: start; color: var(--ink); }
.mini:nth-child(5n+2) { --line: var(--l-blue); }
.mini:nth-child(5n+3) { --line: #1F7A4C; }
.mini:nth-child(5n+4) { --line: #B45309; }
.mini:nth-child(5n+5) { --line: #C0353A; }
.mini .em { grid-row: 1 / span 2; margin: 2px 0 0; width: 52px; height: 52px; padding: 11px; background: var(--line); color: #fff; border-radius: var(--r-md); display: block; }
.mini .em svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mini h3 { margin-bottom: 4px; font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 1.7rem); }
.mini p { color: var(--muted); }
.mini p b { color: var(--ink); }
