.price-calculator {
    --price-ink: #172f50;
    --price-accent: #264f92;
    --price-line: #d7e1ed;
    --price-surface: #eff4fa;
    --price-success: #23613f;
    --price-error: #a61628;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 1fr);
    gap: clamp(1.5rem, 4vw, 3.75rem);
    align-items: start;
    color: var(--price-ink);
    margin: 1.75rem 0 0;
    scroll-margin-top: 7rem;
}

.price-calculator *,
.price-calculator {
    box-sizing: border-box;
}

.price-calculator [hidden] {
    display: none !important;
}

.price-calculator__counts,
.price-calculator__choices {
    display: grid;
    gap: 1rem;
}

.price-calculator__counts {
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    margin-bottom: 1.5rem;
}

.price-calculator__counts > div {
    min-width: 0;
}

.price-calculator__counts label,
.price-calculator legend {
    display: block;
    font-weight: 650;
    margin: 0 0 .4rem;
}

.price-calculator__counts input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 2.85rem;
    padding: .5rem .7rem;
    border: 0;
    border-bottom: 1px solid #8394a9;
    border-radius: .35rem .35rem 0 0;
    background: #f4f6f9;
    color: var(--price-ink);
    font: inherit;
    scroll-margin-top: 7rem;
}

.price-calculator__counts input[readonly] {
    background: #e8eff7;
    border-color: #b7c5d6;
}

.price-calculator__counts input[aria-invalid="true"] {
    border-bottom: 2px solid var(--price-error);
}

.price-calculator__field-error {
    margin: .45rem 0 0;
    color: var(--price-error);
    font-size: .9rem;
}

.price-calculator__choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--price-line);
}

.price-calculator fieldset {
    min-width: 0;
    border: 0;
    padding: 0;
    margin: 0;
}

.price-calculator legend {
    font-size: 1.125rem;
}

.price-calculator .price-calculator__option {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    min-height: 2.75rem;
    padding: .45rem .6rem;
    border-radius: .4rem;
    cursor: pointer;
    line-height: 1.35;
}

.price-calculator__option:hover {
    background: #f1f4f8;
}

.price-calculator__option:has(:checked) {
    background: #e6effc;
    color: #193e72;
}

.price-calculator__option input {
    accent-color: var(--price-accent);
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    margin: 0;
}

.price-calculator :is(input, button):focus-visible {
    outline: 2px solid var(--price-accent);
    outline-offset: 3px;
}

.price-calculator__summary {
    min-width: 0;
    padding: clamp(1rem, 2.8vw, 2rem);
    border: 1px solid var(--price-line);
    border-radius: .75rem;
    background: var(--price-surface);
}

.price-calculator__summary h3 {
    color: #173c70;
    margin: 0 0 1rem;
    font-size: clamp(1.25rem, 2.3vw, 1.55rem);
    line-height: 1.3;
}

.price-calculator__amounts {
    margin: 0 0 1.15rem;
}

.price-calculator__amounts div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .2rem .65rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--price-line);
}

.price-calculator__amounts dt {
    color: #435973;
}

.price-calculator__amounts dd {
    margin: 0;
    font-weight: 650;
    overflow-wrap: anywhere;
    text-align: right;
}

.price-calculator__amounts .price-calculator__total {
    display: grid;
    gap: .25rem;
    padding: 0 0 .7rem;
}

.price-calculator__total dt {
    font-weight: 650;
}

.price-calculator__total dd {
    color: #193e72;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    text-align: left;
    line-height: 1.2;
}

.price-calculator .price-calculator__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    width: 100%;
    gap: .65rem;
    padding: .65rem .85rem;
    border: 0;
    border-radius: .45rem;
    background: var(--price-accent);
    color: #fff;
    font: inherit;
    font-weight: 650;
    text-align: center;
}

.price-calculator .price-calculator__submit:hover:not(:disabled) {
    background: #193d76;
}

.price-calculator .price-calculator__submit:disabled {
    background: #435f85;
    cursor: wait;
}

.price-calculator__spinner {
    width: 1em;
    height: 1em;
    flex: none;
    border-radius: 50%;
    border: 2px solid #bdcbe0;
    border-top-color: #fff;
    animation: price-calculator-spin .75s linear infinite;
}

@keyframes price-calculator-spin {
    to { transform: rotate(360deg); }
}

.price-calculator__status {
    margin: 0;
    overflow-wrap: anywhere;
}

.price-calculator .price-calculator__help {
    margin: .4rem 0 0;
    color: #435973;
    font-size: .8125rem;
    line-height: 1.45;
}
.price-calculator__indicator { display: none; }
[data-price-state-title], [data-price-message] { display: block; }
.price-calculator__summary:is([data-state="loading"], [data-state="error"]) .price-calculator__amounts { display: none; }
.price-calculator__summary:is([data-state="loading"], [data-state="error"]) .price-calculator__status {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin: .8rem 0 1.25rem;
    color: var(--price-ink);
}
.price-calculator__summary:is([data-state="loading"], [data-state="error"]) .price-calculator__indicator {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: #dce8f6;
}
[data-state="loading"] .price-calculator__indicator b,
[data-state="error"] .price-calculator__spinner { display: none; }
[data-state="loading"] .price-calculator__spinner { border-top-color: var(--price-accent); }
.price-calculator__summary[data-state="error"] .price-calculator__indicator { background: #fae9ec; color: var(--price-error); }
[data-price-message]:not(:empty) { margin-top: .3rem; color: #435973; line-height: 1.45; }
@media (max-width: 560px) {
    .price-calculator__choices { grid-template-columns: minmax(0, 1fr); }
}

.price-calculator__total #price {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-variant-numeric: tabular-nums;
}
.price-calculator__check, .price-calculator__amounts dd.price-calculator__included { display: none; }
[data-state="success"] .price-calculator__check {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: #d7eee3;
    color: #206347;
    font: bold .92rem/1 system-ui, sans-serif;
}
[data-state="success"] .price-calculator__amounts dd.price-calculator__included {
    display: block;
    font-size: .9rem;
    font-weight: normal;
    color: #405670;
    text-align: left;
}

.price-calculator__spoken {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
}

@media (max-width: 800px) {
    .price-calculator {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 420px) {
    .price-calculator__counts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 359px) {
    .price-calculator__choices {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .price-calculator__spinner {
        animation: none;
    }
}

.price-calculator .price-calculator__notes {
    grid-column: 1 / -1;
    margin: 0;
    padding: 1rem 0 0 1.4rem;
    border-top: 1px solid var(--price-line);
    color: #435973;
    font-size: .875rem;
    line-height: 1.5;
}
.price-calculator__notes li { padding-left: .2rem; scroll-margin-top: 8rem; }
.price-calculator__notes li + li { margin-top: .4rem; }
.price-calculator__option:has(input:disabled) { color: #617185; cursor: not-allowed; }
.price-calculator legend sup { font-size: .7em; }
