.f50-calc {
  --f50-ink: #101522; --f50-muted: #626d7e; --f50-line: #dbe0e7; --f50-gold: #f5bb24;
  width: 100%; max-width: 1400px; margin: 28px auto; color: var(--f50-ink); font-family: inherit;
  font-size: 16px; line-height: 1.5; text-align: left;
  /* No size containment: nested flex accordions otherwise overestimate block height. */
  --f50-unit: 1vw;
}
.f50-calc *, .f50-calc *::before, .f50-calc *::after { box-sizing: border-box; }
.f50-calc [hidden] { display: none !important; }
.f50-calc .f50-calc__layout { display: grid; grid-template-columns: 1.07fr 1fr; gap: 18px; align-items: stretch; }
.f50-calc .f50-calc__card { min-width: 0; padding: clamp(22px, calc(3.3 * var(--f50-unit)), 44px); border: 1px solid var(--f50-line); border-radius: 18px; background: linear-gradient(135deg, #fff, #fafbfc); box-shadow: 0 8px 30px #17293d08; }
.f50-calc .f50-calc__accent { width: 54px; height: 6px; background: var(--f50-gold); border-radius: 5px; margin-bottom: 15px; }
.f50-calc h2.f50-calc__title { margin: 0 0 12px; font-family: inherit; font-size: clamp(27px, calc(3.2 * var(--f50-unit)), 43px); font-weight: 750; line-height: 1.14; letter-spacing: -.035em; color: var(--f50-ink); overflow-wrap: anywhere; }
.f50-calc .f50-calc__description { margin: 0 0 25px; font-size: clamp(16px, calc(1.6 * var(--f50-unit)), 21px); line-height: 1.48; color: var(--f50-muted); }
.f50-calc .f50-calc__field { min-width: 0; margin-bottom: 18px; }
.f50-calc label { display: block; margin: 0 0 7px; font: inherit; font-weight: 500; color: var(--f50-ink); }
.f50-calc input:not([type="checkbox"]), .f50-calc select, .f50-calc textarea {
  display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 52px; height: auto; margin: 0; padding: 12px 16px;
  border: 1px solid #cbd3df; border-radius: 9px; box-shadow: inset 0 1px 2px #16243708;
  background-color: #fff; color: var(--f50-ink); font-family: inherit; font-size: 18px; font-weight: 400; line-height: 1.4;
}
.f50-calc select { appearance: auto; cursor: pointer; padding-right: 8px; text-overflow: ellipsis; }
.f50-calc textarea { resize: vertical; min-height: 86px; }
.f50-calc .f50-calc__input-unit { display: flex; border: 1px solid #cbd3df; border-radius: 9px; overflow: hidden; background: #fff; }
.f50-calc .f50-calc__input-unit input { border: 0; border-radius: 0; flex: 1 1 auto; width: 0; }
.f50-calc .f50-calc__input-unit span { display: flex; align-items: center; justify-content: center; flex: 0 1 auto; padding: 10px 20px; background: #f0f2f5; border-left: 1px solid var(--f50-line); max-width: 45%; overflow-wrap: anywhere; }
.f50-calc .f50-calc__input-unit:focus-within { outline: 2px solid #9a6a00; outline-offset: 2px; }
.f50-calc .f50-calc__label-row { display: flex; align-items: center; gap: 12px; margin-bottom: 5px; }
.f50-calc .f50-calc__label-row label { margin: 0; }
.f50-calc button { font-family: inherit; text-transform: none; letter-spacing: normal; cursor: pointer; }
.f50-calc button.f50-calc__help-toggle { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 50%; color: var(--f50-ink); background: transparent; font-size: 20px; font-weight: 650; text-decoration: underline dotted; }
.f50-calc .f50-calc__help { margin: 4px 0 10px; padding: 12px; background: #fff5d9; border-radius: 8px; font-size: 14px; }
.f50-calc .f50-calc__dimensions { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.f50-calc .f50-calc__result { padding: 20px 22px 14px; margin: 3px 0 12px; border-radius: 12px; background: linear-gradient(115deg, #fff4d6, #fff8e7); }
.f50-calc .f50-calc__empty { margin: 6px 0 12px; color: #5f5033; }
.f50-calc .f50-calc__totals { display: grid; grid-template-columns: .95fr 1.1fr; gap: 18px; }
.f50-calc .f50-calc__totals > div { min-width: 0; }
.f50-calc .f50-calc__totals > div + div { padding-left: 18px; border-left: 1px solid #e4d6b5; }
.f50-calc .f50-calc__totals span { display: block; font-size: 15px; line-height: 1.4; }
.f50-calc .f50-calc__totals strong { display: block; font-size: clamp(27px, calc(3 * var(--f50-unit)), 40px); font-weight: 750; line-height: 1.2; margin-top: 6px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.f50-calc .f50-calc__totals strong.f50-calc__total { color: #946200; }
.f50-calc .f50-calc__formula { border-top: 1px solid #e4d6b5; padding-top: 10px; margin: 14px 0 0; text-align: center; color: #625b4b; overflow-wrap: anywhere; }
.f50-calc button.f50-calc__button { display: flex; align-items: center; justify-content: center; gap: 13px; width: 100%; min-height: 58px; margin: 0; padding: 14px 20px; background: linear-gradient(105deg, #f9c749, #f5bb24); border: 1px solid #efb621; border-radius: 10px; color: #111722; font-size: 19px; font-weight: 700; line-height: 1.3; box-shadow: none; transition: background .15s, transform .15s; white-space: normal; }
.f50-calc button.f50-calc__button:hover:not(:disabled) { background: #efb015; transform: translateY(-1px); color: #111722; }
.f50-calc button.f50-calc__button:disabled { opacity: .6; cursor: default; }
.f50-calc .f50-calc__button svg { width: 27px; height: 30px; flex-shrink: 0; }
.f50-calc .f50-calc__button span { min-width: 0; overflow-wrap: anywhere; }
.f50-calc .f50-calc__arrow { font-size: 29px; font-weight: 400; }
.f50-calc .f50-calc__note { display: flex; align-items: flex-start; gap: 12px; font-size: 12px; line-height: 1.5; padding: 13px 15px; margin: 10px 0 0; border-radius: 10px; background: #f0f3f6; color: #5b6677; }
.f50-calc .f50-calc__note > span { font-size: 24px; line-height: 1.1; flex-shrink: 0; }
.f50-calc .f50-calc__scheme { display: flex; flex-direction: column; align-items: stretch; background: linear-gradient(140deg, #f8f9fa, #f0f2f4); }
.f50-calc .f50-calc__scheme h3 { margin: 0 0 24px; font-family: inherit; color: var(--f50-ink); font-size: clamp(19px, calc(1.9 * var(--f50-unit)), 25px); line-height: 1.3; letter-spacing: -.025em; }
.f50-calc img.f50-calc__image { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; border: 0; border-radius: 0; margin: auto 0; }
.f50-calc .f50-calc__tip { display: flex; gap: 16px; padding: 20px; margin-top: 28px; border-radius: 12px; background: #fffbf0; border: 1px solid #fff; }
.f50-calc .f50-calc__tip > span { color: #966600; font-size: 28px; line-height: 1.1; }
.f50-calc .f50-calc__tip strong { font-size: 16px; }
.f50-calc .f50-calc__tip p { font-size: 14px; line-height: 1.5; margin: 7px 0 0; color: #596678; }
.f50-calc :focus-visible { outline: 3px solid #926100; outline-offset: 3px; }
.f50-calc .f50-calc__error { font-size: 13px; color: #8a291c; margin: 6px 0 0; }
.f50-calc .f50-calc__error:empty { display: none; }
.f50-calc [aria-invalid="true"] { border-color: #9d3c2c; }
.f50-calc dialog.f50-calc__dialog { position: fixed; inset: 0; width: min(600px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 30px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--f50-line); border-radius: 17px; background: #fff; color: var(--f50-ink); font: inherit; box-shadow: 0 24px 90px #17213140; }
.f50-calc .f50-calc__dialog::backdrop { background: #10152299; }
.f50-calc .f50-calc__dialog h2 { margin: 0 40px 10px 0; font-family: inherit; font-size: 27px; line-height: 1.2; color: var(--f50-ink); }
.f50-calc .f50-calc__modal-intro { margin: 0 0 16px; color: var(--f50-muted); font-size: 15px; }
.f50-calc button.f50-calc__close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #f1f3f5; color: var(--f50-ink); font-size: 30px; line-height: 1; }
.f50-calc .f50-calc__summary { padding: 16px; border-radius: 10px; background: #fff7e2; margin-bottom: 20px; overflow-wrap: anywhere; }
.f50-calc .f50-calc__summary h3 { font: inherit; font-weight: 700; color: var(--f50-ink); margin: 0 0 8px; }
.f50-calc .f50-calc__summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; margin: 0; font-size: 14px; }
.f50-calc .f50-calc__summary dt, .f50-calc .f50-calc__summary dd { margin: 0; min-width: 0; }
.f50-calc .f50-calc__summary dd { text-align: right; font-weight: 600; }
.f50-calc .f50-calc__consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.f50-calc .f50-calc__consent input { appearance: auto; width: 20px; height: 20px; min-width: 20px; margin: 12px 0; accent-color: #a46e00; cursor: pointer; }
.f50-calc .f50-calc__consent label { font-size: 13px; line-height: 1.5; min-height: 44px; padding: 10px 0; cursor: pointer; }
.f50-calc .f50-calc__consent a { color: #785300; text-decoration: underline; }
.f50-calc .f50-calc__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.f50-calc .f50-calc__status { font-weight: 600; margin: 15px 0 0; overflow-wrap: anywhere; }
.f50-calc .f50-calc__status:empty { display: none; }
.f50-calc .f50-calc__spinner { width: 19px; height: 19px; border: 2px solid #17213140; border-top-color: #172131; border-radius: 50%; animation: f50-spin .7s linear infinite; }
@keyframes f50-spin { to { transform: rotate(360deg); } }
/* Initial mobile layout before JS. Once measured, each instance follows its own width. */
@media (max-width: 860px) {
  .f50-calc:not([data-f50-layout]) .f50-calc__layout { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .f50-calc:not([data-f50-layout]) .f50-calc__dimensions,
  .f50-calc:not([data-f50-layout]) .f50-calc__totals { grid-template-columns: 1fr; }
}
.f50-calc[data-f50-layout="stacked"] .f50-calc__layout,
.f50-calc[data-f50-layout="compact"] .f50-calc__layout { grid-template-columns: 1fr; }
.f50-calc[data-f50-layout="stacked"] .f50-calc__card,
.f50-calc[data-f50-layout="compact"] .f50-calc__card { padding: 28px; }
.f50-calc[data-f50-layout="stacked"] h2.f50-calc__title,
.f50-calc[data-f50-layout="compact"] h2.f50-calc__title { font-size: 34px; }
.f50-calc[data-f50-layout="stacked"] .f50-calc__totals strong,
.f50-calc[data-f50-layout="compact"] .f50-calc__totals strong { font-size: 36px; }
.f50-calc[data-f50-layout="stacked"] .f50-calc__scheme h3,
.f50-calc[data-f50-layout="compact"] .f50-calc__scheme h3 { font-size: 23px; }
.f50-calc[data-f50-layout="stacked"] img.f50-calc__image,
.f50-calc[data-f50-layout="compact"] img.f50-calc__image { max-width: 701px; margin: 0 auto; }
.f50-calc[data-f50-layout="compact"] .f50-calc__card { padding: 20px 16px; border-radius: 13px; }
.f50-calc[data-f50-layout="compact"] h2.f50-calc__title { font-size: 28px; }
.f50-calc[data-f50-layout="compact"] .f50-calc__dimensions { grid-template-columns: 1fr; gap: 0; }
.f50-calc[data-f50-layout="compact"] .f50-calc__totals { grid-template-columns: 1fr; gap: 14px; }
.f50-calc[data-f50-layout="compact"] .f50-calc__totals > div + div { border-left: 0; padding: 13px 0 0; border-top: 1px solid #e4d6b5; }
.f50-calc[data-f50-layout="compact"] .f50-calc__totals strong { font-size: 32px; }
.f50-calc[data-f50-layout="compact"] .f50-calc__result { padding: 17px; }
.f50-calc[data-f50-layout="compact"] .f50-calc__tip { padding: 16px; gap: 10px; }
.f50-calc[data-f50-layout="compact"] button.f50-calc__button { padding: 14px 12px; font-size: 17px; gap: 8px; }
.f50-calc[data-f50-layout="compact"] .f50-calc__button svg { width: 23px; }
@media (max-width: 480px) {
  .f50-calc dialog.f50-calc__dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 22px 16px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .f50-calc *, .f50-calc *::before, .f50-calc *::after { animation: none !important; transition: none !important; }
}
