.calc {
    --calc-gold: #c78b48;
    --calc-amber: #ffca79;
    --calc-ink: #17191d;
    --calc-rule: #9c6a3e38;
    color: var(--calc-ink);
    background: #f6eadb;
}

.calc :is(h1, h2, h3, p, dl, dd, ol) { margin: 0; }
.calc h1, .calc h2, .calc h3 { color: inherit; line-height: 1.13; letter-spacing: -.035em; }
.calc h2 { font-size: clamp(1.35rem, 2.25vw, 2rem); font-weight: 800; }
.calc a:focus-visible,
.calc input:focus-visible { outline: 3px solid #92602a; outline-offset: 3px; }
.calc-dark :is(a, input):focus-visible,
.calc-cta a:focus-visible { outline-color: var(--calc-amber); }
.calc-shell { width: min(1480px, calc(100% - 112px)); margin-inline: auto; }

.calc-hero {
    color: #fff;
    padding: 105px 0 31px;
    background: linear-gradient(90deg, #17110df5, #17110de8 24%, #17110d70 53%, transparent 76%),
        #302318 url('../../img/calculator/calculator-hero.webp') center 54% / cover no-repeat;
    border-bottom: 1px solid var(--calc-gold);
}
.calc-hero .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin: 0 0 12px;
    padding: 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgb(255 255 255 / 28%);
}
.calc-hero .breadcrumbs a { color: rgb(255 255 255 / 72%); text-decoration: none; }
.calc-hero .breadcrumbs a:hover,
.calc-hero .breadcrumbs strong { color: var(--calc-gold); }
.calc-hero .breadcrumbs strong { min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc-hero h1 {
    max-width: 12ch;
    font-size: clamp(2.5rem, 4.4vw, 4.3rem);
    font-weight: 800;
    margin: 12px 0 16px;
    text-wrap: balance;
}
.calc-hero p { max-width: 48ch; line-height: 1.5; }
.calc-hero .calc-hero__note { margin-top: 12px; color: #ffe0b5; font-size: .9rem; }
.calc-hero__note span { color: #C78B48; font-weight: 800; }

.calc-dark {
    color: #fff;
    background: #151516 url('../../img/home/dark-marble-bg.webp') center / cover;
}
.calc-marble {
    background: #f7ecde url('../../img/home/light-marble-bg.webp') center top / 100% auto repeat-y;
}
.calc-steps { padding: 15px 0 17px; }
.calc-steps ol {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 0;
    margin-inline: auto;
    list-style: none;
}
.calc-steps li { position: relative; text-align: center; }
.calc-steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 29px);
    width: calc(100% - 58px);
    height: 1px;
    background: var(--calc-gold);
    pointer-events: none;
}
.calc-steps a {
    display: inline-grid;
    justify-items: center;
    gap: 4px;
    padding: 0 5px;
    color: inherit;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}
.calc-steps a span, .calc-number {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--calc-gold);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0;
}
.calc-steps a:hover span { border-color: var(--calc-amber); }
.calc-steps a[aria-current] span, .calc-number {
    color: #21160b;
    background: linear-gradient(145deg, #ffcf8b, #c88639);
}

.calc-section { padding: 22px 0; }
.calc-section + .calc-section:not(.calc-dark) { border-top: 1px solid var(--calc-rule); }
.calc-section h2 { display: flex; align-items: center; gap: 16px; }
.calc-section h2:focus { outline-offset: 3px; }
.calc-section .calc-intro { margin: 0 0 15px 56px; }
.calc-cards, .calc-equipment, .calc-installations, .calc-dimensions, .calc-result {
    display: grid;
    gap: 16px;
}
.calc-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-cards--materials { margin-top: 14px; }
.calc-card, .calc-option { position: relative; display: grid; cursor: pointer; }
.calc-card input, .calc-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.calc-card__face, .calc-option > span {
    position: relative;
    display: block;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #fff8efb8;
    box-shadow: 0 2px 4px #563a2329;
}
.calc-card:hover .calc-card__face, .calc-option:hover > span { border-color: #aa6b33; }
.calc-card input:checked + .calc-card__face, .calc-option input:checked + span {
    border-color: #a7672a;
    background-color: #fff2e2;
}
.calc-card input:focus-visible + .calc-card__face, .calc-option input:focus-visible + span {
    outline: 3px solid #92602a;
    outline-offset: 3px;
}
.calc-card__face::after, .calc-option > span::after {
    content: '';
    position: absolute;
    right: 9px;
    top: 9px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid #a7672a;
    background: #fff8ef;
    color: #fff;
    font-size: 13px;
    line-height: 1;
}
.calc-card__face::after { border-radius: 50%; }
.calc-option > span::after { border-radius: 4px; }
.calc-card input:checked + .calc-card__face::after, .calc-option input:checked + span::after {
    content: '✓';
    background: #935317;
}
.calc-card img { display: block; width: 100%; height: clamp(105px, 10vw, 154px); object-fit: cover; }
.calc-cards--materials img { height: clamp(52px, 5vw, 78px); }
.calc-card__copy { display: grid; gap: 4px; padding: 10px 16px 13px; line-height: 1.35; }
.calc-card__copy strong { font-size: 1.1rem; font-weight: 800; }
.calc-card__copy > span { font-size: .9rem; }

.calc-dimensions { grid-template-columns: 1.2fr 1fr; align-items: start; padding-left: 56px; }
.calc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.calc-fields label { font-size: .87rem; font-weight: 800; }
.calc-field {
    display: flex;
    align-items: center;
    background: #fff8ef;
    border: 1px solid #cdae90;
    border-radius: 5px;
    box-shadow: 0 2px 4px #563a2329;
}
.calc-field input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 0;
    border-radius: 5px;
    padding: 4px 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
}
.calc-field > span { padding-inline: 10px; font-weight: 800; }
.calc-error { display: block; margin-top: 5px; color: #8a251a; font-size: .8rem; }
.calc [hidden] { display: none; }
.calc-measurements { display: flex; gap: 18px; align-items: center; border-left: 1px solid var(--calc-gold); padding-left: 20px; }
.calc-measurements dl { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.calc-measurements dt { font-size: .8rem; }
.calc-measurements dd { font-size: 1.14rem; font-weight: 800; }
.calc :is(.calc-measurements, .calc-option, legend, .calc-budget) svg { width: 30px; height: 30px; flex: none; color: #925414; }
.calc-dark :is(legend, .calc-budget) svg { color: var(--calc-amber); }
.calc-equipment { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 13px; }
.calc-option > span { display: flex; gap: 9px; align-items: center; min-height: 54px; padding: 7px 33px 7px 10px; font-size: .87rem; font-weight: 800; }

.calc-installations { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.calc-installations fieldset { min-width: 0; margin: 0; padding: 4px 14px 9px; border: 1px solid var(--calc-gold); border-radius: 7px; }
.calc-installations legend { display: flex; align-items: center; gap: 7px; padding-inline: 6px; font-weight: 800; }
.calc-installations p { color: #f7e5cd; font-size: .86rem; }
.calc-installations label { display: inline-flex; align-items: center; min-height: 38px; margin-right: 12px; gap: 5px; cursor: pointer; font-size: .86rem; }
.calc-installations input[type="radio"], .calc-scope input[type="checkbox"] { margin: 0; width: 17px; height: 17px; accent-color: #dc9d54; }
.calc-scope {
    min-width: 0;
    margin: 16px 0 0;
    padding: 10px 14px 14px;
    border: 1px solid var(--calc-gold);
    border-radius: 7px;
}
.calc-scope legend { padding-inline: 6px; font-weight: 800; }
.calc-scope__choices { display: flex; flex-wrap: wrap; gap: 0 18px; }
.calc-scope__choices label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.calc-scope__areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-scope__areas, .calc-points, #calc-partial-wet-field { margin-top: 8px; }
#calc-partial-wet-field, .calc-points .calc-field { max-width: 235px; }
.calc-points > label { min-height: 0; margin-bottom: 4px; cursor: default; }
.calc-points .calc-field { color: var(--calc-ink); }
.calc-points p { margin-top: 5px; }
.calc-dark .calc-error { color: #ffb6a8; }
.calc .calc-quantity-note { margin-top: 10px; font-size: .86rem; }
.calc-option small, .calc-breakdown dt small { display: block; font-size: .78em; font-weight: 600; }

.calc-result { grid-template-columns: 1.15fr 1fr; gap: 28px; margin-top: 15px; }
.calc-budget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 24px);
    min-height: 96px;
    padding: 12px;
    border: 2px solid var(--calc-amber);
    border-radius: 14px;
    background: radial-gradient(ellipse at top, #78451988, #22170ded);
    box-shadow: inset 0 0 18px #e88f3855, 0 0 15px #e88f3866;
    text-align: center;
}
.calc-budget output { color: #fff1d7; font-size: clamp(1.5rem, 3.45vw, 3.7rem); font-weight: 800; text-shadow: 0 0 12px #df8f36a0; }
.calc .calc-budget svg { width: clamp(26px, 4vw, 60px); height: auto; }
.calc .calc-price-note { margin-top: 7px; font-size: .8rem; color: #f5d3ab; }
.calc .calc-summary { margin-top: 9px; font-size: .82rem; }
.calc-summary > div, .calc-breakdown dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 4px 0; border-bottom: 1px solid #fff3; }
.calc-summary > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.calc-summary dd, .calc-breakdown dd { text-align: right; font-weight: 800; }
.calc-breakdown { border-left: 1px solid var(--calc-gold); padding-left: 25px; }
.calc-breakdown h3 { margin-bottom: 7px; font-size: clamp(1.2rem, 2vw, 1.6rem); }
.calc-breakdown dd { white-space: nowrap; }
.calc .calc-breakdown__total { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: #ffe0b5; }
.calc-breakdown__total strong { white-space: nowrap; }

.calc-info { display: grid; grid-template-columns: minmax(200px, 1fr) 2.5fr; gap: 25px; padding-block: 24px; }
.calc-info > div { border-left: 1px solid var(--calc-gold); padding-left: 22px; }
.calc-info p + p { margin-top: 7px; }
.calc-cta { padding-bottom: 24px; }
.calc-cta__panel {
    display: grid;
    grid-template-columns: 36% minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 clamp(12px, 1.8vw, 28px);
    padding-right: clamp(14px, 2vw, 34px);
    border-radius: 10px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(90deg, #4f3b26 36%, #30251a 56%, #17130e);
}
.calc-cta__image { position: relative; min-width: 0; }
.calc-cta__image img { display: block; width: 100%; height: auto; border-radius: 0; }
.calc-cta__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 72%, #4f3b26);
}
.calc-cta__copy { padding-block: 10px; }
.calc-cta__copy h2 { font-size: clamp(1.2rem, 2.15vw, 2.05rem); }
.calc-cta__copy p { max-width: 44ch; margin-top: 5px; line-height: 1.4; }
.calc-cta .calc-cta__button { margin: 0; }
.calc-cta__button .inspection-button__face {
    width: auto;
    aspect-ratio: auto;
    min-height: clamp(48px, 4.45vw, 69px);
    padding: 8px clamp(12px, 1.8vw, 28px);
    gap: clamp(7px, 1vw, 16px);
    font-size: clamp(.79rem, 1.2vw, 1.1rem);
    white-space: nowrap;
}
.calc-cta__button .inspection-button__face::before {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(#e9a54a, #9e5607);
    box-shadow: inset 0 1px #ffdf9f88;
}
.calc-cta__button .inspection-button__face::after {
    position: relative;
    inset: auto;
    flex: none;
    width: 1.15em;
    height: 1em;
    filter: none;
    background: currentColor;
    clip-path: polygon(0 44%, 77% 44%, 55% 17%, 64% 8%, 100% 50%, 64% 92%, 55% 83%, 77% 56%, 0 56%);
}
.calc-cta__button .inspection-button__icon { width: 1.15em; height: 1.2em; }
.calc-noscript { padding: 14px 0; }
