/* Financial calculators (2026-11-02). Public design language of the homepage v2 (flat neutral fills, large radii, brand
   red only for the primary action and focus). One form/result pattern shared by the three tools. Logical properties
   only, so AR/FA render right-to-left without overrides; numbers sit in <bdi> and inputs are dir="ltr". */
.ef-calc-page {
  --calc-ink: #0e0e10;
  --calc-text: #52525b;
  --calc-muted: #71717a;
  --calc-line: #e4e4e7;
  --calc-fill: #f4f4f5;
  --calc-brand: #be123c;
  --calc-ok: #15803d;
  --calc-ok-tint: #f0fdf4;
  --calc-warn: #b45309;
  --calc-warn-tint: #fffbeb;
  --calc-error: #b91c1c;
  --calc-error-tint: #fef2f2;
  --calc-info-tint: #f4f4f5;
}

.ef-calc-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ef-calc-disclaimer-short { display: flex; gap: 8px; align-items: baseline; max-width: 760px; margin: 14px 0 0; color: var(--calc-muted); font-size: 14px; font-weight: 600; line-height: 1.5; }
.ef-calc-section { padding-top: 16px; }

/* Layout: form and result side by side from 1100px, stacked below. */
.ef-calc-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1100px) {
  .ef-calc-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 32px; }
  .ef-calc-result { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
}
.ef-calc-layout > * { min-width: 0; }

.ef-calc-form, .ef-calc-result { padding: 22px; border-radius: 22px; background: var(--calc-fill); color: var(--calc-ink); }
@media (min-width: 640px) { .ef-calc-form, .ef-calc-result { padding: 28px; } }
.ef-calc-result:focus { outline: none; }
.ef-calc-result:focus-visible { outline: 3px solid var(--calc-brand); outline-offset: 3px; }

.ef-calc-subtitle { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; color: var(--calc-ink); font-size: 20px; font-weight: 700; line-height: 1.3; }
.ef-calc-group { margin: 0 0 18px; padding: 18px; border: 0; border-radius: 16px; background: #fff; }
.ef-calc-group__title { float: inline-start; width: 100%; margin: 0 0 12px; padding: 0; color: var(--calc-ink); font-size: 16px; font-weight: 700; }
.ef-calc-group__title + * { clear: both; }
.ef-calc-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .ef-calc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ef-calc-row > * { min-width: 0; }

.ef-calc-field { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.ef-calc-field[hidden] { display: none; }
.ef-calc-label { display: block; margin: 0 0 6px; padding: 0; color: var(--calc-ink); font-size: 14px; font-weight: 700; line-height: 1.4; }
.ef-calc-optional { color: var(--calc-muted); font-weight: 500; }
.ef-calc-control { position: relative; display: flex; align-items: center; }
.ef-calc-input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--calc-line); border-radius: 12px; background: #fff; color: var(--calc-ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
select.ef-calc-input { padding-inline-end: 36px; }
.ef-calc-control .ef-calc-input { padding-inline-end: 48px; }
.ef-calc-suffix { position: absolute; inset-inline-end: 14px; color: var(--calc-muted); font-size: 14px; font-weight: 700; pointer-events: none; }
.ef-calc-input:focus-visible, .ef-calc-option input:focus-visible { outline: 3px solid var(--calc-brand); outline-offset: 2px; }
.ef-calc-field.is-invalid .ef-calc-input { border-color: var(--calc-error); }
.ef-calc-help { margin: 6px 0 0; color: var(--calc-text); font-size: 13px; font-weight: 500; line-height: 1.55; }
.ef-calc-error { display: flex; gap: 6px; align-items: baseline; margin: 6px 0 0; color: var(--calc-error); font-size: 13px; font-weight: 700; }

.ef-calc-options { display: grid; gap: 8px; }
.ef-calc-option { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1px solid var(--calc-line); border-radius: 12px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.45; }
.ef-calc-option input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--calc-brand); }
.ef-calc-option:has(input:checked) { border-color: var(--calc-ink); box-shadow: inset 0 0 0 1px var(--calc-ink); }

.ef-calc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ef-calc-actions .ef-public-btn { min-height: 50px; padding-inline: 22px; }

.ef-calc-prefill { display: flex; gap: 10px; margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: #fff; font-size: 14px; font-weight: 600; line-height: 1.55; }
.ef-calc-prefill i { margin-top: 4px; color: var(--calc-brand); }
.ef-calc-prefill p { margin: 0; }
.ef-calc-prefill a { display: inline-block; margin-inline-start: 4px; color: var(--calc-brand); text-decoration: underline; }

/* Result */
.ef-calc-placeholder { margin: 0; color: var(--calc-text); font-size: 15px; font-weight: 500; line-height: 1.6; }
.ef-calc-status { display: flex; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--calc-info-tint); }
.ef-calc-status > i { margin-top: 3px; font-size: 18px; }
.ef-calc-status strong { display: block; font-size: 16px; }
.ef-calc-status p { margin: 4px 0 0; color: var(--calc-text); font-size: 14px; line-height: 1.55; }
.ef-calc-status .ef-calc-status__date { color: var(--calc-muted); font-size: 13px; }
.ef-calc-status--ok { background: var(--calc-ok-tint); } .ef-calc-status--ok > i { color: var(--calc-ok); }
.ef-calc-status--estimate { background: #fff; } .ef-calc-status--estimate > i { color: var(--calc-ink); }
.ef-calc-status--warn { background: var(--calc-warn-tint); } .ef-calc-status--warn > i { color: var(--calc-warn); }
.ef-calc-status--error { background: var(--calc-error-tint); } .ef-calc-status--error > i { color: var(--calc-error); }

.ef-calc-totals { display: grid; gap: 10px; margin: 0 0 16px; }
.ef-calc-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 16px; border-radius: 14px; background: #fff; }
.ef-calc-total dt { color: var(--calc-text); font-size: 14px; font-weight: 600; }
.ef-calc-total dd { margin: 0; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ef-calc-total--main { background: var(--calc-ink); color: #fff; }
.ef-calc-total--main dt { color: rgb(255 255 255 / 0.72); }
.ef-calc-total--main dd { font-size: 22px; }

.ef-calc-declaration { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #fff; font-size: 15px; font-weight: 600; }

.ef-calc-table-wrap { position: relative; margin: 0 0 16px; overflow-x: auto; border-radius: 14px; background: #fff; }
.ef-calc-table-wrap:focus-visible { outline: 3px solid var(--calc-brand); outline-offset: 2px; }
.ef-calc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ef-calc-caption { padding: 12px 16px 4px; color: var(--calc-ink); font-size: 14px; font-weight: 800; text-align: start; caption-side: top; }
.ef-calc-table th, .ef-calc-table td { padding: 10px 16px; border-bottom: 1px solid var(--calc-line); text-align: start; vertical-align: top; }
.ef-calc-table tbody tr:last-child > * { border-bottom: 0; }
.ef-calc-table thead th { color: var(--calc-muted); font-size: 12px; font-weight: 700; }
.ef-calc-table tbody th { font-weight: 600; }
.ef-calc-table .ef-calc-num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.ef-calc-table tr.is-excluded td, .ef-calc-table tr.is-excluded th { color: var(--calc-muted); }
.ef-calc-table tr.is-excluded .ef-calc-num { font-weight: 600; white-space: normal; }
.ef-calc-table tr.is-strong > * { font-weight: 800; }
.ef-calc-table--muted { color: var(--calc-text); }
.ef-calc-table--sources { min-width: 640px; font-size: 13px; }
.ef-calc-table--sources a { color: var(--calc-ink); text-decoration: underline; text-underline-offset: 2px; }

.ef-calc-copy { min-height: 44px; margin-bottom: 4px; }
.ef-calc-copy-status { min-height: 1em; margin: 0 0 12px; color: var(--calc-ok); font-size: 13px; font-weight: 700; }

.ef-calc-notes ul { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.ef-calc-note { display: flex; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #fff; color: var(--calc-text); font-size: 14px; line-height: 1.55; }
.ef-calc-note > i { margin-top: 3px; }
.ef-calc-note--warning > i { color: var(--calc-warn); }
.ef-calc-note--error > i { color: var(--calc-error); }
.ef-calc-note--info > i { color: var(--calc-muted); }
.ef-calc-sources .ef-calc-help { margin-bottom: 10px; }
.ef-calc-limits { margin: 0 0 8px; padding: 12px 16px; border-radius: 14px; background: #fff; font-size: 13px; }
.ef-calc-limits summary { cursor: pointer; font-weight: 700; }
.ef-calc-limits dt { margin-top: 10px; font-weight: 700; }
.ef-calc-limits dd { margin: 2px 0 0; color: var(--calc-text); line-height: 1.55; }

.ef-calc-disclaimer { margin-top: 28px; padding: 20px 22px; border-radius: 18px; background: var(--calc-fill); }
.ef-calc-disclaimer p { margin: 6px 0 0; color: var(--calc-text); font-size: 14px; line-height: 1.6; }
.ef-calc-others { margin-top: 24px; }
.ef-calc-others ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ef-calc-others a { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--calc-fill); color: var(--calc-ink); font-size: 14px; font-weight: 700; }
.ef-calc-others a:hover { background: var(--calc-line); }
.ef-calc-others a:focus-visible, .ef-calc-card a:focus-visible { outline: 3px solid var(--calc-brand); outline-offset: 2px; }

/* Hub */
.ef-calc-hub-help { max-width: 760px; margin: 12px 0 0; color: var(--calc-text); font-size: 14px; line-height: 1.6; }
.ef-calc-hub-tools .ef-calc-cards { margin-top: 0; }
.ef-calc-hub-tools { padding-top: 28px; }
.ef-calc-card .hv2-card__body { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 24px; }
.ef-calc-card .hv2-card__title { margin: 4px 0 0; font-size: 20px; font-weight: 700; }
.ef-calc-card .hv2-card__title a::after { content: ""; position: absolute; inset: 0; }
.ef-calc-card { position: relative; }
.ef-calc-card .hv2-card__text { flex: 1; margin: 0; color: var(--calc-text); font-size: 15px; line-height: 1.6; }
.ef-calc-card__cta { align-self: flex-start; min-height: 46px; padding-inline: 18px; }
.ef-calc-hub-note { display: flex; gap: 10px; align-items: baseline; margin: 20px 0 0; color: var(--calc-text); font-size: 14px; font-weight: 600; line-height: 1.6; }

[dir="rtl"] .ef-calc-others .ef-public-arrow { transform: scaleX(-1); }

@media print {
  .ef-calc-form, .ef-calc-copy, .ef-calc-others, .ef-crumbs { display: none !important; }
  .ef-calc-layout { display: block; }
  .ef-calc-result { position: static; max-height: none; overflow: visible; background: none; }
}

/* Guide under each calculator (SEO and reader context): one H2, H3 topics in a readable two-column grid. */
.ef-calc-guide { margin-top: 36px; }
.ef-calc-guide__title { margin: 0 0 16px; color: var(--calc-ink); font-size: clamp(22px, 1rem + 1vw, 30px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
[dir="rtl"] .ef-calc-guide__title { letter-spacing: 0; }
.ef-calc-guide__grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .ef-calc-guide__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ef-calc-guide__item { min-width: 0; padding: 18px 20px; border-radius: 16px; background: var(--calc-fill); }
.ef-calc-guide__item h3 { margin: 0 0 8px; color: var(--calc-ink); font-size: 17px; font-weight: 700; line-height: 1.35; }
.ef-calc-guide__item p { margin: 0; color: var(--calc-text); font-size: 15px; line-height: 1.7; }
