/* Маршруты (/marshruty/). Подключается только на страницах раздела и в блоках на других страницах
   (главная, место) — через их шаблоны. Цвета — токены из style.css (день/ночь), mobile-first. */

/* ---------- Hero ---------- */
.rt-hero, .rt-index-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--deep); }
.rt-hero-bg, .rt-index-hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.rt-hero::before, .rt-index-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4,20,12,.25) 0%, rgba(4,20,12,.15) 35%, rgba(4,20,12,.82) 100%);
}
.rt-hero-in, .rt-index-hero-in { min-height: 68vh; min-height: 68svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 88px; padding-bottom: 32px; }
.rt-index-hero-in { min-height: 52vh; min-height: 52svh; }
.rt-hero h1, .rt-index-hero h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(2rem, 7.4vw, 3.6rem); line-height: 1.06; max-width: 860px; margin: 6px 0 12px; color: #fff; letter-spacing: -.01em; }
.rt-hero-sub, .rt-index-hero p { font-size: clamp(1rem, 2.6vw, 1.2rem); line-height: 1.5; max-width: 620px; color: rgba(255,255,255,.88); margin: 0 0 22px; }
.rt-hero.is-plain { background: var(--bg-soft); color: var(--text); }
.rt-hero.is-plain::before { display: none; }
.rt-hero.is-plain .rt-hero-in { min-height: 0; padding-top: 40px; padding-bottom: 28px; }
.rt-hero.is-plain h1 { color: var(--text); }
.rt-hero.is-plain .rt-hero-sub { color: var(--text-soft); }
.rt-hero.is-plain .rt-crumbs, .rt-hero.is-plain .rt-crumbs a { color: var(--text-muted); }
.rt-crumbs { font-size: .84rem; color: rgba(255,255,255,.8); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.rt-crumbs a { color: rgba(255,255,255,.9); text-decoration: none; }
.rt-crumbs a:hover { text-decoration: underline; }
.rt-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rt-cta-builder { align-self: flex-start; }
.rt-saved-note { margin: 18px 0 0; font-size: .92rem; color: var(--ok-text); background: var(--ok-bg); padding: 10px 14px; border-radius: var(--radius-sm); display: inline-flex; gap: 8px; align-items: center; }

/* ---------- Поделиться ---------- */
.rt-share { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-share-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; font: 600 .9rem var(--font-sans); cursor: pointer; text-decoration: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rt-share-btn:hover { background: rgba(255,255,255,.22); }
.rt-share-btn i { font-size: 1.05rem; }
.is-plain .rt-share-btn { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.is-plain .rt-share-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 480px) { .rt-share-btn span { display: none; } .rt-share-btn { width: 44px; justify-content: center; padding: 0; } }

/* ---------- Основная колонка ---------- */
.rt-main { max-width: 900px; padding-top: 28px; }
.rt-intro { font-size: clamp(1.06rem, 2.4vw, 1.22rem); line-height: 1.65; color: var(--text-soft); margin: 0 0 24px; }
.rt-builder-edit { margin: -10px 0 22px; }
.rt-builder-edit a { color: var(--brand); font-weight: 600; text-decoration: none; }

.rt-facts { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rt-facts li { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.rt-facts span { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; }
.rt-facts b { font-size: 1.02rem; color: var(--text); font-weight: 700; }
.rt-facts em { font-style: normal; font-weight: 500; color: var(--text-muted); font-size: .88rem; }
@media (min-width: 720px) { .rt-facts { grid-template-columns: repeat(3, 1fr); } }
.rt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.rt-tags span { background: var(--gold-soft); color: var(--gold-strong); font-weight: 600; font-size: .82rem; padding: 5px 12px; border-radius: 999px; }

.rt-toc { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 8px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.rt-toc::-webkit-scrollbar { display: none; }
.rt-toc a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--text-soft); text-decoration: none; background: var(--surface); border: 1px solid var(--line); }
.rt-toc a:hover { color: var(--brand); border-color: var(--brand); }

.rt-block { padding: 34px 0 6px; scroll-margin-top: 64px; }
.rt-block > h2 { font-family: var(--font-serif); font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 600; margin: 0 0 20px; }
.rt-approx { font-size: .74rem; color: var(--text-muted); background: var(--surface-alt); padding: 2px 8px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.rt-note, .rt-approx-note { font-size: .86rem; color: var(--text-muted); line-height: 1.5; }
.rt-approx-note { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; }
.rt-approx-note i { margin-top: 3px; color: var(--info-text); }

/* ---------- Программа ---------- */
.rt-days { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.rt-day { position: relative; padding: 0 0 30px 26px; border-left: 2px solid var(--line-strong); margin-left: 8px; }
.rt-day:last-child { border-left-color: transparent; padding-bottom: 0; }
.rt-day::before { content: ""; position: absolute; left: -9px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--bg); }
.rt-day-num { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-strong); }
.rt-day-head h3 { font-family: var(--font-serif); font-size: clamp(1.2rem, 3.4vw, 1.45rem); font-weight: 600; margin: 4px 0 6px; line-height: 1.25; }
.rt-day-drive { font-size: .88rem; color: var(--text-muted); margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rt-day-drive i { color: var(--brand); }
.rt-day-text { color: var(--text-soft); line-height: 1.6; margin: 0 0 14px; }
.rt-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rt-stop { display: grid; grid-template-columns: 96px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; box-shadow: var(--shadow-card); }
.rt-stop-img { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(140deg, var(--ph-a), var(--ph-b)); align-self: start; }
.rt-stop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt-stop-body h4 { font-size: 1.04rem; font-weight: 700; margin: 0 0 4px; line-height: 1.3; display: flex; gap: 8px; align-items: flex-start; }
.rt-stop-body h4 a { color: var(--text); text-decoration: none; }
.rt-stop-body h4 a:hover { color: var(--brand); text-decoration: underline; }
.rt-stop-body p { margin: 0 0 6px; font-size: .92rem; line-height: 1.55; color: var(--text-soft); }
.rt-stop-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem !important; color: var(--text-muted) !important; }
.rt-stop-meta i { margin-right: 4px; color: var(--brand); }
.rt-4x4 { background: var(--warn-bg); color: var(--warn-text); padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.rt-stop-more { font-size: .86rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.rt-pin { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: .78rem; font-weight: 700; margin-top: 1px; }
.rt-overnight { margin: 12px 0 0; font-size: .9rem; color: var(--text-soft); display: flex; gap: 8px; align-items: center; }
.rt-overnight i { color: var(--logo-blue); }
.rt-finish { margin: 12px 0 0; font-size: .9rem; color: var(--text-soft); display: flex; gap: 8px; align-items: center; }
.rt-finish i { color: var(--brand); }
@media (min-width: 640px) { .rt-stop { grid-template-columns: 168px 1fr; padding: 14px; gap: 18px; } }

/* ---------- Карта ---------- */
/* Схема (SVG с сервера) видна сразу; Leaflet рисуется поверх неё, когда блок подъезжает к экрану. */
.rt-mapwrap { position: relative; height: auto; aspect-ratio: 4 / 3; max-height: 70vh; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-alt); }
.rt-map-static, .rt-map { position: absolute; inset: 0; }
.rt-map-static svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rt-map { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.rt-mapwrap.is-ready .rt-map { opacity: 1; pointer-events: auto; }
.rt-map-load { position: absolute; right: 12px; bottom: 12px; z-index: 2; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface); color: var(--text); font: 600 .9rem var(--font-sans); box-shadow: var(--shadow-card); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.rt-mapwrap.is-loading .rt-map-load { opacity: .6; pointer-events: none; }
.rt-mapwrap.is-ready .rt-map-load { display: none; }
.rt-schema-bg { fill: #E8EEF2; }
.rt-schema-land { fill: #F4F1E8; stroke: #B9AE96; stroke-width: 1.5; stroke-linejoin: round; }
.rt-schema-lake { fill: #A9CFEA; stroke: #7DB3DA; stroke-width: 1; }
.rt-schema-line { fill: none; stroke: #10724A; stroke-width: 3; stroke-dasharray: 7 7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.rt-schema-pt circle { fill: #10724A; stroke: #fff; stroke-width: 3; }
.rt-schema-pt text { fill: #fff; font: 700 14px var(--font-sans, sans-serif); text-anchor: middle; }
.rt-schema-city circle { fill: #8A8F86; }
.rt-schema-city text { fill: #6B7268; font: 600 12px var(--font-sans, sans-serif); }
:root[data-theme="dark"] .rt-schema-city circle { fill: #7E9A8C; }
:root[data-theme="dark"] .rt-schema-city text { fill: #9DB5A8; }
.rt-schema-start rect { fill: #B5501C; stroke: #fff; stroke-width: 2.5; }
.rt-schema-start text { fill: #12241B; font: 700 15px var(--font-sans, sans-serif); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
:root[data-theme="dark"] .rt-schema-bg { fill: #0E1F18; }
:root[data-theme="dark"] .rt-schema-land { fill: #183126; stroke: #3B5E4D; }
:root[data-theme="dark"] .rt-schema-lake { fill: #1E4A66; stroke: #2E6A90; }
:root[data-theme="dark"] .rt-schema-line { stroke: #4CC38A; }
:root[data-theme="dark"] .rt-schema-pt circle { fill: #2E9E68; stroke: #0E1F18; }
:root[data-theme="dark"] .rt-schema-start text { fill: #EEF5F0; stroke: #0E1F18; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rt-schema-bg { fill: #0E1F18; }
  :root:not([data-theme="light"]) .rt-schema-land { fill: #183126; stroke: #3B5E4D; }
  :root:not([data-theme="light"]) .rt-schema-lake { fill: #1E4A66; stroke: #2E6A90; }
  :root:not([data-theme="light"]) .rt-schema-line { stroke: #4CC38A; }
  :root:not([data-theme="light"]) .rt-schema-pt circle { fill: #2E9E68; stroke: #0E1F18; }
  :root:not([data-theme="light"]) .rt-schema-start text { fill: #EEF5F0; stroke: #0E1F18; }
}
.rt-map-toggle { margin-top: 10px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 600 .88rem var(--font-sans); }
.rt-marker { background: none; border: 0; }
.rt-marker span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #10724A; color: #fff; font: 700 .82rem var(--font-sans); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.leaflet-popup-content { font-family: var(--font-sans); font-size: .9rem; line-height: 1.4; }
.leaflet-popup-content a { display: inline-block; margin-top: 4px; color: #10724A; font-weight: 600; }
@media (min-width: 720px) { .rt-mapwrap { aspect-ratio: auto; height: 460px; max-height: none; } }

/* ---------- Бюджет ---------- */
.rt-budget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-card); }
.rt-budget-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-alt); padding: 4px; border-radius: 999px; margin-bottom: 18px; }
.rt-budget-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--text-soft); font: 600 .9rem var(--font-sans); cursor: pointer; }
.rt-budget-tabs button[aria-selected="true"] { background: var(--brand); color: var(--on-brand); }
.rt-budget-total { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.rt-budget-total b { font-family: var(--font-serif); font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 600; color: var(--text); }
.rt-budget-total span { font-size: 1.1rem; color: var(--text-soft); font-weight: 600; }
.rt-budget-who { color: var(--text-muted); margin: 4px 0 14px; font-size: .92rem; }
/* Подробная смета: каждая категория — <details>, внутри строки расчёта */
.rt-costs { border-top: 1px solid var(--line); }
.rt-cost { border-bottom: 1px solid var(--line); }
.rt-cost > summary, .rt-cost.is-flat, .rt-cost.is-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.rt-cost > summary { cursor: pointer; list-style: none; border-radius: 6px; }
.rt-cost > summary::-webkit-details-marker { display: none; }
.rt-cost > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rt-cost-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-weight: 600; color: var(--text); min-width: 0; }
.rt-cost-name i { width: 1.25em; text-align: center; color: var(--brand); }
.rt-cost > summary .rt-cost-name::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); margin-right: 2px; transition: transform .15s; order: -1; }
.rt-cost[open] > summary .rt-cost-name::before { transform: rotate(45deg); }
.rt-cost-sum { text-align: right; white-space: nowrap; flex: none; }
.rt-cost-sum b { display: block; color: var(--text); font-weight: 700; }
.rt-cost-sum small { display: block; font-size: .8rem; color: var(--text-muted); }
.rt-cost-body { padding: 0 0 12px 26px; }
.rt-cost-lines { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.rt-cost-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; color: var(--text-soft); border-top: 1px dashed var(--line); }
.rt-cost-lines li:first-child { border-top: 0; }
.rt-cost-lines li b { white-space: nowrap; color: var(--text); font-weight: 600; }
.rt-cost-lines li small { font-weight: 500; color: var(--text-muted); font-size: .78rem; }
.rt-cost-note, .rt-cost-split { margin: 6px 0 0; font-size: .82rem; color: var(--text-muted); line-height: 1.45; }
.rt-cost.is-total { border-bottom: 0; padding-bottom: 4px; }
.rt-cost.is-total .rt-cost-name { font-size: 1.02rem; }
.rt-cost.is-total .rt-cost-sum b { font-size: 1.15rem; }
.rt-cost.is-group { padding-top: 4px; }
.rt-cost.is-group .rt-cost-name, .rt-cost.is-group .rt-cost-sum b { font-weight: 600; font-size: .98rem; color: var(--text-soft); }
.rt-costs-hint { margin: 10px 0 0; font-size: .8rem; color: var(--text-muted); }
@media (max-width: 520px) {
  .rt-cost-body { padding-left: 0; }
  .rt-cost-lines li { flex-direction: column; gap: 2px; }
  .rt-cost-lines li b { align-self: flex-end; }
}
/* Тёмная тема: подложку OSM чуть приглушаем, чтобы не слепила */
:root[data-theme="dark"] .rt-map .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rt-map .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); } }
.rt-rate { font-size: .82rem; color: var(--text-muted); margin: 12px 0 0; }
.rt-rate a { color: var(--brand); }

/* ---------- Советы и FAQ ---------- */
.rt-info { display: grid; gap: 14px; }
@media (min-width: 720px) { .rt-info { grid-template-columns: 1fr 1fr; } }
.rt-info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 18px 8px; }
.rt-info-card h3 { font-size: 1.04rem; font-weight: 700; margin: 0 0 8px; }
.rt-info-card p, .rt-info-card li { color: var(--text-soft); line-height: 1.6; font-size: .94rem; }
.rt-info-card p { margin: 0 0 10px; }
.rt-list { margin: 0 0 10px; padding-left: 20px; }
.rt-list li { margin-bottom: 5px; }
.rt-faq details { border-bottom: 1px solid var(--line); }
.rt-faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; font-size: 1rem; list-style: none; position: relative; }
.rt-faq summary::-webkit-details-marker { display: none; }
.rt-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--brand); }
.rt-faq details[open] summary::after { content: "−"; }
.rt-faq details p { margin: 0 0 16px; color: var(--text-soft); line-height: 1.6; }

/* ---------- Консультация ---------- */
.rt-consult { margin: 44px auto 0; max-width: 900px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius-lg); padding: 26px 20px; scroll-margin-top: 64px; }
.rt-consult .eyebrow { color: var(--cta-on-deep); }
.rt-consult h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 5vw, 2.1rem); color: #fff; margin: 0 0 8px; font-weight: 600; }
.rt-consult p { color: var(--on-deep-muted); line-height: 1.55; margin: 0 0 18px; }
.rt-consult-actions { display: flex; flex-direction: column; gap: 10px; }
.rt-consult-btn { justify-content: center; min-height: 50px; }
.rt-consult-btn.is-wa { background: #25D366; border-color: #25D366; color: #04140C; }
.rt-consult-btn.is-tg { border-color: rgba(255,255,255,.5); color: #fff; }
.rt-consult-form { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; }
.rt-consult-form summary { cursor: pointer; font-weight: 600; color: #fff; padding: 6px 0; }
.rt-consult-form form { margin-top: 14px; background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 18px; }
.rt-consult-form .svc-form-note { color: var(--text-muted); }
@media (min-width: 760px) {
  .rt-consult { padding: 36px 40px; }
  .rt-consult-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; }
  .rt-consult p { margin: 0; }
}

/* ---------- Каталог ---------- */
.rt-index { padding-top: 26px; }
.rt-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.rt-filter-group { min-width: 0; }
.rt-filter-label { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 8px; }
.rt-filters .chip-row { margin-bottom: 0; }
.rt-filters .chip { cursor: pointer; position: relative; min-height: 40px; display: inline-flex; align-items: center; }
.rt-filters .chip input { position: absolute; opacity: 0; pointer-events: none; }
.rt-filters .chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.rt-filter-actions { display: flex; gap: 10px; }
.rt-count { color: var(--text-muted); font-size: .9rem; margin: 0 0 14px; }
.rt-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .rt-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .rt-grid { grid-template-columns: repeat(3, 1fr); } }
.rt-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease; }
.rt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.rt-card-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(140deg, var(--ph-a), var(--ph-b)); overflow: hidden; }
.rt-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.rt-card:hover .rt-card-media img { transform: scale(1.04); }
.rt-card-days { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.94); color: #12241B; font-weight: 700; font-size: .84rem; padding: 6px 12px; border-radius: 999px; }
.rt-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rt-card-body h3 { font-family: var(--font-serif); font-size: 1.22rem; font-weight: 600; line-height: 1.25; margin: 0; }
.rt-card-sub { margin: 0; color: var(--text-muted); font-size: .92rem; }
.rt-card-facts { list-style: none; padding: 0; margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--text-soft); }
.rt-card-facts i { color: var(--brand); margin-right: 5px; }
.rt-card-price { margin: auto 0 0; padding-top: 10px; font-weight: 700; color: var(--brand); font-size: 1.04rem; }
.rt-card-price span { display: block; font-weight: 500; font-size: .78rem; color: var(--text-muted); }
.rt-empty { text-align: center; padding: 30px 16px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line-strong); }
.rt-builder-teaser { margin-top: 40px; background: linear-gradient(135deg, var(--deep), var(--deep-2)); color: var(--on-deep); border-radius: var(--radius-lg); padding: 26px 22px; display: grid; gap: 16px; align-items: center; }
.rt-builder-teaser .eyebrow { color: var(--cta-on-deep); }
.rt-builder-teaser h2 { font-family: var(--font-serif); color: #fff; font-size: clamp(1.5rem, 4.6vw, 2rem); margin: 0 0 8px; font-weight: 600; }
.rt-builder-teaser p { margin: 0; color: var(--on-deep-muted); line-height: 1.55; }
.rt-builder-teaser .btn-kg-primary { justify-self: start; background: var(--cta-on-deep); border-color: var(--cta-on-deep); color: var(--on-cta-on-deep); }
@media (min-width: 760px) { .rt-builder-teaser { grid-template-columns: 1fr auto; padding: 34px 40px; } }
.rt-similar { max-width: 1200px; padding-bottom: 40px; }
.rt-similar-more { margin-top: 18px; }
.rt-similar-more a { color: var(--brand); font-weight: 600; }

/* ---------- Конструктор ---------- */
.rt-builder { display: grid; gap: 14px; padding-bottom: 40px; }
.rt-q { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px 16px 18px; margin: 0; min-width: 0; }
.rt-q legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-weight: 700; font-size: 1.06rem; display: flex; align-items: center; gap: 10px; }
.rt-q legend > span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: .86rem; flex: none; }
.rt-q legend small { font-weight: 500; color: var(--text-muted); font-size: .82rem; }
.rt-opts { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.rt-opts.is-days { display: grid; grid-template-columns: repeat(5, 1fr); }
.rt-opt { position: relative; }
.rt-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rt-opt span { display: grid; place-items: center; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--bg); font-weight: 600; cursor: pointer; transition: all .15s ease; user-select: none; }
.rt-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.rt-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rt-q-hint { clear: both; margin: 10px 0 0; font-size: .84rem; color: var(--text-muted); }
.rt-people { clear: both; display: flex; align-items: center; gap: 8px; }
.rt-people button { width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--bg); font-size: 1.3rem; color: var(--text); cursor: pointer; }
.rt-people input { width: 72px; height: 46px; text-align: center; font: 700 1.1rem var(--font-sans); border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); }
.rt-build-btn { min-height: 54px; font-size: 1.05rem; justify-content: center; width: 100%; }
@media (min-width: 640px) { .rt-opts.is-days { grid-template-columns: repeat(10, 1fr); } .rt-build-btn { width: auto; justify-self: start; padding: 0 32px; } }

/* ---------- Печать / PDF ---------- */
/* Кнопка «PDF» = печать браузера («Сохранить как PDF»). Без шапки, меню и кнопок сайта: свой логотип,
   программа, схема маршрута, бюджет (все уровни), советы, вопросы и контакты. */
.rt-print-head, .rt-print-contacts, .rt-print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  html, body { background: #fff !important; color: #111 !important; font-size: 10.5pt; }
  body > *:not(main), .site-head, .infobar, .mobile-tabbar, .site-footer, footer,
  .mobile-menu, #menu-toggle, .kg-consent, .contact-fab, .kg-fab, .rt-toc, .rt-share, .rt-hero-actions,
  .rt-consult, .rt-similar, .rt-builder-edit, .rt-budget-tabs, .rt-stop-more, .rt-map, .rt-map-load,
  .rt-map-toggle, .rt-note, .rt-crumbs, .rt-saved-note, .rt-hero-bg { display: none !important; }
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; }
  a { color: inherit !important; text-decoration: none !important; }
  .container { max-width: none !important; padding: 0 !important; margin: 0 !important; }

  .rt-print-head { display: flex !important; align-items: center; gap: 12px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #10724A; }
  .rt-print-head img { width: 46px; height: auto; }
  .rt-print-head b { display: block; font: 700 16pt var(--font-sans); color: #045D9A; }
  .rt-print-head span { font-size: 9pt; color: #555; }
  .rt-print-only { display: block !important; }

  .rt-hero, .rt-hero.is-plain { background: none !important; color: #111 !important; }
  .rt-hero::before { display: none !important; }
  .rt-hero-in, .rt-hero.is-plain .rt-hero-in { min-height: 0 !important; padding: 0 !important; display: block; }
  .rt-hero h1 { color: #111 !important; font-size: 22pt; margin: 0 0 4px; }
  .rt-hero-sub { color: #444 !important; font-size: 11pt; margin: 0 0 8px; }
  .rt-hero .eyebrow { color: #B5501C !important; }
  .rt-main { padding-top: 6px !important; max-width: none; }
  .rt-intro { font-size: 10.5pt; color: #333; margin-bottom: 10px; }

  .rt-facts { grid-template-columns: repeat(3, 1fr) !important; border-color: #ccc; background: #ccc; margin-bottom: 8px; }
  .rt-facts li { padding: 6px 9px; background: #fff !important; }
  .rt-facts span { font-size: 7pt; color: #666; }
  .rt-facts b { font-size: 10pt; color: #111; }
  .rt-tags span { background: #f3ece4 !important; color: #8a3d12 !important; font-size: 8pt; }

  .rt-block { padding: 14px 0 0 !important; }
  .rt-block > h2 { font-size: 15pt; margin: 0 0 8px; color: #10724A; break-after: avoid; }
  .rt-day { padding: 0 0 12px 18px; border-left-color: #bbb; }
  .rt-day::before { background: #10724A; width: 12px; height: 12px; left: -7px; box-shadow: none; }
  .rt-day-head h3 { font-size: 12.5pt; margin: 2px 0 3px; break-after: avoid; }
  .rt-day-drive, .rt-day-text, .rt-overnight, .rt-finish { font-size: 9pt; margin: 0 0 4px; color: #333; }
  .rt-approx { background: none !important; padding: 0; color: #777; }
  .rt-stops { gap: 5px; }
  .rt-stop { grid-template-columns: 64px 1fr !important; gap: 9px; padding: 6px; border-color: #ddd; break-inside: avoid; background: #fff !important; }
  .rt-stop-img { aspect-ratio: 4 / 3; }
  .rt-stop-body h4 { font-size: 10pt; margin-bottom: 2px; }
  .rt-stop-body p { font-size: 8.5pt; margin-bottom: 2px; color: #333 !important; }
  .rt-pin { width: 18px; height: 18px; font-size: 7.5pt; background: #10724A !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  #karta { break-inside: avoid; }
  .rt-mapwrap { height: auto !important; aspect-ratio: 16 / 9; max-height: 105mm; border-color: #ccc; }
  .rt-map-static { display: block !important; position: absolute; inset: 0; }
  .rt-schema, .rt-schema * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rt-schema-bg { fill: #E8EEF2 !important; } .rt-schema-land { fill: #F4F1E8 !important; stroke: #B9AE96 !important; }
  .rt-schema-lake { fill: #A9CFEA !important; } .rt-schema-line { stroke: #10724A !important; }
  .rt-schema-pt circle { fill: #10724A !important; stroke: #fff !important; } .rt-schema-start text { fill: #111 !important; stroke: #fff !important; }

  /* Смета целиком: все тарифы друг под другом, все категории раскрыты (routes.js открывает <details>) */
  .rt-budget { padding: 0; border: 0; background: none !important; }
  .rt-budget-panel, .rt-budget-panel[hidden] { display: block !important; border: 1px solid #ccc; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; break-inside: avoid; }
  .rt-budget-panel.is-default { border-color: #10724A; border-width: 2px; }
  .rt-budget-panel h3 { font-size: 11pt; margin: 0 0 2px; color: #10724A; }
  .rt-budget-total b { font-size: 15pt; color: #111; }
  .rt-budget-total span { font-size: 9pt; }
  .rt-budget-who { font-size: 8.5pt; margin: 0 0 4px; }
  .rt-costs { border-top-color: #ddd; }
  .rt-cost { border-bottom-color: #ddd; break-inside: avoid; }
  .rt-cost > summary, .rt-cost.is-flat, .rt-cost.is-total { padding: 4px 0 2px; }
  .rt-cost > summary .rt-cost-name::before { display: none; }
  .rt-cost-name { font-size: 9.5pt; color: #111; }
  .rt-cost-name i { color: #10724A; }
  .rt-cost-sum b { font-size: 9.5pt; color: #111; }
  .rt-cost-sum small { font-size: 7.5pt; }
  .rt-cost-body { padding: 0 0 4px 18px; display: block !important; }
  .rt-cost::details-content { content-visibility: visible; display: contents; }
  .rt-cost-lines { font-size: 8pt; }
  .rt-cost-lines li { padding: 1px 0; color: #333; border-top-color: #eee; flex-direction: row; }
  .rt-cost-lines li b { color: #111; }
  .rt-cost-note, .rt-cost-split { font-size: 7.5pt; margin-top: 1px; color: #555; }
  .rt-cost.is-total .rt-cost-name, .rt-cost.is-total .rt-cost-sum b { font-size: 10.5pt; }
  .rt-costs-hint, .rt-no-print { display: none !important; }
  .rt-approx-note, .rt-rate { font-size: 8pt; color: #555; margin: 0; }
  .rt-rate a { color: inherit !important; }

  .rt-info { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .rt-info-card { padding: 8px 10px 2px; border-color: #ddd; background: #fff !important; break-inside: avoid; }
  .rt-info-card h3 { font-size: 10.5pt; margin-bottom: 4px; }
  .rt-info-card p, .rt-info-card li { font-size: 8.5pt; line-height: 1.45; color: #222 !important; }
  .rt-faq details { border-bottom-color: #ddd; break-inside: avoid; }
  .rt-faq summary { padding: 6px 0 2px; font-size: 10pt; }
  .rt-faq summary::after { display: none; }
  .rt-faq details p { font-size: 9pt; margin: 0 0 6px; color: #333; }

  .rt-print-contacts { display: block !important; margin-top: 14px; padding: 10px 12px; border: 2px solid #10724A; border-radius: 8px; break-inside: avoid; }
  .rt-print-contacts h2 { font-size: 13pt; margin: 0 0 4px; color: #10724A; }
  .rt-print-contacts p { font-size: 9pt; margin: 0 0 6px; color: #333; }
  .rt-print-contacts ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 4px 18px; justify-content: start; }
  .rt-print-contacts li span { display: block; font-size: 7.5pt; color: #666; text-transform: uppercase; letter-spacing: .05em; }
  .rt-print-contacts li b { font-size: 10.5pt; word-break: break-all; }
  .rt-print-note { font-size: 7.5pt !important; color: #777 !important; }
}
