@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(vendor/fonts/barlow-condensed-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(vendor/fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(vendor/fonts/barlow-condensed-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(vendor/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(vendor/fonts/barlow-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(vendor/fonts/barlow-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(vendor/fonts/barlow-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(vendor/fonts/barlow-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Federo"; font-weight: 400; font-display: swap; src: url(vendor/fonts/federo-latin-400-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --navy: #002d3d;      /* culorile tricoului Humans on Bicycles */
  --steel: #2c6380;
  --orange: #f5821f;
  --ink: #002d3d;
  --ink-2: #3f5560;
  --ink-3: #657883;
  --paper: #ffffff;
  --wash: #f0f3f5;
  --rule: #d9e0e4;
  --focus: #2c6380;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Barlow", system-ui, sans-serif;
  --panel-w: 400px;
  --gap: 16px;
  --rail-h: 70px;
  --shadow: 0 1px 2px rgba(0,45,61,.14), 0 6px 22px rgba(0,45,61,.14);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--wash); color: var(--ink); font: 400 15px/1.45 var(--text); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#map { position: fixed; inset: 0; }

/* ---------- panel ---------- */
#panel {
  position: fixed; z-index: 3; top: var(--gap); left: var(--gap); bottom: calc(var(--gap) * 2 + var(--rail-h));
  width: var(--panel-w); display: flex; flex-direction: column;
  background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
#sheet-handle { display: none; }
/* antet: „HoB Tour” în Federo, centrat și exact cât wordmark-ul de dedesubt */
.brand { background: var(--navy); color: #fff; padding: 18px 20px 16px; border-bottom: 4px solid var(--orange); }
.brand a { display: flex; flex-direction: column; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.brand h1 { margin: 0; font: 400 58px/1 "Federo", var(--cond); letter-spacing: .04em; white-space: nowrap; }
.brand .wm { width: 250px; height: auto; display: block; }
.tabs { display: flex; gap: 6px; padding: 8px 18px 0; border-bottom: 1px solid var(--rule); }
.tabs button { background: none; border: 0; padding: 8px 6px 9px; margin-bottom: -1px; font: 500 19px/1 var(--cond); color: var(--ink-3); border-bottom: 3px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
#view { flex: 1; overflow-y: auto; padding: 16px 22px 28px; overscroll-behavior: contain; }
#view:focus { outline: none; }

h2 { font: 700 30px/1 var(--cond); margin: 0 0 6px; }
h2 + .fun { margin-top: 16px; }
h3 { font: 700 20px/1.1 var(--cond); margin: 26px 0 10px; }
.sub { color: var(--ink-2); margin: 0 0 14px; }
.muted { color: var(--ink-3); }
.back { background: none; border: 0; padding: 0; color: var(--steel); font-weight: 600; margin-bottom: 10px; }
.back:hover { color: var(--ink); }

.hero { display: flex; align-items: baseline; gap: 10px; margin: 2px 0; flex-wrap: wrap; }
.hero b { font: 700 64px/0.9 var(--cond); letter-spacing: -0.02em; }
.hero span { font: 500 24px/1 var(--cond); color: var(--ink-2); }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; margin: 16px 0 0; }
.facts div { border-left: 3px solid var(--rule); padding-left: 10px; }
.facts dt { color: var(--ink-3); font-size: 13px; }
.facts dd { margin: 0; font: 700 24px/1.1 var(--cond); }
.facts dd small { font: 500 15px var(--cond); color: var(--ink-2); }

.chip { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 13px; color: #fff; font: 700 15px/1 var(--cond); background: var(--c); }
.chip.rip { background: #8a969c; }

.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; width: 100%; padding: 10px 4px; background: none; border: 0; text-align: left; border-radius: 8px; }
button.row:hover, .row.on { background: var(--wash); }
.row .t { font-weight: 600; }
.row .s { color: var(--ink-3); font-size: 13px; grid-column: 2; }
.row .n { font: 700 18px var(--cond); text-align: right; grid-row: 1 / span 2; grid-column: 3; white-space: nowrap; }
.row .n small { display: block; font: 500 13px var(--text); color: var(--ink-3); }
.row .d { grid-row: 1 / span 2; font: 700 22px/1 var(--cond); color: var(--ink-3); min-width: 34px; text-align: center; }
.row.ripped { color: var(--ink-3); }
.row.ripped .chip { grid-row: 1 / span 2; }

.seg { display: inline-flex; background: var(--wash); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,45,61,.18); }

.chart { width: 100%; margin-top: 10px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font: 500 12px var(--cond); fill: var(--ink-3); }
.chart .val { font: 700 13px var(--cond); fill: var(--ink-2); }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: pointer; }
.profile { position: relative; margin: 14px 0 4px; touch-action: pan-y; }
.profile text { font: 500 11px var(--cond); fill: var(--ink-3); }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.note { font-size: 13px; color: var(--ink-3); margin: 10px 0 0; }
.daynav { display: flex; justify-content: space-between; gap: 8px; margin-top: 22px; }
.btn { border: 1px solid var(--rule); background: var(--paper); border-radius: 9px; padding: 8px 12px; font-weight: 600; }
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:disabled { opacity: .4; cursor: default; }
.btn[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

.rec { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: left; background: none; border: 0; padding: 12px 4px; border-radius: 8px; }
.rec:hover { background: var(--wash); }
.rec .k { color: var(--ink-2); font-size: 14px; }
.rec .v { font: 700 26px/1 var(--cond); grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; }
.rec .w { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.rec .x { color: var(--ink-3); font-size: 13px; }
.fun { margin: 0 0 18px; }
.fun b { display: block; font: 700 34px/1 var(--cond); }
.fun p { margin: 4px 0 0; color: var(--ink-2); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.missing { color: var(--ink-3); font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; color: var(--steel); font-weight: 600; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* the RIP card */
.rip-card { position: relative; overflow: hidden; margin: 22px 0 6px; padding: 18px 18px 20px; border-radius: 12px; background: var(--navy); color: #fff; }
.rip-card::after { content: ""; position: absolute; right: -40px; bottom: -46px; width: 190px; height: 178px; background: url(img/wordmark-round.png) center / contain no-repeat; opacity: .12; }
.rip-card b { display: block; font: 700 40px/0.95 var(--cond); }
.rip-card .yrs { font: 500 20px var(--cond); color: var(--orange); }
.rip-card p { position: relative; z-index: 1; margin: 10px 0 0; max-width: 30ch; color: #d8e3e8; }

/* ---------- top bar: basemaps + language ---------- */
#topbar { position: fixed; z-index: 2; top: var(--gap); right: var(--gap); display: flex; gap: 8px; }
#basemaps, #lang { display: flex; background: var(--paper); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: var(--shadow); }
#topbar button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
#topbar button[aria-pressed="true"] { background: var(--navy); color: #fff; }
#basemaps button[data-3d] { margin-left: 4px; }
.maplibregl-ctrl-top-right { top: 54px; }

/* ---------- the rail: one slider for all tours or for the selected one ---------- */
#rail {
  position: fixed; z-index: 2; left: calc(var(--panel-w) + var(--gap) * 2); right: var(--gap); bottom: var(--gap);
  height: var(--rail-h); display: flex; align-items: center; gap: 10px; padding: 0 16px 0 12px;
  background: var(--paper); border-radius: 16px; box-shadow: var(--shadow);
}
#scope { flex: none; border: 0; background: var(--wash); border-radius: 9px; padding: 8px 10px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
#scope:hover { color: var(--ink); }
.track { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; --pad: 11px; }
#slider { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; --p: 100%; }
#slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--navy) var(--p), var(--rule) var(--p)); }
#slider::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--navy) var(--p), var(--rule) var(--p)); }
#slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,45,61,.4); }
#slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,45,61,.4); }
#ticks { position: relative; list-style: none; margin: 2px var(--pad) 0; padding: 0; height: 26px; }
#ticks.all { display: grid; grid-template-columns: repeat(12, 1fr); }
#ticks button { width: 100%; height: 26px; border: 0; background: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; font: 700 15px/1 var(--cond); color: var(--ink); position: relative; padding: 0 0 4px; }
#ticks button::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 1px; height: 3px; border-radius: 2px; background: var(--c); }
#ticks button small { font: 500 11px/1 var(--cond); color: var(--ink-3); }
#ticks button:hover, #ticks button[aria-current="true"] { background: var(--wash); }
#ticks button.dim { opacity: .3; }
#ticks.days li { position: absolute; top: 0; }
#ticks.days li + li { border-left: 1px solid var(--rule); }
#ticks.days button::after { left: 6%; right: 6%; }
#bubble { position: absolute; bottom: calc(100% - 4px); transform: translateX(-50%); background: var(--navy); color: #fff; font: 600 13px/1.2 var(--text); padding: 5px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none; }
#bubble b { font: 700 16px var(--cond); }

#tip { position: fixed; z-index: 5; pointer-events: none; background: var(--navy); color: #fff; padding: 6px 9px; border-radius: 7px; font-size: 13px; line-height: 1.3; max-width: 260px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
#tip b { font-weight: 600; }
.maplibregl-ctrl-bottom-right { bottom: calc(var(--gap) + var(--rail-h) + 4px); }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0 var(--gap) 10px 0; }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* ---------- phone: the panel becomes a bottom sheet ---------- */
@media (max-width: 760px) {
  @font-face { font-family: "Federo"; font-weight: 400; font-display: swap; src: url(vendor/fonts/federo-latin-400-normal.woff2) format("woff2"); }

:root { --gap: 10px; --rail-h: 62px; --sheet: 42vh; }
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--sheet); border-radius: 16px 16px 0 0; transition: height .25s ease; padding-bottom: env(safe-area-inset-bottom); }
  body.dragging #panel, body.dragging #rail { transition: none; }
  #sheet-handle { display: block; position: absolute; top: 0; left: 0; right: 0; height: 24px; border: 0; background: none; z-index: 1; padding: 7px 0 0; touch-action: none; cursor: ns-resize; }
  #sheet-handle span { display: block; width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); margin: 0 auto; }
  .brand { padding: 26px 16px 8px; border-bottom-width: 3px; touch-action: none; }
  .brand h1 { font-size: 30px; }
  .brand .wm { display: none; }
  .tabs { padding: 2px 12px 0; }
  .tabs button { font-size: 17px; }
  #view { padding: 12px 16px 24px; }
  .hero b { font-size: 52px; }
  #rail { left: var(--gap); right: var(--gap); bottom: calc(var(--sheet) + 8px); padding: 0 12px 0 8px; transition: bottom .25s ease; }
  #ticks button { font-size: 13px; }
  #ticks button small { display: none; }
  #topbar { left: var(--gap); justify-content: space-between; }
  #topbar button { padding: 6px 7px; font-size: 12px; }
  .maplibregl-ctrl-top-right { top: 48px; }
  .maplibregl-ctrl-bottom-right { display: none; }
}
@media (prefers-reduced-motion: reduce) { #panel, #rail { transition: none; } }
