#calculator { background: var(--dark); color: var(--on-dark); padding-block: clamp(4rem, 7.6vw, 7.6rem); }
[data-estimate] {
  --est-line: var(--line-dark);
  --est-card: var(--night-2);
  --est-selected: color-mix(in srgb, var(--accent) 14%, var(--est-card));
  --receipt-surface: color-mix(in srgb, var(--accent) 62%, var(--paper));
  --receipt-line: color-mix(in srgb, var(--accent-dark) 28%, var(--receipt-surface));
  --receipt-muted: color-mix(in srgb, var(--ink) 78%, var(--accent-dark));
  font-family: inherit;
}
[data-estimate] *, [data-estimate] *::before, [data-estimate] *::after { box-sizing: border-box; }
[data-estimate] [hidden] { display: none !important; }
[data-estimate] :is(button, select) { font: inherit; }
[data-estimate] button { cursor: pointer; }
[data-estimate] :is(button, select, summary, a):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[data-estimate] .est-receipt :is(button,a):focus-visible { outline-color: var(--accent-dark); }
.est-sr { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.est-intro { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2rem, 4vw, 4rem); }
.est-eyebrow { display: inline-flex; align-items: center; gap: .6rem; color: var(--accent); font-size: .81rem; line-height: 1.2; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.est-eyebrow::before { content: ""; width: 1.4rem; height: 2px; background: currentColor; }
.est-intro h2 { max-width: 13.4em; margin: .8rem 0 0; font-size: clamp(2.65rem, 5.25vw, 5.85rem); line-height: .98; font-weight: 720; letter-spacing: -.063em; color: var(--on-dark); text-wrap: balance; }
.est-intro-copy { width: min(100%, 22rem); margin: 0 0 .2rem; font-size: clamp(1rem, 1.16vw, 1.15rem); line-height: 1.55; color: var(--muted-on-dark); }
.est-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(17rem, .85fr); gap: clamp(1.5rem, 3.5vw, 4rem); align-items: start; }
.est-builder { display: grid; min-width: 0; }
.est-block { min-width: 0; }
.est-question { margin: 0; color: var(--on-dark); font-size: clamp(1.25rem, 1.75vw, 1.65rem); font-weight: 650; line-height: 1.2; letter-spacing: -.037em; }
.est-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(5.4rem, 100%), 1fr)); gap: .45rem; margin: 1rem 0 1.8rem; }
.est-zone { min-width: 0; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .75rem; min-height: 5.65rem; padding: .68rem .62rem; border: 1px solid var(--est-line); border-radius: .4rem; background: var(--est-card); color: var(--on-dark); text-align: left; transition: background .16s ease, border-color .16s ease; }
.est-zone > svg { width: 1.72rem; height: 1.72rem; flex: none; transition: transform .2s ease; }
.est-zone-label { margin-top: auto; font-weight: 600; font-size: .89rem; line-height: 1.15; }
.est-zone[aria-pressed=true] { color: var(--accent); background: var(--est-selected); border-color: var(--accent); }
.est-zone[aria-pressed=true] > svg { color: var(--accent); }
.est-zone-mark { width: .92rem; height: .92rem; position: absolute; right: .42rem; top: .42rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--dark); }
.est-zone-mark svg { width: .69rem; height: .69rem; stroke-width: 2; }
/* «Что шумит?»: a noise picked above the tiles opens its zone and marks the tile. */
.est-finder { container: estimate-finder / inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; margin-top: .8rem; }
.est-finder-note { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .65rem; align-items: center; color: var(--muted-on-dark); font-size: .93rem; line-height: 1.45; }
.est-finder-note > svg { width: 1.4rem; height: 1.4rem; color: var(--accent); }
/* The question and every answer share one cell: the tallest of them keeps its height, so the chips and the tiles never move. */
.est-finder-text, .est-finder-sizer { grid-area: 1 / 2; margin: 0; text-wrap: pretty; }
.est-finder-sizer { visibility: hidden; pointer-events: none; }
.est-finder-note strong { display: block; font-weight: 650; }
.est-finder-text strong { color: var(--on-dark); }
.est-finder[data-active=true] .est-finder-text strong { color: var(--accent); }
.est-finder-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.est-finder-chip { min-height: 2.25rem; padding: .3rem .85rem; border: 1px solid var(--line-dark); border-radius: 2rem; color: var(--muted-on-dark); background: transparent; font-size: .87rem; font-weight: 560; line-height: 1.2; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.est-finder-chip[aria-pressed=true] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.est-zone.is-suggested { box-shadow: 0 0 0 2px var(--accent), 0 14px 30px -18px var(--accent); }
.est-zone-tip { position: absolute; left: .47rem; top: .47rem; max-width: calc(100% - 2.7rem); padding: .2rem .56rem; border: 1px solid transparent; border-radius: .8rem; color: var(--on-accent); background: var(--accent); font-size: .74rem; font-weight: 700; line-height: 1.2; box-shadow: 0 1px 6px color-mix(in srgb, var(--night-deep) 55%, transparent); pointer-events: none; }
/* In a narrow column the line runs on without the icon. */
@container estimate-finder (max-width: 40rem) {
  .est-finder-note { grid-template-columns: minmax(0, 1fr); }
  .est-finder-note > svg { display: none; }
  .est-finder-text, .est-finder-sizer { grid-column: 1; }
  .est-finder-note strong { display: inline; }
  /* Under a finger, and on a phone-wide screen as the car brands do, the chips become one row that scrolls sideways. */
  @media (pointer: coarse), (max-width: 44rem) {
    .est-finder-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -.4rem; padding: .4rem; }
    .est-finder-chips::-webkit-scrollbar { display: none; }
    .est-finder-chip { flex: none; }
  }
}
@media (pointer: coarse) { .est-finder-chip { min-height: 2.75rem; } }
@media (forced-colors: active) { .est-finder-chip[aria-pressed=true] { outline: 2px solid Highlight; outline-offset: -2px; } }
.est-packages { border-top: 1px solid var(--est-line); padding-top: 1.25rem; }
.est-work-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.25rem; margin-bottom: 1.05rem; }
.est-work-select { display: grid; grid-template-columns: 1fr; position: relative; min-width: 0; max-width: 100%; gap: .2rem; color: var(--muted-on-dark); }
.est-work-select > span { font-size: .8rem; }
.est-work-select select { min-height: 2.6rem; max-width: min(100%, 17.5rem); width: 100%; border: 1px solid var(--est-line); border-radius: .3rem; appearance: none; color-scheme: dark; background: var(--est-card); padding: .45rem 2rem .45rem .75rem; color: var(--on-dark); font-size: .9rem; text-overflow: ellipsis; }
/* Touch screens: a finger-sized height, and 16 px text so that iOS Safari does not zoom the page on focus. */
@media (pointer: coarse) { .est-work-select select { min-height: 2.75rem; font-size: 1rem; } }
.est-work-select svg { position: absolute; bottom: .72rem; right: .7rem; width: 1.1rem; height: 1.1rem; color: var(--on-dark); pointer-events: none; }
.est-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; align-items: stretch; }
.est-choices[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.est-choices[data-count="2"], .est-choices[data-count="4"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.est-option { position: relative; display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 10.25rem; padding: 1.05rem .9rem .95rem; text-align: left; color: var(--on-dark); background: var(--est-card); border: 1px solid var(--est-line); border-radius: .4rem; transition: border-color .2s, box-shadow .2s; }
.est-option-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .35rem; }
.est-option-name { font-weight: 650; font-size: clamp(.98rem, 1.12vw, 1.12rem); line-height: 1.22; letter-spacing: -.015em; overflow-wrap: anywhere; }
.est-option-action { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; flex: none; margin-top: -.05rem; border: 1px solid var(--line-dark-strong); border-radius: 50%; color: var(--muted-on-dark); }
.est-option-action svg { width: .92rem; height: .92rem; }
.est-option-facts { margin-top: .65rem; margin-bottom: .35rem; color: var(--muted-on-dark); font-size: .85rem; line-height: 1.38; white-space: normal; }
.est-option-amount { margin-top: auto; padding-top: 1.45rem; font-size: clamp(1.16rem, 1.65vw, 1.8rem); font-weight: 690; font-variant-numeric: tabular-nums; line-height: 1.13; letter-spacing: -.05em; overflow-wrap: anywhere; }
.est-option-unit, .est-option-rule { color: var(--muted-on-dark); font-size: .83rem; line-height: 1.35; margin-top: .3rem; }
.est-option-rule { color: color-mix(in srgb, var(--accent) 70%, var(--on-dark)); }
.est-option[aria-pressed=true] { background: var(--est-selected); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.est-option[aria-pressed=true] .est-option-action { background: var(--accent); border-color: var(--accent); color: var(--dark); }
.est-details { margin-top: 1rem; border-bottom: 1px solid var(--est-line); }
.est-details summary { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.8rem; padding-bottom: .25rem; cursor: pointer; list-style: none; color: var(--muted-on-dark); font-size: .94rem; font-weight: 570; }
.est-details summary::-webkit-details-marker { display: none; }
.est-details summary svg { width: 1rem; height: 1rem; transition: transform .2s; }
.est-details[open] summary svg { transform: rotate(180deg); }
.est-details-content { display: grid; gap: 1.1rem; padding: .65rem 0 1.3rem; }
.est-detail strong { font-size: 1rem; line-height: 1.3; }
.est-detail p { margin: .32rem 0; max-width: 72ch; font-size: .94rem; line-height: 1.45; color: var(--muted-on-dark); }
.est-catalog-link { justify-self: start; display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent); text-underline-offset: .18em; }
.est-receipt { isolation: isolate; position: sticky; top: 1.2rem; display: flex; flex-direction: column; align-self: start; min-width: 0; padding: clamp(1.3rem, 2.3vw, 2.3rem); color: var(--ink); background: var(--receipt-surface); border-radius: .5rem; }
.est-receipt-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.est-receipt-head h3 { font-size: clamp(1.55rem, 2.1vw, 2.4rem); line-height: 1.13; font-weight: 650; letter-spacing: -.045em; margin: 0; color: var(--ink); }
.est-receipt-icon { display: grid; place-items: center; color: var(--accent-dark); }
.est-receipt-icon svg { width: 1.56rem; height: 1.56rem; }
.est-vehicle { margin: .7rem 0 0; color: var(--receipt-muted); font-size: .92rem; line-height: 1.4; }
.est-vehicle strong { color: var(--ink); font-weight: 680; }
.est-option[data-adjusted="true"] .est-option-amount { color: color-mix(in srgb, var(--accent) 72%, var(--on-dark)); }
.est-option[aria-pressed=true][data-adjusted="true"] .est-option-amount { color: var(--on-dark); }
.est-empty { margin: .85rem 0 0; font-size: 1rem; color: var(--receipt-muted); line-height: 1.5; max-width: 30ch; }
.est-items { list-style: none; width: 100%; padding: 0; margin: .75rem 0 0; }
.est-line { display: flex; align-items: start; justify-content: space-between; gap: .6rem; padding: .78rem 0; border-top: 1px solid var(--receipt-line); }
.est-line-info { display: grid; gap: .26rem; min-width: 0; }
.est-line-name { color: var(--ink); font-size: .94rem; line-height: 1.35; font-weight: 590; overflow-wrap: anywhere; }
.est-line-price { color: var(--ink); font-size: .93rem; line-height: 1.3; }
.est-line-note { margin-top: .12rem; color: var(--receipt-muted); font-size: .86rem; line-height: 1.45; }
.est-remove { color: var(--receipt-muted); border: 1px solid color-mix(in srgb, var(--accent-dark) 45%, transparent); background: transparent; border-radius: 50%; display: grid; place-items: center; flex: none; width: 1.85rem; height: 1.85rem; }
.est-remove svg { width: .93rem; height: .93rem; stroke-width: 1.8; }
.est-total { margin-top: 1.5rem; border-top: 1px dashed color-mix(in srgb, var(--accent-dark) 50%, transparent); padding-top: 1.25rem; }
.est-total-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem .5rem; color: var(--receipt-muted); font-size: .9rem; }
.est-count { color: var(--receipt-muted); }
.est-total-amount { display: block; color: var(--ink); margin: .35rem 0 1.15rem; font-size: clamp(1.85rem, 3vw, 3.35rem); line-height: 1.08; font-weight: 650; letter-spacing: -.055em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.est-condition { color: var(--receipt-muted); font-size: .9rem; line-height: 1.4; margin: -.5rem 0 1rem; }
.est-offer { color: var(--receipt-muted); font-size: .8rem; line-height: 1.4; margin: .75rem 0 0; }
.est-request { display: block; width: 100%; min-height: 3.15rem; padding: .8rem 1rem; background: var(--dark); color: var(--on-dark); border: 1px solid transparent; border-radius: .3rem; font-size: 1rem; font-weight: 650; transition: background .2s; }
.est-request:disabled { color: color-mix(in srgb, var(--ink) 72%, var(--receipt-surface)); background: color-mix(in srgb, var(--accent-dark) 12%, var(--receipt-surface)); border-color: var(--receipt-line); cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .est-option { animation: est-option-enter .25s ease-out backwards; }
  .est-option:nth-child(2) { animation-delay: .035s; }
  .est-option:nth-child(3) { animation-delay: .065s; }
  .est-line-enter { animation: est-line-enter .28s ease-out backwards; }
  .est-zone.is-suggested { animation: est-suggest .9s ease-out 2; }
  .est-zone-tip { animation: est-tip-enter .22s ease-out backwards; }
  @keyframes est-suggest { from { box-shadow: 0 0 0 2px var(--accent), 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); } to { box-shadow: 0 0 0 2px var(--accent), 0 0 0 .85rem transparent; } }
  @keyframes est-tip-enter { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes est-option-enter { from { opacity: .45; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes est-line-enter { from { opacity: .25; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
}
@media (hover:hover) {
  .est-zone:hover, .est-option:hover { border-color: var(--line-dark-strong); }
  .est-finder-chip:not([aria-pressed=true]):hover { color: var(--on-dark); border-color: var(--line-dark-strong); }
  .est-zone:hover > svg { transform: translateY(-2px); }
  .est-zone[aria-pressed=true]:hover, .est-option[aria-pressed=true]:hover { border-color: var(--accent); }
  .est-request:not(:disabled):hover { background: var(--accent-dark); }
  .est-remove:hover { border-color: currentColor; color: var(--accent-dark); }
}
@media (max-width: 66rem) {
  .est-layout { grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr); gap: 1.5rem; }
  .est-choices { grid-template-columns: minmax(0,1fr); }
  .est-option { min-height: auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(5rem,auto); padding: .85rem .9rem; align-items: start; column-gap: .7rem; }
  .est-option-top { grid-row: 1; grid-column: 1; justify-content: flex-start; align-items: center; flex-direction: row-reverse; }
  .est-option-name { flex: 1; }
  .est-option-facts { grid-column: 1; grid-row: 2; margin: .35rem 0 0 1.8rem; }
  .est-option-amount { grid-column: 2; grid-row: 1; margin: .07rem 0 0; padding: 0; text-align: right; }
  .est-option-unit { grid-column: 2; grid-row: 2; text-align: right; }
  .est-option-rule { grid-column: 1/-1; }
  .est-choices[data-count="2"], .est-choices[data-count="4"] { grid-template-columns: 1fr; }
}
@media (max-width: 57rem) {
  .est-intro { align-items: start; flex-direction: column; gap: 1rem; }
  .est-intro-copy { width: auto; max-width: 45rem; }
  .est-layout { grid-template-columns: minmax(0,1fr) minmax(15.25rem,.73fr); gap: 1.1rem; }
  .est-zones { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .est-zone { min-height: 3.55rem; flex-direction: row; align-items: center; gap: .4rem; padding: .55rem; }
  .est-zone > svg { width: 1.4rem; height: 1.4rem; }
  .est-zone-label { margin: 0; }
}
@media (max-width: 44rem) {
  .est-layout { grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
  .est-intro h2 { font-size: clamp(2.5rem, 9.6vw, 3.8rem); max-width: none; }
  .est-intro-copy { font-size: 1rem; margin: 0; }
  .est-zone { min-height: 3.5rem; padding: .65rem .5rem; gap: .5rem; }
  .est-zone-label { font-size: .87rem; }
  .est-zones { margin: .75rem 0 1.15rem; }
  .est-finder { gap: .5rem; margin-top: .6rem; }
  /* The row of chips runs to the edges of the screen, as the car brands above do. */
  .est-finder-chips { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .est-finder-chip { min-height: 2.75rem; padding-inline: 1rem; }
  .est-work-head { align-items: center; }
  .est-receipt { position: relative; top: auto; padding: 1.25rem; }
  .est-total-heading { justify-content: start; gap: 1rem; }
  .est-total-amount { font-size: 2.3rem; }
  .est-remove { min-width: 2.2rem; min-height: 2.2rem; }
}
.est-dock { position: fixed; z-index: 30; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem .55rem .55rem 1rem; color: var(--ink); background: var(--receipt-surface); border: 1px solid color-mix(in srgb, var(--accent-dark) 30%, transparent); border-radius: .7rem; box-shadow: 0 18px 40px -18px rgba(8, 6, 18, .75); }
.est-dock[hidden] { display: none; }
.est-dock-text { display: grid; gap: .05rem; min-width: 0; }
.est-dock-count { color: var(--receipt-muted, color-mix(in srgb, var(--ink) 65%, transparent)); font-size: .76rem; font-weight: 600; }
.est-dock-amount { font-size: 1.12rem; font-weight: 760; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-dock-button { flex: none; min-height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: .5rem; color: var(--on-dark, #fff); background: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .est-dock:not([hidden]) { animation: est-dock-in .32s cubic-bezier(.2, .8, .2, 1); }
  @keyframes est-dock-in { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (max-width: 24rem) {
  .est-zone { min-height: 4.1rem; flex-direction: column; align-items: flex-start; gap: .25rem; }
  .est-finder-note { font-size: .875rem; }
  .est-option { gap: .2rem .5rem; }
  .est-option-amount { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  [data-estimate] *, [data-estimate] *::before, [data-estimate] *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
