/* Upit za cenu (upit.html): „Vaš izbor“ + forma u 3 koraka + živi zbir. Tokeni boja, font, .top / .brand / .btn / .eyebrow / .sr / .skip su iz podovi.css;
   svetla i tamna tema prate sistem. Raspored: telefon jedna kolona (izbor, forma, zbir) + donja traka sa zbirom; od 1040 px dve kolone (izbor i zbir levo,
   lepljivo); od 1400 px tri kolone (izbor | forma | zbir). */
.pg-upit { --err: #c5221f; --err-bg: rgba(217, 48, 37, .07); --ok: #1e8e3e; --pool: #9fd3e6; --pool-ink: #0d4a5e; }
@media (prefers-color-scheme: dark) { .pg-upit { --err: #ff8a80; --err-bg: rgba(255, 138, 128, .1); --ok: #6dd58c; --pool: #2f6f86; --pool-ink: #d8f1fa; } }
.pg-upit input, .pg-upit select, .pg-upit textarea { font: inherit; color: inherit; }

/* ───────── zaglavlje ───────── */
.up-top .top__in { height: 68px; }
.up-path { display: flex; align-items: center; gap: 10px; margin: 0 auto 0 8px; padding: 0; list-style: none; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.up-path li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.up-path li + li::before { content: ''; width: 18px; height: 1.5px; border-radius: 2px; background: var(--line-2); }
.up-path a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; }
.up-path a:hover { color: var(--ink); }
.up-path__done a::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.up-path [aria-current] { color: var(--ink); }
.up-top__change { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px 0 11px; border: 1.5px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .2s, border-color .2s; }
.up-top__change:hover { background: var(--surface); border-color: var(--ink); }
.up-top__change .ico { width: 17px; height: 17px; }

/* ───────── uvod i raspored ───────── */
.up { padding-top: clamp(18px, 3vw, 36px); padding-bottom: clamp(48px, 7vw, 96px); }
.up-intro { max-width: 820px; margin-bottom: clamp(18px, 2.6vw, 30px); }
.up-h1 { margin-top: 14px; font-size: clamp(1.85rem, 4.2vw, 3.2rem); line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.up-lead { max-width: 42em; margin: 12px 0 0; font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.6; color: var(--muted); }
.up-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "izbor" "forma" "zbir"; gap: clamp(16px, 2vw, 24px); align-items: start; }
.up-side { display: contents; }
.up-izbor { grid-area: izbor; }
.up-forma { grid-area: forma; }
.up-zbir { grid-area: zbir; }
@media (min-width: 1040px) {
  .up-grid { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); grid-template-areas: "side forma"; }
  .up-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; grid-area: side; max-height: calc(100vh - 100px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; border-radius: 28px; }
}
@media (min-width: 1400px) {
  .up-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr) minmax(0, 390px); grid-template-areas: "izbor forma zbir"; }
  .up-side { display: contents; }
  .up-izbor, .up-zbir { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
.up-card { min-width: 0; padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-1); }
.up-card__h { margin: 0 0 12px; font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ───────── vaš izbor ───────── */
.up-shot { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 20px; background: var(--surface-2); }
.up-shot img, .up-shot canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.up-shot figcaption { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-shot figcaption small { font-size: 11px; font-weight: 600; color: var(--muted); }
.up-shot figcaption:empty { display: none; }
.up-dec { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.up-dec__sw { flex: none; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; background: var(--c, var(--surface-2)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.up-dec__sw img, .up-dec__sw canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.up-dec__t { min-width: 0; }
.up-dec__brand { display: flex; align-items: center; gap: 8px; height: 18px; margin-bottom: 6px; }
.up-dec__brand .lg { display: block; height: 100%; }
.up-dec__brand .lg img { display: block; width: auto; height: 100%; max-width: 160px; }
.up-dec__brand--duo .lg--main { height: 13px; }
.up-dec__brand--duo .lg--sub { height: 16px; }
.up-dec__brand .lg-sep { display: block; width: 1px; height: 14px; background: var(--line-2); }
.up-dec__name { font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
.up-dec__sub { margin: 3px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.up-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 16px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.up-specs div { padding: 9px 12px; background: var(--surface); min-width: 0; }
.up-specs dt { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.up-specs dd { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.up-specs div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.up-lay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 0; font-size: 13px; font-weight: 700; }
.up-lay span { padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.up-ghost { display: inline-flex; align-items: center; gap: 8px; height: 42px; margin-top: 14px; padding: 0 16px 0 12px; border: 1.5px solid var(--line-2); border-radius: 14px; font-size: 13px; font-weight: 700; text-decoration: none; transition: background-color .2s, border-color .2s; }
.up-ghost:hover { border-color: var(--ink); background: var(--surface-2); }
.up-ghost .ico { width: 17px; height: 17px; }

/* ───────── koraci ───────── */
.up-forma { outline: none; padding: clamp(16px, 2.6vw, 32px); container: forma / inline-size; }   /* sadržaj se ravna po širini forme, ne ekrana (v. @container forma) */
.up-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.up-steps__b { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 4px 12px; border: 0; border-bottom: 3px solid var(--line); background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 700; text-align: left; transition: color .2s, border-color .3s; }
.up-steps__b:hover { color: var(--ink); }
.up-steps__n { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 13px; font-weight: 800; transition: background-color .3s, color .3s; }
.up-steps__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-steps__b[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.up-steps__b[aria-current] .up-steps__n { background: var(--ink); color: var(--bg); box-shadow: none; }
.up-steps__b.is-done { color: var(--ink); border-bottom-color: var(--ink); }
.up-steps__b.is-done .up-steps__n { background: var(--accent); color: transparent; box-shadow: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); background-position: center; background-size: 16px; background-repeat: no-repeat; }
.up-step { animation: up-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes up-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.up-step__k { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.up-step__h { margin-top: 6px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.1; letter-spacing: -.035em; outline: none; }
.up-step__p { margin: 6px 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* ───────── polja ───────── */
.up-field { min-width: 0; }
.up-field > label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 700; }
.up-input { position: relative; }
.up-input input, .up-field textarea { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); font-size: 16px; font-weight: 600; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.up-input.has-unit input { padding-right: 44px; }
.up-unit { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--muted); pointer-events: none; }
.up-field textarea { height: auto; min-height: 112px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.up-input input::placeholder, .up-field textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); font-weight: 500; }
.up-input input:hover, .up-field textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.up-input input:focus, .up-field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.pg-upit [aria-invalid="true"] { border-color: var(--err) !important; background: var(--err-bg); }
.up-err { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; line-height: 1.4; color: var(--err); }
.up-hint { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.up-hint b { color: var(--ink); }
.up-opt { font-weight: 600; color: var(--muted); }
.up-req { color: var(--accent-ink); }
.up-count { margin: 4px 0 0; font-size: 11.5px; font-weight: 600; text-align: right; color: var(--muted); }
.up-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; border: 0; background: none; color: var(--accent-ink); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.up-link small { margin-left: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.up-link .ico { width: 16px; height: 16px; }
.up-link--add { margin-top: 12px; padding: 9px 13px; border-radius: 12px; background: var(--accent-soft); text-decoration: none; }
.up-link--add:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* ───────── korak 1: prostorije / površine ───────── */
.up-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }   /* kolona ne sme da raste preko kartice forme */
.up-item { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); transition: border-color .25s, box-shadow .25s; }
.up-item:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 4px var(--accent-soft); }
.up-item__head { display: flex; align-items: center; gap: 10px; }
.up-item__ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--ink); color: var(--bg); }
.up-item__name { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 1.5px solid transparent; border-radius: 12px; background: transparent; font-size: 16px; font-weight: 800; letter-spacing: -.01em; text-overflow: ellipsis; transition: border-color .2s, background-color .2s; }
.up-item__name:hover { border-color: var(--line-2); }
.up-item__name:focus { border-color: var(--ink); background: var(--surface); outline: none; }
.up-select { flex: none; height: 40px; padding: 0 34px 0 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; font-size: 13px; font-weight: 700; -webkit-appearance: none; appearance: none; cursor: pointer; }
.up-select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.up-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--muted); transition: background-color .2s, color .2s; }
.up-icon:hover { background: var(--err-bg); color: var(--err); }
.up-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; max-width: 100%; margin: 12px 0 0; padding: 4px; border-radius: 15px; background: var(--bg-2); }
.up-seg__o { position: relative; min-width: 0; }
.up-seg__o input, .up-chip input, .up-rc input, .up-switch input, .up-check input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.up-seg__o span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 4px 14px; border-radius: 11px; font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.up-seg__o span .ico { width: 17px; height: 17px; }
.up-seg__o span:hover { color: var(--ink); }
.up-seg__o input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.up-seg__o input:focus-visible + span, .up-chip input:focus-visible + span, .up-rc input:focus-visible + .up-rc__b, .up-switch input:focus-visible + .up-switch__ui, .up-check input:focus-visible + .up-check__box { outline: 3px solid var(--accent); outline-offset: 2px; }
.up-item__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 16px; align-items: start; margin-top: 14px; }
.up-item__body--m2 { grid-template-columns: minmax(0, 360px); }
.up-dims { display: flex; align-items: flex-start; gap: 10px; }
.up-dims .up-field { flex: 1; }
.up-dims__x { flex: none; padding-top: 37px; font-size: 16px; font-weight: 700; color: var(--muted); }
.up-sub { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.up-sub ~ .up-sub { margin-top: 14px; }
.up-part { margin-top: 14px; padding: 12px; border: 1.5px dashed var(--line-2); border-radius: 16px; }
.up-part__h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12.5px; font-weight: 800; }
.up-part__h .ico { width: 17px; height: 17px; color: var(--accent-ink); }
.up-plan { display: grid; place-items: center; aspect-ratio: 260 / 176; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background-color: var(--surface);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 16px 16px; }
.up-plan .pl { display: block; width: 100%; height: 100%; }
.up-plan__empty { width: 52%; height: 48%; border: 2px dashed var(--line-2); border-radius: 6px; }
.pl-room { fill: color-mix(in srgb, var(--accent) 13%, var(--surface)); stroke: var(--plan-wall); stroke-width: 2.4; stroke-linejoin: round; }
.pl-part { fill: color-mix(in srgb, var(--accent) 24%, var(--surface)); }
.pl-pool { fill: var(--pool); stroke: var(--plan-wall); stroke-width: 1.4; }
.pl-dim { font: 800 10.5px var(--font); fill: var(--plan-dim); text-anchor: middle; dominant-baseline: middle; }
.pl-dim--pool { fill: var(--pool-ink); }
.up-plan.is-on .pl { animation: up-in .3s ease; }
.up-item__area { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.up-item__area b { font-size: 19px; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.up-item__area small { margin-left: auto; font-size: 12px; font-weight: 700; }
.up-add { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; margin-top: 14px; border: 2px dashed var(--line-2); border-radius: 18px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 800; transition: border-color .2s, background-color .2s; }
.up-add:hover { border-color: var(--accent); background: var(--accent-soft); }
.up-add[disabled] { opacity: .5; cursor: not-allowed; }

/* ───────── korak 2: materijal ───────── */
.up-mat { padding: 18px 0; border-top: 1px solid var(--line); }
.up-step__head + .up-mat { padding-top: 4px; border-top: 0; }
.up-mat__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 10px; }
.up-mat__head h4 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.up-mat__head h4 .ico { width: 19px; height: 19px; color: var(--accent-ink); }
.up-mat__meta { padding: 5px 11px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); }
.up-range__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.up-range__top label { font-size: 13px; font-weight: 700; }
.up-range output { font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.up-range input[type="range"] { --p: 15%; width: 100%; height: 30px; margin: 4px 0 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.up-range input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line-2) var(--p)); }
.up-range input[type="range"]::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line-2) var(--p)); }
.up-range input[type="range"]::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -8px; border: 3px solid var(--surface); border-radius: 50%; background: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); -webkit-appearance: none; appearance: none; }
.up-range input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 3px solid var(--surface); border-radius: 50%; background: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.up-range input[type="range"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.up-range__scale { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); }
.up-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.up-switch__ui { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); transition: background-color .25s; }
.up-switch__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.up-switch input:checked + .up-switch__ui { background: var(--accent); }
.up-switch input:checked + .up-switch__ui::after { transform: translateX(18px); }
.up-prod { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.up-prod b { font-size: 14px; }
.up-prod span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.up-prod small { margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.up-walls { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.up-wall { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto minmax(0, .8fr); grid-template-areas: "n p num len" "err err err err"; align-items: center; gap: 4px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.up-wall.is-off { grid-template-columns: 1fr auto; grid-template-areas: "n p"; opacity: .7; }
.up-wall__n { grid-area: n; min-width: 0; font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.up-wall__n small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.up-wall__p, .up-wall .up-field { grid-area: p; }
.up-wall__p { font-size: 13px; font-weight: 600; color: var(--muted); }
.up-wall__p b { color: var(--ink); }
.up-wall .up-field > label { margin-bottom: 4px; font-size: 11.5px; color: var(--muted); }
.up-wall .up-input input { height: 40px; border-radius: 12px; }
.up-wall .up-num { grid-area: num; }
.up-wall__len { grid-area: len; font-size: 13px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.up-wall__err { grid-area: err; margin: 2px 0 0; }
.up-num > label { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.up-num__c { display: inline-flex; align-items: center; overflow: hidden; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.up-num__c:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.up-num__b { width: 38px; height: 40px; padding: 0; border: 0; background: transparent; font-size: 19px; font-weight: 700; line-height: 1; color: var(--ink); transition: background-color .2s; }
.up-num__b:hover { background: var(--surface-2); }
.up-num__c input { width: 44px; height: 40px; padding: 0; border: 0; background: transparent; font-size: 16px; font-weight: 800; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.up-num__c input:focus { outline: none; }
.up-num__c input::-webkit-inner-spin-button, .up-num__c input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.up-checks { display: grid; gap: 8px; margin-top: 12px; }
.up-check { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s; }
.up-check:hover { border-color: var(--line-2); }
.up-check:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.up-check__box { display: grid; place-items: center; flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid var(--line-2); border-radius: 7px; background: var(--surface); color: transparent; transition: background-color .2s, border-color .2s, color .2s; }
.up-check__box .ico { width: 14px; height: 14px; stroke-width: 3.2; }
.up-check input:checked + .up-check__box { border-color: var(--accent); background: var(--accent); color: #fff; }
.up-check__t b { display: block; font-size: 14px; line-height: 1.35; }
.up-check__t small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.45; color: var(--muted); }
.up-check--consent { margin-top: 16px; }
.up-mat--plain { padding-bottom: 0; }
.up-mat--plain .up-check { margin-top: 0; }
.up-rcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.up-rcs legend, .up-chips legend { margin: 0 0 8px; padding: 0; font-size: 12.5px; font-weight: 700; }
.up-rcs legend { grid-column: 1 / -1; }
.up-rc { display: block; min-width: 0; }
.up-rc__b { position: relative; display: grid; align-content: start; gap: 4px; height: 100%; padding: 14px 14px 14px 44px; border: 1.5px solid var(--line-2); border-radius: 18px; background: var(--surface); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.up-rc__b:hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.up-rc__dot { position: absolute; top: 15px; left: 14px; width: 20px; height: 20px; border: 2px solid var(--line-2); border-radius: 50%; background: var(--surface); transition: border-width .2s, border-color .2s; }
.up-rc input:checked + .up-rc__b { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.up-rc input:checked + .up-rc__b .up-rc__dot { border: 6px solid var(--accent); }
.up-rc__b b { font-size: 14px; }
.up-rc__b small { font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--muted); }
.up-chips { min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.up-chips__l { display: flex; flex-wrap: wrap; gap: 8px; }
.up-chip span { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.up-chip span:hover { border-color: var(--ink); }
.up-chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.up-note { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); font-size: 13px; line-height: 1.5; }
.up-note .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-ink); }
.up-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.up-row .up-link { margin-bottom: 8px; }
.up-field--sm { width: 190px; max-width: 100%; }

/* ───────── korak 3: kontakt ───────── */
.up-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.up-forma .up-chips { margin-top: 16px; }
.up-forma .up-field + .up-check, .up-cols + .up-chips + .up-field { margin-top: 16px; }
.up-review { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--muted); }
.up-review__k { width: 100%; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.up-review b { font-size: 14px; color: var(--ink); }
.up-review .up-link { padding: 0; }

/* ───────── navigacija, greške, slanje ───────── */
.up-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.up-next { margin-left: auto; }
.up-next[disabled] { opacity: .7; cursor: progress; transform: none; }
.up-next.is-send { background: var(--accent); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 35%, transparent); }
.up-next.is-send .btn__go { background: rgba(255, 255, 255, .22); }
.up-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .2s, border-color .2s; }
.up-btn:hover { border-color: var(--ink); }
.up-btn .ico { width: 18px; height: 18px; }
.up-btn--dark { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.up-btn--dark:hover { background: color-mix(in srgb, var(--ink) 88%, var(--accent)); }
.up-btn--text { border-color: transparent; background: transparent; padding: 0 10px; }
.up-btn--text:hover { border-color: transparent; background: var(--surface-2); }
.up-errsum { margin: 18px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--err-bg); color: var(--err); font-size: 13.5px; font-weight: 700; }
.up-fail { margin-top: 18px; padding: 16px; border: 1.5px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 18px; background: var(--accent-soft); outline: none; }
.up-fail__t { margin: 0; font-size: 15px; font-weight: 800; }
.up-fail__p { margin: 6px 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.up-fail__cta { display: flex; flex-wrap: wrap; gap: 8px; }
.up-fail__ok { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--ok); }
.up-fail__ok:empty { display: none; }
.up-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ───────── zbir ───────── */
.up-zbir { container-type: inline-size; }
.up-zbir__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.up-zbir__head .up-card__h { margin: 0; }
.up-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ok); }
.up-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: up-pulse 2.4s infinite; }
@keyframes up-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.up-tot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.up-tot__i { min-width: 0; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.up-tot dt { font-size: 11px; font-weight: 700; color: var(--muted); }
.up-tot dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.up-tot dd small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.up-tot__i--packs, .up-tot__i--boards { background: var(--ink); color: var(--bg); }
.up-tot__i--packs dt, .up-tot__i--boards dt, .up-tot__i--packs dd small, .up-tot__i--boards dd small { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.up-tab { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 13px; }
.up-tab th, .up-tab td { padding: 10px 6px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.up-tab th:first-child, .up-tab td:first-child { padding-left: 0; }
.up-tab thead th { padding-top: 0; border-top: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.up-tab tbody th { font-weight: 600; }
.up-tab__s { display: block; font-weight: 800; }
.up-tab__d { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.up-tab__n { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); }
.up-tab__q { white-space: nowrap; }
.up-tab__q b { font-size: 15px; font-variant-numeric: tabular-nums; }
.up-tab__p { font-size: 12px; font-weight: 600; color: var(--muted); }
@container (max-width: 430px) {
  .up-tab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .up-tab tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
  .up-tab th, .up-tab td { padding: 0; border: 0; }
  .up-tab tbody th { grid-column: 1; grid-row: 1 / span 2; }
  .up-tab__q { grid-column: 2; text-align: right; }
  .up-tab__p { grid-column: 2; text-align: right; }
}
.up-notes { margin: 12px 0 0; padding: 0 0 0 18px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.up-disc { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.up-empty { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 18px; border: 1.5px dashed var(--line-2); border-radius: 18px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.up-empty b { display: block; font-size: 15px; color: var(--ink); }
.up-empty__i { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); }

/* ───────── donja traka (telefon, tablet) ───────── */
.up-bar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 9px 9px 9px 18px; border-radius: 20px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); }
.up-bar__t { flex: 1; min-width: 0; }
.up-bar__t b, .up-bar__t span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.up-bar__t b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.up-bar__t span { font-size: 12px; font-weight: 600; opacity: .72; }
.up-bar__b { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 13px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; }
@media (max-width: 1039px) { .pg-upit { padding-bottom: 88px; } .pg-upit.is-done { padding-bottom: 0; } }
@media (min-width: 1040px) { .up-bar { display: none; } }
.is-done .up-bar { display: none; }

/* ───────── hvala ───────── */
.up-done { display: grid; place-items: center; padding: clamp(12px, 5vw, 64px) 0; outline: none; }
.up-done__card { width: min(660px, 100%); padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow-2); text-align: center; }
.up-done__ok { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 40%, transparent); animation: up-pop .55s cubic-bezier(.2, 1.4, .4, 1); }
.up-done__ok .ico { width: 36px; height: 36px; stroke-width: 2.6; }
@keyframes up-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.up-done__h { margin-top: 10px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.08; letter-spacing: -.04em; }
.up-done__id { margin: 14px 0 0; font-size: 15px; font-weight: 600; }
.up-done__id b { display: inline-block; padding: 3px 10px; border-radius: 10px; background: var(--surface-2); font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 16px; letter-spacing: .04em; }
.up-done__p { max-width: 34em; margin: 10px auto 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.up-done__sum { margin: 22px 0 0; border-top: 1px solid var(--line); text-align: left; }
.up-done__sum div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.up-done__sum dt { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.up-done__sum dd { margin: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.up-done__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ───────── uska forma (srednja kolona na širokom ekranu, tablet, telefon): po širini forme, ne ekrana ───────── */
@container forma (max-width: 560px) {
  .up-item__head { flex-wrap: wrap; }
  .up-item__head .up-select { order: 3; flex: 1 1 100%; }
  .up-item__body { grid-template-columns: minmax(0, 1fr); }
  .up-plan { max-height: 190px; width: 100%; }
  .up-seg { display: grid; width: 100%; }
  .up-seg__o span { padding: 4px 8px; }
  .up-wall { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n len" "p num" "err err"; }
  .up-cols { grid-template-columns: minmax(0, 1fr); }
}
/* široki ekran: tri kolone traže širu stranu, da forma u sredini ne bude stisnuta */
@media (min-width: 1400px) { .pg-upit .wrap { max-width: 1600px; } }

/* ───────── uži ekrani ───────── */
@media (max-width: 760px) {
  .up-path { display: none; }
  .up-top__change { margin-left: auto; }
  .up-card { border-radius: 24px; }
  .up-shot { aspect-ratio: 16 / 9; }
}
@media (max-width: 620px) {
  .up-item { padding: 12px; border-radius: 18px; }
  .up-item__head { flex-wrap: wrap; }
  .up-item__head .up-select { order: 3; flex: 1 1 100%; }
  .up-item__body { grid-template-columns: minmax(0, 1fr); }
  .up-plan { max-height: 190px; width: 100%; }
  .up-seg { display: grid; width: 100%; }
  .up-seg__o span { padding: 4px 6px; font-size: 12.5px; }
  .up-seg__o span .ico { display: none; }
  .up-wall { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n len" "p num" "err err"; }
  .up-cols { grid-template-columns: minmax(0, 1fr); }
  .up-steps__b { gap: 6px; font-size: 12.5px; }
  .up-steps__n { width: 26px; height: 26px; font-size: 12px; }
  .up-nav .btn { padding-left: 18px; gap: 12px; }
  .up-done__sum div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .up-specs div:nth-child(n+5) { display: none; }                      /* telefon: 4 ključne specifikacije, forma je bliže */
}
@media (max-width: 380px) {
  .up-top__change { padding: 0 10px; font-size: 12px; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .up-step, .up-plan.is-on .pl, .up-done__ok { animation: none; }
  .up-badge::before { animation: none; }
}
