.estimate {
  --estimate-paper: #efeada;
  --estimate-ink: #272c22;
  --estimate-amber: #edbf59;
  --estimate-type: Manrope, Arial, sans-serif;
  color-scheme: dark;
  color: var(--estimate-paper);
  background: #26352e url('/landing/grain.svg');
  background-blend-mode: soft-light;
  padding: clamp(45px, 6.2vw, 95px) 0;
  scroll-margin-top: 10px;
}
.estimate-wrap {
  width: min(1280px, 90%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.23fr) minmax(0,.92fr);
  align-items: center;
  column-gap: clamp(45px, 8vw, 135px);
}
.estimate-worksheet h2 {
  font: 400 clamp(44px,4.9vw,76px)/1.02 var(--display, Georgia, serif);
  letter-spacing: -.055em;
  margin: 0;
  color: var(--estimate-paper);
}
.estimate-instruction {
  max-width: 44ch;
  margin: 14px 0 clamp(24px, 2.8vw, 38px);
  color: #d1d4c4;
  font: 450 15px/1.5 var(--estimate-type);
}
.estimate-field {
  display: grid;
  grid-template-columns: minmax(0,1fr) 154px;
  align-items: center;
  column-gap: clamp(15px, 2vw, 32px);
}
.estimate-field label {
  max-width: 32ch;
  font: 550 clamp(15px,1.2vw,19px)/1.5 Manrope, Arial, sans-serif;
}
.estimate-number {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 5px 2px 6px;
  color: var(--estimate-amber);
  border-bottom: 1px solid #b0b49b;
}
.estimate-number:focus-within {
  border-color: var(--estimate-amber);
  box-shadow: 0 1px 0 var(--estimate-amber);
}
.estimate-number input {
  flex: 1;
  width: 100%;
  min-width: 0;
  color: var(--estimate-paper);
  color-scheme: dark;
  background: transparent;
  font: 620 clamp(18px, 1.5vw, 22px)/1.3 var(--estimate-type);
  border: 0;
  padding: 3px 0;
  text-align: right;
  appearance: textfield;
}
.estimate-number input::-webkit-inner-spin-button { appearance: none; }
.estimate-number span { font: 550 14px/1.2 var(--estimate-type); white-space: nowrap; }
.estimate-number input:focus, .estimate-scale input:focus { outline: none; }
.estimate-scale {
  margin-top: 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid #a6b09b50;
}
.estimate-scale input {
  --filled: 9.375%;
  display: block;
  width: 100%;
  height: 38px;
  margin: 0;
  border: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.estimate-scale input::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right, var(--estimate-amber) 0 var(--filled), #959d86 var(--filled) 100%);
}
.estimate-scale input::-moz-range-track { height: 4px; background: #959d86; }
.estimate-scale input::-moz-range-progress { height: 4px; background: var(--estimate-amber); }
.estimate-scale input::-webkit-slider-thumb {
  appearance: none;
  width: 17px;
  height: 25px;
  margin-top: -10px;
  border: 1px solid #2d3026;
  border-radius: 3px;
  background: linear-gradient(to right, #8f7740, #f8d17b 25%, #e5b453 70%, #a08243);
  box-shadow: 1px 2px 2px #12180e66;
}
.estimate-scale input::-moz-range-thumb {
  width: 16px; height: 24px; border: 1px solid #2d3026; border-radius: 3px; background: var(--estimate-amber);
}
.estimate-scale input:focus-visible::-webkit-slider-thumb {
  background: #fff1bb;
  box-shadow: inset 0 -4px #9a7019;
}
.estimate-scale input:focus-visible::-moz-range-thumb {
  background: #fff1bb;
  box-shadow: inset 0 -4px #9a7019;
}
.estimate-scale div {
  display: flex;
  justify-content: space-between;
  color: #c1c7b3;
  font: 550 12px/1.3 var(--estimate-type);
  background: repeating-linear-gradient(to right,#b4bba45c 0 1px,transparent 1px 4.16667%) left top / 100% 4px no-repeat;
  padding-top: 9px;
}
.estimate-rate { margin-top: 12px; }
.estimate-error { font-size: 14px; margin: 12px 0 0; color: #ffd890; }
.estimate-error:empty { display: none; }
.estimate-slip {
  position: relative;
  color: var(--estimate-ink);
  background: var(--estimate-amber) url('/landing/grain.svg');
  background-blend-mode: soft-light;
  filter: drop-shadow(3px 7px 7px #11170e55);
  border-bottom: 2px solid #bf9649;
  margin: 5px 2px;
}
.estimate-slip-body, .estimate-stub { padding: clamp(23px, 2.3vw, 34px); }
.estimate-slip-body {
  padding-bottom: 22px;
  container-type: inline-size;
}
.estimate-slip h3 {
  margin: 0;
  max-width: 33ch;
  font: 690 clamp(15px, 1.23vw, 19px)/1.45 Manrope, Arial, sans-serif;
}
.estimate-result {
  margin: 17px 0 12px;
  /* The longest amount, including kopecks and the ruble sign, fits at this
     size. Smaller values use exactly the same type as the slider moves. */
  font: 700 clamp(27px, 13cqi, 64px)/1.12 var(--estimate-type);
  letter-spacing: -.025em;
  white-space: nowrap;
}
.estimate-result output, .estimate-result span { color: inherit; font: inherit; }
.estimate-equation {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid #7a693d80;
  padding-top: 10px;
  font: 550 13px/1.5 var(--estimate-type);
}
.estimate-equation span:last-child { text-align: right; }
.estimate-stub {
  position: relative;
  padding-top: 21px;
  border-top: 2px dashed #766a4680;
}
.estimate-stub::before, .estimate-stub::after {
  content: '';
  position: absolute;
  top: -9px;
  width: 8px;
  height: 16px;
  background: #26352e;
}
.estimate-stub::before { left: 0; border-radius: 0 8px 8px 0; }
.estimate-stub::after { right: 0; border-radius: 8px 0 0 8px; }
.estimate-stub p { margin: 0 0 15px; font: 550 15px/1.5 Manrope, Arial, sans-serif; }
.estimate-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--estimate-ink);
  background: var(--estimate-ink);
  color: #fbefcf;
  font: 750 16px/1.4 Manrope, Arial, sans-serif;
  padding: 13px 27px 13px 20px;
  min-height: 48px;
  cursor: pointer;
  clip-path: polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%);
}
.estimate-order::after {
  content: '';
  width: 19px;
  height: 19px;
  flex: none;
  background: currentColor;
  mask: url('/icons/file-text.svg') center / contain no-repeat;
}
.estimate-order:hover { background: #3d4334; }
.estimate-order:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px #ffe7a8; }
.estimate-order:disabled { opacity: .55; cursor: default; }
.estimate-stub small { display: block; margin: 10px 0 0; color: #504a34; font: 500 12px/1.5 Manrope, Arial, sans-serif; }
.estimate-number input, .estimate-number span, .estimate-result, .estimate-result output,
.estimate-result span, .estimate-equation, .estimate-scale div {
  font-variant-numeric: lining-nums tabular-nums;
}
@media (max-width: 780px) {
  .estimate-wrap { width: min(550px,calc(100% - 44px)); grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 440px) {
  .estimate-wrap { width: calc(100% - 36px); }
  .estimate-worksheet h2 { font-size: clamp(34px, 9vw, 40px); }
  .estimate-field { grid-template-columns: minmax(0,1fr) 125px; gap: 10px; }
  .estimate-field label { font-size: 14px; line-height: 1.45; }
  .estimate-number input { font-size: 17px; }
  .estimate-number span { font-size: 13px; }
  .estimate-equation { flex-wrap: wrap; gap: 4px 12px; }
  .estimate-slip-body, .estimate-stub { padding: 21px 19px; }
}
