/* Допълнения към base.css */
.toast[hidden] { display: none; }
.top .wrap { gap: 16px; }
.nav { display: none; gap: 20px; font-weight: 650; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--amber); }
@media (min-width: 980px) { .nav { display: flex; } }
section[id], footer[id] { scroll-margin-top: 76px; }

.hint { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.err { color: #b3261e; font-size: 14px; font-weight: 600; margin: 0 0 10px; min-height: 0; }
.err:empty { display: none; }
form .f { margin-bottom: 12px; }
select { appearance: auto; }

/* смарт търсачка */
.smart { background: #fff8e6; border: 1.5px dashed var(--amber-d); border-radius: 14px; padding: 12px; margin-bottom: 16px; }
.smart-l { font-weight: 800; font-size: 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.pill { background: var(--ink); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.smart-row { display: flex; gap: 8px; }
.smart-row input { flex: 1; min-width: 0; font: inherit; padding: 12px; border: 1.5px solid #cfc7b4; border-radius: 10px; min-height: 48px; background: #fff; }
.mini { border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 700; padding: 0 16px; border-radius: 10px; cursor: pointer; min-height: 48px; transition: transform .12s ease; }
.mini:hover { transform: translateY(-1px); } .mini:active { transform: scale(.96); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.examples button { border: 1px solid #e0c98a; background: #fff; border-radius: 999px; font: inherit; font-size: 13px; padding: 5px 10px; cursor: pointer; color: var(--ink-2); }
.examples button:hover { background: #ffefc2; }
.recog { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.recog b { font-weight: 800; }
.recog span { display: inline-block; background: var(--mint); border-radius: 999px; padding: 2px 9px; margin: 2px 4px 2px 0; font-weight: 650; }
.recog.miss { color: #8a5a00; }

/* combobox */
.combo { position: relative; display: grid; gap: 6px; }
.combo > label { font-weight: 700; font-size: 14px; }
.combo-list { position: absolute; z-index: 15; left: 0; right: 0; top: 76px; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 0 18px 30px -16px rgba(14, 42, 38, .5); max-height: 280px; overflow: auto; }
.combo-list[hidden] { display: none; }
.combo-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.combo-list li small { color: var(--muted); }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--mint); }
.combo-list li.none { color: var(--muted); cursor: default; }
.combo-list li.none:hover { background: transparent; }
.combo.bad input { border-color: #b3261e; }

.more-opts { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; background: #fcfaf4; }
.more-opts summary { font-weight: 700; cursor: pointer; }
.more-opts summary small { font-weight: 500; color: var(--muted); }
.more-opts[open] summary { margin-bottom: 12px; }
.checks { display: grid; gap: 4px 12px; grid-template-columns: 1fr 1fr; margin: 2px 0 12px; }
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; min-height: 40px; cursor: pointer; }
.checks input, .chk input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.checks label[hidden] { display: none; }

/* резултат */
.res-head { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.meter { display: flex; gap: 10px; align-items: center; margin: 10px 0 4px; font-size: 13px; font-weight: 700; flex-wrap: wrap; }
.meter .bars { display: inline-flex; gap: 3px; } .meter .bars i { width: 22px; height: 8px; border-radius: 3px; background: #e3ddcf; display: block; }
.meter .bars i.on { background: var(--ink); }
.meter .lv-ниска { color: #8a5a00; }
.warns { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.warns li { background: #fff3d1; color: #6b4500; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; }
.warns:empty { display: none; }
.why { margin: 10px 0; }
.why summary { font-weight: 800; cursor: pointer; }
.why ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.why li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; background: #f7f3e8; border-radius: 9px; font-size: 14px; }
.why li small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.pct { font-weight: 800; white-space: nowrap; }
.pct.up { color: #1d6b3b; } .pct.down { color: #b3261e; }
.compare { background: var(--mint); border-radius: 14px; padding: 14px; margin: 12px 0; font-size: 14.5px; }
.compare b { font-weight: 800; }
.compare h3 { margin: 0 0 6px; font-size: 16px; }
.compare p { margin: 4px 0; }
.actions { display: grid; gap: 10px; margin-top: 12px; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); font-size: 15px; min-height: 48px; }
.btn.ghost:hover { background: rgba(14, 42, 38, .06); box-shadow: inset 0 0 0 2px var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }

/* цени по квартали */
.tools { display: grid; gap: 12px; margin-bottom: 14px; }
.tools input { font: inherit; padding: 13px 12px; border: 1.5px solid #cfc7b4; border-radius: 10px; min-height: 48px; width: 100%; max-width: 420px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
table.prices { width: 100%; border-collapse: collapse; font-size: 15px; }
table.prices th, table.prices td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.prices tr:last-child td { border-bottom: 0; }
table.prices th { background: #f4ecd9; font-size: 13px; padding: 0; }
table.prices th button { all: unset; box-sizing: border-box; width: 100%; padding: 12px 14px; cursor: pointer; font-weight: 800; }
table.prices th.num button { text-align: right; }
table.prices th button.on::after { content: " ↓"; } table.prices th button.on.asc::after { content: " ↑"; }
table.prices th button:focus-visible { outline: 3px solid var(--amber); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
table.prices tbody tr:hover { background: #fbf6ec; }
table.prices .go { border: 0; background: var(--ink); color: #fff; border-radius: 999px; font: inherit; font-weight: 700; font-size: 13px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
@media (max-width: 640px) { .hide-s { display: none; } table.prices th, table.prices td { padding: 10px 8px; font-size: 14px; } table.prices th button { padding: 10px 8px; } }

.cond { font-size: 14px; color: #cfe3dc; margin: 0 0 16px; max-width: 52ch; }
.cond b { color: #fff; }
button.card { font: inherit; text-align: left; color: inherit; width: 100%; cursor: pointer; display: block; }
.more-l { display: block; margin-top: 10px; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.card .soon + .more-l { margin-top: 6px; }
.faq a { text-decoration: underline; }

footer .foot { grid-template-columns: 1fr; gap: 20px; }
footer a { color: #fff; }
footer .small { font-size: 12.5px; opacity: .8; }
@media (min-width: 860px) { footer .foot { grid-template-columns: 1.2fr 1.2fr 1fr; } }

/* диалог */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--ink); color: #fff; box-shadow: 0 40px 80px -20px #000; }
dialog::backdrop { background: rgba(6, 21, 19, .6); backdrop-filter: blur(3px); }
dialog form { padding: 24px 20px 20px; position: relative; }
dialog h3 { margin: 0 0 4px; font-size: 22px; padding-right: 36px; }
.dsub { margin: 0 0 12px; color: #cfe3dc; font-size: 14.5px; }
.ctx { background: rgba(255, 255, 255, .1); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; margin: 0 0 12px; color: #fff; }
.x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.x:hover { background: rgba(255, 255, 255, .22); }
dialog .chip { background: transparent; color: #fff; border-color: #4a6b64; }
dialog .chip[aria-pressed="true"] { background: var(--amber); color: var(--ink); border-color: var(--amber); }
dialog .f { color: #fff; }
dialog .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #cfe3dc; margin: 4px 0 12px; }
dialog .consent a { color: #fff; }
dialog .chk input { accent-color: var(--amber); }
dialog .err { color: #ffc9c4; }
dialog .thanks { display: none; text-align: center; padding: 24px 0 6px; }
dialog .thanks.show { display: block; }
dialog .thanks b { font-size: 22px; display: block; margin-bottom: 8px; }
dialog .thanks span { color: #cfe3dc; display: block; }

input[type="text"], input[type="search"] { font: inherit; font-weight: 500; padding: 13px 12px; border: 1.5px solid #cfc7b4; border-radius: 10px; background: #fff; width: 100%; min-height: 48px; }
.smart-row input[type="search"] { width: auto; }
input:focus { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (min-width: 860px) { .hero-grid > div:first-child { position: sticky; top: 96px; } }

/* мобилно: без хоризонтален скрол */
html, body { overflow-x: hidden; }
.hero-grid, .offer .wrap, .steps, .cards, .tools { grid-template-columns: minmax(0, 1fr); }
.hero-grid > *, .calc, .calc > * { min-width: 0; }
.row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.checks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.table-wrap { overflow-x: auto; }
select, input { min-width: 0; max-width: 100%; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .steps, .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .offer .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

/* калкулаторът в средата */
.hero-grid, .hero-grid > div:first-child { position: static; }
.hero-grid { grid-template-columns: minmax(0, 1fr) !important; justify-items: center; text-align: center; gap: 24px; }
.hero-grid > div:first-child { max-width: 640px; }
.hero .lead { margin-inline: auto; }
.perks { justify-items: center; }
.perks li { text-align: left; }
.hero .calc { width: min(560px, 100%); text-align: left; }

/* калкулатор + резултат един до друг */
.stage { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 24px; width: 100%; }
.stage .calc { flex: 0 1 548px; width: auto; min-width: 0; }
.stage .res-card.result { display: none; margin: 0; border-top: 1px solid var(--line); padding: 20px; }
.stage .res-card.result.show { display: block; animation: slideIn .45s ease-out; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@media (max-width: 1099px) { .stage .calc { flex-basis: 560px; } }
@media (min-width: 1100px) { .stage .res-card.result.show { flex: 0 1 548px; } }

/* карта */
.mapbox { margin: 0 0 14px; }
.mapbox svg { width: 100%; height: auto; border-radius: 14px; display: block; }
.mt { font: 800 9px system-ui, sans-serif; fill: #7fa28d; letter-spacing: .18em; }
.mt.c { fill: #a99f83; text-anchor: middle; font-size: 8px; }
.dot { cursor: pointer; outline: none; }
.dot .d { stroke: #fff; stroke-width: 1.5; transition: r .15s ease; }
.dot:hover .d, .dot:focus-visible .d { r: 8; }
.dot.sel .d { opacity: 0; }
.pin { pointer-events: none; }
.pin[hidden] { display: none; }
.pin .pn { fill: #f5b83d; stroke: #0e2a26; stroke-width: 2.2; animation: drop .55s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 0 0; }
.pin .pulse { fill: none; stroke: #e3a21f; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: ping 1.8s ease-out infinite; }
.pin .p2 { animation-delay: .9s; }
.pin .pl rect { fill: #0e2a26; }
.pin .pl text { fill: #fff; font: 700 11px system-ui, sans-serif; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(4.2); opacity: 0; } }
@keyframes drop { 0% { transform: translateY(-26px) scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
.legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 8px; font-weight: 600; flex-wrap: wrap; }
.legend i { width: 70px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(160, 205, 190), rgb(14, 42, 38)); display: inline-block; }
.legend em { margin-left: auto; font-style: normal; }

.mapbox svg { background: #f6efdd; }
.dot .d { stroke-width: 1.2; filter: drop-shadow(0 1px 1px rgba(14,42,38,.35)); }
.pin .pl text { font-size: 11px; }

.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.quick span { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.quick button { border: 1.5px solid #cfc7b4; background: #fff; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 650; padding: 6px 12px; min-height: 34px; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.quick button:hover { background: var(--mint); border-color: var(--ink); transform: translateY(-1px); }
.quick button:active { transform: scale(.96); }

/* мобилно: калкулаторът и бутонът „Покажи цената“ в първия екран */
@media (max-width: 640px) {
  .hero { padding: 14px 0 28px; }
  .hero-grid { gap: 12px; }
  .hero .lead, .perks, .calc > h2, .calc > .sub, #areaHint, #conHint { display: none; }
  h1 { font-size: 30px; margin: 0; }
  .calc, .stage .res-card.result { padding: 14px; border-radius: 16px; }
  .seg { margin-bottom: 10px; } .seg button { padding: 9px 6px; }
  form .f, .combo { margin-bottom: 8px; gap: 4px; }
  label.f, .combo > label, legend { font-size: 13px; }
  select, input[type="number"], input[type="text"], input[type="search"] { min-height: 44px; padding: 10px; }
  .quick { margin-top: 0; gap: 5px; }
  .quick span { display: none; }
  .quick button:nth-of-type(n+5) { display: none; }
  .quick button { min-height: 32px; padding: 5px 10px; font-size: 13px; }
  fieldset { margin-bottom: 8px; }
  .chips { gap: 6px; margin-bottom: 8px; }
  .chip { padding: 8px 9px; min-height: 40px; font-size: 13.5px; }
  .row2 { gap: 8px; }
  .btn { min-height: 50px; }
  .dock { transition: transform .2s ease; }
  .dock.away { transform: translateY(110%); }
}

.whenset { margin-bottom: 12px; }
.whenset legend { color: #fff; font-size: 14px; margin-bottom: 8px; }
.whenset .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.whenset .chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 9px 14px; border-radius: 12px; line-height: 1.2; }
.whenset .chip small { font-size: 12px; font-weight: 500; opacity: .8; }
.wnote { margin: 0; font-size: 12.5px; color: #cfe3dc; }

/* мобилно: бутоните запълват редовете (мрежа 2×2, без дупки) */
@media (max-width: 640px) {
  #rooms, #cond { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #rooms .chip, #cond .chip { width: 100%; justify-content: center; text-align: center; padding: 9px 8px; }
  .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick button { width: 100%; text-align: center; min-height: 38px; }
}
@media (max-width: 640px) {
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .quick button { padding: 4px 2px; min-height: 34px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #rooms, #cond { gap: 6px; margin-bottom: 8px; }
  #rooms .chip, #cond .chip { min-height: 36px; padding: 6px; font-size: 13.5px; }
}

.plan img { width: 100%; height: auto; border-radius: 12px; display: block; }

/* план: изображението запълва цялата карта, по-голямо и балансирано с текста */
.plan { padding: 0; overflow: hidden; background: #fef5ea; border-radius: 22px; }
.plan img { border-radius: 0; }
.plan figcaption { padding: 10px 18px 14px; margin: 0; }
@media (min-width: 860px) {
  .offer .wrap { grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); gap: 48px; }
}

.plan svg { padding: 22px 22px 0; width: 100%; height: auto; }
.plan figcaption { padding-top: 18px; }

.range { font-size: inherit; font-weight: inherit; letter-spacing: 0; }
.range .mid-l { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.range .mid { display: block; font-size: clamp(34px, 6vw, 46px); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.range .mid .pm { font-size: 16px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.range .rng { display: block; font-size: 16px; font-weight: 700; color: var(--ink-2); margin-top: 2px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.kv div { background: #f7f3e8; border-radius: 10px; padding: 9px 10px; }
.kv b { display: block; font-size: 15px; font-weight: 800; letter-spacing: 0; }
.kv span { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.25; margin-top: 2px; }
@media (max-width: 400px) { .kv { grid-template-columns: 1fr; } }
