:root {
  --ink: #13233a;
  --ink2: #3c4b60;
  --muted: #6a7686;
  --paper: #f6f3ec;
  --card: #ffffff;
  --line: #e2ddd2;
  --accent: #ffc23c;
  --accent-ink: #13233a;
  --link: #1c5bd8;
  --water: #cfe1ee;
  --land: #efe9dc;
  --sea: #dfeaf1;
  --border: #d8cfbd;
  --tie: #a89a82;
  --steel: #6b7380;
  --mapbg: #fbfaf6;
  --halo: #fbfaf6;
  --shadow: 0 1px 2px rgba(19, 35, 58, .06), 0 6px 20px rgba(19, 35, 58, .06);
  --r: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #eef2f7; --ink2: #c3ccd8; --muted: #8d99a9; --paper: #0f1622; --card: #172131; --line: #263247;
  --link: #8db4ff; --water: #1a3147; --mapbg: #121b29; --halo: #121b29; --land: #1b2637; --sea: #0f1a28; --border: #2c3a50;
  --tie: #4a4f57; --steel: #9aa3ad;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4.2vw, 44px); letter-spacing: -.025em; }
h2 { font-size: clamp(21px, 2.4vw, 27px); margin-top: 1.6em; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.in { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main { max-width: 1160px; margin: 0 auto; padding: 8px 20px 40px; }
main.wide { max-width: none; padding: 0 0 40px; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 18px; font-weight: 600; font-size: 15px; }
.nav > a { color: var(--ink); }
.citymenu { position: relative; }
.citymenu summary { cursor: pointer; list-style: none; color: var(--ink); }
.citymenu summary::-webkit-details-marker { display: none; }
.citymenu summary::after { content: " ▾"; color: var(--muted); }

/* buttons, badges */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 12px 20px; border-radius: 999px; margin: 4px 8px 4px 0; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.bd { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--c); color: var(--f); font: 700 13px/1 var(--font); letter-spacing: -.01em; white-space: nowrap; }
.bd.wide { font-size: 12px; }
.bdl:hover { text-decoration: none; filter: brightness(1.08); }
.pbd { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; vertical-align: middle; }
.pbd.wrap { gap: 6px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: .6em; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink2); max-width: 820px; }
.sub { color: var(--muted); font-weight: 600; margin-bottom: .6em; }
.crumbs { font-size: 14px; color: var(--muted); margin: 14px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--muted); }
.more { font-weight: 700; }
.sources { font-size: 13px; color: var(--muted); margin-top: 32px; }

/* hero (home) */
.hero { position: relative; overflow: hidden; background: #13233a; color: #fff; padding: 72px 0 80px; }
.hero h1 { max-width: 780px; font-size: clamp(32px, 5.4vw, 58px); }
.hero .lede { color: #c9d3e1; max-width: 640px; }
.hero .kicker { color: var(--accent); }
.hero .btn.ghost { color: #fff; }
.hero .in { position: relative; z-index: 1; }
.heroart { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); opacity: .5; pointer-events: none; mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, #000 75%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, #000 75%); }
.heroline { width: 100%; height: 100%; }
.block { padding-top: 24px; }
.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease; }
.ccard:hover { text-decoration: none; transform: translateY(-2px); }
.ccard .thumb { width: 100%; aspect-ratio: 16 / 10; background: var(--mapbg); border-bottom: 1px solid var(--line); display: block; }
.ccard .thumb.ph { background: repeating-linear-gradient(45deg, var(--paper) 0 10px, var(--mapbg) 10px 20px); }
.cbody { padding: 14px 16px 16px; }
.cbody h3 { margin: 0; font-size: 20px; }
.cbody p { margin: 0 0 .3em; }
.cstats { font-size: 13.5px; font-weight: 700; color: var(--ink2); margin-top: .5em !important; }
.ccard.soon { opacity: .6; box-shadow: none; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; margin-top: 32px; }
.features > div { border-top: 3px solid var(--accent); padding-top: 14px; }
.spot { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: center; margin-top: 40px; }
.spotgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.soonlist { display: flex; flex-wrap: wrap; gap: 8px; }
.soonlist span { background: var(--card); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }

/* city / line / station heads */
.cityhead, .stahead { margin-bottom: 18px; }
.stahead .pbd { margin-bottom: 12px; }
.linehead { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.bigbd .bd { min-width: 64px; height: 56px; font-size: 26px; border-radius: 14px; padding: 0 12px; }
.hint { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 6px; }
.facts > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.facts b { display: block; font-size: 22px; letter-spacing: -.02em; }
.facts span { color: var(--muted); font-size: 13.5px; }
.prose { max-width: 760px; font-size: 17px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; }
.split aside h2:first-child, .split > div > h2:first-child { margin-top: 1.2em; }

/* line list */
.tgroup { margin-top: 1.4em; color: var(--ink2); }
.lcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lcard { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); }
.lcard:hover { text-decoration: none; border-color: var(--muted); }
.lcard > span:last-child { display: flex; flex-direction: column; line-height: 1.35; font-size: 15px; }
.lcard .muted { font-size: 13.5px; }
.ixlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 24px; }
.ixrow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.ixrow:hover { text-decoration: none; }
.ixrow:hover .ixname { color: var(--link); }
.ixname { font-weight: 600; }

/* stops timeline */
.stops { list-style: none; padding: 0; margin: 0 0 8px; position: relative; }
.stops::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: 14px; width: 6px; border-radius: 3px; background: var(--c); }
.stops li { position: relative; padding: 7px 0 7px 36px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; min-height: 40px; }
.stops li::before { content: ""; position: absolute; left: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--card); border: 3px solid var(--c); box-sizing: content-box; left: 4px; }
.stops li.ix::before { background: var(--card); border-color: var(--ink); }
.stops li.term .sname { font-weight: 750; }
.stops .sname a { color: var(--ink); font-weight: 600; }
.stops .sname a:hover { color: var(--link); }
.branch { margin: 18px 0 6px; font-size: 15px; color: var(--muted); }
.conn { list-style: none; padding: 0; margin: 0; }
.conn li { display: flex; gap: 10px; align-items: center; padding: 6px 0; }

/* station */
.lineat { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lineat ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink2); }
.lineat strong { color: var(--ink); }
.near { list-style: none; padding: 0; margin: 0; }
.near li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.near li .muted { margin-left: auto; font-size: 14px; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; }
.letters a { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }
.az { list-style: none; padding: 0; columns: 3 280px; column-gap: 32px; }
.az li { break-inside: avoid; display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }

/* places */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.pcard:hover { text-decoration: none; box-shadow: var(--shadow); }
.pcard img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--line); }
.pbody { padding: 10px 12px 12px; }
.pbody h3 { font-size: 16.5px; margin: 0 0 2px; }
.pbody .muted { font-size: 13.5px; margin-bottom: 6px; }
.pcard.small .pbd { display: none; }
.place header { margin-bottom: 14px; }
.hero-img { margin: 0 0 18px; }
.hero-img img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r); display: block; height: auto; }
.hero-img figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.getthere { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--r); padding: 16px 20px; }
.getthere .kicker { margin: 0; }
.gname { font-size: 22px; font-weight: 750; margin: 2px 0 6px; }
.gname a { color: var(--ink); }
.walk { text-align: right; }
.walk b { display: block; font-size: 28px; letter-spacing: -.02em; }
.walk span { color: var(--muted); font-size: 14px; }

/* faq */
.faq { margin-top: 36px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 13px 0; }
.faq details p { color: var(--ink2); }

/* map */
.mapwrap { margin: 8px 0 0; }
.mapbox { position: relative; height: min(56vh, 460px); min-height: 320px; background: var(--mapbg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.mapwrap.tall .mapbox { height: min(72vh, 720px); }
.mapbox.full { position: fixed; inset: 0; z-index: 100; height: auto !important; border-radius: 0; border: 0; }
.mapload { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.mapbox svg.net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.mapbox svg.net.drag { cursor: grabbing; }
.net .water path { fill: var(--water); stroke: none; }
.net .coast path { fill: none; stroke: var(--water); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.net .ln { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: var(--lw-metro, 4px); transition: opacity .2s; }
.net .ln.t-suburban { stroke-width: var(--lw-sub, 3.6px); }
.net .ln.t-tram { stroke-width: var(--lw-tram, 2px); }
.net .ln.t-funicular, .net .ln.t-cable { stroke-width: 2.4px; stroke-dasharray: 5 3; }
.net .st { fill: var(--mapbg); stroke: var(--ink); stroke-width: 1.4px; vector-effect: non-scaling-stroke; r: var(--sr, 3px); cursor: pointer; }
.net .st.ix { stroke-width: 2px; r: var(--srx, 4px); }
.net .st.minor { r: var(--srm, 2px); stroke-width: 1px; }
.net .lb { font: 600 var(--fs, 12px) var(--font); fill: var(--ink); paint-order: stroke; stroke: var(--halo); stroke-width: var(--hw, 3px); stroke-linejoin: round; dominant-baseline: central; cursor: pointer; display: none; }
.net .lb.show { display: inline; }
.net .lb.minor { font-weight: 500; fill: var(--ink2); }
.net.focus .ln:not(.on) { opacity: .13; }
.net.focus .st:not(.on) { opacity: .25; }
.net.focus .lb:not(.on) { display: none; }
.net .st.sel { stroke: #e0362c; stroke-width: 3px; }
.net .mk { fill: #e0362c; stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.net.hide-tram .t-tram, .net.hide-metro .t-metro, .net.hide-suburban .t-suburban, .net.hide-funicular .t-funicular, .net.hide-cable .t-cable { display: none; }
.mapctl { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; z-index: 3; }
.mapctl button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 19px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.mapctl button:hover { border-color: var(--muted); }
.mpop { position: absolute; z-index: 4; left: 12px; bottom: 12px; max-width: min(340px, calc(100% - 24px)); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 14.5px; }
.mpop h4 { margin: 0 32px 6px 0; font-size: 17px; }
.mpop .x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.mpop .row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.mpop a.go { font-weight: 700; }
.legend { margin-top: 10px; display: grid; gap: 8px; }
.types { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 5px 12px; font: 650 13.5px var(--font); cursor: pointer; }
.tchip:not(.on) { background: transparent; color: var(--muted); border-color: var(--line); }
.lchips { display: flex; flex-wrap: wrap; gap: 5px; }
.lchip { border: 0; background: none; padding: 2px; border-radius: 9px; cursor: pointer; }
.lchip.on { box-shadow: 0 0 0 2px var(--ink); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 0 20px; font-size: 14.5px; }
.foot .in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot .fcol { display: flex; flex-direction: column; gap: 6px; }
.foot .fcol a:not(.brand) { color: var(--ink2); }
.foot h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0; }
.foot .legal { display: block; color: var(--muted); font-size: 12.5px; margin-top: 20px; }

@media (max-width: 820px) {
  .split, .spot { grid-template-columns: 1fr; gap: 8px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .foot .in { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 56px; }
  .heroart { grid-template-columns: repeat(2, 1fr); mask-image: linear-gradient(180deg, transparent 0%, #000 100%); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 100%); opacity: .3; }
  .linehead { gap: 12px; }
  .bigbd .bd { min-width: 48px; height: 44px; font-size: 20px; }
  .nav { gap: 12px; font-size: 14px; }
  .mapwrap.tall .mapbox { height: 64vh; }
}
@media (max-width: 480px) {
  main { padding: 4px 16px 32px; }
  .in { padding: 0 16px; }
  .nav > a { display: none; }
  .spotgrid { grid-template-columns: 1fr 1fr; }
  .getthere { flex-direction: column; align-items: flex-start; }
  .walk { text-align: left; }
}
.stahead .pbd { margin-bottom: 14px; }

/* ---------- header: city switcher + theme ---------- */
.nav { gap: 14px; }
.navlink { color: var(--ink); }
/* city picker: same quiet pill as the language and theme buttons */
.citymenu summary { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px; transition: border-color .15s; }
.citymenu summary:hover, .citymenu[open] summary { border-color: var(--muted); }
.citymenu summary::after { content: none; }
.cm-pin { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.cm-caret { color: var(--muted); font-size: 11px; }
.citymenu > .cm-list { position: absolute; right: 0; top: 46px; width: min(330px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px; z-index: 40; }
.cm-list a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; color: var(--ink); }
.cm-list a:hover, .cm-list a[aria-current] { background: var(--paper); text-decoration: none; }
.cm-list a span { display: flex; flex-direction: column; line-height: 1.25; }
.cm-list small { color: var(--muted); font-size: 12.5px; }
.cm-thumb { width: 44px; height: 44px; border-radius: 9px; background: var(--mapbg); border: 1px solid var(--line); flex: none; }
.cm-list .cm-all { font-weight: 650; font-size: 14px; color: var(--link); padding: 9px 10px; }
.themebtn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.themebtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.themebtn .i-moon { display: none; fill: currentColor; stroke: none; }
:root[data-theme="dark"] .themebtn .i-sun { display: none; }
:root[data-theme="dark"] .themebtn .i-moon { display: block; }

/* ---------- home hero: Europe map ---------- */
.home-hero { background: linear-gradient(180deg, var(--paper), color-mix(in srgb, var(--paper) 70%, var(--sea))); border-bottom: 1px solid var(--line); }
.hh { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr); gap: 28px; align-items: center; padding-top: 28px; padding-bottom: 28px; }
.hh h1 { font-size: clamp(32px, 4.6vw, 54px); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.qchip { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink); font-weight: 650; font-size: 15px; transition: border-color .15s, transform .15s; }
.qchip:hover, .qchip.hot { text-decoration: none; border-color: var(--ink); transform: translateY(-1px); }
.eu-wrap { position: relative; }
.eumap { width: 100%; height: auto; display: block; border-radius: 20px; background: var(--sea); box-shadow: var(--shadow); border: 1px solid var(--line); }
.eu-sea { fill: var(--sea); }
.eu-land { fill: var(--land); }
.eu-border { fill: none; stroke: var(--border); stroke-width: .8; }
.eu-line { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.eu-trains circle { stroke: #fff; stroke-width: 2.2; }
.eu-city circle { fill: var(--card); stroke: var(--ink); stroke-width: 2.6; }
.eu-city .halo { fill: var(--accent); stroke: none; opacity: 0; transition: opacity .2s, r .2s; }
.eu-city .core { fill: var(--ink); stroke: none; }
.eu-city text { font: 600 15px var(--font); fill: var(--muted); paint-order: stroke; stroke: var(--land); stroke-width: 4px; stroke-linejoin: round; dominant-baseline: central; }
.eu-city text.big { font-weight: 800; font-size: 19px; fill: var(--ink); }
.eu-city.soon circle { stroke: var(--muted); stroke-width: 2; }
.eu-link { cursor: pointer; }
.eu-link:hover .halo, .eu-link.hot .halo { opacity: .55; }
.eu-link .eu-city { transition: transform .2s; }
.eu-link:focus-visible { outline: none; }
.eu-link:focus-visible .halo { opacity: .7; }
.eu-card { position: absolute; z-index: 5; width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; pointer-events: auto; }
.eu-card .eu-thumb { width: 100%; aspect-ratio: 16 / 10; display: block; background: var(--mapbg); border-radius: 10px; border: 1px solid var(--line); }
.eu-card h3 { margin: 10px 0 2px; font-size: 19px; }
.eu-card p { margin: 0 0 8px; font-size: 14px; color: var(--ink2); }
.eu-card .btn { padding: 9px 16px; font-size: 14.5px; margin: 0; }
.features .fi { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--accent); font-size: 20px; margin-bottom: 8px; }
.cmpteaser { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cmpthumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.cmpthumbs .thumb { aspect-ratio: 1; border: 0; }
.soonchip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }

/* ---------- compare ---------- */
.cmpgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 6px; }
.cmpgrid figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cmpgrid figcaption { padding: 10px 14px; font-weight: 750; font-size: 18px; }
.cmpmap { display: block; width: 100%; height: auto; }
.cmpmap .cm-bg { fill: var(--mapbg); }
.cmpmap .cl { fill: none; stroke-width: 2.6px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.cmpmap .cl.t-tram { stroke-width: 1.1px; opacity: .8; }
.cmpmap .scale path { stroke: var(--ink); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.cmpmap .scale text { font: 700 180px var(--font); fill: var(--ink); }
.cmptable { width: 100%; max-width: 820px; border-collapse: collapse; margin-top: 18px; background: var(--card); border-radius: 12px; overflow: hidden; }
.cmptable th, .cmptable td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cmptable thead th { background: var(--ink); color: var(--paper); }
.cmpform { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 24px; }
.cmpform select { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 12px; font: 600 16px var(--font); }

/* ---------- route pages ---------- */
.rsum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; }
.rsum > div:not(.pbd) { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.rsum b { display: block; font-size: 22px; letter-spacing: -.02em; }
.rsum > div:not(.pbd) span { color: var(--muted); font-size: 13px; }
.rsum .arr { color: var(--muted); font-size: 18px; margin: 0 2px; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0 12px 12px; border-left: 4px solid var(--line); margin-left: 10px; }
.steps li.ride { border-left-color: var(--c); }
.steps .wk { display: inline-grid; place-items: center; min-width: 28px; height: 24px; }
.small { font-size: 13.5px; }

/* ---------- map UI ---------- */
.mui { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.mui > * { pointer-events: auto; }
.mtools { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 70px); }
.mtools button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 650 13.5px var(--font); cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; }
.mtools button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mpanel { position: absolute; left: 10px; top: 54px; width: min(340px, calc(100% - 70px)); max-height: calc(100% - 66px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 14px; }
.mpanel .x, .mpop .x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.rform { display: grid; grid-template-columns: 1fr 34px; gap: 6px; margin-right: 26px; }
.rform label { display: flex; flex-direction: column; gap: 2px; grid-column: 1; font-size: 12px; color: var(--muted); font-weight: 650; }
.rform input { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 0 10px; font: 500 16px var(--font); width: 100%; }
.rform .swap { grid-column: 2; grid-row: 1 / span 2; align-self: center; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 16px; }
.rres ol { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.rres li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.rres li i { color: var(--muted); font-style: normal; }
.rres .chg { color: var(--muted); }
.rtot { margin: 10px 0 4px; font-size: 15px; }
.rtot b { font-size: 19px; }
.rnote, .rhint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.rhint { color: var(--ink2); font-size: 14px; }
.ptitle { margin: 0 26px 8px 0; font-size: 15px; }
.isokey { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; }
.isokey i { display: inline-block; width: 14px; height: 6px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.plist span { color: var(--muted); white-space: nowrap; }
.mpop { position: absolute; left: 10px; bottom: 10px; width: min(360px, calc(100% - 20px)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 14.5px; }
.mpop h4 { margin: 0 32px 6px 0; font-size: 17px; }
.mpop .row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.mpop .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mpop .acts button { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 650 13.5px var(--font); cursor: pointer; }
.mpop .acts button:hover { border-color: var(--ink); }
.mpop .pmin { font-weight: 700; margin: 0 0 8px; }
.mpop a.go { font-weight: 700; }
.mcap { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: calc(100% - 24px); background: var(--ink); color: var(--paper); border-radius: 14px; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; box-shadow: var(--shadow); }
.mcap b { font-size: 17px; }
.mcap .ctr, .mcap .cx { font-size: 13px; opacity: .8; display: inline-flex; gap: 4px; align-items: center; }
[hidden] { display: none !important; }

/* rails when zoomed in: sleepers under each track, two steel rails on top (offset lines built in map.js) */
.net .rails-ties, .net .rails-steel { display: none; }
.net.railmode .rails-ties, .net.railmode .rails-steel { display: inline; }
.net .tie, .net .steel { fill: none; stroke-linejoin: round; }
.net .tie { stroke: var(--tie); stroke-width: var(--tie-w); stroke-dasharray: var(--tie-dash); }
.net .steel { stroke: var(--steel); stroke-width: var(--rail-w); stroke-linecap: round; }
.net.railmode .ln { stroke-width: var(--col-w); vector-effect: none; opacity: .28; stroke-dasharray: none; }
.net.railmode .t-tram.tie { stroke: color-mix(in srgb, var(--tie) 70%, var(--mapbg)); }
.mapbox svg.net.over { z-index: 2; pointer-events: none; }
.mapbox canvas.trains { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.trainnote { position: absolute; left: 10px; bottom: 10px; z-index: 3; max-width: calc(100% - 72px); padding: 4px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink2); font-size: 12px; line-height: 1.3; pointer-events: none; }
.trainnote:empty, .trainnote[hidden] { display: none; }
.net.focus .tie:not(.on), .net.focus .steel:not(.on) { opacity: .15; }
.net.hide-tram .t-tram, .net.hide-metro .t-metro, .net.hide-suburban .t-suburban, .net.hide-funicular .t-funicular, .net.hide-cable .t-cable { display: none; }
/* trains */
/* route, time map, nearby */
.net.routing .rails-col, .net.routing .rails-ties, .net.routing .rails-steel { opacity: .16; }
.net.routing .st:not(.on) { opacity: .25; }
.net .rt-case path { fill: none; stroke: var(--mapbg); stroke-width: 13px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.net .rt-line { fill: none; stroke-width: 7px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px currentColor); }
.net .rt-walk { fill: none; stroke: var(--ink2); stroke-width: 3px; stroke-dasharray: 2 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.net .rt-path { fill: none; stroke: none; }
.net .rt-train { fill: #fff; stroke: var(--ink); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.net .rt-a, .net .rt-b { fill: var(--ink); stroke: #fff; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.net .rt-b { fill: #e0362c; }
.net.isoing .rails-col, .net.isoing .rails-ties, .net.isoing .rails-steel { opacity: .1; }
.net .iso-e { fill: none; stroke-width: 5px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.net.isoing .st { stroke: #fff; }
.net .near { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: var(--accent); stroke-width: 2.5px; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.net .plc circle { fill: #e0362c; stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: pointer; }
.net .plcl { font: 700 var(--fs, 12px) var(--font); fill: var(--ink); paint-order: stroke; stroke: var(--halo); stroke-width: var(--hw, 3px); stroke-linejoin: round; transform: translate(calc(var(--mr) * 1.4), 0); dominant-baseline: central; pointer-events: none; }

@media (max-width: 820px) {
  .hh { grid-template-columns: 1fr; gap: 16px; padding-top: 18px; }
  .hh-map { margin: 0 -8px; order: -1; }
  .quick { display: none; }
  .cmpgrid { grid-template-columns: 1fr; }
  .navlink { display: none; }
  .eu-city text { font-size: 22px; stroke-width: 5px; }
  .eu-city text.big { font-size: 27px; }
}
@media (max-width: 560px) {
  .mtools { right: 56px; max-width: none; }
  .mtools button { height: 34px; padding: 0 10px; font-size: 13px; }
  .mpanel { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; max-height: 46%; }
  .mpop { left: 8px; right: 8px; width: auto; bottom: 8px; }
  .citymenu summary { padding: 0 12px; font-size: 14px; }
  .cm-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .eu-card { width: 220px; }
}

.mtools svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: currentColor; }
.mtools svg [fill="none"] { fill: none; }
.mtools svg circle:not([fill]) { fill: none; }
.net .tr { stroke: var(--mapbg); }
@media (max-width: 420px) { .mtools button span { display: none; } .mtools button { width: 38px; justify-content: center; padding: 0; } }

/* language menu */
.langmenu { position: relative; }
.langmenu summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; font-size: 13.5px; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu .globe { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.langmenu > .lm-list { position: absolute; inset-inline-end: 0; top: 46px; z-index: 40; min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: grid; }
.lm-list a { padding: 8px 12px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.lm-list a:hover, .lm-list a[aria-current] { background: var(--paper); text-decoration: none; }
@media (max-width: 640px) { .langmenu summary { padding: 0 9px; } .langmenu summary span { display: none; } }

/* right-to-left pages (Arabic): mirror the layout; maps and station-name lists stay left-to-right */
[dir="rtl"] .citymenu > .cm-list { right: auto; left: 0; }
[dir="rtl"] .stops::before { left: auto; right: 9px; }
[dir="rtl"] .stops li::before { left: auto; right: 4px; }
[dir="rtl"] .stops li { padding: 7px 36px 7px 0; }
[dir="rtl"] .lineat ul { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .near li .muted { margin-left: 0; margin-right: auto; }
[dir="rtl"] .getthere { border-left: 1px solid var(--line); border-right: 6px solid var(--accent); }
[dir="rtl"] .walk { text-align: left; }
[dir="rtl"] .cmptable th, [dir="rtl"] .cmptable td { text-align: right; }
[dir="rtl"] .steps li { padding: 12px 12px 12px 0; border-left: 0; border-right: 4px solid var(--line); margin-left: 0; margin-right: 10px; }
[dir="rtl"] .steps li.ride { border-right-color: var(--c); }
[dir="rtl"] .btn { margin: 4px 0 4px 8px; }
[dir="rtl"] .mapbox .mpanel, [dir="rtl"] .mapbox .mpop, [dir="rtl"] .mapbox .mcap, [dir="rtl"] .mapbox .trainnote { direction: rtl; text-align: right; }
[dir="rtl"] .mapbox .mpanel .x, [dir="rtl"] .mapbox .mpop .x { right: auto; left: 6px; }
/* travel-guide pages (guides.css): right-aligned tables, mirrored accent borders and list indents; no
   letter-spacing/uppercase on Arabic headers (letter-spacing breaks Arabic letter joining) */
[dir="rtl"] .gtable th, [dir="rtl"] .gtable td { text-align: right; }
[dir="rtl"] .gtable th { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .mode { margin-right: 0; margin-left: 2px; }
[dir="rtl"] .opt.best, [dir="rtl"] .tip { border-left: 1px solid var(--line); border-right: 5px solid var(--accent); }
[dir="rtl"] .opt ul, [dir="rtl"] .gsources ul { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .glist { padding-left: 0; padding-right: 20px; }
/* site-wide: letter-spacing tears Arabic letters apart (headings, kickers, footer headings) */
[dir="rtl"] :is(h1, h2, h3, .kicker, .foot h3) { letter-spacing: 0; }
.place .irlink { margin: 10px 0 0; }
.place .irlink a { font-weight: 600; }

/* header: brand never wraps; on narrow phones only the logo shows so the city, language and theme buttons fit */
.top .in { gap: 10px; }
.brand { white-space: nowrap; flex: none; }
.nav { min-width: 0; }
.citymenu summary { max-width: 46vw; }
.citymenu summary > span, .citymenu summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .top .brand span { display: none; } .nav { gap: 8px; } }

/* menus: a long list scrolls inside itself (site.js sets max-height when it would leave the screen) */
.cm-list, .lm-list { overflow-y: auto; overscroll-behavior: contain; }
/* touch screens: small chips and links get a larger invisible tap area */
@media (pointer: coarse) {
  .bdl, .lchip, .tchip, .badges .morel, .crumbs a { position: relative; }
  .bdl::after, .lchip::after, .tchip::after, .badges .morel::after, .crumbs a::after { content: ""; position: absolute; inset: -6px -3px; }
  .mpanel .x::after, .mpop .x::after { content: ""; position: absolute; inset: -5px; }
}
/* about / contact / privacy */
.infopage { max-width: 720px; }
.infopage h2 { font-size: 20px; margin: 28px 0 8px; }
.infopage p, .infopage li { line-height: 1.6; }
.infopage ul { padding-inline-start: 20px; margin: 0 0 12px; }
.infopage .lede a, .infopage p a { word-break: break-word; }
.infopage .upd { color: var(--muted); font-size: 13.5px; margin-top: 28px; }
.foot .flinks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 13.5px; }
.foot .flinks a { color: var(--ink); }

/* safety net: nothing may push the page sideways on phones */
html, body { overflow-x: clip; }

/* place page: plan-your-visit box */
.place .visit { margin: 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 20px; }
.place .visit h2 { font-size: 1rem; margin: 0 0 8px; }
.place .visit dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 20px; margin: 0; }
.place .visit dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.place .visit dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
