.calculator-hero { max-width: 1180px; margin: 0 auto; }
.calculator-section { background: #f5f1eb; }
.calculator-context { max-width: 1180px; margin: 0 auto 2rem; padding: 1.5rem; background: #fff; border-top: 4px solid #500000; }
.calculator-context h2 { margin: .2rem 0 .65rem; color: #17253a; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.calculator-context > p:not(.eyebrow) { max-width: 900px; margin: 0; color: #536170; }
.calculator-context-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.25rem; }
.calculator-context-grid article { padding: 1rem; background: #f5f1eb; border-left: 3px solid #a8874a; }
.calculator-context-grid span { display: inline-grid; width: 1.8rem; height: 1.8rem; place-items: center; color: #fff; background: #500000; border-radius: 50%; font-weight: 700; }
.calculator-context-grid h3 { margin: .7rem 0 .35rem; color: #17253a; font-size: 1rem; }
.calculator-context-grid p { margin: 0; color: #536170; font-size: .9rem; }
.calculator-layout { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.42fr); gap: 2rem; max-width: 1280px; margin: 0 auto; align-items: start; }
.calculator-inputs { display: grid; gap: 1rem; position: sticky; top: 6rem; }
.country-selector { padding: 1.1rem; background: #fff; border-top: 4px solid #500000; }
.country-selector h2 { margin: .15rem 0 .75rem; color: #17253a; font-size: 1.25rem; }
.country-selector > label { display: block; padding: 0 0 .35rem; border: 0; }
.country-selector select { max-width: none; }
.country-summary { margin: .85rem 0 .25rem; color: #17253a; font-size: .9rem; font-weight: 650; }
.country-period, .country-limitation, .country-sources { margin: .45rem 0 0; color: #5d6873; font-size: .78rem; line-height: 1.4; }
.country-sources a { color: #500000; text-decoration: underline; text-underline-offset: 2px; }
.country-limitation { padding: .65rem; background: #fff8e6; border-left: 3px solid #a8874a; color: #4a4030; }
.calculator-inputs fieldset { margin: 0; padding: 1.1rem; border: 1px solid rgba(80, 0, 0, .18); background: #fff; }
.calculator-inputs legend { padding: 0 .45rem; color: #500000; font-weight: 700; }
.calculator-inputs label { display: grid; gap: .35rem; padding: .58rem 0; color: #17253a; font-weight: 650; border-bottom: 1px solid #ece7df; position: relative; }
.calculator-inputs label:last-child { border-bottom: 0; }
.calculator-inputs label > span { display: flex; gap: .45rem; align-items: center; color: #536170; font-size: .88rem; font-weight: 500; }
.calculator-inputs label > .field-name { color: #17253a; font-size: inherit; font-weight: 650; line-height: 1.35; }
.field-help-button { display: inline-grid; width: 1.45rem; height: 1.45rem; flex: 0 0 1.45rem; place-items: center; padding: 0; border: 1px solid #7d8995; border-radius: 50%; background: #fff; color: #500000; font: 700 .82rem/1 sans-serif; cursor: pointer; }
.field-help-button:hover, .field-help-button:focus-visible, .field-help-button[aria-expanded="true"] { border-color: #500000; background: #500000; color: #fff; outline: 0; }
.field-help-button:focus-visible { box-shadow: 0 0 0 3px rgba(80, 0, 0, .2); }
.field-help-popover { position: absolute; z-index: 20; top: calc(100% + .45rem); left: 0; width: min(390px, calc(100vw - 3rem)); padding: .9rem 1rem; border: 1px solid #b8a98e; border-top: 4px solid #500000; border-radius: 3px; background: #fffdf9; color: #253447; box-shadow: 0 12px 28px rgba(8, 29, 43, .2); font-size: .82rem; font-weight: 400; line-height: 1.45; }
.field-help-popover[hidden] { display: none; }
.field-help-popover > strong { display: block; color: #500000; font-size: .95rem; }
.field-help-popover p { margin: .55rem 0 0; }
.field-help-popover b { color: #17253a; }
.field-help-popover a { color: #500000; text-decoration: underline; text-underline-offset: 2px; }
.calculator-inputs small { color: #68737e; font-size: .78rem; line-height: 1.35; font-weight: 400; }
.calculator-inputs input, .calculator-inputs select { width: 100%; min-height: 2.6rem; padding: .6rem .68rem; border: 1px solid #a9b1ba; border-radius: 3px; background: #fff; color: #111b2b; font: inherit; }
.calculator-inputs input { max-width: 9rem; }
.calculator-inputs input:focus, .calculator-inputs select:focus { outline: 3px solid rgba(80, 0, 0, .2); border-color: #500000; }
.calculator-actions { display: flex; justify-content: flex-start; }
.calculator-results { display: grid; gap: 1.2rem; }
.calculator-results > section { padding: 1.45rem; background: #081d2b; color: #fff; border-top: 4px solid #500000; }
.calculator-results h2 { margin: .2rem 0 1rem; color: #fff; font-size: clamp(1.25rem, 2vw, 1.7rem); }
.calculator-results .eyebrow { color: #e2c080; }
.result-context { max-width: 780px; margin: -.35rem 0 1rem; color: #d7e1e8; font-size: .9rem; line-height: 1.45; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .85rem; }
.result-grid article { min-height: 105px; padding: 1rem; background: #fff; color: #17253a; border-left: 3px solid #a8874a; }
.result-grid strong { display: block; color: #500000; font-size: clamp(1.4rem, 2.4vw, 2.15rem); line-height: 1; overflow-wrap: anywhere; }
.result-grid span { display: block; margin-top: .55rem; color: #52606d; font-size: .86rem; line-height: 1.3; }
.result-grid span small { display: block; margin-top: .15rem; color: #6c7782; font-size: .72rem; }
.boundary-message, .currency-note { margin: 1rem 0 0; color: #d7e1e8; font-size: .9rem; }
.calculator-equations { padding: 1rem 1.15rem; border: 1px solid #ccd4da; background: #fff; color: #17253a; }
.calculator-equations summary { cursor: pointer; color: #500000; font-weight: 700; }
.calculator-equations p { margin: .8rem 0 0; }
.calculator-note { margin: 0; padding: 1rem 1.15rem; background: #fff8e6; color: #3b3325; border-left: 4px solid #a8874a; }
@media (max-width: 900px) { .calculator-context-grid { grid-template-columns: 1fr; } .calculator-layout { grid-template-columns: 1fr; } .calculator-inputs { position: static; } }
@media (max-width: 540px) { .calculator-section { padding-inline: 1rem; } .result-grid { grid-template-columns: 1fr 1fr; } .calculator-results > section { padding: 1rem; } }
