.site-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 4vw; border-bottom: 1px solid #262626; }
.brand { font-family: var(--font-legquinne-vf); font-size: 36px; letter-spacing: .08em; text-decoration: none; }
.header-right, .site-switch { display: flex; align-items: center; gap: 20px; }
.site-switch { gap: 4px; }
.site-switch a, .nav-cta { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.nav-cta[aria-current] { text-decoration-thickness: 2px; }
main { padding: 0 4vw 100px; }
.intro { padding: 64px 0 48px; max-width: 780px; }
.intro p:last-child { max-width: 620px; margin-bottom: 0; }
.intro .back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 24px; text-underline-offset: 4px; }
.service-help { margin: 0 0 16px 30px; }
.estimate-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(450px, 1fr); gap: 40px; align-items: start; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 16px; }
.step { padding-bottom: 48px; margin-bottom: 40px; border-bottom: 1px solid #262626; }
.step > legend { font: 500 36px/1.15 var(--font-legquinne-vf); letter-spacing: .022em; margin-bottom: 28px; }
.step > legend span { margin-right: 12px; }
.thickness { margin-top: 28px; }
.segments { display: flex; gap: 12px; }
.segments label { position: relative; }
.segments input { position: absolute; left: 12px; top: 15px; margin: 0; }
.segments span { display: flex; align-items: center; min-height: 48px; padding: 8px 16px 8px 36px; border: 1px solid #262626; }
.segments input:checked + span { text-decoration: underline; text-underline-offset: 5px; }
input[type="radio"], input[type="checkbox"] { width: 18px; height: 18px; accent-color: #262626; flex-shrink: 0; }
.stone-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stone-option { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-content: start; gap: 8px 0; padding: 10px; border: 1px solid #262626; cursor: pointer; min-width: 0; }
.stone-option:has(input:checked) { outline: 2px solid #262626; outline-offset: -3px; }
.stone-option input { margin: 3px 0; }
.stone-sample { grid-column: 1 / -1; grid-row: 1; height: 96px; background: #aaa79e; }
.stone-sample img { width: 100%; height: 100%; object-fit: cover; }
.stone-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.stone-price { grid-column: 1 / -1; font-size: 13px; font-weight: 600; }
.stone-group, .stone-description { grid-column: 1 / -1; font-size: 13px; }
.stone-group { font-weight: 600; }
.help { font-size: 13px; margin: 16px 0; }
.element-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; padding: 24px 0; border-top: 1px solid #262626; }
.element-row > .element-field { display: block; min-width: 0; padding: 0; }
.element-row > .element-field:first-child, .element-row > .element-field:nth-child(2) { grid-column: span 2; }
.element-row > .element-field:last-child { align-self: end; justify-self: end; }
.element-row > .element-field:nth-last-child(2) { grid-column: span 3; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; }
input:not([type="radio"]):not([type="checkbox"]), select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; background: transparent; border: 1px solid #262626; border-radius: 0; font-size: 16px; }
select { text-overflow: ellipsis; }
.area-field { font-size: 13px; }
.area-field output { display: block; padding-top: 8px; }
.remove-element, .stepper button { min-width: 44px; min-height: 44px; border: 1px solid #262626; background: transparent; border-radius: 0; }
.remove-element { padding: 8px 12px; }
button:disabled { cursor: default; opacity: .55; }
[aria-invalid="true"] { border-width: 2px !important; }
.field-error { font-size: 12px; font-weight: 500; }
.extras-group { margin-top: 32px; }
.extras-group > legend { font-family: var(--font-legquinne-vf); font-size: 28px; letter-spacing: .017em; }
.extra-row { display: grid; grid-template-columns: minmax(0, 1fr) 144px; gap: 8px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid #262626; }
.extra-row > .field-error { grid-column: 1 / -1; }
.stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; }
.stepper input { text-align: center; padding: 4px !important; appearance: textfield; border-right: 0 !important; border-left: 0 !important; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; cursor: pointer; }
.toggle input { margin: 0; }
.extras-group + .toggle, .customer { margin-top: 28px; }
.estimate-card { position: sticky; top: 24px; min-width: 0; padding: 24px; border: 1px solid #262626; scroll-margin-top: 24px; }
.estimate-card h2 { font-size: 36px; }
#stone-summary { font-size: 13px; }
.estimate-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums lining-nums; }
.estimate-table th, .estimate-table td { text-align: right; padding: 10px 4px; border-bottom: 1px solid #262626; overflow-wrap: anywhere; vertical-align: top; }
.estimate-table th:first-child { text-align: left; width: 35%; }
.estimate-table th:nth-child(2) { width: 15%; }
.estimate-table th:nth-child(3) { width: 10%; }
.estimate-table th:nth-child(4), .estimate-table th:nth-child(5) { width: 20%; }
.estimate-table th { font-weight: 500; }
.estimate-table small { display: block; font-size: 10px; margin-top: 4px; }
.table-section th { padding-top: 20px; font-size: 13px; }
.totals { margin: 24px 0; font-variant-numeric: lining-nums tabular-nums; }
.totals > div { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0; }
.totals dd { margin: 0; text-align: right; }
.totals .grand-total { display: block; margin-top: 20px; padding-top: 20px; border-top: 1px solid #262626; }
.grand-total dd { font: 500 clamp(32px, 3vw, 46px)/1.2 var(--font-legquinne-vf); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.disclaimer { font-size: 12px; }
.demo { font-size: 14px; font-weight: 500; }
.estimate-actions { display: grid; gap: 12px; }
.estimate-actions .btn { font-size: 13px; text-align: center; padding: 12px; }
.print-meta, .mobile-total { display: none; }
.footer { background: #38141b; color: #fff; padding: 64px 4vw; display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.footer p, .footer address { margin-bottom: 12px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }
/* Karty prowadzą przez wybór, a pola pozostają dostępne na jednej stronie. */
.product-options, .edge-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-option { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; padding: 0 0 16px; text-align: left; border: 1px solid #262626; border-radius: 0; background: transparent; }
.product-option img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product-option strong, .product-option span { padding: 0 12px; }
.product-option strong { font-size: 20px; font-weight: 500; }
.product-option span { font-size: 13px; }
.product-option:hover:not(:disabled), .edge-option:hover, .stone-option:hover { background: #eeece7; }
.elements-title { font-size: 28px; margin: 32px 0 12px; }
.element-row { padding: 20px 12px; margin-bottom: 16px; border: 1px solid #262626; }
.element-row[data-active="true"] { box-shadow: inset 3px 0 #262626; }
.edge-option { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-content: start; gap: 8px; padding: 12px; border: 1px solid #262626; cursor: pointer; min-width: 0; }
.edge-option input { margin: 4px 0; }
.edge-icon { grid-column: 2; }
.edge-icon svg { display: block; width: 78px; height: 54px; fill: #c7c4bd; stroke: #262626; stroke-width: 1.2; }
.edge-option strong, .edge-option > span:last-child { grid-column: 1 / -1; overflow-wrap: anywhere; }
.edge-option strong { font-size: 15px; font-weight: 600; }
.edge-option > span:last-child { font-size: 13px; }
.edge-option:has(input:checked), .segments label:has(input:checked) { box-shadow: inset 0 0 0 2px #262626; background: #eeece7; }
.edge-option:has(input:focus-visible), .stone-option:has(input:focus-visible), .segments label:has(input:focus-visible) { outline: 3px solid #262626; outline-offset: 4px; }
summary { cursor: pointer; min-height: 48px; padding: 14px 0; font-size: 16px; }
summary:focus-visible { outline: 2px solid #262626; outline-offset: 4px; }
.extras-details { border-top: 1px solid #262626; border-bottom: 1px solid #262626; margin: 28px 0 16px; }
#extras-count { font-size: 13px; white-space: nowrap; }
.extras-details[open] { padding-bottom: 20px; }
.element-preview { margin: -24px -24px 0; border-bottom: 1px solid #262626; }
.preview-scene { position: relative; aspect-ratio: 620 / 380; overflow: hidden; background: #e6e4de; }
.preview-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.preview-empty { padding: 24px; font-size: 14px; }
.element-preview figcaption { border-top: 1px solid #262626; padding: 16px 24px; font-size: 14px; overflow-wrap: anywhere; }
.preview-note { margin: 16px 0 28px; }
.estimate-price { margin: 20px 0; }
.estimate-price > span { display: block; font-size: 16px; }
.estimate-price strong { display: block; font: 500 clamp(36px, 3.4vw, 54px)/1.2 var(--font-legquinne-vf); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; margin: 6px 0; }
#estimate-details { border-top: 1px solid #262626; border-bottom: 1px solid #262626; margin-bottom: 24px; }
.estimate-actions .btn { min-height: 48px; }
.disclaimer { margin-top: 24px; }
@media (min-width: 1800px) {
  .element-row { grid-template-columns: 1.5fr 1.1fr 1fr 1fr .6fr 1fr 1fr auto; }
  .element-row > .element-field:first-child, .element-row > .element-field:nth-child(2), .element-row > .element-field:nth-last-child(2) { grid-column: auto; }
}
@media (max-width: 1100px) {
  .estimate-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .estimate-card { position: static; }
  .estimate-table { font-size: 14px; }
  .estimate-table small { font-size: 12px; }
  .mobile-total { display: flex; position: fixed; inset: auto 0 0; z-index: 10; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #262626; background: #e0ded8; }
  .mobile-total span { display: block; font-size: 11px; }
  .mobile-total strong { font-size: 17px; font-variant-numeric: lining-nums tabular-nums; }
  .mobile-total .btn { font-size: 12px; padding: 8px 12px; min-height: 44px; }
  body { padding-bottom: 100px; }
}
@media (max-width: 600px) {
  .site-header { padding: 16px 20px; }
  .header-right { gap: 16px; }
  main { padding: 0 20px 64px; }
  .intro { padding: 48px 0 32px; }
  h1 { font-size: 40px; }
  .step > legend { font-size: 32px; }
  .element-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .element-row > .element-field:first-child, .element-row > .element-field:nth-child(2), .element-row > .element-field:nth-last-child(2) { grid-column: auto; }
  .extra-row { grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; }
  .estimate-card { padding: 20px 16px; }
  .element-preview { margin: -20px -16px 0; }
  .element-preview figcaption { padding: 16px; }
  .stone-options { grid-template-columns: minmax(0, 1fr); }
  .stone-sample { height: 120px; }
  .estimate-card h2 { font-size: 32px; }
  .estimate-table, .estimate-table tbody { display: block; }
  .estimate-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .estimate-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estimate-table .table-section { display: block; padding-top: 12px; }
  .estimate-table th:first-child { display: block; width: auto; grid-column: 1 / -1; }
  .estimate-table td { display: block; text-align: left; font-size: 13px; }
  .estimate-table td::before { content: attr(data-label); display: block; font-size: 10px; }
  .estimate-line { margin-bottom: 12px; }
  .mobile-total { padding-left: 16px; padding-right: 16px; }
  .mobile-total > div { min-width: 0; overflow-wrap: anywhere; }
  .mobile-total .btn { max-width: 48%; flex-shrink: 0; }
}
@page { size: A4; margin: 15mm; }
@media print {
  html, body { background: white !important; color: black !important; margin: 0; padding: 0; font-size: 10pt; }
  .element-preview, .preview-note, #estimate-details > summary, .site-header, .intro, #estimate-form, .footer, .estimate-actions, .mobile-total, .skip-link, #email-note, #load-status, noscript { display: none !important; }
  main { padding: 0; }
  .estimate-layout { display: block; }
  .estimate-card { position: static; border: 0; padding: 0; width: 100%; }
  .estimate-card h2 { font-size: 26pt; margin-bottom: 12pt; }
  .print-meta { display: block; margin-bottom: 12pt; }
  .print-meta p { margin: 0; font-size: 10pt; }
  #estimate-details { border: 0; }
  #estimate-details > .estimate-detail-content { display: block !important; }
  #estimate-details::details-content { display: block; content-visibility: visible; }
  .estimate-price strong { font-size: 28pt; }
  .estimate-table { display: table; font-size: 9pt; table-layout: fixed; }
  .estimate-table thead { display: table-header-group; position: static; width: auto; height: auto; clip-path: none; overflow: visible; }
  .estimate-table tbody { display: table-row-group; }
  .estimate-table tr, .estimate-table .table-section { display: table-row; break-inside: avoid; }
  .estimate-table th, .estimate-table td, .estimate-table th:first-child { display: table-cell; padding: 6pt 3pt; border-color: black; font-size: 9pt; }
  .estimate-table th:first-child { width: 35%; }
  .estimate-table td { text-align: right; }
  .estimate-table td::before { display: none; }
  .estimate-table small { font-size: 8pt; }
  .totals, .disclaimer, .demo { break-inside: avoid; }
  .grand-total dd { font-size: 28pt; }
  .disclaimer { font-size: 9pt; }
  .demo { font-size: 10pt; }
}

/* Pozycje zamówienia, z niezależną konfiguracją aktywnej pozycji. */
.positions-section { margin-bottom: 36px; }
.position-cards { display: grid; gap: 12px; margin-bottom: 16px; }
.position-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-width: 0; }
.position-select, .remove-position { min-height: 44px; min-width: 44px; padding: 12px; border: 1px solid #262626; border-radius: 0; background: transparent; }
.position-select { text-align: left; overflow-wrap: anywhere; }
.position-select strong, .position-summary { display: block; }
.position-summary { margin-top: 8px; font-size: 13px; line-height: 1.5; }
.position-select[aria-pressed="true"] { box-shadow: inset 3px 0 #262626; background: #eeece7; }
.remove-position { align-self: start; }
.position-name { margin-bottom: 16px; }
#position-config { min-width: 0; }
button:focus-visible, input:focus-visible, .btn:focus-visible { outline: 3px solid #262626; outline-offset: 3px; }
.element-row > .element-field:nth-child(2) { grid-column: span 2; }
.element-row > .element-field:nth-child(3) { grid-column: auto; }
#extras-count { white-space: normal; }
@media (min-width: 1800px) {
  .element-row { grid-template-columns: 1.5fr 1fr 1fr .6fr 1fr 1fr auto; }
  .element-row > .element-field:nth-child(2) { grid-column: auto; }
}
@media (max-width: 600px) {
  .element-row > .element-field:nth-last-child(2) { grid-column: auto; }
  .position-card { grid-template-columns: minmax(0, 1fr); }
  .remove-position { justify-self: end; }
  .extra-row { grid-template-columns: minmax(0, 1fr); }
  .stepper { width: 144px; justify-self: end; }
}
[hidden] { display: none !important; }
