/* Bridge the canonical public SEO calculator to the original TAVRUS wizard visual system. */
.tav-universal-calculator {
  display: block;
  width: min(1240px, calc(100% - 40px));
  margin-top: 10px;
  margin-bottom: clamp(64px, 8vw, 112px);
  scroll-margin-top: 104px;
}

.tav-universal-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid rgba(17, 19, 21, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 20px 60px rgba(17, 19, 21, .07);
}

.tav-universal-progress button {
  appearance: none;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #111315;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.tav-universal-progress button > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 19, 21, .08);
  color: rgba(17, 19, 21, .62);
  font-size: 11px;
  font-weight: 850;
}

.tav-universal-progress button > strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tav-universal-progress button:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 19, 21, .16);
}

.tav-universal-progress button.is-active {
  border-color: #111315;
  background: #111315;
  color: #fff;
  box-shadow: 0 12px 24px rgba(17, 19, 21, .14);
}

.tav-universal-progress button.is-active > span {
  background: #ceff00;
  color: #111315;
}

.tav-universal-progress button:focus-visible {
  outline: 3px solid #ff9500;
  outline-offset: 2px;
}

.tav-universal-calculator > [data-universal-step] {
  margin-top: 0;
}

.tav-universal-js .tav-universal-calculator > [data-universal-step][hidden] {
  display: none !important;
}

body[data-page-type="calculators"] {
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 133, 253, .08), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(150, 93, 217, .08), transparent 31%),
    var(--paper);
}

body[data-page-type="calculators"] > main > .tav-page-head {
  padding-block: clamp(28px, 3vw, 46px) clamp(18px, 2vw, 30px);
}

body[data-page-type="calculators"] > main > .tav-page-head h1 {
  max-width: 1080px;
  font-size: clamp(2rem, 3.4vw, 3.6rem);
  line-height: .98;
}

body[data-page-type="calculators"] > main > .tav-page-head .tav-lead {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.tav-universal-calculator > [data-universal-step="country"] {
  width: 100%;
}

.tav-universal-calculator > [data-universal-step="picker"] {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: clamp(16px, 1.8vw, 22px);
}

.tav-universal-calculator > [data-universal-step="details"] {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .55fr);
  gap: 14px;
  align-items: start;
}

.tav-universal-calculator > [data-universal-step="details"] > .tm-calc-workspace {
  grid-column: 1;
  padding: clamp(18px, 2vw, 28px);
}

.tav-universal-calculator > [data-universal-step="details"] > .tm-calc-workspace,
.tav-universal-calculator > [data-universal-step="details"] > .tm-calc-result {
  max-height: calc(100vh - 186px);
  overflow: auto;
  scrollbar-width: thin;
}

.tav-universal-calculator > [data-universal-step="details"] > .tm-calc-result {
  grid-column: 2;
  position: sticky;
  top: 104px;
}

.tav-universal-calculator > [data-universal-step="picker"] > .tm-section-head {
  max-width: 760px;
  margin: 0;
  padding: 0;
}

.tav-universal-calculator > [data-universal-step="picker"] > .tm-section-head h2 {
  margin: 4px 0;
  font-size: clamp(26px, 3vw, 42px);
}

.tav-universal-calculator > [data-universal-step="picker"] > .tm-section-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.tav-universal-calculator > [data-universal-step="picker"] .tm-calc-improvement-note {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
}

.tav-universal-calculator > [data-universal-step="picker"] .tav-wizard-actions {
  margin: 0;
}

.tav-universal-calculator > [data-universal-step="picker"] .tav-wizard-actions .tav-button {
  min-height: 38px;
  padding: 8px 12px;
}

.tav-universal-calculator .tm-section {
  scroll-margin-top: 104px;
}

.tav-universal-calculator .tm-calculator-hero h2 {
  max-width: 760px;
  margin: 10px 0 12px;
  font-size: clamp(30px, 5vw, 66px);
  line-height: .98;
  letter-spacing: -.055em;
}

.tav-universal-calculator .tm-calc-picker {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: none;
  padding: 0;
  overflow: visible;
}

.tav-universal-calculator .tm-calc-picker .tm-calc-tab {
  min-height: 52px;
  padding: 8px 10px;
}

.tav-universal-calculator .tm-calc-picker .tm-calc-tab em {
  display: none;
  overflow: hidden;
  color: currentColor;
  font-size: 10px;
  font-style: normal;
  opacity: .6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tav-universal-calculator .tm-calc-picker .tm-calc-tab strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tav-universal-calculator .tm-calc-tab {
  text-decoration: none;
}

.tav-universal-calculator .tm-calc-tab:focus-visible {
  outline: 3px solid #111315;
  outline-offset: 3px;
}

.tav-universal-calculator .tm-calculator {
  align-items: start;
}

.tav-universal-calculator [data-universal-step="details"] .tm-calc-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tav-universal-calculator [tabindex="-1"]:focus {
  outline: 0;
}

.tav-universal-calculator .tm-calc-workspace,
.tav-universal-calculator .tm-calc-result {
  min-width: 0;
}

.tav-universal-calculator .tm-calc-result {
  align-content: start;
}

.tav-universal-calculator .tm-calc-result > p[data-universal-typical] {
  margin: -4px 0 18px;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
}

.tav-universal-calculator .tm-calc-result > strong[data-universal-range] {
  display: block;
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(32px, 3.25vw, 52px);
  line-height: .96;
  letter-spacing: -.055em;
}

.tav-universal-calculator .tm-calc-breakdown {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.tav-universal-calculator .tm-calc-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
}

.tav-universal-calculator .tm-calc-breakdown > div > strong {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
}

.tav-universal-calculator .tm-calc-result .tav-result-actions {
  display: flex;
  gap: 8px;
}

.tav-universal-calculator .tm-calc-result .tav-result-actions .tav-button {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 11px;
}

.tav-universal-calculator .tm-calc-breakdown div > span,
.tav-universal-calculator .tm-calc-breakdown div > span small {
  display: block;
}

.tav-universal-calculator .tm-calc-breakdown div > span small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .5);
  font-size: 10px;
}

.tav-universal-calculator .tav-universal-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(17, 19, 21, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
}

.tav-universal-calculator .tav-universal-check.is-checked {
  border-color: rgba(17, 19, 21, .24);
  background: rgba(206, 255, 0, .08);
}

.tav-universal-calculator .tav-universal-check-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tav-universal-calculator .tav-universal-check-copy > strong {
  color: #111315;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.tav-universal-calculator .tav-universal-check-copy > small {
  color: rgba(17, 19, 21, .52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.tav-universal-calculator .tav-universal-check input {
  grid-column: 2;
  grid-row: 1;
  appearance: none;
  width: 48px;
  height: 28px;
  margin: 0;
  border: 1px solid rgba(17, 19, 21, .2);
  border-radius: 999px;
  background: rgba(17, 19, 21, .1);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.tav-universal-calculator .tav-universal-check input::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(17, 19, 21, .18);
  transition: transform .2s ease;
}

.tav-universal-calculator .tav-universal-check input:checked {
  border-color: #111315;
  background: #111315;
}

.tav-universal-calculator .tav-universal-check input:checked::before {
  transform: translateX(20px);
  background: #ceff00;
}

.tav-universal-calculator .tav-universal-check input:focus-visible {
  outline: 3px solid #ff9500;
  outline-offset: 3px;
}

.tav-universal-js .tav-universal-calculator [data-universal-step].is-active {
  animation: tavWizardPanelIn .56s cubic-bezier(.22, 1, .36, 1) both;
}

.tav-universal-calculator.is-switching {
  cursor: progress;
}

.tav-universal-calculator.is-switching .tm-calc-picker,
.tav-universal-calculator .tm-calc-result.is-loading {
  opacity: .58;
}

.tav-universal-calculator .tm-calc-result.is-changing {
  animation: tavWizardResultGlow 1.05s ease;
}

.tav-calc-wizard {
  margin-top: 0 !important;
  margin-bottom: clamp(56px, 7vw, 96px) !important;
  scroll-margin-top: 112px;
}

.tav-wizard-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(17, 19, 21, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 24px 70px rgba(17, 19, 21, .07);
}

.tav-wizard-status button {
  appearance: none;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #111315;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.tav-wizard-status button > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 19, 21, .08);
  color: rgba(17, 19, 21, .62);
  font-size: 11px;
  font-weight: 850;
}

.tav-wizard-status button > strong,
.tav-wizard-status button > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tav-wizard-status button > strong {
  font-size: 13px;
  font-weight: 820;
}

.tav-wizard-status button > small {
  color: rgba(17, 19, 21, .5);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tav-wizard-status button:hover,
.tav-wizard-status button:focus-visible {
  border-color: rgba(17, 19, 21, .16);
  background: #fff;
  box-shadow: 0 10px 22px rgba(17, 19, 21, .08);
  outline: 0;
  transform: translateY(-1px);
}

.tav-wizard-status button.is-active {
  border-color: rgba(255, 111, 0, .92);
  background: #111315;
  color: #fff;
  box-shadow: 0 14px 30px rgba(17, 19, 21, .16), inset 0 0 0 2px rgba(255, 111, 0, .92);
}

.tav-wizard-status button.is-active > span {
  background: #ff9500;
  color: #111315;
  box-shadow: 0 0 0 5px rgba(255, 149, 0, .14);
}

.tav-wizard-status button.is-active > small {
  color: rgba(255, 255, 255, .64);
}

.tav-wizard-status button.is-complete > span {
  background: #111315;
  color: #ceff00;
}

.tav-calc-wizard .tm-calc-workspace {
  min-width: 0;
}

.tav-calc-wizard .tav-wizard-panel {
  min-width: 0;
}

.tav-calc-wizard [tabindex="-1"]:focus {
  outline: 0;
}

.tav-js .tav-calc-wizard [data-wizard-panel]:not(.is-active) {
  display: none;
}

.tav-js .tav-calc-wizard [data-wizard-panel].is-active {
  animation: tavWizardPanelIn .56s cubic-bezier(.22, 1, .36, 1) both;
}

.tav-wizard-choice {
  max-height: 560px;
  margin: 16px 0 0;
  padding-right: 6px;
  overflow: auto;
  scrollbar-width: thin;
}

.tav-wizard-choice .tm-calc-tab {
  min-height: 88px;
  cursor: default;
}

.tav-wizard-choice .tm-calc-tab strong {
  font-size: 15px;
}

.tav-wizard-country {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 19, 21, .1);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(206, 255, 0, .14), transparent 48%),
    #fff;
}

.tav-wizard-country img {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.tav-wizard-country strong,
.tav-wizard-country small {
  display: block;
}

.tav-wizard-country strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.tav-wizard-country small {
  color: rgba(17, 19, 21, .58);
  font-size: 12px;
  line-height: 1.45;
}

.tav-wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tav-wizard-actions .tav-button {
  min-height: 50px;
}

.tav-calc-wizard .tav-fields {
  margin-top: 14px;
}

.tav-calc-wizard .tav-field input,
.tav-calc-wizard .tav-field select {
  min-height: 48px;
}

.tav-calc-wizard .tm-calc-result {
  align-content: start;
  min-width: 0;
}

.tav-calc-wizard .tm-calc-result .tav-panel-head {
  grid-column: 1 / -1;
}

.tav-calc-wizard .tm-calc-result .tav-panel-head h2 {
  color: #fff;
}

.tav-calc-wizard .tm-calc-result .tav-panel-head p {
  color: rgba(255, 255, 255, .64);
}

.tav-calc-wizard .tm-calc-result .tav-step {
  background: #ff9500;
}

.tav-calc-wizard .tm-calc-result .tav-total,
.tav-calc-wizard .tm-calc-result .tav-empty,
.tav-calc-wizard .tm-calc-result .tav-breakdown,
.tav-calc-wizard .tm-calc-result .tav-missing,
.tav-calc-wizard .tm-calc-result .tav-disclaimer,
.tav-calc-wizard .tm-calc-result .tav-result-actions,
.tav-calc-wizard .tm-calc-result .tav-save-status {
  grid-column: 1 / -1;
}

.tav-calc-wizard .tm-calc-result .tav-total > strong {
  position: relative;
  display: inline-flex;
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  letter-spacing: -.055em;
}

.tav-calc-wizard .tm-calc-result .tav-total > strong.is-changing {
  animation: tmCalcValuePulse .72s ease;
}

.tav-calc-wizard .tm-calc-result .tav-result-line strong {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}

.tav-calc-wizard .tm-calc-result .tav-disclaimer strong {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.tav-calc-wizard .tm-calc-result .tav-empty strong {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}

.tav-calc-wizard .tm-calc-result.is-changing {
  animation: tavWizardResultGlow 1.05s ease;
}

@keyframes tavWizardPanelIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tavWizardResultGlow {
  0% { box-shadow: 0 0 0 rgba(206, 255, 0, 0); }
  38% { box-shadow: 0 0 0 4px rgba(206, 255, 0, .16), 0 26px 70px rgba(17, 19, 21, .24); }
  100% { box-shadow: 0 0 0 rgba(206, 255, 0, 0); }
}

@media (max-width: 1180px) {
  .tav-universal-calculator {
    width: min(100% - 32px, 1120px);
  }

  .tav-universal-calculator .tm-calc-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tav-universal-calculator [data-universal-step="details"] .tm-calc-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .tav-universal-calculator {
    display: block;
    width: min(100% - 32px, 1400px);
  }

  .tav-universal-calculator > [data-universal-step] {
    margin-top: 0;
  }

  .tav-universal-calculator > [data-universal-step="details"] {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tav-universal-calculator > [data-universal-step="details"] > .tm-calc-workspace,
  .tav-universal-calculator > [data-universal-step="details"] > .tm-calc-result {
    grid-column: 1;
  }

  .tav-universal-calculator > [data-universal-step="details"] > .tm-calc-workspace,
  .tav-universal-calculator > [data-universal-step="details"] > .tm-calc-result {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .tav-universal-calculator .tm-calc-picker,
  .tav-universal-calculator [data-universal-step="details"] .tm-calc-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .tav-universal-calculator {
    width: min(100% - 24px, 1400px);
  }

  .tav-universal-calculator .tm-calculator-hero h2 {
    font-size: clamp(30px, 11vw, 48px);
  }

  .tav-universal-calculator .tm-calc-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .tav-universal-calculator .tm-calc-tab {
    min-height: 58px;
  }

  .tav-universal-progress {
    gap: 4px;
    padding: 5px;
  }

  .tav-universal-progress button {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 6px;
    min-height: 48px;
    padding: 6px;
  }

  .tav-universal-progress button > span {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .tav-universal-progress button > strong {
    font-size: 10px;
  }

  .tav-wizard-status {
    grid-template-columns: 1fr;
  }

  .tav-wizard-status button {
    min-height: 54px;
  }

  .tav-wizard-status button:not(.is-active) {
    display: none;
  }

  .tav-wizard-country {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .tav-wizard-country img {
    width: 68px;
    height: 68px;
  }

  .tav-wizard-actions .tav-button {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .tav-universal-calculator [data-universal-step="details"] .tm-calc-controls {
    grid-template-columns: 1fr;
  }

  .tav-universal-progress button > strong {
    display: none;
  }

  .tav-universal-progress button {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tav-universal-js .tav-universal-calculator [data-universal-step].is-active,
  .tav-universal-calculator .tm-calc-result.is-changing,
  .tav-js .tav-calc-wizard [data-wizard-panel].is-active,
  .tav-calc-wizard .tm-calc-result.is-changing {
    animation: none;
  }
}

@media print {
  .tav-wizard-status,
  .tav-wizard-actions {
    display: none !important;
  }
}
