/* Cenovnik: the price board (sticky photo + ledger) and the estimate (steppers + rolling total). */
.cn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- the board */
.cn-hero { padding-bottom: clamp(30px, 4vw, 60px); }
.cn-board { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(14px, 2vw, 28px); align-items: start; margin-top: clamp(30px, 4vw, 60px); }
.cn-frame { position: sticky; top: calc(var(--hdr) + 14px); height: min(calc(100svh - var(--hdr) - 40px), 820px); min-height: 460px; border-radius: var(--R); overflow: hidden; background: var(--stone); }
.cn-mask { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.mo .cn-mask { animation: kopen 1.5s var(--io) .2s both; }
.cn-pi { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.06); transition: opacity .7s ease, transform 1.4s var(--spring); }
.cn-pi.is-on { opacity: 1; transform: none; }
.cn-pi img { width: 100%; height: 100%; object-fit: cover; }

.cn-list { min-width: 0; }
.cn-tog { margin: 0 0 14px; }
.cn-pn { padding: clamp(14px, 1.8vw, 26px) clamp(14px, 2vw, 30px) clamp(16px, 2vw, 28px); }
.cn-gh { margin: clamp(10px, 1.2vw, 16px) 0 4px; padding: 0 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cn-gh:first-child { margin-top: 4px; }
.cn-rows { list-style: none; margin: 0 0 6px; padding: 0; }
.cn-rows li {
  position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 15px 14px;
  border-radius: 20px; transition: background-color .3s;
}
.cn-rows li + li::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: var(--line); transition: opacity .3s; }
.cn-rows li.is-on { background: var(--bg); }
.cn-rows li.is-on::before, .cn-rows li.is-on + li::before { opacity: 0; }
.cn-n { font-size: clamp(16.5px, 1.35vw, 20px); font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.cn-v { flex: none; font-size: clamp(17px, 1.6vw, 25px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cn-notes { display: grid; gap: 4px; list-style: none; margin: 10px 0 0; padding: 14px 14px 0; border-top: 1px solid var(--line); }
.cn-notes li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.cn-notes .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ink); }

.cn-pk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.cn-pkc { padding: clamp(18px, 2vw, 26px); border-radius: calc(var(--R) - 16px); background: var(--bg); transition: background-color .3s, box-shadow .3s; }
.cn-pkc--g { background: var(--stone); }
.cn-pkc.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.cn-pkn { font-weight: 800; font-size: clamp(32px, 3vw, 48px); letter-spacing: -.05em; line-height: 1; }
.cn-pkv { margin: 8px 0 14px; font-weight: 800; font-size: clamp(17px, 1.4vw, 21px); letter-spacing: -.02em; }
.cn-pkl { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 14.5px; line-height: 1.4; }
.cn-pkl li { display: flex; gap: 9px; }
.cn-pkl .ic { flex: none; width: 17px; height: 17px; margin-top: 1px; }

.cn-dep { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; padding: 0 6px; }
.cn-dep-l { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.cn-dep-l li { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 18px; border-radius: 999px; background: var(--white); font-weight: 700; font-size: 15px; }

@media (max-width: 899px) {
  .cn-board { grid-template-columns: minmax(0, 1fr); }
  .cn-frame { position: relative; top: auto; height: auto; min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .cn-frame { aspect-ratio: 4 / 3.2; }
  .cn-pn { padding: 10px 6px 16px; }
  .cn-rows li { padding: 14px 10px; gap: 12px; }
  .cn-rows li + li::before { left: 10px; right: 10px; }
  .cn-gh { padding: 0 10px; }
  .cn-notes { padding: 14px 10px 0; }
  .cn-v { font-size: 16px; }
  .cn-n { font-size: 15.5px; }
  .cn-pk { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- the estimate */
.cn-calc { padding: clamp(10px, 2vw, 30px) 12px; scroll-margin-top: var(--hdr); }
.cn-band { padding: clamp(30px, 5vw, 90px) 0; }
.cn-calc-in { width: min(100% - 2 * var(--g), 1392px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: clamp(14px, 2.4vw, 36px); align-items: start; }
.cn-calc-head { margin-bottom: clamp(22px, 3vw, 40px); padding: 0 4px; }
.cn-calc-head .lbl { margin-bottom: 12px; }
.cn-calc-head .sh-p { margin-top: 18px; }
.cn-qs { padding: clamp(10px, 1.4vw, 18px); border-radius: var(--R); background: var(--white); }
.cn-qh { margin: 18px 0 6px; padding: 0 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cn-qh:first-child { margin-top: 8px; }
.cn-ql { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.cq { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 10px 10px 14px; border-radius: 26px; transition: background-color .3s; }
.cq.is-on { background: var(--bg); }
.cq-t { display: grid; gap: 2px; min-width: 0; }
.cq-n { font-weight: 700; font-size: clamp(16px, 1.25vw, 18.5px); letter-spacing: -.015em; line-height: 1.25; }
.cq-v { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cq-s { display: flex; align-items: center; gap: 4px; flex: none; padding: 4px; border-radius: 999px; background: var(--bg); transition: background-color .3s; }
.cq.is-on .cq-s { background: var(--white); }
.cq-b { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: var(--white); cursor: pointer; box-shadow: 0 1px 2px rgba(16, 21, 24, .08); transition: transform .4s var(--bounce), background-color .25s; }
.cq.is-on .cq-b { background: var(--bg); }
.cq-b:hover { transform: scale(1.08); }
.cq-b:active { transform: scale(.94); }
.cq-b .ic { width: 18px; height: 18px; }
.cq-b--p { background: var(--ink) !important; color: var(--white); }
.cq-o {
  width: 3.1ch; height: 42px; padding: 0; border: 0; background: none; text-align: center; color: var(--ink);
  font: 800 18px/1 Manrope, system-ui, sans-serif; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.cq-o::-webkit-outer-spin-button, .cq-o::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cq-o:focus { outline: none; }
.cq-o:focus-visible { outline: 2.5px solid var(--aqua); outline-offset: 2px; border-radius: 10px; }
.cq-u { margin: 0 2px 0 -2px; font-size: 13px; font-weight: 700; color: var(--muted); }

.cn-tot { position: sticky; top: calc(var(--hdr) + 14px); display: grid; gap: 14px; padding: clamp(22px, 2.6vw, 36px); border-radius: var(--R); background: var(--white); box-shadow: 0 30px 60px -40px rgba(16, 21, 24, .35); }
.cn-sum { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 .26em; min-height: 1.1em; font-weight: 800; font-size: clamp(32px, 3.3vw, 54px); letter-spacing: -.045em; line-height: 1.04; font-variant-numeric: tabular-nums; }
.cn-sum-e { font-size: clamp(19px, 1.6vw, 24px); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; color: var(--muted); }
.cn-w { white-space: pre; height: 1.04em; }
.cn-num { display: inline-flex; height: 1.04em; overflow: hidden; }
.od { display: block; height: 1.04em; overflow: hidden; }
.od-s { display: block; transition: transform 1s var(--spring); will-change: transform; }
.od-s > span { display: block; height: 1.04em; text-align: center; }
.od-c { display: block; height: 1.04em; }
.cn-picked[hidden], .cn-open[hidden], .cn-reset[hidden], .cn-mini[hidden] { display: none; }
.cn-pl { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cn-pick { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.cn-pick li { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 13px; border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 600; }
.cn-pick b { font-weight: 800; }
.cn-open { font-size: 14px; line-height: 1.5; font-weight: 600; }
.cn-tnotes { display: grid; gap: 4px; list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); }
.cn-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cn-send[disabled] { opacity: .45; cursor: not-allowed; }
.cn-reset { justify-self: start; padding: 6px 2px; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.cn-mini { display: none; }

@media (max-width: 999px) {
  .cn-calc-in { grid-template-columns: minmax(0, 1fr); }
  .cn-tot { position: relative; top: auto; }
  .cn-mini {
    position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px;
    padding: 10px 10px 10px 20px; border: 0; border-radius: 999px; background: var(--white); color: var(--ink); cursor: pointer; text-align: left;
    box-shadow: 0 0 0 1px var(--line), 0 22px 44px -16px rgba(16, 21, 24, .45); transition: opacity .3s, transform .5s var(--spring);
  }
  .cn-mini.is-away { opacity: 0; transform: translateY(12px); pointer-events: none; }
  .cn-mini-l { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .cn-mini-v { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
  .cn-mini-go { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--aqua); color: var(--ink); }
}
@media (max-width: 560px) {
  .cn-calc { padding-inline: 8px; }
  .cn-qs { padding: 6px; border-radius: 26px; }
  .cq { padding: 9px 6px 9px 12px; gap: 8px; }
  .cq-t { flex: 1 1 auto; }
  .cq-n { font-size: 15.5px; }
  .cq-v { font-size: 13px; }
  .cq[data-unit] { flex-wrap: wrap; }
  .cq[data-unit] .cq-s { margin-left: auto; }
  .cq-b { width: 38px; height: 38px; }
  .cq-o { width: 2.6ch; height: 38px; font-size: 17px; }
  .cn-qh { padding: 0 12px; }
  .cn-tot { border-radius: 28px; }
}
