/* DCOM · Alta Via 2 — minimalist redesign.
   Inspiration: Brian Chorski (REI Trails), Mason Wang, Squarespace "Radian".
   Light neutral beige ground, a solid header, one neutral grotesque (Graphik →
   Hanken Grotesk substitute), near-black text, and a single red accent that
   carries the route line, the elevation line, and the via-ferrata marks. */

:root {
  --bg:      #e7e3d8;   /* warm neutral beige ground */
  --bg-2:    #efece3;   /* lifted panels / cards */
  --bg-3:    #f4f1ea;   /* lightest */
  --ink:     #1a1a16;   /* warm near-black */
  --ink-2:   #565449;   /* secondary text */
  --ink-3:   #8c897c;   /* muted labels */
  --red:     #d63a26;   /* the one accent — route, elevation, ferrata */
  --red-deep:#b32d1c;
  --line:    rgba(26,26,22,0.16);
  --line-2:  rgba(26,26,22,0.09);

  --sans: "Hanken Grotesk", "Graphik", "Helvetica Neue", Arial, sans-serif;

  --header-h: 60px;
  --pad: 40px;
  --maxw: 1380px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* type helpers */
.label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.serif-no { } /* (no serif in this system) */

::selection { background: var(--red); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1500; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
/* keep the frozen header above Leaflet's zoom (+/–) controls */
.leaflet-top, .leaflet-bottom { z-index: 650 !important; }
.site-header .brand {
  display: flex; align-items: baseline; gap: 12px;
  font-weight: 800; letter-spacing: 0.02em; font-size: 1.02rem;
}
.site-header .brand .sub {
  font-weight: 500; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.site-header nav { display: flex; align-items: center; gap: 4px; }
/* tab toggle */
.tabs { display: inline-flex; border: 1px solid var(--ink); border-radius: 100px; overflow: hidden; }
.tabs a, .tabs button {
  font: inherit; background: none; border: 0; cursor: pointer;
  padding: 7px 18px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); transition: background 0.18s, color 0.18s;
}
.tabs a.active, .tabs button.active { background: var(--ink); color: var(--bg); }
.header-link {
  margin-left: 22px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2);
}
.header-link:hover { color: var(--red); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; height: calc(100vh - var(--header-h)); min-height: 560px;
  margin-top: var(--header-h);
  overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end;
}
.hero .bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,18,14,0.18) 0%, rgba(20,18,14,0) 32%, rgba(20,18,14,0.6) 100%);
}
.hero .hero-inner { width: 100%; padding: 0 var(--pad) 48px; color: #f4f1ea; }
.hero .dcom {
  font-weight: 800; font-size: clamp(3.4rem, 12vw, 11rem); line-height: 0.86;
  letter-spacing: -0.02em;
}
.hero .dcom em { font-style: italic; font-weight: 800; }
.hero .tagline {
  margin-top: 18px; max-width: 52ch; font-size: clamp(0.96rem, 1.4vw, 1.15rem);
  font-weight: 400; color: rgba(244,241,234,0.92);
}
.hero .meta-row {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 26px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(244,241,234,0.8);
}
.hero .meta-row b { color: #fff; font-weight: 700; }

/* ---------------------------------------------------------------- views (tab panels) */
.view { display: none; }
.view.active { display: block; }
.view-pad { padding: 70px 0 90px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.02;
}
.section-head h2 em { font-style: italic; }
.section-head p { max-width: 46ch; color: var(--ink-2); font-size: 0.96rem; }

/* ---------------------------------------------------------------- route: map */
.map-frame { position: relative; border: 1px solid var(--ink); background: var(--bg-2); }
#map { width: 100%; height: 72vh; min-height: 520px; background: var(--bg-2); }
.leaflet-container { font-family: var(--sans); background: var(--bg-2); }
.map-legend {
  position: absolute; left: 16px; bottom: 16px; z-index: 500;
  background: var(--bg); border: 1px solid var(--ink); padding: 12px 15px;
  font-size: 0.72rem; max-width: 240px;
}
.map-legend .ln { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
.map-legend .ln:first-of-type { margin-top: 10px; }
.map-legend .swatch { width: 22px; height: 0; border-top: 3px solid var(--red); }
.map-legend .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--ink); }
/* custom hut markers */
.hut-marker {
  background: var(--red); color: #fff; border: 2px solid var(--bg);
  border-radius: 50%; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; box-shadow: 0 1px 6px rgba(0,0,0,0.35);
  transition: transform 0.15s;
}
.hut-marker:hover { transform: scale(1.18); }
.leaflet-popup-content-wrapper { border-radius: 2px; }
.leaflet-popup-content { font-family: var(--sans); margin: 12px 14px; }
.popup-day { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.popup-name { font-weight: 700; font-size: 1rem; margin: 3px 0 2px; }
.popup-elev { color: var(--ink-3); font-size: 0.8rem; }
.popup-link { display: inline-block; margin-top: 7px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid var(--red); padding-bottom: 1px; }

/* ---------------------------------------------------------------- elevation (overall + day) */
.elev-block { margin-top: 56px; }
.elev-card { position: relative; border: 1px solid var(--ink); background: var(--bg-2); padding: 0; overflow: hidden; }
.elev-svg { width: 100%; height: auto; display: block; overflow: visible; }
.elev-svg .area { fill: rgba(214,58,38,0.10); }
.elev-svg .line { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.elev-svg .grid { stroke: var(--line-2); stroke-width: 1; }
.elev-svg .axis-label { font-size: 10px; fill: var(--ink-3); }
.elev-svg .hut-tick { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.elev-hut-label {
  font-size: 11px; font-weight: 700; fill: var(--ink); cursor: pointer;
}
.elev-hut-label:hover { fill: var(--red); }
.elev-cursor { stroke: var(--ink); stroke-width: 1; opacity: 0; }
.elev-dot { fill: var(--red); stroke: var(--bg-2); stroke-width: 2; opacity: 0; }
.elev-tip {
  position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -120%);
  background: var(--ink); color: var(--bg); padding: 6px 9px; font-size: 0.72rem; white-space: nowrap;
  border-radius: 2px; transition: opacity 0.1s;
}
.elev-tip b { color: #fff; }

/* ---------------------------------------------------------------- snake itinerary grid */
.snake { position: relative; margin-top: 8px; }
.snake-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.snake-line path { fill: none; stroke: var(--red); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; }
.snake-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px 38px;
}
.daybox {
  display: block; background: var(--bg-2); border: 1px solid var(--ink);
  color: var(--ink); position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.daybox:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(26,26,22,0.22); }
.daybox .thumb { position: relative; aspect-ratio: 4 / 3; background-size: cover; background-position: center; border-bottom: 1px solid var(--ink); }
/* bold day number in a little beige-green square, top-left of the photo */
.daybox .num {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  min-width: 30px; height: 30px; padding: 0 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em;
  background: #cfe1f3; color: #1f4a6b; border: 1px solid rgba(31,74,107,0.40);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.daybox .box-body { padding: 16px 18px 20px; }
.daybox .box-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.daybox .daynum { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.daybox h3 { font-size: 1.18rem; font-weight: 700; line-height: 1.12; margin: 8px 0 4px; letter-spacing: -0.01em; }
.daybox .box-sub { font-size: 0.84rem; color: var(--ink-2); }
.daybox .box-stats { margin-top: 12px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.badge-vf {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: #b5301f; background: #f6d9d3; border: 1px solid #e0a99f; border-radius: 7px; padding: 4px 11px;
  box-shadow: 0 1px 2px rgba(182,48,31,0.14);
}
.badge-vf::before { content: ""; width: 6px; height: 6px; background: var(--red); border-radius: 50%; }

/* ---------------------------------------------------------------- logistics */
.logi { border-top: 1px solid var(--line); }
.logi .traveler { margin-top: 40px; }
.logi .traveler > .label { margin-bottom: 14px; }
.logi-tl { border-left: 2px solid var(--ink); margin-left: 6px; }
.logi-row { position: relative; padding: 0 0 26px 28px; }
.logi-row::before { content: ""; box-sizing: border-box; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.logi-row.fly::before { background: var(--red); border-color: var(--red); }
.logi-row .when { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.logi-row .what { font-weight: 700; margin: 2px 0 2px; }
.logi-row .detail { font-size: 0.88rem; color: var(--ink-2); }
.logi-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }

/* ---------------------------------------------------------------- recs */
.recs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 10px; }
.recs h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.rec { padding: 14px 0; border-top: 1px solid var(--line-2); }
.rec:first-of-type { border-top: 1px solid var(--ink); }
.rec .rec-name { font-weight: 700; }
.rec .rec-name .area { font-weight: 500; color: var(--ink-3); font-size: 0.82rem; }
.rec .rec-why { font-size: 0.88rem; color: var(--ink-2); }

/* ================================================================ DAY PAGE */
/* intro reveal overlay: photo -> jagged red line draws -> fades -> content */
.day-intro { position: fixed; inset: 0; z-index: 2000; background: var(--ink); display: flex; align-items: center; justify-content: center; }
.day-intro .intro-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; }
.day-intro .intro-shade { position: absolute; inset: 0; background: rgba(20,18,14,0.45); opacity: 0; }
.day-intro svg { position: relative; width: 92%; max-width: 1100px; height: auto; overflow: visible; }
.day-intro .intro-line { fill: none; stroke: var(--red); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round;
  filter: drop-shadow(0 2px 10px rgba(214,58,38,0.6)); }
.day-intro.done { pointer-events: none; }

.day-hero { position: relative; height: 78vh; min-height: 520px; margin-top: var(--header-h); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.day-hero .bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.day-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,18,14,0.12) 0%, rgba(20,18,14,0) 40%, rgba(20,18,14,0.66) 100%); }
.day-hero .hero-inner { padding: 0 var(--pad) 44px; color: #f4f1ea; width: 100%; }
.day-hero .daynum { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #f0cfc7; display: flex; gap: 12px; align-items: center; }
.day-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.015em; line-height: 0.98; margin-top: 12px; }
.day-hero h1 em { font-style: italic; }
.day-hero .sub { margin-top: 14px; max-width: 56ch; color: rgba(244,241,234,0.92); font-size: 1.02rem; }

.daystat { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.daystat .wrap { display: grid; grid-template-columns: repeat(5, 1fr); }
.daystat .cell { padding: 22px var(--pad); border-left: 1px solid var(--line); }
.daystat .cell:first-child { border-left: 0; }
.daystat b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.daystat span { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

.day-section { padding: 72px 0; }
.day-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 60px; align-items: start; }
.prose p { font-size: 1.06rem; margin-bottom: 1.25em; color: #2b2a23; max-width: 64ch; }
.prose p:first-of-type::first-letter { font-weight: 800; font-size: 3.1em; line-height: 0.8; float: left; padding: 8px 12px 0 0; color: var(--red); }
.side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 26px; }
.panel { border: 1px solid var(--ink); background: var(--bg-2); padding: 22px 22px 24px; }
.panel h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.panel ul { list-style: none; }
.panel li { font-size: 0.94rem; padding: 8px 0 8px 18px; position: relative; border-top: 1px solid var(--line-2); color: var(--ink-2); }
.panel li:first-child { border-top: 0; }
.panel li::before { content: ""; position: absolute; left: 0; top: 15px; width: 7px; height: 2px; background: var(--red); }
.panel.warn { background: transparent; border-color: var(--red); }
.panel.warn h4 { color: var(--red); }

/* day elevation (interactive, accurate from GPS) */
.day-elev { padding: 0 0 72px; }
.day-elev .elev-card { border-color: var(--ink); }

/* accommodation — clean, centered, no off-center box */
.accom { padding: 0 0 72px; }
.accom-inner { border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; }
.accom .photo { aspect-ratio: 4/3; background-size: cover; background-position: center; }
.accom .photo.noimg { background: var(--bg-2); display: flex; align-items: center; justify-content: center; }
.accom .info { padding: 38px 0 38px 48px; }
.accom .info.full { padding-left: 0; grid-column: 1 / -1; max-width: 64ch; }
.accom h3 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.05; margin: 8px 0 6px; }
.accom .elev { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.accom p { color: var(--ink-2); margin: 14px 0; max-width: 52ch; }
.accom .btn { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--ink); padding: 11px 22px; transition: background 0.18s, color 0.18s; }
.accom .btn:hover { background: var(--ink); color: var(--bg); }

/* gallery */
.gallery-sec { padding: 0 0 80px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; margin-top: 28px; }
.gallery figure { cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border: 1px solid var(--ink); }
.gallery figcaption { font-size: 0.82rem; color: var(--ink-2); margin-top: 9px; }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(18,16,12,0.95); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 16px; padding: 40px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; }
.lightbox p { color: var(--bg); font-size: 0.86rem; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.pager a { padding: 30px var(--pad); transition: background 0.18s; }
.pager a:hover { background: var(--bg-2); }
.pager a.next { text-align: right; border-left: 1px solid var(--ink); }
.pager .dir { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.pager b { display: block; font-size: 1.3rem; font-weight: 800; margin-top: 6px; letter-spacing: -0.01em; }
.pager a.spacer { visibility: hidden; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--ink); padding: 50px 0 60px; }
footer .wrap { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-end; }
footer .big { font-weight: 800; font-size: 2rem; letter-spacing: -0.01em; }
footer .big em { font-style: italic; }
footer p { font-size: 0.82rem; color: var(--ink-2); max-width: 44ch; }
footer a { border-bottom: 1px solid var(--line); }
footer a:hover { color: var(--red); border-color: var(--red); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  :root { --pad: 24px; }
  .day-grid, .logi-cols, .recs { grid-template-columns: 1fr; gap: 30px; }
  .accom-inner { grid-template-columns: 1fr; }
  .accom .info { padding: 26px 0 30px; }
  .snake-grid { grid-template-columns: 1fr 1fr; }
  .side { position: static; }
}
@media (max-width: 680px) {
  :root { --pad: 18px; --header-h: 54px; }
  .site-header .brand .sub { display: none; }
  .snake-grid { grid-template-columns: 1fr; }
  .snake-line { display: none; }
  .daystat .wrap { grid-template-columns: 1fr 1fr; }
  .daystat .cell { border-top: 0; border-left: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .daystat .cell:nth-child(even) { border-right: 0; }
  .daystat .cell:nth-child(5) { border-bottom: 0; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { border-left: 0; border-top: 1px solid var(--ink); }
  .hero .meta-row { gap: 6px 16px; }
}

/* ============================================================ v2 additions */

/* ---- hero title block (Alta Via 2 / featuring DC + OM / Almost there!!! / tagline) ---- */
.hero .av-kicker {
  display: inline-block; margin-bottom: 16px; font-weight: 800; letter-spacing: 0.02em;
  color: #fff; background: var(--red); padding: 6px 13px; font-size: 0.92rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3); transform: rotate(-1.6deg);
}
.hero .av-title { font-weight: 800; font-size: clamp(3rem, 11vw, 9rem); line-height: 0.88; letter-spacing: -0.025em; }
.hero .av-title em { font-style: italic; }
.hero .av-featuring { margin-top: 8px; font-size: clamp(1.05rem, 2.6vw, 2rem); font-weight: 700; font-style: italic; color: #f3efe4; }

/* ---- generic hover lift + shadow on interactive things ---- */
.lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(26,26,22,0.2); }

/* ---- inline hyperlinks (red underline, hover red) ---- */
.ilink { color: inherit; border-bottom: 1.5px solid var(--red); padding-bottom: 1px; transition: color 0.15s ease, background 0.15s ease; }
.ilink:hover { color: var(--red); background: rgba(214,58,38,0.06); }

/* ---- spacing buffers: nothing in content touches the screen edge ---- */
.section-head, .snake, .elev-block, .logi, .day-grid, .recs, .minicharts, .history, .rec-map-wrap { box-sizing: border-box; }
.view-pad { padding-left: clamp(20px, 4vw, 64px); padding-right: clamp(20px, 4vw, 64px); }

/* ---- full-bleed day elevation (red line touches both edges) ---- */
.day-elev-fb { position: relative; width: 100%; margin: 0; }
.day-elev-fb .elev-svg { width: 100%; height: 320px; min-width: 0; display: block; }
.day-elev-fb .grid { stroke: rgba(26,26,22,0.10); }
.day-elev-fb .line { stroke-width: 3.4; }
.day-elev-fb .area { fill: rgba(214,58,38,0.12); }
.day-elev-cap { display: flex; justify-content: space-between; align-items: baseline; padding: 0 clamp(20px,4vw,64px); }
.day-elev-cap .lo, .day-elev-cap .hi { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-3); }
/* via-ferrata sticker pinned below the line at the day's high point */
.sticker-vf { position: absolute; z-index: 6; bottom: 6px; transform: translateX(-50%); height: 124px; pointer-events: none; }
.sticker-vf .vf-tag { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red);
  background: var(--bg); border: 1px solid var(--red); border-radius: 100px; padding: 2px 8px; }

/* ---- sticker look (white cut-out outline + drop shadow + off-kilter) ---- */
.sticker img, img.sticker { display: block; width: 100%; height: auto;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 8px 14px rgba(0,0,0,0.32)); }
img.sticker-corner { position: absolute; z-index: 30; width: clamp(104px, 11vw, 150px); height: auto; pointer-events: none; }
.sticker-corner.pos-tl { top: 76px; left: -10px; transform: rotate(-7deg); }
.sticker-corner.pos-tr { top: 96px; right: -8px; transform: rotate(6.5deg); }
.sticker-corner.pos-br { bottom: 40px; right: -6px; transform: rotate(-5deg); }
.sticker-corner.pos-bl { bottom: 60px; left: -8px; transform: rotate(5deg); }

/* ---- journal entry block (empty, to fill in on the trail) ---- */
.journal { border: 1.5px dashed rgba(26,26,22,0.4); background: rgba(244,241,234,0.5); padding: 30px 32px; min-height: 150px; }
.journal .label { margin-bottom: 10px; }
.journal .ph { color: var(--ink-3); font-style: italic; font-size: 0.96rem; max-width: 60ch; }

/* ---- history toggle (details/summary) ---- */
.history-block { border-top: 1px solid var(--ink); }
.hist-name { font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 800; letter-spacing: -0.01em; padding: 22px 0 0; }
.history { border-top: 0; }
.history > summary { list-style: none; cursor: pointer; padding: 7px 0 24px; display: flex; align-items: center; justify-content: flex-start; gap: 11px; }
.history > summary::-webkit-details-marker { display: none; }
.history > summary h3 { font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 800; letter-spacing: -0.01em; }
.history > summary .hint { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
.history > summary .chev { width: 16px; height: 16px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform 0.2s ease; flex-shrink: 0; }
.history[open] > summary .chev { transform: rotate(-135deg); }
.history .hbody { padding: 4px 0 30px; columns: 2; column-gap: 48px; }
.history .hbody p { font-size: 0.95rem; color: var(--ink-2); margin-bottom: 1em; break-inside: avoid; max-width: 60ch; }
.history-block.main { border-top: 0; }

/* ---- mini charts below the profile ---- */
/* ---- bar charts (distance / climb) + dual-axis, on a light-green ground ---- */
.minicharts { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 36px; }
.barchart, .dualchart { border: 1px solid var(--ink); background: #dbe6c5; padding: 18px 22px 16px; }
.dualchart { margin-top: 30px; }
.bc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.barchart h4, .dualchart h4 { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #3f5a2e; }
.barchart .cap, .dualchart .cap { font-size: 0.74rem; color: #5b6b48; }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 168px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-val { font-size: 0.6rem; font-weight: 700; color: #4a5a36; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.bar { width: 100%; max-width: 30px; border-radius: 3px 3px 0 0; transition: height 0.6s cubic-bezier(.2,.7,.2,1); }
.bar.blue { background: #3f7fae; } .bar.red { background: var(--red); }
.bar-day { font-size: 0.66rem; font-weight: 800; color: #4a5a36; margin-top: 6px; }
.dual-svg { width: 100%; height: auto; display: block; }
.dl-km { fill: none; stroke: #3f7fae; stroke-width: 3; stroke-linejoin: round; }
.dl-m { fill: none; stroke: var(--red); stroke-width: 3; stroke-linejoin: round; }
.dl-ax { font-size: 14px; fill: #4a5a36; font-weight: 800; }
.lg-km { color: #3f7fae; } .lg-m { color: var(--red); }

/* ---- rec interactive map ---- */
.rec-map-wrap { margin-top: 8px; border: 1px solid var(--ink); }
.rec-map { width: 100%; height: 420px; background: var(--bg-2); }
.rec-pin { background: var(--red); color: #fff; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 2px solid var(--bg); box-shadow: 0 1px 5px rgba(0,0,0,0.35); }
.recs .rec-name a { border-bottom: 1.5px solid var(--red); }
.recs .rec-name a:hover { color: var(--red); }

/* ---- logistics person blocks ---- */
.logi-person { border-top: 2px solid var(--ink); padding-top: 16px; margin-bottom: 30px; }
.logi-person .who { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.logi-person .who b { font-size: 1.15rem; font-weight: 800; }
.logi-person .who .frm { font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }
.logi-together { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.logi-notes { margin-top: 26px; border-top: 1px solid var(--ink); padding-top: 18px; }
.logi-notes .label { margin-bottom: 12px; }
.logi-notes li { font-size: 0.92rem; color: var(--ink-2); padding: 8px 0 8px 20px; position: relative; list-style: none; max-width: 70ch; }
.logi-notes li::before { content: ""; position: absolute; left: 0; top: 15px; width: 8px; height: 2px; background: var(--red); }

@media (max-width: 900px) {
  .minicharts { grid-template-columns: 1fr; }
  .history .hbody { columns: 1; }
  .sticker-corner { display: none; }
}

/* sticker-vf image sizing + positioning contexts for corner stickers */
.sticker-vf img { display: block; height: 118px; width: auto;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 8px 14px rgba(0,0,0,0.32)); }
.accom, .day-section, .gallery-sec { position: relative; }
.minichart .mc-bar.vf { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35); }

/* broader hover lift+shadow (user: "whenever I hover above anything, it raises with a slight shadow") */
.panel, .minichart, .map-frame, .rec-map-wrap, .elev-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.panel:hover, .minichart:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(26,26,22,0.15); }
.history > summary { transition: color 0.18s ease; }
.history > summary:hover .hint { text-decoration: underline; }
.accom .btn, .map-legend, .daystat .cell { transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.18s ease; }
.gallery figure:hover { box-shadow: 0 14px 30px rgba(26,26,22,0.2); }

/* ============================================================ v3 additions */

/* hero bottom caption — dramatic location line */
.hero-caption {
  position: absolute; right: var(--pad); bottom: 18px; z-index: 3; max-width: 62%; text-align: right;
  font-size: clamp(0.8rem, 1.5vw, 1.1rem); font-weight: 700; font-style: italic;
  color: rgba(255,255,255,0.94); text-shadow: 0 1px 10px rgba(0,0,0,0.55); letter-spacing: 0.01em;
}

/* make hyperlinks unmistakable (red, underlined) */
.ilink { color: var(--red); border-bottom: 1.5px solid var(--red); padding-bottom: 1px; font-weight: 600; }
.ilink:hover { color: #fff; background: var(--red); border-color: var(--red); }
.recs .rec-name a, .rec-name a { color: var(--red); border-bottom: 1.5px solid var(--red); font-weight: 700; }
footer a.ilink { color: #e7decd; border-color: rgba(231,222,205,0.5); }
footer a.ilink:hover { color: #fff; background: var(--red); border-color: var(--red); }

/* full-bleed intro reveal — the red line draws across the WHOLE screen */
.day-intro svg { position: relative; width: 100vw !important; max-width: none !important; height: 64vh; }
.day-intro .intro-line { stroke-width: 7; }

/* via-ferrata marker on the day elevation (visible even without the sticker PNG) */
.vf-marker { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.vf-marker .vf-flag { margin-top: 4px; background: var(--red); color: #fff; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; white-space: nowrap; box-shadow: 0 2px 7px rgba(0,0,0,0.32); }
.vf-marker .vf-stem { width: 2px; flex: 1; background: var(--red); opacity: 0.55; margin: 4px 0; }
.vf-marker .vf-sticker-img { position: absolute; bottom: 4px; height: 120px; width: auto;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 8px 14px rgba(0,0,0,0.32)); }

/* highlight dropdowns (side panel) */
.hl-list { display: flex; flex-direction: column; }
.hl { border-top: 1px solid var(--line-2); }
.hl:first-child { border-top: 0; }
.hl > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 11px 0; font-size: 0.93rem; font-weight: 600; color: var(--ink); transition: color 0.15s ease; }
.hl > summary::-webkit-details-marker { display: none; }
.hl > summary::before { display: none; }
.hl-ttl { flex: 1; }
.hl-chev { width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform 0.2s ease; flex-shrink: 0; }
.hl[open] .hl-chev { transform: rotate(-135deg); border-color: var(--red); }
.hl[open] > summary { color: var(--red); }
.hl p { font-size: 0.9rem; color: var(--ink-2); padding: 0 0 13px 15px; }

@media (max-width: 680px) { .hero-caption { display: none; } }

/* ---- printed photo under the hero (DC + OM) ---- */
.dcom-photo-sec { display: flex; justify-content: center; margin: 44px 0 6px; padding: 0 var(--pad); }
.framed-photo { background: #fff; padding: 16px 16px 0; border: 1px solid rgba(0,0,0,0.10); box-shadow: 0 16px 38px rgba(26,26,22,0.20);
  transform: none; max-width: 540px; width: 100%; margin: 0; }
.framed-photo img { display: block; width: 100%; height: auto; }
.framed-photo figcaption { font-size: 1.02rem; color: var(--red); text-align: center; padding: 14px 10px 18px;
  font-weight: 800; letter-spacing: 0.01em; }

/* ---- "Along the way" route-photo strip ---- */
.along-block { position: relative; }
.along-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.along-fig { margin: 0; border: 1px solid var(--ink); background: var(--bg-2); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.along-fig:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(26,26,22,0.2); }
.along-fig img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-bottom: 1px solid var(--ink); }
.along-fig figcaption { font-size: 0.74rem; color: var(--ink-2); padding: 9px 11px; font-weight: 600; }
@media (max-width: 820px) { .along-grid { grid-template-columns: 1fr 1fr; } }

/* ---- logistics columns: titled "Getting there" / "Leaving" ---- */
.logi-title { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 6px; }
.logi-col { position: relative; }

/* hover lift for the new charts */
.barchart, .dualchart { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.barchart:hover, .dualchart:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(26,26,22,0.15); }

/* ---- per-highlight pins on the day elevation ---- */
.hl-pin { position: absolute; transform: translate(-50%, -50%); z-index: 6; pointer-events: none; }
.hl-pin .pin { display: flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 50%;
  background: var(--mc); color: #fff; font-size: 0.72rem; font-weight: 800; border: 2px solid var(--bg); box-shadow: 0 2px 7px rgba(0,0,0,0.32); }
.hl-pin.is-vf .pin { width: 27px; height: 27px; font-size: 0.8rem; box-shadow: 0 2px 11px rgba(214,58,38,0.55); }
.hl-pin .hl-emoji { position: absolute; left: 50%; top: -19px; transform: translateX(-50%); font-size: 15px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }
.hl-pin .vf-sticker-img { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); height: 116px; width: auto;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 8px 14px rgba(0,0,0,0.32)); }

/* ---- highlight dropdowns: number, photo, exact place, paragraphs ---- */
.hl-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--mc); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; }
.hl-body { padding: 2px 0 16px; }
.hl-photo { margin: 0 0 11px; border: 1px solid var(--ink); overflow: hidden; background: var(--bg-2); }
.hl-photo img { display: block; width: 100%; height: 200px; object-fit: cover; }
.hl-place { display: flex; align-items: baseline; gap: 8px; font-size: 0.86rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.hl-tag { flex-shrink: 0; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--mc); padding: 3px 7px; border-radius: 4px; position: relative; top: -1px; }
.hl-body p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.55; margin-bottom: 9px; padding: 0; }
.hl-body p:last-child { margin-bottom: 0; }

/* ---- coffee & lunch callout ---- */
.cl-panel h4 { margin-bottom: 13px; }
.cl-row { display: flex; gap: 11px; align-items: flex-start; font-size: 0.88rem; color: var(--ink-2); line-height: 1.45; margin-bottom: 11px; }
.cl-row:last-child { margin-bottom: 0; }
.cl-row .cl-ic { font-size: 17px; flex-shrink: 0; line-height: 1.25; }
.cl-row b { color: var(--ink); }

/* ---- journal: a 3D open book ---- */
.journal-wrap { perspective: 2200px; perspective-origin: 50% 16%; padding: 8px 0 30px; }
.book { display: grid; grid-template-columns: 1fr 1fr; position: relative; margin: 24px auto 0; max-width: 780px;
  transform-style: preserve-3d; transform: rotateX(19deg); transform-origin: center 80%;
  filter: drop-shadow(0 40px 34px rgba(26,26,22,0.32)); }
.book-page { position: relative; min-height: 340px; padding: 34px 36px 42px; background: #fdfaf0;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, rgba(70,96,140,0.13) 33px, rgba(70,96,140,0.13) 34px);
  background-position: 0 34px;
  box-shadow: 0 2px 0 #efe9d6, 0 4px 0 #e6dfca, 0 6px 0 #efe9d6, 0 8px 0 #e6dfca, 0 10px 0 #ded6bd, 0 12px 0 #efe9d6, 0 15px 1px rgba(0,0,0,0.16); }
.book-page.left { border-radius: 8px 2px 2px 8px; transform-origin: right center; transform: rotateY(7deg);
  box-shadow: inset -26px 0 30px -22px rgba(0,0,0,0.32), 0 2px 0 #efe9d6, 0 4px 0 #e6dfca, 0 6px 0 #efe9d6, 0 8px 0 #e6dfca, 0 10px 0 #ded6bd, 0 12px 0 #efe9d6, 0 15px 1px rgba(0,0,0,0.18); }
.book-page.right { border-radius: 2px 8px 8px 2px; transform-origin: left center; transform: rotateY(-7deg);
  box-shadow: inset 26px 0 30px -22px rgba(0,0,0,0.32), 0 2px 0 #efe9d6, 0 4px 0 #e6dfca, 0 6px 0 #efe9d6, 0 8px 0 #e6dfca, 0 10px 0 #ded6bd, 0 12px 0 #efe9d6, 0 15px 1px rgba(0,0,0,0.18); }
.book::after { content: ""; position: absolute; top: 2%; bottom: 2%; left: 50%; width: 2px; transform: translateX(-50%) translateZ(1px);
  background: linear-gradient(180deg, rgba(0,0,0,0.30), rgba(0,0,0,0.12)); z-index: 4; }
.jdate { display: flex; align-items: baseline; gap: 10px; height: 34px; font-size: 0.76rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.jdate .rule { flex: 1; }
.jph { margin: 0; font-style: italic; color: var(--ink-3); line-height: 34px; font-size: 0.97rem; }
/* mobile: a single flat ruled page, not the 3D book */
@media (max-width: 760px) {
  .journal-wrap { perspective: none; padding: 2px 0 18px; }
  .book { transform: none !important; grid-template-columns: 1fr; filter: none; max-width: 100%; margin: 14px 0 0;
    border: 1px solid var(--ink); border-radius: 5px; overflow: hidden; background: #fdfaf0;
    box-shadow: 0 12px 26px rgba(26,26,22,0.18); }
  .book::before, .book::after { display: none !important; }
  .book-page { transform: none !important; box-shadow: none !important; min-height: auto; }
  .book-page.left { padding: 22px 24px 14px; background-image: none; border-bottom: 1px solid rgba(26,26,22,0.10); }
  .book-page.left .jdate .rule { border-bottom: 1.5px solid var(--ink-3); }
  .book-page.right { padding: 14px 24px 28px; min-height: 200px; background-position: 0 14px; } }

/* ---- clickable elevation pins + highlight flash ---- */
.hl-pin { pointer-events: auto; cursor: pointer; }
.hl-pin .vf-sticker-img { pointer-events: none; }
.hl-pin .pin { transition: transform 0.15s ease; }
.hl-pin:hover .pin { transform: scale(1.16); }
.hl.hl-flash { animation: hlflash 1.3s ease; }
@keyframes hlflash { 0%, 100% { background: transparent; } 22% { background: rgba(214,58,38,0.12); } }

/* ---- coffee / lunch / ferrata markers on the overall profile ---- */
.elev-card { position: relative; }
.op-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.op-mark { position: absolute; top: 1px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.op-mark .op-ic { font-size: 13px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(255,255,255,0.75)); }
.op-mark .op-stem { width: 1.5px; height: 26px; background: rgba(26,26,22,0.26); margin-top: 1px; }
.op-mark.ferrata .op-ic { color: var(--red); }
.op-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 0.76rem; font-weight: 600; color: var(--ink-3); }
.op-legend .op-ic { font-size: 13px; }
.op-legend .op-note { font-style: italic; }

/* ---- train timetable (travel days) ---- */
.transit { border: 1px solid var(--ink); background: var(--bg-2); }
.tleg { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.tleg:last-child { border-bottom: 0; }
.tl-end b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.05; }
.tl-end span { font-size: 0.82rem; color: var(--ink-2); font-weight: 600; }
.tl-end.tl-r { text-align: right; }
.tl-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tl-mid .tl-train { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.tl-mid .tl-line { width: 46px; height: 2px; background: var(--red); position: relative; }
.tl-mid .tl-line::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 7px solid var(--red); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.transit-note { margin-top: 14px; font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; max-width: 72ch; }
.transit-note b { color: var(--ink); }
@media (max-width: 560px) {
  .tleg { grid-template-columns: 1fr auto; gap: 6px 14px; }
  .tl-end.tl-r { text-align: right; }
  .tl-mid { grid-row: span 2; }
}

/* ---- interactive dual chart (distance + climb hover) ---- */
.dualchart { position: relative; }
.dual-svg { cursor: crosshair; }
.dl-cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; transition: opacity 0.1s ease; }
.dl-hdot { stroke: var(--bg); stroke-width: 2.5; opacity: 0; pointer-events: none; transition: opacity 0.1s ease; }
.dl-dot-km { fill: #3f7fae; }
.dl-dot-m { fill: var(--red); }
.dual-tip { position: absolute; transform: translateX(-50%); background: var(--ink); color: var(--bg-2);
  padding: 7px 11px; border-radius: 6px; font-size: 0.74rem; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.1s ease; z-index: 6; display: flex; flex-direction: column; gap: 1px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.dual-tip .dt-day { font-weight: 800; font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; margin-bottom: 2px; }
.dual-tip .dt-km { color: #8fc0e6; font-weight: 700; }
.dual-tip .dt-m { color: #f3a596; font-weight: 700; }

/* ---- live per-day weather card ---- */
.wx-sec { margin-top: 0; }
.weather { border: 1px solid var(--ink); background: var(--bg-2); padding: 20px 24px; }
.wx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; }
.wx-when { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.wx-loc { font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.wx-body { min-height: 30px; }
.wx-soon { font-size: 0.92rem; color: var(--ink-3); font-style: italic; max-width: 68ch; display: block; line-height: 1.5; }
.wx-main { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wx-emoji { font-size: 2.4rem; line-height: 1; }
.wx-temp { font-size: 1rem; color: var(--ink-2); }
.wx-temp b { font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.wx-desc { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.wx-meta { margin-top: 10px; font-size: 0.88rem; color: var(--ink-2); font-weight: 600; }
.wx-src { margin-top: 8px; font-size: 0.68rem; color: var(--ink-3); letter-spacing: 0.04em; }

/* ---- per-day fun fact (under "Historical things to know") ---- */
.funfact { border-left: 3px solid var(--red); background: var(--bg-2); padding: 16px 22px; margin-top: 24px; }
.ff-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.ff-text { font-size: 1.02rem; line-height: 1.58; color: var(--ink); margin: 0; max-width: 66ch; }

/* ============ weather: calendar, icons, hourly graph, modal ============ */
.wxi { display: inline-block; vertical-align: middle; }

/* main-page weather calendar */
.wx-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.wxc-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 12px 13px 13px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: left; font: inherit; color: var(--ink); border-radius: 3px; transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease; }
.wxc-cell:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 7px 18px rgba(0,0,0,0.09); }
.wxc-row { display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
.wxc-wd { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.wxc-dn { font-size: 0.6rem; font-weight: 800; color: var(--red); letter-spacing: 0.03em; }
.wxc-date { font-size: 1.06rem; font-weight: 800; letter-spacing: -0.01em; }
.wxc-icon { margin: 5px 0 3px; min-height: 44px; }
.wxc-icon .wxi { width: 40px; height: 45px; display: block; }
.wxc-temp { font-size: 0.82rem; color: var(--ink-2); }
.wxc-temp b { font-size: 1.02rem; color: var(--ink); font-weight: 800; }
.wxc-place { font-size: 0.66rem; color: var(--ink-3); margin-top: 4px; line-height: 1.25; }
.wxc-cell.iswet { border-color: #9fb8cb; }
.wxc-cell.isstorm { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.wxc-cell.soon { cursor: default; }
.wxc-cell.soon .wxc-icon .wxi { opacity: 0.35; }
.wxc-cell.soon .wxc-temp { color: var(--ink-3); font-style: italic; font-size: 0.78rem; }
.wxc-cell.soon .wxc-temp b { display: none; }
.wx-cal-foot { margin-top: 14px; font-size: 0.72rem; color: var(--ink-3); }
.wx-cal-foot a { color: var(--ink-2); }

/* hourly graph (day card + modal) */
.wxg-title { font-size: 0.72rem; color: var(--ink-3); margin: 16px 0 6px; }
.wxg { width: 100%; height: auto; display: block; }
.wxg-ax { font-size: 9px; fill: var(--ink-3); font-weight: 600; }
.wxg-t { font-size: 9px; fill: var(--ink-2); font-weight: 800; }

/* verdict pills */
.wx-verdict, .wxm-verdict { margin-top: 12px; padding: 9px 13px; border-radius: 5px; font-size: 0.88rem; font-weight: 600; line-height: 1.4; }
.wx-verdict.good, .wxm-verdict.good { background: #e7efe4; color: #3f6b43; }
.wx-verdict.wet, .wxm-verdict.wet { background: #e2ecf3; color: #2f5a78; }
.wx-verdict.storm, .wxm-verdict.storm { background: #f6e2dd; color: #a8341f; }

/* day-card weather icon */
.wx-cardicon { width: 46px; height: 50px; flex: 0 0 auto; }
.wx-src a { color: var(--ink-2); }

/* the blurred weather modal */
.wx-modal { position: fixed; inset: 0; z-index: 3200; display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(18,16,12,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.wx-modal.open { display: flex; }
.wxm-card { position: relative; background: var(--bg); width: min(540px, 100%); max-height: 88vh; overflow-y: auto;
  border-radius: 6px; padding: 26px 28px 24px; box-shadow: 0 24px 64px rgba(0,0,0,0.45); }
.wxm-x { position: absolute; top: 8px; right: 12px; background: none; border: none; font-size: 1.7rem; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 4px 8px; }
.wxm-x:hover { color: var(--ink); }
.wxm-loading { padding: 28px 4px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.wxm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.wxm-day { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.wxm-head h3 { margin: 3px 0 2px; font-size: 1.3rem; }
.wxm-date { font-size: 0.8rem; color: var(--ink-3); }
.wxm-icon { width: 56px; height: 62px; flex: 0 0 auto; }
.wxm-now { display: flex; align-items: baseline; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.wxm-temp { font-size: 1rem; color: var(--ink-2); }
.wxm-temp b { font-size: 2.2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.wxm-cond { font-size: 1.05rem; font-weight: 700; }
.wxm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 18px; }
.wxm-cell { background: var(--bg); padding: 12px 14px; }
.wxm-cell b { display: block; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.wxm-cell span { font-size: 0.66rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.wxm-foot { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.wxm-src { font-weight: 700; color: var(--red); text-decoration: none; }
.wxm-src:hover { text-decoration: underline; }
.wxm-attr { font-size: 0.7rem; color: var(--ink-3); }
.wxm-attr a { color: var(--ink-2); }
@media (max-width: 480px) { .wxm-grid { grid-template-columns: repeat(2, 1fr); } .wxm-card { padding: 22px 18px; } }

/* offline-copy download button (footer) */
.foot-offline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-offline { display: inline-block; background: var(--red); color: #fff; font-weight: 800; font-size: 0.92rem; padding: 11px 18px; border-radius: 7px; text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.btn-offline:hover { background: #b8301e; }
.foot-offline span { font-size: 0.84rem; color: var(--ink-3); }

/* train-journey map (travel day) */
.train-map-wrap { margin-top: 22px; }
.train-map { height: 380px; border: 1px solid var(--line); border-radius: 8px; }
.train-map-cap { font-size: 0.82rem; color: var(--ink-3); margin-top: 8px; line-height: 1.45; }
.train-pin { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 0.82rem; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.train-lbl { background: var(--ink); color: var(--bg); border: none; font-weight: 700; font-size: 0.78rem; padding: 3px 8px; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.train-lbl::before { display: none; }
