/* =====================================================================
   podlaskiszlakbociani.pl · komponenty makiet · kierunek „Cztery parki”
   Używa wyłącznie zmiennych z design/tokens.css. Zalążek style.css motywu
   WordPress: nazwy klas są robocze, do ujednolicenia przy budowie.
   ===================================================================== */

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body.site{ margin:0; background:var(--bg); color:var(--ink); font-family:var(--font-body); font-stretch:var(--wdth-body); font-size:var(--fs-body); line-height:var(--lh-body); -webkit-font-smoothing:antialiased; }
.site a{ color:var(--link); text-decoration-thickness:1px; text-underline-offset:.2em; }
.site a:hover{ text-decoration-thickness:2px; }
.site :focus-visible{ outline:3px solid var(--region-accent); outline-offset:2px; }
.wrap{ max-width:var(--page-max); margin:0 auto; padding-left:var(--gutter); padding-right:var(--gutter); }
.ico{ width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.ico.s{ width:17px; height:17px; }
.vh{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.num{ font-family:var(--font-num); font-stretch:var(--wdth-num); font-weight:var(--wght-num); font-variant-numeric:tabular-nums lining-nums; }

/* ---------- znak ---------- */
.wm{ display:inline-flex; flex-direction:column; gap:4px; font-stretch:115%; font-weight:700; font-size:16px; letter-spacing:-.01em; color:var(--ink); line-height:1; white-space:nowrap; text-decoration:none; }
.site a.wm{ color:var(--ink); text-decoration:none; }
.wm .bar4{ display:grid; grid-template-columns:50.1fr 96.4fr 102.2fr 163.8fr; height:3px; }
.bar4 i:nth-child(1){ background:var(--r-puszcza-accent); } .bar4 i:nth-child(2){ background:var(--r-narew-accent); }
.bar4 i:nth-child(3){ background:var(--r-biebrza-accent); } .bar4 i:nth-child(4){ background:var(--r-wigry-accent); }

/* ---------- nagłówek ---------- */
.hdr{ position:sticky; top:0; z-index:var(--z-header); background:var(--bg); border-bottom:var(--border) solid var(--line); }
.hdr .wrap{ height:var(--header-h); display:flex; align-items:center; gap:4px; padding-right:4px; }
.hdr .wm{ margin-right:auto; }
.hdr nav.main{ display:none; }
.hdr .tool.search{ display:none; } /* na telefonie wyszukiwarka jest w menu */
@media (max-width:400px){ .hdr .wm{ font-size:15px; } }
.hdr .tool{ font:inherit; background:none; border:0; color:var(--ink); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:var(--tap); height:48px; padding:0 4px; font-size:10.5px; line-height:1; cursor:pointer; text-decoration:none; }
.site a.tool{ color:var(--ink); text-decoration:none; }
@media (min-width:1080px){
  .hdr .wrap{ padding-right:var(--gutter); gap:28px; }
  .hdr .wm{ margin-right:0; }
  .hdr nav.main{ display:flex; gap:18px; margin-right:auto; font-size:var(--fs-small); white-space:nowrap; }
  .hdr nav.main a{ color:var(--ink); text-decoration:none; padding:6px 0; border-bottom:2px solid transparent; }
  .hdr nav.main a[aria-current]{ border-bottom-color:var(--region-accent); }
  .hdr .tool{ flex-direction:row; gap:6px; font-size:var(--fs-small); height:40px; }
  .hdr .tool.menu{ display:none; }
  .hdr .tool.search{ display:flex; }
}
@media (min-width:1080px) and (max-width:1359px){ .hdr .tool .lbl{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); } }

/* ---------- blok tytułu w kolorze regionu ---------- */
.titleblk{ background:var(--region); color:var(--on-region); }
.titleblk .wrap{ padding-top:18px; padding-bottom:20px; }
.titleblk .crumbs{ font-size:var(--fs-caption); }
.site .titleblk a{ color:var(--on-region); text-decoration-color:rgba(255,255,255,.45); }
.titleblk .crumbs{ opacity:.88; }
.titleblk h1{ margin:8px 0 0; font-stretch:var(--wdth-h1); font-weight:var(--wght-head); font-size:var(--fs-h1); line-height:var(--lh-head); letter-spacing:var(--track-head); max-width:20ch; }
.titleblk .dek{ margin:10px 0 0; font-size:var(--fs-lead); line-height:1.4; opacity:.9; max-width:40ch; }
.stagebar{ margin-top:18px; max-width:760px; }
.stagebar .segs{ display:grid; gap:2px; height:8px; }
.stagebar .segs a{ display:block; opacity:.55; }
.stagebar .segs a[aria-current]{ opacity:1; background:#fff !important; outline:2px solid var(--route); outline-offset:1px; }
.stagebar .lg{ display:flex; justify-content:space-between; margin-top:8px; font-size:var(--fs-caption); opacity:.88; }
@media (min-width:1024px){ .titleblk .wrap{ padding-top:28px; padding-bottom:30px; } }

/* ---------- układ: treść + panel boczny ---------- */
.layout{ display:block; }
.main{ min-width:0; }
.aside{ display:none; }
@media (min-width:1024px){
  .layout{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:56px; align-items:start; }
  .main{ max-width:760px; }
  .aside{ display:block; position:sticky; top:calc(var(--header-h) + 20px); padding-top:28px; }
}

/* ---------- statystyki etapu ---------- */
.stats{ display:grid; grid-template-columns:1fr 1fr; border-top:var(--border) solid var(--line); }
.stats > div{ padding:10px 0 12px; border-bottom:var(--border) solid var(--line); }
.stats > div:nth-child(odd){ border-right:var(--border) solid var(--line); padding-right:12px; }
.stats > div:nth-child(even){ padding-left:14px; }
.stat-n{ display:block; font-family:var(--font-num); font-stretch:var(--wdth-num); font-weight:var(--wght-num); font-size:var(--fs-stat); line-height:1.05; font-variant-numeric:tabular-nums lining-nums; letter-spacing:-.01em; white-space:nowrap; }
.stat-n small{ font-size:.5em; font-weight:500; margin-left:3px; letter-spacing:0; }
.stats .k{ display:block; font-size:var(--fs-caption); color:var(--ink-2); margin-top:3px; line-height:1.3; }
.stats.row4{ grid-template-columns:repeat(4,1fr); }
.stats.row4 > div, .stats.row4 > div:nth-child(odd), .stats.row4 > div:nth-child(even){ padding:8px 6px 10px; border-right:var(--border) solid var(--line); }
.stats.row4 > div:first-child{ padding-left:0; } .stats.row4 > div:last-child{ border-right:0; }
.stats.row4 .stat-n{ font-size:24px; } .stats.row4 .k{ font-size:11.5px; }

/* nawierzchnia */
.surface .sbar{ display:flex; height:10px; gap:2px; }
.surface .sbar i{ display:block; }
.surface .a{ background:var(--ink); } .surface .g{ background:var(--ink-2); opacity:.5; }
.surface .p{ background-color:var(--bg-2); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='5'%3E%3Ccircle cx='1.5' cy='1.5' r='1' fill='%23807a70'/%3E%3C/svg%3E"); }
.surface .lg{ display:flex; gap:14px; flex-wrap:wrap; margin-top:7px; font-size:var(--fs-caption); color:var(--ink-2); }
.surface .lg b{ color:var(--ink); font-weight:var(--wght-strong); font-variant-numeric:tabular-nums; }

/* stan szlaku */
.status{ display:flex; gap:9px; align-items:flex-start; font-size:var(--fs-small); line-height:1.45; color:var(--ink-2); margin:0; }
.status::before{ content:""; flex:none; width:9px; height:9px; margin-top:6px; background:var(--ok); border-radius:50%; }
.status.warn::before{ background:var(--warn); border-radius:0; transform:rotate(45deg); }
.status.alert::before{ background:var(--alert); border-radius:0; width:10px; height:10px; }
.status b{ color:var(--ink); font-weight:var(--wght-strong); }

/* W skrócie i Uwaga: jedyne bloki z tłem */
.short, .uwaga{ background:var(--bg-2); border-top:var(--border-strong) solid var(--region-accent); padding:14px 16px 16px; border-radius:var(--radius); }
.uwaga{ border-top-color:var(--warn); }
.short h2, .uwaga h2, .short .h, .uwaga .h{ margin:0 0 var(--s-1) !important; font-family:var(--font-body) !important; font-stretch:100% !important; font-size:var(--fs-small) !important; font-weight:700 !important; letter-spacing:0 !important; line-height:1.4 !important; }
.short p, .uwaga p{ margin:0; font-size:var(--fs-body); line-height:1.55; }

/* kotwice: na telefonie przyklejony pasek */
.chips{ position:sticky; top:var(--header-h); z-index:var(--z-chips); background:var(--bg); display:flex; gap:8px; overflow-x:auto; padding:10px var(--gutter); border-bottom:var(--border) solid var(--line); scrollbar-width:none; }
.chips::-webkit-scrollbar{ display:none; }
.chip{ white-space:nowrap; font-size:var(--fs-small); line-height:1; padding:0 13px; min-height:40px; display:inline-flex; align-items:center; border:var(--border) solid var(--line); border-radius:var(--radius); background:var(--bg); }
.site a.chip{ color:var(--ink); text-decoration:none; }
.site a.chip.on{ background:var(--region); color:var(--on-region); border-color:var(--region); }
@media (min-width:1024px){ .chips{ display:none; } }

/* przyciski */
.btn{ font:inherit; font-size:var(--fs-small); display:inline-flex; gap:8px; align-items:center; justify-content:center; padding:0 16px; min-height:var(--tap); border-radius:var(--radius); border:var(--border) solid var(--line); background:var(--bg); color:var(--ink); cursor:pointer; white-space:nowrap; text-decoration:none; }
.site a.btn{ color:var(--ink); text-decoration:none; }
.btn.pri, .site a.btn.pri{ background:var(--region); color:var(--on-region); border-color:var(--region); font-weight:var(--wght-strong); }
.btn[aria-pressed="true"]{ border-color:var(--ink); }
.btn small{ font-weight:400; opacity:.8; }

/* pasek akcji na telefonie */
.actions{ position:sticky; bottom:0; z-index:var(--z-actions); display:grid; grid-template-columns:1fr auto auto; gap:8px; padding:10px 12px 12px; background:var(--bg); border-top:var(--border) solid var(--line); }
.actions .btn.sq{ flex-direction:column; gap:1px; width:56px; padding:0; font-size:10.5px; line-height:1.1; }
@media (min-width:1024px){ .actions{ display:none; } }

/* panel boczny (desktop) */
.aside .stats{ margin-top:0; }
.aside .surface{ margin-top:14px; }
.aside .status{ margin-top:12px; }
.aside .btns{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:16px; }
.aside .btns .pri{ grid-column:1 / -1; }
.toc{ margin-top:26px; border-top:var(--border) solid var(--line); padding-top:12px; }
.toc .h{ font-size:var(--fs-caption); color:var(--ink-2); margin:0 0 6px; }
.toc ol{ list-style:none; margin:0; padding:0; font-size:var(--fs-small); line-height:1.35; }
.toc a{ display:block; padding:6px 0 6px 12px; border-left:2px solid var(--line); color:var(--ink-2) !important; text-decoration:none; }
.toc a.on{ border-left-color:var(--region-accent); color:var(--ink) !important; font-weight:var(--wght-strong); }

/* ---------- treść ---------- */
.prose{ padding-bottom:var(--s-6); }
.prose > *:first-child{ margin-top:0; }
.prose p{ margin:0; }
.prose p + p, .prose p + ul, .prose ul + p{ margin-top:var(--s-3); }
.prose .lead{ font-size:var(--fs-lead); line-height:1.5; }
.prose h2{ font-stretch:var(--wdth-h2); font-weight:var(--wght-head); font-size:var(--fs-h2); line-height:var(--lh-head); letter-spacing:var(--track-head); margin:var(--s-6) 0 var(--s-4); scroll-margin-top:calc(var(--header-h) + var(--chips-h) + 12px); }
.prose h3{ font-stretch:var(--wdth-h3); font-weight:var(--wght-head); font-size:var(--fs-h3); line-height:var(--lh-h3); margin:var(--s-5) 0 var(--s-2); }
.prose h4{ font-weight:var(--wght-h4); font-size:var(--fs-h4); line-height:1.3; margin:var(--s-4) 0 var(--s-1); }
.prose h5{ font-weight:700; font-size:var(--fs-small); line-height:1.35; color:var(--ink-2); margin:var(--s-4) 0 var(--s-1); }
.prose ul, .prose ol{ margin:var(--s-3) 0 0; padding-left:1.2em; }
.prose li + li{ margin-top:.35rem; }
.prose section > h2:first-child{ margin-top:var(--s-6); }
.block{ margin-top:var(--s-5); }
.block-tight{ margin-top:var(--s-4); }
.todo{ background:none; color:var(--warn); font-size:.85em; white-space:nowrap; }

/* zdjęcie (zastępnik, bez AI) */
.fig{ margin:var(--s-5) 0 0; }
.fig .ph{ aspect-ratio:3/2; background-color:var(--bg-2); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M0 10L10 0' stroke='%23808080' stroke-opacity='.18'/%3E%3C/svg%3E"); display:flex; align-items:flex-end; padding:12px 14px; font-size:var(--fs-caption); color:var(--ink-2); }
.fig figcaption{ font-size:var(--fs-caption); line-height:1.45; color:var(--ink-2); margin-top:8px; }
.fig figcaption small{ display:block; opacity:.85; }
@media (max-width:1023px){ .fig.bleed{ margin-left:calc(-1 * var(--gutter)); margin-right:calc(-1 * var(--gutter)); } .fig.bleed figcaption{ padding:0 var(--gutter); } }

/* mapa */
.mapbox{ position:relative; margin-top:var(--s-5); }
.mapbox .map{ height:300px; background:var(--bg-2); z-index:var(--z-map); }
.mapbox .over{ position:absolute; z-index:500; top:10px; right:10px; display:flex; gap:6px; }
.mapbox .over a{ background:var(--bg); color:var(--ink) !important; font-size:13px; padding:8px 11px; border-radius:var(--radius); border:var(--border) solid var(--line); text-decoration:none; }
.mapbox .note{ font-size:var(--fs-caption); color:var(--ink-2); margin-top:6px; }
@media (max-width:1023px){ .mapbox{ margin-left:calc(-1 * var(--gutter)); margin-right:calc(-1 * var(--gutter)); } .mapbox .note{ padding:0 var(--gutter); } .mapbox .map{ height:260px; } }
@media (min-width:1024px){ .mapbox .map{ height:420px; } }
.site .leaflet-tile-pane{ filter:saturate(.35) contrast(.95); }
[data-theme="dark"] .site .leaflet-tile-pane{ filter:invert(1) hue-rotate(180deg) saturate(.25) brightness(.85) contrast(.9); }
.leaflet-container{ font-family:inherit; }
.leaflet-control-attribution{ font-size:10px !important; }

/* profil wysokości z odczytem */
.profile{ margin-top:var(--s-4); position:relative; }
.profile svg{ width:100%; height:auto; display:block; overflow:visible; touch-action:pan-y; }
.profile .area{ fill:var(--bg-2); } .profile .ln{ fill:none; stroke:var(--ink); stroke-width:1.5; vector-effect:non-scaling-stroke; }
.profile .ax{ font-size:11px; fill:var(--ink-2); font-family:var(--font-body); }
.profile .tk{ stroke:var(--line); vector-effect:non-scaling-stroke; }
.profile .poi{ fill:var(--route); }
.profile .cur{ stroke:var(--ink); stroke-dasharray:3 3; vector-effect:non-scaling-stroke; }
.profile .read{ font-size:var(--fs-caption); color:var(--ink-2); margin-top:6px; min-height:1.5em; font-variant-numeric:tabular-nums; }
.profile .read b{ color:var(--ink); }

/* kilometraż */
.kml{ list-style:none; margin:var(--s-4) 0 0; padding:0; }
.kml li{ display:grid; grid-template-columns:58px 30px 1fr; padding-bottom:18px; position:relative; }
.kml li:not(:last-child)::before{ content:""; position:absolute; left:72px; top:12px; height:100%; width:3px; background:var(--route); }
.kml li.to-branch::before{ background:none; border-left:2px dashed var(--ink-2); width:0; left:73px; opacity:.7; }
.kml .km{ font-family:var(--font-num); font-stretch:var(--wdth-num); font-weight:var(--wght-num); font-size:var(--fs-small); text-align:right; line-height:1.65; font-variant-numeric:tabular-nums; }
.kml .km.est{ color:var(--ink-2); font-weight:500; }
.kml .dt{ position:relative; }
.kml .dt::after{ content:""; position:absolute; left:9px; top:6px; width:13px; height:13px; border-radius:50%; background:var(--bg); border:3px solid var(--route); box-sizing:border-box; }
.kml li.t .dt::after{ background:var(--route); }
.kml li.branch .dt::after{ border:2px dashed var(--ink-2); }
.kml .nm{ display:block; font-weight:700; font-size:var(--fs-body); line-height:1.45; }
.kml .ds{ display:block; color:var(--ink-2); font-size:var(--fs-small); line-height:1.45; }
.kml .ic{ display:flex; gap:12px; margin-top:6px; color:var(--ink); }
.kml .pk{ display:inline-block; margin-top:3px; font-size:var(--fs-caption); font-weight:650; color:var(--link); }
.kml li:last-child{ padding-bottom:0; }
.legend{ display:flex; gap:16px; flex-wrap:wrap; font-size:var(--fs-caption); color:var(--ink-2); margin-top:var(--s-3); }
.legend span{ display:inline-flex; gap:6px; align-items:center; }

/* gdzie spać (afiliacja, oznaczona) */
.sleep{ margin-top:var(--s-6); border-top:var(--border) solid var(--line-strong); padding-top:12px; }
.sleep .hd{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
.sleep .hd h2{ margin:0 !important; font-size:var(--fs-h3) !important; font-stretch:var(--wdth-h3) !important; }
.sleep .hd span{ font-size:var(--fs-caption); color:var(--ink-2); white-space:nowrap; }
.sleep ul{ list-style:none; margin:10px 0 0; padding:0; }
.sleep li{ display:grid; grid-template-columns:1fr auto; gap:2px 12px; padding:11px 0; border-bottom:var(--border) solid var(--line); font-size:var(--fs-small); }
.sleep li small{ grid-column:1; color:var(--ink-2); font-size:var(--fs-caption); }
.sleep li a{ grid-row:1 / span 2; grid-column:2; align-self:center; }
.sleep .disc{ font-size:var(--fs-caption); color:var(--ink-2); margin-top:8px; }

/* FAQ */
.faq{ margin-top:var(--s-4); border-top:var(--border) solid var(--line); }
.faq details{ border-bottom:var(--border) solid var(--line); }
.faq summary{ cursor:pointer; list-style:none; display:flex; justify-content:space-between; gap:16px; padding:14px 0; font-weight:var(--wght-strong); line-height:1.4; }
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::after{ content:"+"; font-weight:400; font-size:1.3em; line-height:1; color:var(--ink-2); }
.faq details[open] summary::after{ content:"–"; }
.faq details > p{ margin:0 0 16px; }

/* źródła, nota, zgłoś błąd */
.sources{ margin-top:var(--s-6); border-top:var(--border) solid var(--line-strong); padding-top:var(--s-3); }
.sources h2{ margin:0 0 var(--s-2) !important; font-size:var(--fs-h3) !important; font-stretch:var(--wdth-h3) !important; }
.sources ol{ margin:0; padding-left:1.3em; font-size:var(--fs-small); line-height:1.5; }
.sources li + li{ margin-top:.4rem; }
.sources li small{ color:var(--ink-2); }
.editnote{ margin-top:var(--s-4); font-size:var(--fs-small); color:var(--ink-2); line-height:1.5; }
.editnote p + p{ margin-top:var(--s-2); }

/* poprzedni / następny etap */
.prevnext{ display:grid; grid-template-columns:1fr 1fr; gap:0; margin-top:var(--s-6); border-top:var(--border) solid var(--line-strong); }
.prevnext a{ display:block; padding:14px 12px 16px 0; text-decoration:none; color:var(--ink) !important; }
.prevnext a + a{ text-align:right; padding:14px 0 16px 12px; border-left:var(--border) solid var(--line); }
.prevnext small{ display:block; font-size:var(--fs-caption); color:var(--ink-2); }
.prevnext b{ display:block; font-stretch:var(--wdth-h3); font-weight:var(--wght-head); font-size:var(--fs-h4); line-height:1.25; margin-top:4px; }
.prevnext i{ display:block; height:4px; width:48px; margin-top:10px; }
.prevnext a + a i{ margin-left:auto; }

/* stopka */
.ftr{ margin-top:var(--s-7); background:var(--r-neutral); color:#E8E9E6; font-size:var(--fs-small); }
.ftr .wrap{ padding-top:36px; padding-bottom:40px; }
.site .ftr a{ color:#fff; }
.ftr .cols{ display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:24px; }
.ftr ul{ list-style:none; margin:8px 0 0; padding:0; line-height:1.9; }
.ftr .h{ font-weight:700; color:#fff; }
.ftr .disc{ margin-top:28px; padding-top:16px; border-top:1px solid rgba(255,255,255,.2); max-width:80ch; color:#C9CCC8; line-height:1.55; }
