/* CityLooper – strona docelowa. Kolory i krój jak na dawnej stronie „wkrótce”. */
:root {
  --bg: #fdf8f1;
  --card: #ffffff;
  --ink: #1d2340;
  --muted: #5c6280;
  --accent: #ff6b4a;
  --accent-ink: #c2412a;
  --accent-soft: #ffe3da;
  --sky: #2f6be0;
  --line: #ece4d8;
  --warn-bg: #fff4d6;
  --warn-line: #f1d48a;
  --ok: #1f8a4c;
  --stale: #c62828;
  --aging: #c25e00;
  --sea: #dfeaf5;
  --land: #fbf6ee;
  --land-line: #d9cdb9;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(29, 35, 64, .06), 0 6px 20px rgba(29, 35, 64, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a30;
    --card: #1e2440;
    --ink: #eef0f8;
    --muted: #a7acc6;
    --accent: #ff7a5c;
    --accent-ink: #ff9a80;
    --accent-soft: #3a2a35;
    --sky: #8fb2ff;
    --line: #2e3555;
    --warn-bg: #3a3320;
    --warn-line: #6b5a2a;
    --ok: #5fd08f;
    --stale: #ff8a80;
    --aging: #ffb366;
    --sea: #10152a;
    --land: #232a4a;
    --land-line: #39416a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky); }
h1, h2, h3 { text-wrap: balance; line-height: 1.15; letter-spacing: -.02em; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

/* nagłówek */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.fav-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 99px; }
.fav-link:hover, .fav-link[aria-current="page"] { background: var(--accent-soft); }
.count { background: var(--accent); color: #fff; border-radius: 99px; font-size: 12px; min-width: 20px; padding: 0 6px; text-align: center; line-height: 20px; }

/* hero + formularz */
.hero { padding-top: 28px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 8px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); margin: 0 0 20px; font-size: 17px; }

.search { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.fields { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
.field input, .field select, .sort select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; min-height: 44px; width: 100%; min-width: 0;
}
.suffix { position: relative; display: block; }
.suffix input { padding-right: 36px; }
.suffix i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); }
.seg, .fields .wide { grid-column: 1 / -1; }
.seg-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-opts label { flex: 1 1 auto; position: relative; }
.seg-opts input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.seg-opts span { display: block; text-align: center; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; font-weight: 600; }
.seg-opts input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg-opts input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; min-height: 38px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* pasek zwiniętego formularza: tylko na telefonie (niżej, max-width: 759px) */
.search-sum { display: none; width: 100%; align-items: center; justify-content: space-between; gap: 12px; font: inherit; text-align: left; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; min-height: 52px; cursor: pointer; }
.sum-text { font-weight: 700; font-size: 15px; line-height: 1.35; }
.sum-edit { color: var(--sky); font-weight: 700; font-size: 14px; flex: none; }
.search-sum[aria-expanded="true"] .sum-edit { color: var(--muted); }

.more { margin-top: 12px; }
.more summary { cursor: pointer; color: var(--sky); font-weight: 600; padding: 6px 0; }
.more .fields { margin-top: 8px; }

.btn { font: inherit; font-weight: 700; border-radius: 12px; padding: 12px 18px; min-height: 46px; cursor: pointer; border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--accent); color: #fff; width: 100%; margin-top: 14px; }
.btn.primary:hover { filter: brightness(.95); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.small { padding: 8px 12px; min-height: 38px; font-size: 14px; }
.btn.book { background: var(--ink); color: var(--bg); }

/* wyniki */
.results { padding-top: 28px; }
.results-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.summary { font-size: 20px; margin: 0; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { width: auto; min-height: 38px; padding: 6px 10px; }
.list { display: grid; gap: 12px; }
#more { width: 100%; margin-top: 16px; }

.state { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; color: var(--muted); }
.state strong { color: var(--ink); }

.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card-link { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 16px 60px 16px 16px; color: inherit; text-decoration: none; }
.route { font-weight: 800; font-size: 17px; line-height: 1.3; grid-column: 1 / -1; }
.route .arr { color: var(--accent); font-weight: 700; margin: 0 2px; }
.route .home { color: var(--muted); font-weight: 600; }
.when, .stays { color: var(--muted); font-size: 14px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.badge.warn { background: var(--warn-bg); color: inherit; border: 1px solid var(--warn-line); }
.price { text-align: right; align-self: end; grid-row: 2 / span 3; grid-column: 2; }
.price strong { display: block; font-size: 24px; letter-spacing: -.02em; }
.price small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.age.aging { color: var(--aging); font-weight: 600; }
.age.stale { color: var(--stale); font-weight: 600; }
.cta { color: var(--sky); font-weight: 700; font-size: 14px; }
.fav { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); }
.fav[aria-pressed="true"] { color: var(--accent); }
.fav:hover { background: var(--accent-soft); }

/* sekcje informacyjne */
.info { padding-top: 48px; }
.info h2 { font-size: clamp(22px, 3.5vw, 30px); }
.steps { list-style: none; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 16px 64px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.steps h3 { margin: 0 0 4px; font-size: 17px; }
/* „Skąd lecisz?”: kafelki stron z lotnisk (/z/…), statyczne linki pod Google */
.skad { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.skad a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; }
.skad a:hover { border-color: var(--accent); }
.skad img { display: block; width: 100%; height: 84px; object-fit: cover; }
.sk-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.sk-body b { font-size: 17px; }
.sk-body span { font-weight: 600; color: var(--accent-ink); }
.sk-body small { color: var(--muted); font-size: 13px; }
/* link w szczegółach pętli do strony lotniska */
.more-from { margin: 12px 0 0; font-weight: 600; }
.steps p { margin: 0; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); margin: 8px 0 0; }

/* ulubione */
.favs { padding-top: 28px; padding-bottom: 40px; }
.favs h1 { font-size: 30px; margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.fav-meta { padding: 0 16px 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.delta-down { color: var(--ok); font-weight: 700; }
.delta-up { color: var(--accent-ink); font-weight: 700; }

/* okno detali */
dialog {
  border: 0; padding: 0; color: var(--ink); background: var(--bg);
  width: min(720px, 100vw); max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0 0 0 auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .2);
}
dialog::backdrop { background: rgba(10, 14, 30, .45); }
/* mapa trasy: na wąskim ekranie pasek nad treścią, od 1100 px kolumna po lewej (przy przewijaniu stoi w miejscu) */
dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(3, max-content); grid-template-areas: "bar" "map" "body"; align-content: start; }
.d-bar { grid-area: bar; }
#d-body { grid-area: body; }
#d-map { grid-area: map; position: relative; margin: 0 20px 14px; border-radius: 14px; overflow: hidden; background: var(--sea); border: 1px solid var(--line); }
#d-map svg { display: block; width: 100%; height: 210px; }
.m-sea { fill: var(--sea); }
.m-land { fill: var(--land); stroke: var(--land-line); stroke-width: .7; stroke-linejoin: round; }
.m-route { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.m-arrow { fill: var(--accent); }
.m-num circle { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.m-num text { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.m-dot { fill: var(--card); stroke: var(--ink); stroke-width: 2.5; }
.m-dot.home { fill: var(--ink); stroke: var(--bg); }
.m-label { fill: var(--ink); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--land); stroke-width: 3px; stroke-linejoin: round; }
.m-label.remote { fill: var(--aging); }
.m-sub { fill: var(--muted); font-size: 11px; font-weight: 600; }
.m-transfer { stroke: var(--sky); stroke-width: 2.5; stroke-dasharray: 3 4; stroke-linecap: round; }
.m-transfer-hit { stroke: transparent; stroke-width: 16; }
.m-ap { fill: var(--warn-bg); stroke: var(--aging); stroke-width: 2.5; }
.m-tip { cursor: help; outline: none; }
.m-tip:hover .m-ap, .m-tip:focus .m-ap { stroke-width: 3.5; }
.m-route, .m-arrow, .m-num, .m-dot, .m-label, .m-tip { transition: opacity .15s, stroke-width .15s; }
#d-map svg.focus :is(.m-route, .m-arrow, .m-num, .m-dot, .m-label, .m-tip):not(.on) { opacity: .22; }
#d-map svg.focus .m-route.on { stroke-width: 5.5; }
#d-map svg.focus .m-dot.on { stroke-width: 4; }
#d-map svg.focus .m-tip.on .m-ap { stroke-width: 3.5; }
#d-map svg.focus .m-label.on, #d-map svg.focus .m-tip.on .m-label { font-size: 15px; }
.m-route-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; }
.timeline .leg-card, .timeline .stay-card { transition: box-shadow .15s, background-color .15s; }
.timeline li.hl .leg-card { box-shadow: 0 0 0 2px var(--accent); }
.timeline li.hl .stay-card { background: var(--accent-soft); border-radius: 12px; box-shadow: 0 0 0 8px var(--accent-soft); }
.map-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; max-width: 260px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; line-height: 1.35; padding: 6px 10px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); z-index: 2; }
.map-tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
@media (min-width: 1100px) {
  dialog.has-map { width: min(100vw, 1400px); }
  dialog.has-map[open] { grid-template-columns: minmax(0, 1fr) 720px; grid-template-areas: "map bar" "map body"; grid-template-rows: auto 1fr; }
  dialog.has-map #d-map { position: sticky; top: 0; align-self: start; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  dialog.has-map #d-map svg { height: 100%; }
}
.d-bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 8px; background: var(--bg); z-index: 1; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 18px; cursor: pointer; }
#d-body { padding: 0 20px 32px; }
.d-head h2 { font-size: clamp(22px, 4vw, 28px); margin: 0 0 6px; }
.d-head .when { font-size: 15px; }
.d-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.d-price strong { font-size: 32px; letter-spacing: -.02em; }
.d-price span { color: var(--muted); font-size: 14px; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }
.notice strong { display: block; margin-bottom: 2px; }
.small-note { color: var(--muted); font-size: 13px; }
.d-section h3 { font-size: 18px; margin: 24px 0 10px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-left: 28px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; border-left: 2px dashed var(--line); }
.timeline li::after { content: ""; position: absolute; left: 2px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.timeline li.stay::after { background: var(--card); border: 2px solid var(--muted); }
.leg-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 8px 0; }
.leg-times { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; }
.leg-times b { font-size: 18px; font-variant-numeric: tabular-nums; }
.leg-times .place { align-self: center; }
.leg-times .place small { color: var(--muted); display: block; font-size: 13px; }
.leg-times .remote-ap { display: block; margin: 4px 0 6px; padding: 6px 10px; font-size: 13px; }
.leg-date { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.leg-date::first-letter { text-transform: uppercase; }
.leg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.leg-foot .lp { font-weight: 700; }
.leg-foot .lp small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.stay-card { padding: 12px 0 12px 2px; }
.stay-card b { font-size: 16px; }
.stay-card .small-note { margin: 2px 0 6px; }
/* Karta pobytu ze zdjęciem miasta (site/img/miasta/): pasek zdjęcia z nazwą i nocami, pod nim reszta. */
.stay-card.with-photo { padding: 0; margin: 8px 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stay-head.photo { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 112px; padding: 0 10px 8px 12px; background: var(--line) center / cover no-repeat; color: #fff; }
.stay-head.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(20, 24, 45, .55)); }
.stay-head.photo b, .stay-head.photo .nights { position: relative; text-shadow: 0 1px 4px rgba(0, 0, 0, .65), 0 0 2px rgba(0, 0, 0, .4); }
.stay-head.photo b { font-size: 19px; }
.stay-head.photo .sep { display: none; }
.stay-head.photo .nights { font-size: 13px; font-weight: 600; background: rgba(0, 0, 0, .35); padding: 2px 9px; border-radius: 99px; margin-bottom: 2px; }
.stay-head.photo .credit { position: absolute; top: 5px; right: 8px; color: rgba(255, 255, 255, .85); font-size: 10px; text-decoration: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.stay-card.with-photo .stay-body { padding: 10px 12px 12px; }
.timeline li.hl .stay-card.with-photo { background: var(--card); box-shadow: 0 0 0 2px var(--accent); border-radius: 14px; }
.stay-link { text-align: left; justify-content: flex-start; }
.timeline { scroll-margin-top: 70px; }
.d-sticky { display: none; position: sticky; bottom: 0; z-index: 1; align-items: center; justify-content: space-between; gap: 12px;
  margin: 24px -20px -32px; padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(29, 35, 64, .08); }
.d-sticky strong { display: block; font-size: 22px; letter-spacing: -.02em; line-height: 1.1; }
.d-sticky span { color: var(--muted); font-size: 12px; }
.d-sticky .btn { width: auto; margin: 0; flex: none; }

/* wyróżnione pętle przez kilka miast nad listą i zachęta do powiadomienia między wynikami */
.picks { margin-bottom: 4px; }
.picks-title { font-size: 15px; margin: 4px 0 10px; color: var(--muted); }
.picks .list + .picks-title { margin-top: 22px; }
.alert-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.alert-inline p { margin: 0; flex: 1 1 200px; }
.alert-inline .btn { width: auto; margin: 0; }

.extras { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.extra { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.extra h4 { margin: 0 0 4px; font-size: 15px; }
.extra p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.extra .soon { font-size: 12px; font-weight: 700; color: var(--muted); display: block; margin-top: 8px; }
.extra-links { display: flex; flex-wrap: wrap; gap: 6px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 20; }

footer { color: var(--muted); font-size: 13px; padding: 32px 0 28px; margin-top: 40px; border-top: 1px solid var(--line); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.foot nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot p { margin: 0; }
.foot .foot-cities { margin: 0 0 8px; }
.foot .foot-cities a { color: var(--muted); margin-right: 6px; }
.rank-note { color: var(--muted); font-size: 13px; margin: -4px 0 12px; }
.small-note.aff { border-top: 1px solid var(--line); padding-top: 10px; }

/* baner zgody na cookies analityczne (site/consent.js) */
#consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; max-width: 560px; margin: 0 auto;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25); padding: 16px; }
#consent h2 { font-size: 17px; margin: 0 0 6px; }
#consent p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.consent-actions { display: flex; gap: 8px; }
.consent-actions .btn { flex: 1; }
@media (max-width: 759px) {  /* telefon: mały pasek zamiast okna na 1/5 ekranu */
  #consent { left: 8px; right: 8px; bottom: 8px; padding: 12px; }
  #consent h2 { display: none; }
  #consent p { font-size: 13px; line-height: 1.4; margin-bottom: 8px; }
  .consent-actions .btn { min-height: 38px; padding: 6px 12px; font-size: 14px; }
}

/* podstrony informacyjne (regulamin, prywatność, kontakt) */
.legal { padding-top: 28px; padding-bottom: 20px; }
.legal h1 { font-size: clamp(28px, 4vw, 36px); margin: 0 0 6px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink); }
.legal ol, .legal ul { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal .meta { color: var(--muted); font-size: 14px; }
.legal mark { background: var(--warn-bg); color: inherit; border: 1px dashed var(--warn-line); padding: 0 4px; border-radius: 4px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
@media (max-width: 759px) { .legal table { display: block; overflow-x: auto; } }
.legal th, .legal td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }

.skeleton { height: 128px; border-radius: var(--radius); background: linear-gradient(90deg, var(--card), var(--line), var(--card)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

@media (min-width: 760px) {
  .fields { grid-template-columns: repeat(4, 1fr); }
  .seg { grid-column: span 2; }
  .fields .wide { grid-column: auto; }
  .fields .when-field { grid-column: span 3; }
  .search .btn.primary { width: auto; min-width: 200px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .card-link { grid-template-columns: 1fr auto; }
  .d-bar { padding: 12px; }
  #d-body { padding: 0 32px 40px; }
}
@media (max-width: 759px) {
  dialog { width: 100vw; margin: 0; box-shadow: none; }
  .extras { grid-template-columns: 1fr; }
  /* telefon: wyniki na pierwszym ekranie — krótki nagłówek, formularz zwinięty do paska */
  .hero { padding-top: 16px; }
  .hero h1 { font-size: 25px; margin-bottom: 12px; }
  .h1-extra, .hero .lead { display: none; }
  .search-sum { display: flex; }
  .search:not(.open) { display: none; }
  .search.open { margin-top: 8px; }
  .results { padding-top: 18px; }
  /* karta: trasa i daty na całą szerokość, znaczniki i cena w jednym rzędzie na dole */
  .card-link { padding: 14px; gap: 4px 12px; }
  .card-link .route { padding-right: 40px; }
  .card-link .when, .card-link .stays { grid-column: 1 / -1; }
  .card-link .badges { grid-column: 1; align-self: end; margin-top: 6px; }
  .card-link .price { grid-row: auto; grid-column: 2; }
  .card-link .cta { display: none; }
  .fav { top: 6px; right: 6px; }
  /* okno pętli: cena i przejście do rezerwacji zawsze pod kciukiem */
  .d-sticky { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .card { transition: none; }
}

/* baner reklamowy z lewej (120×600) — tylko gdy obok treści (1040 px) jest miejsce */
.side-ad { display: none; }
@media (min-width: 1340px) {
  .side-ad { display: block; position: fixed; top: 90px; left: max(24px, calc((100vw - 1040px) / 2 - 150px)); z-index: 4; }
  .side-ad.right { left: auto; right: max(24px, calc((100vw - 1040px) / 2 - 150px)); }
  .side-ad img { display: block; border-radius: 6px; box-shadow: var(--shadow); }
  .ad-label { display: block; font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 4px; letter-spacing: .04em; text-transform: uppercase; }
}

/* powiadomienia o spadku cen: przycisk nad wynikami, małe okno zapisu, widok /powiadomienia */
dialog.sheet { height: fit-content; max-height: calc(100dvh - 32px); width: min(480px, calc(100vw - 32px)); margin: auto; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
dialog.sheet[open] { display: block; }
.sheet-body { padding: 0 20px 24px; }
.sheet-body h2 { font-size: 22px; margin: 0 0 8px; }
.sheet-body .field { margin: 14px 0 10px; }
.a-label { font-weight: 700; margin: 0 0 8px; }
.a-error { color: var(--accent-ink); font-weight: 600; margin: 8px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert-item { padding: 14px 16px; display: grid; gap: 6px; }
.alert-item .actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 759px) { dialog.sheet { width: calc(100vw - 32px); margin: auto; } }

/* Poradnik: lista artykułów i artykuł (site/poradnik/) */
.top-nav { display: flex; gap: 4px; }
.crumbs { margin: 0 0 6px; font-size: 14px; }
.crumbs a { color: var(--muted); }
.article .lead { font-size: 18px; }
.article figure { margin: 24px 0; }
.article figure img { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--line); }
.article figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 8px; }
.loopbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin: 24px 0; }
.loopbox h2 { margin: 2px 0 6px; }
.loopbox ul { margin: 10px 0; }
.loopbox-kicker { margin: 0; color: var(--accent-ink); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.loopbox-price { margin: 0; }
.loopbox-price strong { font-size: 24px; color: var(--accent-ink); }
.loopbox .note { color: var(--muted); font-size: 14px; }
.loopbox .btn.ghost { margin-top: 6px; }
.article details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.article summary { font-weight: 700; cursor: pointer; }
.article details p { margin: 8px 0 0; }
.post-list { list-style: none; padding: 0 !important; margin: 20px 0; display: grid; gap: 14px; }
.post-list a { display: grid; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.post-list a:hover strong { text-decoration: underline; }
.post-list span { color: var(--ink); }
.post-list small { color: var(--muted); }
.post-list a.with-thumb { grid-template-columns: 96px 1fr; column-gap: 16px; align-items: center; }
.post-list .thumb { grid-row: span 3; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
@media (max-width: 480px) {
  .post-list a.with-thumb { grid-template-columns: 72px 1fr; column-gap: 12px; }
  .post-list .thumb { width: 72px; height: 72px; }
}
