/* Calculator UI only. The site's existing style.css controls all page-level
   typography, hero, navigation, footer, section spacing and standard components.
   Every selector here is scoped to #ek-calculator. */
#ek-calculator { --ink:#262B32; --text:#29313A; --muted:#566166; --line:#E8E8E3; --page:#F8F8F5; --paper:#fff; --pine:#496256; --terracotta:#B78069; --soft:#F2F2EE; --purple:#A7A0B1; background:var(--page); }
#ek-calculator, #ek-calculator * {box-sizing:border-box}
#ek-calculator [hidden]{display:none!important}
#ek-calculator button,#ek-calculator input,#ek-calculator select {font:inherit}
#ek-calculator button{cursor:pointer}
#ek-calculator button:focus-visible,#ek-calculator input:focus-visible,#ek-calculator select:focus-visible,#ek-calculator summary:focus-visible{outline:3px solid #9BAEA6;outline-offset:3px}
#ek-calculator .workspace {border:1px solid #e6e6e0;border-radius:22px;background:#fff;box-shadow:0 22px 60px rgba(35,43,49,.065),0 2px 10px rgba(35,43,49,.025);display:grid;grid-template-columns:240px minmax(0,1fr);overflow:hidden;min-height:660px}
#ek-calculator .sidebar {padding:26px 15px;background:#FBFBF9;border-right:1px solid var(--line)}
#ek-calculator .sidetitle {padding:0 15px 12px;font-size:10px;font-weight:800;letter-spacing:.13em;color:#596268;text-transform:uppercase}
#ek-calculator .tool {border:0;border-radius:11px;width:100%;padding:13px 13px;text-align:left;background:transparent;display:flex;align-items:center;gap:12px;color:#505b60;font-size:13px;font-weight:630;margin:2px 0;transition:background .15s,color .15s}
#ek-calculator .tool:hover {background:#F0F0ED}
#ek-calculator .tool[aria-selected=true] {background:#282f36;color:#fff}
#ek-calculator .tool svg {width:19px;height:19px;flex:none}
#ek-calculator .tool small {margin-left:auto;font-size:9px;opacity:.6;text-transform:uppercase;letter-spacing:.04em}
#ek-calculator .sideseparator {height:1px;background:var(--line);margin:26px 12px}
#ek-calculator .sidetip {padding:10px 14px;color:#566166;font-size:12px;line-height:1.65}
#ek-calculator .main {min-width:0}
#ek-calculator .topbar {height:72px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 29px}
#ek-calculator .topbar strong {font-weight:600}
#ek-calculator .topright {display:flex;align-items:center;gap:9px;color:#566166;font-size:12px}
#ek-calculator .live {width:7px;height:7px;border-radius:50%;background:#7da78d}
#ek-calculator .bodygrid {display:grid;grid-template-columns:minmax(305px,1.04fr) minmax(320px,.96fr);min-height:586px}
#ek-calculator .inputs {padding:34px 34px 42px}
#ek-calculator .results {background:#F5F5F1;border-left:1px solid var(--line);padding:34px 32px 38px}
#ek-calculator .field {margin-bottom:22px}
#ek-calculator .fieldlabel {display:flex;justify-content:space-between;gap:6px;font-size:12px;font-weight:650;margin-bottom:10px}
#ek-calculator .fieldlabel .hint {color:#566166;font-weight:500}
#ek-calculator .numberwrap {display:flex;align-items:center;border:1.5px solid #e5e7e4;border-radius:12px;background:#fff;min-height:51px;padding:0 14px;transition:border-color .2s,box-shadow .2s}
#ek-calculator .numberwrap:focus-within {border-color:#a7b6ab;box-shadow:0 0 0 3px #d9e3da60}
#ek-calculator .numberwrap .prefix {color:#566166;font-size:15px;margin-right:4px}
#ek-calculator .numberwrap input {border:0;outline:0!important;min-width:0;width:100%;font-size:19px;font-weight:720;letter-spacing:-.035em;color:#283039;background:transparent;height:48px;font-variant-numeric:tabular-nums}
#ek-calculator .numberwrap .suffix {font-size:13px;color:#566166;font-weight:650}
#ek-calculator .range {width:100%;margin:12px 0 0;accent-color:#3b5449;height:3px;cursor:pointer}
#ek-calculator .twocol {display:grid;grid-template-columns:1fr 1fr;gap:16px}
#ek-calculator .seg {display:flex;padding:4px;border-radius:12px;background:#f2f2ef;gap:4px}
#ek-calculator .seg button {flex:1;border:0;background:transparent;border-radius:9px;padding:11px 6px;color:#566166;font-weight:660;font-size:12px}
#ek-calculator .seg button[aria-pressed=true] {color:#303941;background:#fff;box-shadow:0 1px 5px #00000013}
#ek-calculator .adv {border-top:1px solid var(--line);margin-top:26px;padding-top:19px}
#ek-calculator .adv summary {cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;color:#505a61;font-size:12px;font-weight:710}
#ek-calculator .adv summary::-webkit-details-marker {display:none}
#ek-calculator .adv summary:after {content:"+";font-size:21px;font-weight:400;color:#566166}
#ek-calculator .adv[open] summary:after {content:"−"}
#ek-calculator .advcontent {padding-top:19px}
#ek-calculator .advcontent .numberwrap input {font-size:16px}
#ek-calculator .advcontent .field {margin-bottom:17px}
#ek-calculator .resultlabel {font-size:11px;color:#566166;font-weight:750;letter-spacing:.12em;text-transform:uppercase}
#ek-calculator .bigresult {display:flex;align-items:baseline;gap:9px;margin:12px 0 5px}
#ek-calculator .bigresult output {font-size:clamp(42px,4.2vw,61px);font-weight:730;letter-spacing:-.065em;color:#262e33;font-variant-numeric:tabular-nums;line-height:1.2}
#ek-calculator .bigresult span {font-size:14px;color:#566166}
#ek-calculator .resnote {font-size:12px;color:#566166;line-height:1.5}
#ek-calculator .bar {height:10px;display:flex;overflow:hidden;border-radius:12px;background:#e5e5df;margin:27px 0 22px}
#ek-calculator .bar i {height:100%;display:block;transition:width .22s ease}
#ek-calculator .breakdown {display:grid;gap:15px}
#ek-calculator .breakrow {display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:#505b60}
#ek-calculator .breakrow strong {font-size:14px;color:#333b41;letter-spacing:-.025em;font-variant-numeric:tabular-nums}
#ek-calculator .dot {width:9px;height:9px;border-radius:3px;display:inline-block;vertical-align:-1px;margin-right:9px;outline:1px solid rgba(38,43,50,.22);outline-offset:0}
#ek-calculator .rule {height:1px;background:#dfe1dc;margin:25px 0 20px}
#ek-calculator .stats {display:flex;justify-content:space-between;gap:10px;margin:12px 0;font-size:12px;color:#566166}
#ek-calculator .stats strong {font-size:14px;color:#333c41;font-variant-numeric:tabular-nums}
#ek-calculator .charttitle {font-size:12px;color:#3f484d;font-weight:760;margin:25px 0 5px}
#ek-calculator .mini-chart {height:116px;width:100%;display:block}
#ek-calculator .chartlabels {display:flex;justify-content:space-between;color:#566166;font-size:10px}
#ek-calculator .resultactions {display:flex;gap:10px;margin-top:23px}
#ek-calculator .button {border-radius:100px;background:#293139;color:white;border:1px solid #293139;padding:13px 18px;font-weight:680;font-size:12px;flex:1}
#ek-calculator .button:hover {background:#454d52}
#ek-calculator .button.alt {background:transparent;color:#344039;border-color:#d4d8d3}
#ek-calculator .button.alt:hover {background:#e9ebe6}
#ek-calculator .fineprint {font-size:11px;line-height:1.65;color:#566166;margin-top:19px}
#ek-calculator .bottom {display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:20px;color:#566166;font-size:12px}
#ek-calculator .bottom a {color:#4a6057;text-decoration:underline}
#ek-calculator .mobiletools {display:none}
#ek-calculator .placeholder {padding:65px 30px;text-align:center;grid-column:1/-1}
#ek-calculator .placeholder .symbol {width:76px;height:76px;border-radius:22px;background:#f0f1ec;margin:0 auto 22px;display:grid;place-items:center;font-size:30px}
#ek-calculator .placeholder p {max-width:480px;margin:0 auto 22px;color:#566166;line-height:1.7}
#ek-calculator .placeholder button {padding:13px 25px;border-radius:50px;background:#2c353b;color:#fff;border:0}
#ek-calculator .sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media (max-width:1080px){#ek-calculator .workspace {grid-template-columns:190px minmax(0,1fr)}
#ek-calculator .sidebar {padding:22px 9px}
#ek-calculator .tool {gap:9px;font-size:12px;padding:13px 9px}
#ek-calculator .bodygrid {grid-template-columns:1fr}
#ek-calculator .results {border-left:0;border-top:1px solid var(--line)}
#ek-calculator .inputs, #ek-calculator .results {padding:29px}
#ek-calculator .topbar {padding:0 29px}
#ek-calculator .resnote {max-width:460px}}
@media (max-width:680px){#ek-calculator .workspace {display:block;border-radius:19px}
#ek-calculator .sidebar {display:none}
#ek-calculator .mobiletools {display:flex;gap:7px;overflow-x:auto;padding:14px 16px;background:#fbfbf9;border-bottom:1px solid var(--line);scrollbar-width:none}
#ek-calculator .mobiletools::-webkit-scrollbar {display:none}
#ek-calculator .mobiletools button {width:auto;flex:none;margin:0;white-space:nowrap;padding:11px 14px;border:1px solid #e4e7e2;background:#fff;border-radius:30px;font-size:11px;color:#505b60;font-weight:680}
#ek-calculator .mobiletools button[aria-selected=true] {background:#293139;color:white;border-color:#293139}
#ek-calculator .topbar {height:62px;padding:0 20px}
#ek-calculator .inputs, #ek-calculator .results {padding:26px 20px}
#ek-calculator .results {padding-bottom:30px}
#ek-calculator .twocol {gap:10px}
#ek-calculator .numberwrap {padding:0 10px}
#ek-calculator .numberwrap input {font-size:17px}
#ek-calculator .bigresult output {font-size:52px}
#ek-calculator .bottom {flex-direction:column;align-items:flex-start;line-height:1.6;margin:18px 10px}
#ek-calculator .resultactions {flex-direction:column}}
@media (prefers-reduced-motion:reduce){}
#ek-calculator #otherWorkspace {display:grid;grid-template-columns:minmax(305px,1.04fr) minmax(320px,.96fr);min-height:586px}
#ek-calculator #otherWorkspace .inputs, #ek-calculator #otherWorkspace .results {min-width:0}
#ek-calculator #otherWorkspace .fieldlabel {line-height:1.4}
#ek-calculator #otherWorkspace .numberwrap input {font-size:17px}
#ek-calculator #otherWorkspace .numberwrap select {width:100%;padding:14px 3px;border:0;background:transparent;color:var(--ink);font-weight:650;outline:none}
#ek-calculator #otherWorkspace .simplehint {font-size:11px;color:#566166;line-height:1.6;margin-top:7px}
#ek-calculator #otherWorkspace .resultgroup {margin-top:25px}
#ek-calculator #otherWorkspace .positive {color:#3f6d51}
#ek-calculator #otherWorkspace .negative {color:#a46252}
#ek-calculator #otherWorkspace .comparison {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:24px 0}
#ek-calculator #otherWorkspace .comparebox {background:#fff;border:1px solid #e4e6e1;border-radius:13px;padding:17px 14px}
#ek-calculator #otherWorkspace .comparebox small {display:block;color:#566166;font-size:11px;margin-bottom:10px}
#ek-calculator #otherWorkspace .comparebox strong {font-size:21px;font-variant-numeric:tabular-nums;letter-spacing:-.045em}
#ek-calculator #otherWorkspace .aux {font-size:11px;color:#566166;line-height:1.65;margin-top:18px}
#ek-calculator #otherWorkspace .notice {padding:13px 14px;background:#e9ece6;border-radius:11px;font-size:12px;color:#506355;line-height:1.6;margin:16px 0}
#ek-calculator #otherWorkspace .notice.warning {background:#f5ece6;color:#855d48}
#ek-calculator #otherWorkspace .pick {display:flex;gap:6px;background:#eceee8;padding:5px;border-radius:11px;margin:0 0 24px}
#ek-calculator #otherWorkspace .pick button {flex:1;border:0;padding:11px 6px;background:transparent;border-radius:8px;font-size:12px;font-weight:650;color:#566166}
#ek-calculator #otherWorkspace .pick button[aria-pressed=true] {background:#fff;color:#27342c;box-shadow:0 1px 4px #0001}
#ek-calculator #otherWorkspace .inner-title {font-size:12px;font-weight:760;color:#505b60;text-transform:uppercase;letter-spacing:.1em;margin:29px 0 17px}
#ek-calculator #otherWorkspace .highlight {margin:22px 0;background:white;border:1px solid #e6e7e3;padding:19px;border-radius:15px}
#ek-calculator #otherWorkspace .highlight b {display:block;font-size:22px;margin:7px 0;letter-spacing:-.03em}
#ek-calculator #otherWorkspace .resultactions {flex-wrap:wrap}
#ek-calculator #otherWorkspace .resultactions>* {min-width:140px}
#ek-calculator #otherWorkspace .numberwrap input:invalid {color:#ac5549}
@media (max-width:1050px){#ek-calculator #otherWorkspace {grid-template-columns:1fr}
#ek-calculator #otherWorkspace .results {border-left:0;border-top:1px solid var(--line)}}
@media (max-width:600px){#ek-calculator #otherWorkspace .inputs, #ek-calculator #otherWorkspace .results {padding:26px 20px}
#ek-calculator #otherWorkspace .comparison {grid-template-columns:1fr 1fr}
#ek-calculator #otherWorkspace .comparebox {padding:13px 10px}
#ek-calculator #otherWorkspace .comparebox strong {font-size:18px}}
#ek-calculator .workspace {isolation:isolate}
#ek-calculator .tool {box-shadow:none}
#ek-calculator .button {display:inline-flex;align-items:center;justify-content:center;line-height:1.3;text-align:center}
#ek-calculator .inputs label,#ek-calculator .results label {color:var(--text)}
#ek-calculator .numberwrap input {margin:0;padding:0;box-shadow:none}
#ek-calculator .range {padding:0}
#ek-calculator .results output{display:inline}

/* Extra payments: visually emphasize actual savings, not hypothetical zero savings. */
#ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings {
  --savings-green: #2F6544;
  --savings-bg: #EAF2EB;
  --savings-line: #48855F;
}
#ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings .bigresult output,
#ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings .bigresult span {
  color: var(--savings-green);
}
#ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings .comparison .comparebox:last-child {
  border: 2px solid var(--savings-line);
  background: var(--savings-bg);
  padding: 16px 13px;
  box-shadow: 0 3px 12px rgba(47, 101, 68, .06);
}
#ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings .comparison .comparebox:last-child strong {
  color: var(--savings-green);
}
#ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings .comparison .comparebox:last-child small {
  color: #345A40;
  font-weight: 700;
}
#ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings .stats:first-of-type strong {
  color: var(--savings-green);
}
@media (max-width:600px) {
  #ek-calculator #otherWorkspace.ek-extra-savings.ek-has-savings .comparison .comparebox:last-child {
    padding: 12px 9px;
  }
}

/* Refinance: savings use the same green language as the Extra Payments tool.
   The status class is set only when new monthly P&I is strictly lower. */
#ek-calculator #otherWorkspace.ek-refi.ek-refi-lower-payment .bigresult output,
#ek-calculator #otherWorkspace.ek-refi.ek-refi-lower-payment .bigresult span {
  color:#2F6544;
}
#ek-calculator #otherWorkspace.ek-refi.ek-refi-lower-payment .comparison .comparebox:last-child {
  border:2px solid #48855F;
  background:#EAF2EB;
  padding:16px 13px;
  box-shadow:0 3px 12px rgba(47,101,68,.06);
}
#ek-calculator #otherWorkspace.ek-refi.ek-refi-lower-payment .comparison .comparebox:last-child strong {
  color:#2F6544;
}
#ek-calculator #otherWorkspace.ek-refi.ek-refi-lower-payment .comparison .comparebox:last-child small {
  color:#345A40;
  font-weight:700;
}
#ek-calculator #otherWorkspace.ek-refi.ek-refi-lower-payment .stats.ek-monthly-saved strong,
#ek-calculator #otherWorkspace.ek-refi .stats.ek-interest-saved strong,
#ek-calculator #otherWorkspace.ek-refi .stats.ek-net-saved strong {
  color:#2F6544;
}
#ek-calculator #otherWorkspace.ek-refi .ek-refi-lifetime-title {
  margin-top:30px;
  padding-top:20px;
  border-top:1px solid #D7DDD7;
}
@media (max-width:600px){
  #ek-calculator #otherWorkspace.ek-refi.ek-refi-lower-payment .comparison .comparebox:last-child {padding:12px 9px}
}

/* Refinance: give genuine lifetime interest savings their own result section. */
#ek-calculator #otherWorkspace.ek-refi .ek-refi-interest-savings {
  margin: 24px 0 20px;
  padding: 24px 22px;
  border: 1px solid #9DC5A7;
  border-radius: 15px;
  background: #EAF2EB;
}
#ek-calculator #otherWorkspace.ek-refi .ek-refi-savings-label {
  color: #345A40;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .075em;
  line-height: 1.45;
}
#ek-calculator #otherWorkspace.ek-refi .ek-refi-savings-amount {
  color: #2F6544;
  font-size: clamp(36px, 3.5vw, 52px);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
#ek-calculator #otherWorkspace.ek-refi .ek-refi-interest-savings p {
  color: #345A40;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
@media (max-width:600px) {
  #ek-calculator #otherWorkspace.ek-refi .ek-refi-interest-savings { padding: 20px 16px; }
}

/* Mortgage payment calculator: VA option (scoped to calculator only). */
#ek-calculator .va-loan-option {margin:12px 0 0;padding:4px 0 0;border:0;border-radius:0;background:transparent;box-shadow:none}
#ek-calculator .va-loan-label {display:inline-flex;align-items:center;gap:9px;margin:0;cursor:pointer;color:#262B32;font-weight:650;font-size:13px;line-height:1.5}
#ek-calculator .va-loan-label input[type="checkbox"] {width:20px;height:20px;accent-color:#576E53;flex:none;cursor:pointer}
#ek-calculator .va-loan-option .fineprint {margin:4px 0 0 30px;font-size:11px;line-height:1.5;color:#505a61}
#ek-calculator .va-loan-label input:focus-visible {outline:3px solid #576E53;outline-offset:3px}

/* The site's global custom-checkbox rules must not hide this native control. */
#ek-calculator .va-loan-label input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-block !important;
  position: static !important;
  inset: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid #465c49 !important;
  border-radius: 5px !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
  vertical-align: middle;
}
#ek-calculator .va-loan-label input[type="checkbox"]:checked {
  background-color: #3c6b47 !important;
  border-color: #3c6b47 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.7' d='m4 10 4 4 8-9'/%3E%3C/svg%3E") !important;
  background-size: 15px 15px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
#ek-calculator .va-loan-label input[type="checkbox"]:focus-visible {
  outline: 3px solid #2f6544 !important;
  outline-offset: 3px !important;
}

/* Rent vs. Buy: green signifies a favorable buying outcome only.
   Neutral results when renting wins or both scenarios tie. */
#ek-calculator #otherWorkspace.ek-rent.ek-rent-buy-advantage .bigresult output,
#ek-calculator #otherWorkspace.ek-rent.ek-rent-buy-advantage .bigresult span {
  color: #2F6544;
}
#ek-calculator #otherWorkspace.ek-rent.ek-rent-buy-advantage .comparison .comparebox:first-child {
  border: 2px solid #48855F;
  background: #EAF2EB;
  padding: 16px 13px;
  box-shadow: 0 3px 12px rgba(47, 101, 68, .06);
}
#ek-calculator #otherWorkspace.ek-rent.ek-rent-buy-advantage .comparison .comparebox:first-child strong {
  color: #2F6544;
}
#ek-calculator #otherWorkspace.ek-rent.ek-rent-buy-advantage .comparison .comparebox:first-child small {
  color: #345A40;
  font-weight: 700;
}
@media (max-width:600px) {
  #ek-calculator #otherWorkspace.ek-rent.ek-rent-buy-advantage .comparison .comparebox:first-child {
    padding: 12px 9px;
  }
}

/* Rate Buydown only: use the standard input language and a restrained savings highlight. */
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-plan-field {margin-top:14px}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-select-wrap {
  border:1.5px solid #e5e7e4;
  border-radius:12px;
  background:#fff;
  min-height:51px;
  display:flex;
  align-items:center;
  transition:border-color .2s,box-shadow .2s;
}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-select-wrap:focus-within {
  border-color:#a7b6ab;
  box-shadow:0 0 0 3px #d9e3da60;
}
/* Draw the dropdown chevron on the wrapper: Safari can hide the native select arrow. */
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-select-wrap {
  position:relative;
}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-select-wrap::after {
  content:"";
  position:absolute;
  right:20px;
  top:50%;
  width:9px;
  height:9px;
  border-right:2px solid #566166;
  border-bottom:2px solid #566166;
  transform:translateY(-70%) rotate(45deg);
  pointer-events:none;
}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-select-wrap select {
  -webkit-appearance:none !important;
  appearance:none !important;
  display:block;
  width:100%;
  min-height:49px;
  padding:10px 46px 10px 14px;
  border:0;
  border-radius:12px;
  background:transparent !important;
  background-image:none !important;
  color:#283039;
  font-family:inherit;
  font-weight:600;
  font-size:16px;
  line-height:1.4;
  cursor:pointer;
  outline:none;
}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-explainer {font-size:12px;line-height:1.65;color:#48534E;margin:12px 0 4px}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-explainer strong {color:#283B2F;font-weight:750}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-head {margin:27px 0 10px;font-size:11px;font-weight:800;letter-spacing:.08em;color:#48534E}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-grid {display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:23px}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-card {background:#EAF2EB;border:1.5px solid #94B59B;border-radius:13px;padding:15px 16px}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-title {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px;font-weight:750;color:#345A40;font-size:13px}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-title span {font-size:11px;font-weight:600;color:#345A40}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-payment {font-size:16px;font-weight:750;color:#262B32;margin-top:8px;font-variant-numeric:tabular-nums}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-payment small {font-size:11px;font-weight:550;color:#455A49}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-savings {font-size:16px;font-weight:750;letter-spacing:0;color:#2F6544;margin-top:7px;font-variant-numeric:tabular-nums;line-height:1.4}
#ek-calculator #otherWorkspace.ek-buydown .ek-buy-year-savings span {font-size:12px;font-weight:650;letter-spacing:0}
/* Highlight the discounted year-one payment only, not the full note-rate payment. */
#ek-calculator #otherWorkspace.ek-buydown .comparison:has(+ .ek-buy-year-head) .comparebox:last-child {
  background:#EAF2EB;
  border:2px solid #48855F;
}
#ek-calculator #otherWorkspace.ek-buydown .comparison:has(+ .ek-buy-year-head) .comparebox:last-child strong,
#ek-calculator #otherWorkspace.ek-buydown .comparison:has(+ .ek-buy-year-head) .comparebox:last-child small {
  color:#2F6544;
}

/* Refinance lifetime interest savings: site-standard Apply Now button. */
#ek-calculator #otherWorkspace.ek-refi .ek-refi-interest-savings .ek-refi-apply-button { margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; }

/* Mortgage Payment only: keep the MI explanation immediately under its input. */
#ek-calculator #paymentWorkspace .mi-field-note {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

/* Short MI notice directly beneath MI inputs (Affordability and Rent vs. Buy). */
#ek-calculator #otherWorkspace .field .mi-field-note {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #566166;
}


/* Legal disclosure dialog: scoped entirely to the calculator workspace. */
#ek-calculator .ek-legal-link {
  display:inline-block; border:0; padding:0; margin:0 14px;
  background:transparent; color:#344B40; font:inherit; font-size:12px;
  text-align:left; text-decoration:underline; text-underline-offset:3px;
  cursor:pointer;
}
#ek-calculator .ek-legal-link:hover {color:#1E3D2B}
#ek-calculator .ek-legal-mobile {display:none}
#ek-calculator .ek-legal-dialog {
  position:fixed; inset:0; width:min(760px,calc(100vw - 32px));
  max-width:none; max-height:min(85dvh,850px); height:auto;
  padding:0; margin:auto; border:1px solid #DDE2DA; border-radius:18px;
  color:#29313A; background:#FFF; box-shadow:0 25px 75px rgba(0,0,0,.22);
  overflow:hidden;
}
#ek-calculator .ek-legal-dialog:not([open]) {display:none}
#ek-calculator .ek-legal-dialog::backdrop {background:rgba(27,34,37,.62)}
#ek-calculator .ek-legal-dialog-inner {display:flex;flex-direction:column;max-height:min(85dvh,850px)}
#ek-calculator .ek-legal-dialog-head {
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  border-bottom:1px solid #E6E9E4;padding:22px 26px;background:#F8F8F5;flex:none;
}
#ek-calculator .ek-legal-dialog-head h2 {margin:0;line-height:1.35;min-width:0}
#ek-calculator .ek-legal-close {
  width:36px;height:36px;display:grid;place-items:center;flex:none;
  background:#FFF;border:1px solid #CFD6CE;border-radius:50%;color:#29313A;
  font-size:25px;line-height:1;cursor:pointer;
}
#ek-calculator .ek-legal-close:hover {background:#EAEFEC}
#ek-calculator .ek-legal-dialog-content {padding:23px 28px 30px;overflow-y:auto;overscroll-behavior:contain}
#ek-calculator .ek-legal-intro {margin:0 0 22px;color:#414B4D;line-height:1.6}
#ek-calculator .ek-legal-section {margin:0 0 21px}
#ek-calculator .ek-legal-section h3 {font-size:17px;line-height:1.4;margin:0 0 7px;color:#262B32}
#ek-calculator .ek-legal-section p {font-size:14px;line-height:1.72;color:#414B4D;margin:0}
#ek-calculator .ek-legal-final {margin:25px 0 0;border-top:1px solid #E6E9E4;padding-top:18px;color:#262B32;font-size:14px}
@media(max-width:680px){
  #ek-calculator .ek-legal-mobile {display:block;padding:8px 17px 12px;background:#FBFBF9;border-bottom:1px solid #E8E8E3}
  #ek-calculator .ek-legal-mobile .ek-legal-link {margin:0;font-size:12px}
  #ek-calculator .ek-legal-dialog {width:calc(100vw - 20px);max-height:90dvh;border-radius:14px}
  #ek-calculator .ek-legal-dialog-inner {max-height:90dvh}
  #ek-calculator .ek-legal-dialog-head {padding:16px}
  #ek-calculator .ek-legal-dialog-content {padding:20px 17px 25px}
  #ek-calculator .ek-legal-dialog-head h2 {font-size:18px}
}

/* Legal disclosure is a separate right-aligned action at the bottom of each results panel. */
#ek-calculator .results .ek-legal-corner {
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
  text-align:right;
}
#ek-calculator .results .ek-legal-corner-link {
  margin:0;
  font-size:12px;
  line-height:1.5;
  text-align:right;
}

/* Keep the legal link anchored to the bottom-right of the full results column,
   rather than directly under the disclosure paragraph. Applies to all six tools. */
#ek-calculator .results {
  display: flex;
  flex-direction: column;
}
#ek-calculator .results .ek-legal-corner {
  margin-top: auto;
  padding-top: 24px;
  flex-shrink: 0;
}

/* Group projected results under one consistent qualifier, without repeating it on every row. */
#ek-calculator .ek-estimate-group-heading { margin: 23px 0 11px; color:#505b60; font-size:11px; font-weight:750; letter-spacing:.09em; text-transform:uppercase; line-height:1.45; }
#ek-calculator .ek-estimate-group-heading + .bar { margin-top:12px; }
