.calculator-page { min-height: 100vh; color: #fff; background: #19191c; }
.calculator-header .header-inner { grid-template-columns: 1fr auto; }
.calculator-home { padding-block: 12px; font-size: 14px; font-weight: 700; }
.calculator-home span { margin-right: 5px; color: #ff707b; }
.calculator-home:hover { color: #ffb4ba; }
.calculator-main { padding-block: clamp(34px, 5vw, 70px) 70px; }
.calculator-heading { margin-bottom: clamp(25px, 3vw, 40px); }
.calculator-heading h1 { font-size: clamp(42px, 6.2vw, 90px); letter-spacing: -.05em; line-height: .94; }
.calculator-heading p { max-width: 600px; margin-top: 14px; color: #d3cdd0; font-size: 16px; line-height: 1.55; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr); gap: 14px; }
.calculator-form, .calculator-results { min-width: 0; border-radius: 8px; padding: clamp(19px, 2.6vw, 38px); }
.calculator-form { border: 1px solid #ffffff24; background: linear-gradient(146deg, #332328 0%, #242226 49%, #1d1d20); }
.calculator-panel-heading { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; justify-content: space-between; }
.calculator-layout h2 { font-size: clamp(27px, 3.3vw, 49px); letter-spacing: -.04em; line-height: 1; }
.calculator-example { padding: 5px 0; color: #ffabb2; background: none; border: none; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.calculator-example:hover { color: #fff; }
.calculator-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 13px; margin-top: 24px; }
.calculator-field label { display: block; margin-bottom: 6px; color: #f2eef0; font-size: 13px; font-weight: 700; }
.calculator-field :is(input, select) { min-height: 45px; width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid #ffffff30; border-radius: 4px; color-scheme: dark; color: #fff; background: #ffffff12; font-size: 15px; transition: border-color 180ms; }
.calculator-field option { background: #27252a; color: #fff; }
.calculator-field input::placeholder { color: #bbb4ba; }
.calculator-field :is(input, select):focus { border-color: #ff707b; }
.calculator-field [aria-invalid='true'] { border-color: #ff8289; }
.calculator-field-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.calculator-field-group select { width: auto; }
.calculator-note, .calculator-result-note { font-size: 13px; line-height: 1.5; }
.calculator-note { margin-top: 12px; color: #d2c9ce; }
.calculator-exchange { margin-top: 20px; }
.calculator-exchange p { font-size: 14px; font-weight: 700; }
.calculator-exchange a, .calculator-sources a { text-decoration: underline; text-underline-offset: 3px; }
.calculator-exchange a:hover, .calculator-sources a:hover { color: #ffabb2; }
.calculator-exchange ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.calculator-exchange li { padding: 6px 8px; border: 1px solid #ffffff21; border-radius: 3px; color: #e2dade; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calculator-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.calculator-reset { border-color: #ffffff45; color: #fff; background: transparent; }
.calculator-reset:hover { background: #ffffff13; }
.calculator-error { margin-top: 14px; color: #ffc0c5; font-size: 14px; }

.calculator-results { display: flex; flex-direction: column; border-top: 4px solid var(--red); color: var(--ink); background: #f7f7f6; }
.calculator-status { min-height: 1.4em; margin-top: 9px; color: #625b60; font-size: 13px; line-height: 1.4; }
.calculator-payments, .calculator-totals { margin: 0; }
.calculator-payments { margin-top: 13px; }
:is(.calculator-payments, .calculator-totals) div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 0; }
.calculator-payments div + div { border-top: 1px solid #dedadd; }
.calculator-payments small { display: inline-block; margin-left: 4px; color: #625b60; font-size: 12px; }
.calculator-results dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calculator-totals { margin-top: auto; padding-top: 18px; }
.calculator-totals div { padding: 12px 14px; border-radius: 4px; background: #e9e5e6; font-weight: 700; }
.calculator-totals div + div { margin-top: 7px; color: #fff; background: #aa1521; font-size: clamp(15px, 1.7vw, 22px); }
.calculator-result-note { margin-top: 11px; color: #625b60; }
.calculator-sources { margin-top: 24px; color: #ded8dc; font-size: 14px; line-height: 1.6; }
.calculator-sources summary { cursor: pointer; width: fit-content; font-weight: 700; }
.calculator-sources ul { margin: 8px 0 0; padding-left: 20px; }

@media (max-width: 820px) {
  .calculator-layout { grid-template-columns: 1fr; }
}

@media (max-width: 490px) {
  .calculator-heading h1 { font-size: clamp(35px, 10vw, 45px); }
  .calculator-fields { grid-template-columns: 1fr; gap: 12px; margin-top: 17px; }
  .calculator-payments small { display: block; margin-left: 0; }
}
