/* Wayfinding design system — Slovenian trail signage.
   Signature: the Knafelc waymark (red ring, white core). Everything else stays quiet. */

:root{
  --bg:#EEF2F0; --surface:#FFFFFF; --surface2:#F5F8F6;
  --ink:#10241F; --muted:#5C6B64; --line:#D8E0DB;
  --emerald:#116B5E; --red:#D1342C; --yellow:#F2C012; --yellow-ink:#231A02;
  --waymark-past-ring:#9AA8A1; --muted-fixed:#6E7B75; /* greyed-out state on the always-white waymark/pin cores + map popup — stays fixed in both themes */
  --board:#0F211B; --board-ink:#E9F1EC; --board-muted:#AFC4BA; --board-line:rgba(233,241,236,.22);
  --disp:"Barlow Semi Condensed",-apple-system,sans-serif;
  --body:"Barlow",-apple-system,sans-serif;
  --mono:"Spline Sans Mono",ui-monospace,monospace;
  --shadow:0 1px 2px rgba(16,36,31,.06), 0 6px 20px rgba(16,36,31,.07);
  --nav-h:58px;
}
[data-theme="dark"]{
  --bg:#0C1613; --surface:#131F1A; --surface2:#182620;
  --ink:#E4ECE7; --muted:#93A49B; --line:#243329;
  --emerald:#46B39C; --red:#E0564C; --yellow:#E8B93A;
  --board:#11201A; --board-line:rgba(233,241,236,.16);
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
}
/* JS-off fallback so a dark-mode user doesn't get a white blast on the <noscript>
   page. With JS, the inline <head> script sets data-theme before first paint. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme]){ --bg:#0C1613; --surface:#131F1A; --ink:#E4ECE7; --muted:#93A49B; --line:#243329; }
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0; background:var(--bg); color:var(--ink); font-family:var(--body);
  font-size:16px; line-height:1.5; -webkit-font-smoothing:antialiased;
  padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom));}
img{max-width:100%}
a{color:var(--emerald); text-decoration:none}
a:hover{text-decoration:underline; text-underline-offset:3px}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:2px solid var(--red); outline-offset:2px; border-radius:4px}
.wrap{max-width:640px; margin:0 auto; padding:0 14px}
.mono{font-family:var(--mono)}

/* The waymark — red ring, white core. Paint stays paint in dark mode. */
.waymark{flex:none; display:grid; place-items:center; width:34px; height:34px; border-radius:50%;
  background:#fff; border:6px solid var(--red); color:#10241F;
  font-family:var(--mono); font-size:14px; font-weight:500; line-height:1}
.waymark.past{border-color:var(--waymark-past-ring); color:var(--muted-fixed)}
.waymark.small{width:12px; height:12px; border-width:3.5px}

/* ---------- Trailhead board (header) ---------- */
.board{background:var(--board); color:var(--board-ink); border-radius:0 0 18px 18px;
  padding:calc(14px + env(safe-area-inset-top)) 18px 20px; position:relative; overflow:hidden}
.board-top{display:flex; align-items:center; gap:10px; margin-bottom:18px}
.board-top .waymark{width:26px; height:26px; border-width:5px}
.board-kicker{font-family:var(--mono); font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:var(--board-muted)}
#themeBtn{margin-left:auto; width:44px; height:44px; display:grid; place-items:center;
  background:none; border:1px solid var(--board-line); border-radius:50%; color:var(--board-ink); cursor:pointer}
#themeBtn svg{width:19px; height:19px}
.board h1{font-family:var(--disp); font-weight:700; font-size:clamp(34px,9.5vw,44px); line-height:1.02; margin:0 0 10px; letter-spacing:.005em; text-wrap:balance}
.board h1 .alps{color:var(--yellow); display:block}
[data-theme="dark"] .board h1 .alps{color:#E8B93A}
.board .lede{font-size:15px; color:var(--board-muted); margin:0 0 16px; max-width:46ch}
.status{display:flex; align-items:center; gap:10px; width:100%; text-align:left;
  background:rgba(255,255,255,.06); border:1px solid var(--board-line); border-radius:10px;
  padding:11px 13px; margin:0 0 16px; color:var(--board-ink); font-family:var(--body); font-size:15px; cursor:pointer}
.status .badge{flex:none; font-family:var(--mono); font-size:10.5px; font-weight:500; letter-spacing:.1em;
  background:var(--yellow); color:var(--yellow-ink); padding:4px 8px; border-radius:4px}
.status .arrow{margin-left:auto; color:var(--board-muted)}
.facts{display:flex; flex-wrap:wrap; gap:7px; padding:0; margin:0; list-style:none}
.facts li{font-family:var(--mono); font-size:10.5px; letter-spacing:.07em; text-transform:uppercase;
  border:1px solid var(--board-line); color:var(--board-muted); padding:5px 9px; border-radius:4px}

/* ---------- Sections ---------- */
section{padding:30px 0 6px}
.sec-head{display:flex; align-items:center; gap:10px; margin:0 0 6px}
.sec-head h2{font-family:var(--disp); font-weight:700; font-size:24px; margin:0; letter-spacing:.005em}
.sec-head::after{content:""; flex:1; height:1px; background:var(--line)}
.sub{color:var(--muted); font-size:14.5px; margin:0 0 16px; max-width:60ch}
section{scroll-margin-top:10px}

/* ---------- Days ---------- */
.day{background:var(--surface); border:1px solid var(--line); border-radius:12px; margin:0 0 12px; box-shadow:var(--shadow); overflow:hidden}
.day summary{display:flex; align-items:center; gap:12px; padding:13px 14px; cursor:pointer; list-style:none; min-height:44px}
.day summary::-webkit-details-marker{display:none}
.day-info{flex:1; min-width:0; display:flex; flex-direction:column}
.day-date{font-family:var(--mono); font-size:11px; letter-spacing:.12em; color:var(--muted)}
.day-title{font-family:var(--disp); font-weight:600; font-size:19px; line-height:1.15; margin:1px 0 1px}
.day-sub{color:var(--muted); font-size:13.5px}
.day .today-badge{font-family:var(--mono); font-size:10px; font-weight:500; letter-spacing:.1em;
  background:var(--yellow); color:var(--yellow-ink); padding:3px 7px; border-radius:4px; margin-left:auto; flex:none}
.day .chev{margin-left:auto; flex:none; color:var(--muted); transition:transform .18s}
.day .today-badge + .chev{margin-left:0}
.day[open] .chev{transform:rotate(180deg)}
.day-body{padding:0 14px 14px; border-top:1px solid var(--line)}

/* Fingerpost rows: destination left, time right */
.post{display:flex; align-items:baseline; gap:10px; justify-content:space-between;
  font-family:var(--mono); font-size:11px; letter-spacing:.05em; text-transform:uppercase;
  color:var(--muted); padding:11px 2px 10px; border-bottom:1px dashed var(--line)}
.post .t{color:var(--emerald); flex:none; font-weight:500}

.stop{padding:14px 0 4px}
.stop + .stop{border-top:1px solid var(--line)}
.stop.flash{animation:flash 1.2s ease}
@keyframes flash{25%{box-shadow:0 0 0 3px var(--yellow)}}
.stop .ph{border-radius:8px; overflow:hidden; aspect-ratio:16/9; background:var(--surface2); margin-bottom:10px; position:relative}
.stop .ph img{width:100%; height:100%; object-fit:cover; display:block}
.stop .ph .fallback{position:absolute; inset:0; display:grid; place-items:center; color:var(--muted);
  font-family:var(--disp); font-weight:600; font-size:16px; text-align:center; padding:12px}
.stop-row{display:flex; align-items:baseline; gap:10px; justify-content:space-between}
.stop-name{font-family:var(--disp); font-weight:600; font-size:18px; line-height:1.2; margin:0}
.stop-time{font-family:var(--mono); font-size:13px; font-weight:500; color:var(--emerald); flex:none}
.stop-tag{font-family:var(--mono); font-size:10.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin:2px 0 6px}
.stop-note{font-size:14.5px; margin:0 0 10px}
.links{display:flex; flex-wrap:wrap; gap:7px; padding-bottom:8px}
.lnk{font-family:var(--mono); font-size:11.5px; letter-spacing:.02em; border:1px solid var(--line);
  padding:10px 13px; border-radius:7px; color:var(--ink); background:var(--surface2); cursor:pointer; line-height:1}
.lnk:hover{border-color:var(--emerald); text-decoration:none}
.lnk:disabled{opacity:.5; cursor:default; border-color:var(--line)}
.lnk.solid{background:var(--emerald); border-color:var(--emerald); color:#fff}
[data-theme="dark"] .lnk.solid, [data-theme="dark"] .daybtn[aria-pressed="true"], [data-theme="dark"] .badge.pick{color:#0C1613}

.meals{background:var(--surface2); border:1px solid var(--line); border-radius:8px; padding:11px 12px 6px; margin-top:12px}
.meals-h{font-family:var(--mono); font-size:10px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); margin-bottom:4px}
.meal{display:flex; gap:10px; padding:8px 0; align-items:baseline}
.meal + .meal{border-top:1px dashed var(--line)}
.meal .slot{font-family:var(--mono); font-size:10px; letter-spacing:.06em; color:var(--muted); min-width:66px; flex:none; padding-top:3px}
.meal .m-body{font-size:14px}
.meal .m-body > a{font-family:var(--disp); font-weight:600; font-size:15.5px}
.meal .m-note{color:var(--muted)}
.meal .m-map{font-family:var(--mono); font-size:11px; margin-left:6px; white-space:nowrap}

.past-divider{display:flex; align-items:center; gap:10px; margin:22px 0 12px;
  font-family:var(--mono); font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted)}
.past-divider::after{content:""; flex:1; height:1px; background:var(--line)}
.trip-note{font-size:14px; color:var(--muted); margin:0 0 14px; font-style:italic}

/* ---------- Map ---------- */
.map-tools{display:flex; gap:7px; overflow-x:auto; padding:2px 0 10px; scrollbar-width:none}
.map-tools::-webkit-scrollbar{display:none}
.daybtn{flex:none; font-family:var(--mono); font-size:11.5px; cursor:pointer; background:var(--surface);
  border:1px solid var(--line); color:var(--ink); padding:11px 13px; border-radius:7px; line-height:1}
.daybtn[aria-pressed="true"]{background:var(--emerald); border-color:var(--emerald); color:#fff}
#map{height:min(58vh,480px); border-radius:12px; border:1px solid var(--line); box-shadow:var(--shadow); z-index:0; background:var(--surface2)}
.map-note{font-family:var(--mono); font-size:10.5px; color:var(--muted); margin:7px 2px 0}
.leaflet-popup-content{font-family:var(--body); margin:12px 14px}
.pop-t{font-family:var(--disp); font-weight:600; font-size:16px}
.pop-tag{font-family:var(--mono); font-size:10px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted-fixed); display:block; margin:3px 0 7px}
.pop-links a{font-size:12.5px; margin-right:12px}
.pin{display:grid; place-items:center; width:30px; height:30px; border-radius:50%;
  background:#fff; border:6px solid var(--red); color:#10241F; box-shadow:0 2px 6px rgba(0,0,0,.35);
  font-family:var(--mono); font-size:12px; font-weight:500}
.pin.past{border-color:var(--waymark-past-ring); color:var(--muted-fixed)}
[data-theme="dark"] .leaflet-tile{filter:brightness(.85) contrast(1.05)}

/* ---------- Car ---------- */
.timeline{list-style:none; margin:0 0 14px; padding:0}
.timeline li{position:relative; padding:0 0 18px 24px; border-left:2px solid var(--line); margin-left:5px}
.timeline li:last-child{border-left-color:transparent; padding-bottom:4px}
.timeline .waymark.small{position:absolute; left:-7px; top:4px}
.timeline .when{font-family:var(--mono); font-size:11px; letter-spacing:.08em; color:var(--emerald); font-weight:500}
.timeline .what{font-family:var(--disp); font-weight:600; font-size:18px; margin:2px 0 3px}
.timeline .why{font-size:14.5px; color:var(--muted)}
.callout{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow); margin-bottom:8px}
.callout h3{margin:0 0 8px; font-family:var(--disp); font-weight:600; font-size:17px}
.callout ul{margin:0; padding:0; list-style:none}
.callout li{position:relative; padding:7px 0 7px 22px; font-size:14.5px; border-top:1px dashed var(--line)}
.callout li:first-child{border-top:none}
.callout li::before{content:""; position:absolute; left:2px; top:14px; width:5px; height:5px; border-radius:50%;
  background:#fff; border:3px solid var(--red)}

/* ---------- Pack ---------- */
.zone{background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:9px; box-shadow:var(--shadow)}
.zone-row{display:flex; align-items:baseline; justify-content:space-between; gap:10px}
.z-name{font-family:var(--disp); font-weight:600; font-size:16.5px}
.z-temp{font-family:var(--mono); font-size:11px; color:var(--emerald); font-weight:500; flex:none; text-align:right}
.z-bring{font-size:14px; color:var(--muted); margin:3px 0 0}
.pack-shoes{font-size:14.5px; margin:12px 0 8px}

/* ---------- Stay ---------- */
.hotel{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow); margin-bottom:12px}
.hotel .row{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px}
.hotel h3{font-family:var(--disp); font-weight:600; font-size:19px; margin:0}
.hotel .badge{font-family:var(--mono); font-size:9.5px; letter-spacing:.1em; padding:4px 8px; border-radius:4px; white-space:nowrap}
.badge.pick{background:var(--emerald); color:#fff}
.badge.character{border:1px solid var(--emerald); color:var(--emerald)}
.hotel .meta{font-family:var(--mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:0 0 9px}
.hotel p{margin:0 0 10px; font-size:14.5px}

/* ---------- Essentials ---------- */
.ess{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px 16px 4px; margin-bottom:10px; box-shadow:var(--shadow)}
.ess h3{font-family:var(--disp); font-weight:600; font-size:16.5px; margin:0 0 2px}
.ess dl{margin:0}
.ess-row{display:flex; gap:14px; align-items:baseline; padding:9px 0}
.ess-row + .ess-row{border-top:1px dashed var(--line)}
.ess dt{flex:none; width:33%; max-width:150px; font-family:var(--mono); font-size:12px; font-weight:500;
  letter-spacing:.02em; color:var(--emerald); line-height:1.4}
.ess dd{flex:1; margin:0; font-size:14px; color:var(--muted)}
/* Phrases read as a glossary: Slovenian in the display face, gloss alongside. */
.ess.phrases dt{font-family:var(--disp); font-size:15.5px; font-weight:600; color:var(--ink)}
.ess.phrases dd{font-size:13.5px}

footer{padding:26px 0 18px; color:var(--muted); font-size:12.5px}
footer .mono{font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; margin-bottom:6px}

/* ---------- Bottom nav ---------- */
.bottomnav{position:fixed; left:0; right:0; bottom:0; z-index:1000;
  display:flex; height:calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  background:color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border-top:1px solid var(--line)}
.bottomnav a{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  color:var(--muted); font-size:10.5px; font-weight:500; letter-spacing:.02em}
.bottomnav a:hover{text-decoration:none}
.bottomnav a svg{width:21px; height:21px}
.bottomnav a[aria-current="true"]{color:var(--emerald)}

@media (prefers-reduced-motion:reduce){
  *{transition:none!important; animation:none!important}
  html{scroll-behavior:auto}
}
@media (min-width:700px){
  .wrap{max-width:720px}
  .board{border-radius:0 0 22px 22px}
}
