/* ======================================================================
   StairCost Calculator V2 — Design System
   Motyw: Drewex.net.pl
   © 2026 Piotr Kozioł · Claude AI (Anthropic)
   ====================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens — paleta Drewex ──────────────────────────────────────────── */
/*
   Drewex używa:
   - Ciemny granat    #1a2e4a  → menu, nagłówki, przyciski CTA
   - Złoty dąb        #c8922a  → akcent drewna / wood
   - Kremowe tło      #f7f3ec  → tło strony
   - Ciepły beż       #ede7db  → głębsze tło, sekcje
   - Biel ciepła      #fdfaf5  → karty, panele
*/
:root {
	--bg:          #f7f3ec;
	--bg-deep:     #ede7db;
	--surface:     #fdfaf5;
	--surface-2:   #ffffff;
	--ink:         #131b27;
	--ink-2:       #3d4e63;
	--ink-3:       #7a8fa6;
	--line:        #ddd6c8;
	--line-strong: #bfb49e;
	--green:       #1a2e4a;
	--green-deep:  #0f1e33;
	--green-soft:  #e8edf3;
	--wood:        #c8922a;
	--wood-soft:   #faefd8;
	--warn-bg:     #fdf4dc;
	--warn-ink:    #7a5a0a;
	--radius:      6px;
	--radius-lg:   10px;
	--shadow-sm:   0 1px 0 rgba(19,27,39,.05);
	--shadow-md:   0 12px 32px -16px rgba(19,27,39,.2), 0 2px 4px -2px rgba(19,27,39,.07);
	--font-sans:   'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-display:'Instrument Serif', Georgia, serif;
	--font-mono:   'JetBrains Mono', ui-monospace, 'Menlo', monospace;
	--trans:       .15s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────── */
.scc-v2 *, .scc-v2 *::before, .scc-v2 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scc-v2 { font-family: var(--font-sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
.scc-v2 button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.scc-v2 input, .scc-v2 select, .scc-v2 textarea { font: inherit; color: inherit; }
.scc-v2 input[type="number"] { -moz-appearance: textfield; }
.scc-v2 input[type="number"]::-webkit-outer-spin-button,
.scc-v2 input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Layout ──────────────────────────────────────────────────────────── */
.scc-v2 .scc-layout {
	display: grid;
	grid-template-columns: minmax(0,1fr) 360px;
	gap: 28px;
	align-items: start;
	padding: 24px 0 100px;
}
.scc-v2 .scc-form-col  { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.scc-v2 .scc-aside-col { position: sticky; top: 16px; }

/* ── Section card ────────────────────────────────────────────────────── */
.scc-v2 .scc-section {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.scc-v2 .scc-section-head {
	padding: 16px 20px 12px;
	display: flex;
	align-items: baseline;
	gap: 12px;
	border-bottom: 1px solid var(--line);
	background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}
.scc-v2 .scc-section-num {
	font-family: var(--font-display);
	font-size: 20px;
	color: var(--green);
	line-height: 1;
	letter-spacing: .04em;
	flex-shrink: 0;
}
.scc-v2 .scc-section-titles { flex: 1; }
.scc-v2 .scc-section-title {
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.1;
}
.scc-v2 .scc-section-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.scc-v2 .scc-section-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

/* ── Field label ─────────────────────────────────────────────────────── */
.scc-v2 .scc-field-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-2);
	margin-bottom: 10px;
}

/* ── Input ───────────────────────────────────────────────────────────── */
.scc-v2 .scc-input {
	appearance: none;
	border: 1px solid var(--line-strong);
	background: var(--surface-2);
	padding: 9px 11px;
	border-radius: 6px;
	font-size: 14px;
	font-family: var(--font-mono);
	width: 100%;
	transition: border-color var(--trans), box-shadow var(--trans);
	color: var(--ink);
}
.scc-v2 .scc-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,93,58,.15); }

.scc-v2 .scc-select {
	appearance: none;
	border: 1px solid var(--line-strong);
	background: var(--surface-2);
	padding: 9px 32px 9px 11px;
	border-radius: 6px;
	font-size: 14px;
	width: 100%;
	cursor: pointer;
	transition: border-color var(--trans);
}
.scc-v2 .scc-select:focus { outline: none; border-color: var(--green); }

/* ── Input group ─────────────────────────────────────────────────────── */
.scc-v2 .scc-input-group { display: flex; flex-direction: column; gap: 4px; }
.scc-v2 .scc-input-group label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.scc-v2 .scc-input-hint { font-size: 11px; color: var(--ink-3); }

/* ── Grid rows ───────────────────────────────────────────────────────── */
.scc-v2 .scc-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.scc-v2 .scc-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Empty state ─────────────────────────────────────────────────────── */
.scc-v2 .scc-empty {
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	padding: 28px 20px;
	text-align: center;
	color: var(--ink-2);
	background: repeating-linear-gradient(135deg, transparent 0, transparent 14px, rgba(182,83,28,.04) 14px, rgba(182,83,28,.04) 15px);
}
.scc-v2 .scc-empty h4 { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--ink); margin-bottom: 4px; }
.scc-v2 .scc-empty p  { font-size: 13px; }

/* ── Step row ────────────────────────────────────────────────────────── */
.scc-v2 .scc-step-list { display: flex; flex-direction: column; gap: 8px; }
.scc-v2 .scc-step-row {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color var(--trans);
}
.scc-v2 .scc-step-row:hover { border-color: var(--line-strong); }
.scc-v2 .scc-step-row__head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
}
.scc-v2 .scc-step-badge {
	font-size: 11px; font-weight: 600; letter-spacing: .06em;
	text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.scc-v2 .scc-step-badge--straight { background: var(--wood-soft); color: var(--wood); border: 1px solid rgba(182,83,28,.2); }
.scc-v2 .scc-step-badge--winding  { background: var(--green-soft); color: var(--green); border: 1px solid rgba(47,93,58,.2); }
.scc-v2 .scc-step-badge--landing  { background: #ede7d8; color: #6b5a2c; border: 1px solid rgba(107,90,44,.2); }
.scc-v2 .scc-step-summary { font-size: 14px; }
.scc-v2 .scc-step-summary .muted { color: var(--ink-3); }
.scc-v2 .scc-step-actions { display: flex; gap: 4px; align-items: center; }
.scc-v2 .scc-step-row__body { border-top: 1px solid var(--line); padding: 12px; }
.scc-v2 .scc-step-row__body .scc-row-3 { margin-bottom: 10px; }

/* ── Icon button ─────────────────────────────────────────────────────── */
.scc-v2 .scc-icon-btn {
	width: 28px; height: 28px; border-radius: 6px;
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--ink-3); font-size: 13px;
	transition: background var(--trans), color var(--trans);
}
.scc-v2 .scc-icon-btn:hover { background: var(--bg-deep); color: var(--ink); }
.scc-v2 .scc-icon-btn--danger:hover { background: #fbe7e2; color: #a33a1a; }

/* ── Winding inline editor ───────────────────────────────────────────── */
.scc-v2 .scc-inline-editor {
	border: 1px solid var(--green); border-radius: var(--radius);
	background: var(--green-soft); padding: 16px;
	display: flex; flex-direction: column; gap: 14px;
	margin-top: 8px;
}
.scc-v2 .scc-inline-editor__head { display: flex; align-items: center; justify-content: space-between; }
.scc-v2 .scc-inline-editor__head h4 { font-family: var(--font-display); font-size: 19px; font-weight: 400; color: var(--green-deep); }
.scc-v2 .scc-inline-editor .scc-input-group label { color: var(--green-deep); }
.scc-v2 .scc-inline-editor__actions { display: flex; gap: 8px; justify-content: flex-end; }
.scc-v2 .scc-inline-editor__checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

/* ── Add buttons ─────────────────────────────────────────────────────── */
.scc-v2 .scc-add-row { display: flex; gap: 10px; flex-wrap: wrap; }
.scc-v2 .scc-add-btn {
	flex: 1 1 160px;
	display: flex; align-items: center; gap: 10px;
	padding: 11px 13px; border: 1px solid var(--line-strong);
	border-radius: var(--radius); background: var(--surface-2);
	font-weight: 500; font-size: 14px; text-align: left;
	transition: all var(--trans);
}
.scc-v2 .scc-add-btn:hover { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }
.scc-v2 .scc-add-btn__plus {
	display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
	background: var(--ink); color: var(--surface);
	align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
	transition: background var(--trans);
}
.scc-v2 .scc-add-btn:hover .scc-add-btn__plus { background: var(--green); }
.scc-v2 .scc-add-btn__label { line-height: 1.2; }
.scc-v2 .scc-add-btn__sub { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; margin-top: 1px; }
.scc-v2 .scc-add-btn:hover .scc-add-btn__sub { color: var(--green); }

/* ── Segmented control ───────────────────────────────────────────────── */
.scc-v2 .scc-segmented {
	display: inline-flex; background: var(--surface-2);
	border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; width: 100%;
}
.scc-v2 .scc-segmented button {
	flex: 1; padding: 8px 12px; border-radius: 6px; font-weight: 500; font-size: 13px;
	color: var(--ink-2); transition: all var(--trans); white-space: nowrap;
	display: inline-flex; align-items: center; justify-content: center; gap: 5px; line-height: 1.3;
}
.scc-v2 .scc-segmented button:hover { color: var(--ink); }
.scc-v2 .scc-segmented button.is-active { background: var(--ink); color: var(--surface); box-shadow: var(--shadow-sm); }
.scc-v2 .scc-segmented--green button.is-active { background: var(--green); }

/* ── Direction cards ─────────────────────────────────────────────────── */
.scc-v2 .scc-direction-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scc-v2 .scc-direction-card {
	border: 1px solid var(--line); background: var(--surface-2);
	border-radius: var(--radius); padding: 13px 15px;
	cursor: pointer; display: flex; align-items: center; gap: 13px;
	text-align: left; transition: all var(--trans); width: 100%;
}
.scc-v2 .scc-direction-card:hover { border-color: var(--line-strong); }
.scc-v2 .scc-direction-card.is-active { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,93,58,.12); }
.scc-v2 .scc-direction-arrow { font-size: 28px; line-height: 1; color: var(--ink); }
.scc-v2 .scc-direction-card.is-active .scc-direction-arrow { color: var(--green); }
.scc-v2 .scc-direction-card__title { font-size: 14px; font-weight: 600; }
.scc-v2 .scc-direction-card__sub   { font-size: 12px; color: var(--ink-3); }

/* ── Choice cards ────────────────────────────────────────────────────── */
.scc-v2 .scc-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; }
.scc-v2 .scc-choice {
	position: relative; border: 1px solid var(--line); background: var(--surface-2);
	border-radius: var(--radius); padding: 12px; cursor: pointer; transition: all var(--trans);
	display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left;
}
.scc-v2 .scc-choice:hover { border-color: var(--line-strong); }
.scc-v2 .scc-choice.is-active { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,93,58,.12); }
.scc-v2 .scc-choice.is-active::after {
	content: "✓"; position: absolute; top: 8px; right: 8px;
	width: 20px; height: 20px; background: var(--green); color: #fff;
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 11px; font-weight: 700;
}
.scc-v2 .scc-choice__swatch { height: 56px; border-radius: 5px; background: var(--bg-deep); overflow: hidden; position: relative; }
.scc-v2 .scc-choice__title { font-size: 14px; font-weight: 600; line-height: 1.25; }
.scc-v2 .scc-choice__sub   { font-size: 12px; color: var(--ink-3); line-height: 1.4; }

/* Wood swatches */
.scc-v2 .wood-swatch {
	position: absolute; top: 0; left: 0; right: 0; bottom: 0;
	background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0px, rgba(0,0,0,.06) 1px, transparent 1px, transparent 5px),
	                  repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 1px, transparent 1px, transparent 18px);
}
.scc-v2 .wood-dab    { background-color: #b88a4f; }
.scc-v2 .wood-jesion { background-color: #d9b685; }

/* ── Bal SVG choices ─────────────────────────────────────────────────── */
.scc-v2 .scc-bal-svg { width: 100%; height: 100%; }

/* ── Check rows ──────────────────────────────────────────────────────── */
.scc-v2 .scc-check-row {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; padding: 11px 13px; border: 1px solid var(--line);
	background: var(--surface-2); border-radius: var(--radius);
	cursor: pointer; transition: all var(--trans); width: 100%;
}
.scc-v2 .scc-check-row:hover { border-color: var(--line-strong); }
.scc-v2 .scc-check-row.is-active { border-color: var(--green); background: linear-gradient(0deg, rgba(47,93,58,.04), rgba(47,93,58,.04)), var(--surface-2); }
.scc-v2 .scc-check-box {
	width: 19px; height: 19px; border: 1.5px solid var(--line-strong); border-radius: 4px;
	flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
	font-size: 11px; color: transparent; background: var(--surface-2); transition: all var(--trans);
}
.scc-v2 .scc-check-row.is-active .scc-check-box { background: var(--green); border-color: var(--green); color: #fff; }
.scc-v2 .scc-check-row__main  { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.scc-v2 .scc-check-row__info  { display: flex; flex-direction: column; gap: 1px; }
.scc-v2 .scc-check-row__title { font-size: 14px; font-weight: 500; }
.scc-v2 .scc-check-row__sub   { font-size: 12px; color: var(--ink-3); }
.scc-v2 .scc-check-row__price { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.scc-v2 .scc-btn {
	display: inline-flex; align-items: center; justify-content: center;
	gap: 7px; padding: 10px 18px; border-radius: var(--radius);
	font-weight: 600; font-size: 14px; border: 1px solid transparent;
	transition: all var(--trans); cursor: pointer; line-height: 1.3;
}
.scc-v2 .scc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.scc-v2 .scc-btn--primary   { background: var(--green); color: #fff; border-color: var(--green); }
.scc-v2 .scc-btn--primary:hover:not([disabled]) { background: var(--green-deep); }
.scc-v2 .scc-btn--secondary { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.scc-v2 .scc-btn--secondary:hover { background: var(--bg-deep); border-color: var(--ink-3); }
.scc-v2 .scc-btn--ghost { color: var(--ink-2); }
.scc-v2 .scc-btn--ghost:hover { color: var(--ink); }
.scc-v2 .scc-btn--sm { padding: 6px 12px; font-size: 13px; font-weight: 500; }

/* ── Sticky summary ──────────────────────────────────────────────────── */
.scc-v2 .scc-summary { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.scc-v2 .scc-summary__head { padding: 16px 18px 14px; background: var(--ink); color: #f3ede0; }
.scc-v2 .scc-summary__label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(243,237,224,.55); margin-bottom: 6px; }
.scc-v2 .scc-summary__price { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.scc-v2 .scc-summary__price--empty { font-family: var(--font-display); font-size: 22px; font-style: italic; color: rgba(243,237,224,.45); letter-spacing: 0; }
.scc-v2 .scc-summary__price-sub { font-size: 12px; color: rgba(243,237,224,.5); margin-top: 5px; display: flex; justify-content: space-between; }
.scc-v2 .scc-summary__body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.scc-v2 .scc-summary__section h5 { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
.scc-v2 .scc-summary__list { display: flex; flex-direction: column; gap: 3px; }
.scc-v2 .scc-summary__line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.scc-v2 .scc-summary__line .desc { color: var(--ink); flex: 1; min-width: 0; }
.scc-v2 .scc-summary__line .meta { color: var(--ink-3); font-size: 12px; }
.scc-v2 .scc-summary__line .val  { font-family: var(--font-mono); color: var(--ink-2); white-space: nowrap; }
.scc-v2 .scc-summary__divider { height: 1px; background: var(--line); margin: 3px 0; }
.scc-v2 .scc-summary__totals { display: flex; flex-direction: column; gap: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
.scc-v2 .scc-summary__total-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.scc-v2 .scc-summary__total-line .val { font-family: var(--font-mono); }
.scc-v2 .scc-summary__total-line--big { font-family: var(--font-display); font-size: 21px; color: var(--ink); align-items: baseline; }
.scc-v2 .scc-summary__total-line--big .val { font-family: var(--font-mono); font-size: 21px; font-weight: 500; }
.scc-v2 .scc-summary__empty { padding: 22px 18px; text-align: center; color: var(--ink-3); font-size: 13px; }
.scc-v2 .scc-summary__cta { display: flex; flex-direction: column; gap: 7px; padding: 12px 18px 18px; }
.scc-v2 .scc-summary__trust { padding: 12px 18px; background: var(--bg-deep); border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 5px; }
.scc-v2 .scc-trust-row { display: flex; align-items: center; gap: 7px; }
.scc-v2 .scc-trust-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* ── Spinner ─────────────────────────────────────────────────────────── */
.scc-v2 .scc-spinner-wrap { display: flex; align-items: center; justify-content: center; padding: 24px; gap: 8px; color: var(--ink-3); font-size: 13px; }
.scc-v2 .scc-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--green); border-radius: 50%; animation: scc-spin .6s linear infinite; }
@keyframes scc-spin { to { transform: rotate(360deg); } }

/* ── Mobile bar ──────────────────────────────────────────────────────── */
.scc-v2 .scc-mobile-bar {
	display: none; position: fixed; left: 0; right: 0; bottom: 0;
	background: var(--ink); color: #f3ede0; padding: 10px 16px; z-index: 30;
	box-shadow: 0 -8px 24px -10px rgba(0,0,0,.3);
	align-items: center; justify-content: space-between; gap: 12px;
}
.scc-v2 .scc-mobile-bar__label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(243,237,224,.6); }
.scc-v2 .scc-mobile-bar__price { font-family: var(--font-mono); font-size: 20px; font-weight: 500; }

/* ── Diagram ─────────────────────────────────────────────────────────── */
.scc-v2 .scc-diagram-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.scc-v2 .scc-diagram-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.scc-v2 .scc-diagram-tab { flex: 1; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; transition: all var(--trans); }
.scc-v2 .scc-diagram-tab:hover { color: var(--ink); }
.scc-v2 .scc-diagram-tab.is-active { color: var(--green); border-bottom-color: var(--green); }
.scc-v2 .scc-diagram-content { padding: 14px; overflow-x: auto; min-height: 100px; }
.scc-v2 .scc-diagram-hint { text-align: center; color: var(--ink-3); font-size: 13px; padding: 20px; }

/* ── Notice / alerts ─────────────────────────────────────────────────── */
.scc-v2 .scc-notice { padding: 10px 13px; border-radius: 5px; font-size: 13px; }
.scc-v2 .scc-notice--warn    { border-left: 3px solid var(--wood); background: var(--warn-bg); color: var(--warn-ink); }
.scc-v2 .scc-notice--success { border-left: 3px solid var(--green); background: var(--green-soft); color: var(--green-deep); }
.scc-v2 .scc-notice--error   { border-left: 3px solid #c0392b; background: #fbe7e2; color: #7a1e1e; }
.scc-v2 .scc-hint { font-size: 12px; color: var(--ink-3); line-height: 1.5; }

/* ── Summary result tables ───────────────────────────────────────────── */
.scc-v2 .scc-qtable-wrap { display: flex; flex-direction: column; gap: 16px; }
.scc-v2 .scc-qtable-block { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.scc-v2 .scc-qtable-block h5 { padding: 10px 14px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--surface); }
.scc-v2 .scc-qline { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.scc-v2 .scc-qline:last-of-type { border-bottom: none; }
.scc-v2 .scc-qline__desc { flex: 1; color: var(--ink); }
.scc-v2 .scc-qline__meta { font-size: 12px; color: var(--ink-3); }
.scc-v2 .scc-qline__val { font-family: var(--font-mono); color: var(--ink-2); white-space: nowrap; font-size: 13px; }
.scc-v2 .scc-qline--subtotal { background: var(--green-soft); font-weight: 600; }
.scc-v2 .scc-qline--subtotal .scc-qline__val { color: var(--green-deep); }
.scc-v2 .scc-qline--total { background: var(--bg-deep); border-top: 2px solid var(--line-strong); }
.scc-v2 .scc-qline--total .scc-qline__desc { font-family: var(--font-display); font-size: 17px; }
.scc-v2 .scc-qline--total .scc-qline__val  { font-family: var(--font-mono); font-size: 17px; font-weight: 500; color: var(--ink); }

/* ── Extra elements ──────────────────────────────────────────────────── */
.scc-v2 .scc-extra-row { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.scc-v2 .scc-extra-row__head { display: flex; align-items: center; justify-content: space-between; }

/* ── Tooltip ─────────────────────────────────────────────────────────── */
.scc-v2 .scc-tooltip-wrap { position: relative; display: inline-flex; align-items: center; margin-left: 5px; vertical-align: middle; }
.scc-v2 .scc-tooltip-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 15px; height: 15px; border-radius: 50%;
	border: 1px solid var(--line-strong); background: transparent; color: var(--ink-3);
	font-size: 9px; font-weight: 700; cursor: pointer; padding: 0;
	transition: background var(--trans), color var(--trans);
}
.scc-v2 .scc-tooltip-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.scc-v2 .scc-tooltip-box {
	display: none; position: absolute; left: 50%; bottom: calc(100% + 7px);
	transform: translateX(-50%); background: var(--ink); color: #f3ede0;
	font-size: .76rem; line-height: 1.45; padding: .45rem .65rem; border-radius: 5px;
	width: 220px; max-width: min(220px,80vw); z-index: 1000; pointer-events: none;
	box-shadow: 0 4px 12px rgba(0,0,0,.2); white-space: normal;
}
.scc-v2 .scc-tooltip-box::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: var(--ink); }
.scc-v2 .scc-tooltip-wrap:hover .scc-tooltip-box,
.scc-v2 .scc-tooltip-btn:focus + .scc-tooltip-box,
.scc-v2 .scc-tooltip-box.is-visible { display: block; }

/* ── Material image ──────────────────────────────────────────────────── */
.scc-v2 .scc-material-preview { margin-top: 12px; }
.scc-v2 .scc-material-preview__inner { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 300px; }
.scc-v2 .scc-material-img { display: block; width: 100%; height: 130px; object-fit: cover; }
.scc-v2 .scc-material-img__caption { padding: .3rem .6rem; font-size: .72rem; color: var(--ink-3); font-style: italic; border-top: 1px solid var(--line); background: #fdf8f5; }

/* ── Textarea ────────────────────────────────────────────────────────── */
.scc-v2 .scc-textarea { width: 100%; min-height: 88px; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 6px; padding: 10px; resize: vertical; font-size: 14px; transition: border-color var(--trans), box-shadow var(--trans); }
.scc-v2 .scc-textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,93,58,.15); }

/* ── Bieg flight (balustrada auto) ───────────────────────────────────── */
.scc-v2 .scc-flight-row { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.scc-v2 .scc-flight-row__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 500; font-size: 14px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 960px) {
	.scc-v2 .scc-layout { grid-template-columns: 1fr; padding-bottom: 90px; }
	.scc-v2 .scc-aside-col { position: static; order: -1; }
	.scc-v2 .scc-summary { box-shadow: none; }
	.scc-v2 .scc-mobile-bar { display: flex; }
}
@media (max-width: 600px) {
	.scc-v2 .scc-row-3 { grid-template-columns: 1fr; }
	.scc-v2 .scc-row-2 { grid-template-columns: 1fr; }
	.scc-v2 .scc-direction-group { grid-template-columns: 1fr; }
	.scc-v2 .scc-inline-editor .scc-row-3 { grid-template-columns: 1fr; }
	.scc-v2 .scc-choice-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Services accordion ──────────────────────────────────────────────── */
.scc-v2 .scc-services-accordion {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface-2);
}
.scc-v2 .scc-services-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink-2);
	background: var(--surface-2);
	transition: background var(--trans);
	cursor: pointer;
}
.scc-v2 .scc-services-toggle:hover { background: var(--bg-deep); }
.scc-v2 .scc-accordion-arrow {
	font-size: 9px;
	color: var(--ink-3);
	margin-left: 6px;
}

/* ── Extra element add button ────────────────────────────────────────── */
.scc-v2 .scc-add-btn--extra {
	border-style: dashed;
	border-color: var(--line-strong);
	opacity: .85;
}
.scc-v2 .scc-add-btn--extra:hover {
	border-color: var(--wood);
	background: var(--wood-soft);
	color: var(--wood);
	opacity: 1;
}
.scc-v2 .scc-add-btn__plus--extra {
	background: var(--ink-3);
	font-size: 12px;
}
.scc-v2 .scc-add-btn--extra:hover .scc-add-btn__plus--extra {
	background: var(--wood);
}

/* ── Balustrade choice grid — swatch height ──────────────────────────── */
.scc-v2 .scc-section .scc-choice-grid .scc-choice__swatch {
	height: 52px;
}

/* ── Add button SVG icon ─────────────────────────────────────────────── */
.scc-v2 .scc-add-btn__icon {
	width:      32px;
	height:     32px;
	flex-shrink: 0;
	color:      var(--ink-2);
	transition: color var(--trans);
}
.scc-v2 .scc-add-btn:hover .scc-add-btn__icon { color: var(--green); }
.scc-v2 .scc-add-btn--extra:hover .scc-add-btn__icon { color: var(--wood); }

/* ── Segmented control — mobile wrap ─────────────────────────────────── */
@media (max-width: 600px) {
	.scc-v2 .scc-segmented {
		flex-wrap: wrap;
	}
	.scc-v2 .scc-segmented button {
		flex: 1 1 auto;
		min-width: 0;
		font-size: 12px;
		padding: 7px 8px;
		text-align: center;
	}
}

/* ── Isometric 3D preview ────────────────────────────────────────────── */
.scc-v2 .scc-iso-preview {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.scc-v2 .scc-iso-preview svg {
	display: block;
	width: 100%;
}

/* ── Services accordion — mobile fix ────────────────────────────────── */
@media (max-width: 600px) {
	.scc-services-accordion .scc-check-row__info {
		display: none;
	}
}
