/* Mortgage Tools (Amanda, 2026-10-11): the look of her approved design mortgage-option-1-equal-cards.html (its final values, after
 * its own refinements), for src/shared/components/MortgageTools.html in the CRM and the portal. Every selector is scoped under .mt
 * (doubled, .mt.mt, where an app's own form or button rules would otherwise win). Her 2026-10-11 decisions on top of the design:
 * the CRM Home cards' round chevron on the phone cards; the branded dropdowns (BrandSelect) dressed exactly like the money and rate
 * fields; the three pills on one line on a phone; one inner left edge in every card (the checklist's extra 22px inset removed); the
 * Freddie Mac link opens in a new tab with the ↗; the gold-edged buttons (the unchosen pills, Expand checklist, Close) take the app's own
 * button gold, var(--gold), as every gold-edged button does (Amanda's W3-BORDER rule, 2026-09-26). */
.mt{--mt-navy:#102b4b;--mt-gold:#cda45d;--mt-muted:#52667d;color:var(--mt-navy);font:16px/normal Arial,Helvetica,sans-serif}
.mt *,.mt *::before,.mt *::after{box-sizing:border-box}
.mt.mt :is(button,input,select){font:inherit}
.mt button{cursor:pointer}
.mt .mt-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.mt [hidden]{display:none!important}

/* The three calculator pills: raised, navy when chosen; always one line. */
.mt .mt-tabs{position:relative;isolation:isolate;display:flex;flex-wrap:nowrap;gap:14px;margin:22px 0 9px;padding:7px 4px 15px}
.mt.mt .mt-tabs button{min-height:44px;margin:0;padding:11px 18px;border:1px solid var(--gold,#d5ad63);border-radius:24px;background:linear-gradient(155deg,#fffefd,#f8ecdf);color:var(--mt-navy);font-weight:700;line-height:normal;box-shadow:0 4px 0 rgba(155,117,61,.25),0 9px 18px rgba(20,44,76,.13),inset 0 1px 0 rgba(255,255,255,.95);transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.mt.mt .mt-tabs button[aria-selected=true]{background:linear-gradient(150deg,#284a70,#142c4c 72%);border-color:#142c4c;color:#fff;box-shadow:0 4px 0 #0c2039,0 10px 22px rgba(20,44,76,.27),inset 0 1px 0 rgba(255,255,255,.16)}
@media(hover:hover){
  .mt.mt .mt-tabs button:hover{transform:translateY(-2px)}
  .mt.mt .mt-tabs button:not([aria-selected=true]):hover{background:linear-gradient(155deg,#fffefd,#f2e0ca);box-shadow:0 5px 0 rgba(155,117,61,.27),0 12px 22px rgba(20,44,76,.17)}
  .mt.mt .mt-tabs button[aria-selected=true]:hover{background:linear-gradient(150deg,#31577f,#142c4c 72%)}
}
.mt.mt .mt-tabs button:focus-visible{outline:2px solid #244c78;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.mt.mt .mt-tabs button{transition:none}}

/* Section heads, cards and fields. */
.mt .mt-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:27px 0 12px}
.mt .mt-head h2{margin:0;font:400 30px/1.15 Georgia,serif;color:var(--mt-navy)}
.mt .mt-head p{margin:5px 0 0;color:var(--mt-muted);line-height:1.45}
.mt .mt-tag{font-size:12px;letter-spacing:1.5px;color:#365579;text-transform:uppercase;white-space:nowrap}
/* Clear (Amanda, 2026-10-20): the tag and a quiet outlined Clear on one centered line, Expand checklist's own button look. */
.mt .mt-head-right{display:flex;align-items:center;gap:14px;flex:none}
.mt.mt .mt-clear{flex:none;height:40px;margin:0;padding:0 15px;border:1px solid var(--gold,#cda45d);border-radius:22px;background:#fff;color:var(--mt-navy);font-size:13px;font-weight:700;line-height:1;white-space:nowrap;box-shadow:none}
.mt.mt .mt-clear:focus-visible{background:var(--mt-navy);color:#fff;outline:none}
@media(hover:hover){.mt.mt .mt-clear:hover{background:var(--mt-navy);color:#fff}}
.mt .mt-grid{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:1051px){.mt .mt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* The design's 3px gold top line is a 1px gold top edge plus a 2px inset line (the CRM R30 cards' way), with 2px more top padding, so
   the box is the design's to the pixel: a 3px top border on a rounded 1px box rasterized 3px wide down the sides of part of the card
   inside the portal's animated (composited) page. */
.mt .mt-card{min-width:0;padding:24px 24px 22px;border:1px solid #d4b373;border-top-color:var(--mt-gold);border-radius:19px;background:linear-gradient(112deg,#fffaf3 35%,#f8eae4);box-shadow:inset 0 2px 0 var(--mt-gold),0 8px 22px rgba(18,45,77,.05);color:var(--mt-navy)}
.mt .mt-card h3{margin:0 0 18px;font:400 27px/1.15 Georgia,serif;color:var(--mt-navy)}
.mt .mt-fields{display:grid;grid-template-columns:1fr 1fr;gap:17px 16px}
.mt .mt-field{display:grid;grid-template-rows:minmax(44px,auto) 48px;align-content:start;min-width:0}
.mt .mt-field.mt-full{grid-column:1/-1;display:block}
.mt .mt-field.mt-down-field{grid-template-rows:minmax(44px,auto) auto}
.mt .mt-field label,.mt .mt-caption{display:block;margin:0;color:#5c6e80;font-size:14px;font-weight:700;line-height:17px}
.mt .mt-field>label,.mt .mt-field>.mt-label-row,.mt .mt-field>.mt-caption{align-self:end;margin-bottom:8px}
.mt .mt-label-row{display:flex;align-items:baseline;gap:9px}
.mt.mt .mt-label-row a{font-size:13px;color:#173c6a;text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.mt .mt-label-row .mt-ext{margin-left:3px;text-decoration:none;display:inline-block}
.mt .mt-down-label{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:8px}
.mt .mt-down-field>.mt-down-label{align-self:end}
.mt .mt-down-hint{display:inline-block;color:#866840;font-size:14px;font-weight:500;line-height:1.3;text-align:right;white-space:nowrap}
.mt .mt-down-grid{min-width:0}
.mt .mt-down-grid .mt-input+.mt-input{margin-top:10px}

/* One field look: white, gold edge, 48px, the text 13px in (14px after a $). */
.mt .mt-input{display:flex;align-items:center;height:48px;border:1px solid #d8bd89;border-radius:12px;background:#fff;overflow:hidden}
.mt .mt-input>span{flex:none;padding-left:14px;color:#76869a}
.mt .mt-input>span.mt-suffix{padding:0 14px 0 0}
.mt.mt .mt-input input,.mt.mt .mt-input select{flex:1 1 auto;width:100%;min-width:0;height:100%;min-height:0;margin:0;padding:0 13px;border:0;border-radius:0;background:transparent;box-shadow:none;color:#173c6a;font:16px Arial,Helvetica,sans-serif;outline:0}
.mt .mt-input:focus-within{outline:2px solid #244c78;outline-offset:1px}
.mt .mt-down-grid .mt-input:focus-within{outline:none;border-color:var(--mt-gold);box-shadow:0 0 0 1px var(--mt-gold)}
/* The dropdowns: the design's own chevron on a plain select; with the branded dropdown (BrandSelect), the same text, color and height. */
.mt .mt-select{position:relative}
.mt.mt .mt-select select{appearance:none;-webkit-appearance:none;padding-right:40px;cursor:pointer}
.mt .mt-select:not(.has-brand-select)::after{content:"";position:absolute;right:18px;top:18px;width:9px;height:9px;border-right:2px solid #173c6a;border-bottom:2px solid #173c6a;transform:rotate(45deg);pointer-events:none}
.mt .mt-select.has-brand-select{overflow:visible}
.mt .mt-select .brand-select-wrap{flex:1 1 auto;height:100%;min-width:0}
.mt.mt .mt-select .brand-select{height:100%;min-height:0;margin:0;padding:0 40px 0 13px;border:0;border-radius:12px;background:transparent;box-shadow:none;color:#173c6a;font:16px Arial,Helvetica,sans-serif;line-height:normal;opacity:1}
.mt.mt .mt-select .brand-select-value{color:#173c6a}
.mt.mt .mt-select .brand-select-chevron{right:18px;width:9px;height:9px;margin-top:-7px;border-right:2px solid #173c6a;border-bottom:2px solid #173c6a}
.mt.mt .mt-select .brand-select-wrap.is-open .brand-select-chevron{margin-top:-2px}
.mt .mt-select .brand-select-popover{left:-1px;right:-1px}

.mt .mt-finance-choice{display:grid}
.mt .mt-choice-box{display:flex!important;align-items:center;gap:10px;height:48px;margin:0!important;padding:0 14px;border:1px solid #d8bd89;border-radius:12px;background:#fff;color:var(--mt-navy)!important;font-size:14px!important;font-weight:400!important;line-height:1.2!important;cursor:pointer}
.mt.mt .mt-choice-box input{width:18px;height:18px;margin:0;flex:none;accent-color:var(--mt-navy)}
.mt .mt-choice-box:focus-within{outline:2px solid #244c78;outline-offset:1px}

/* Results. */
.mt .mt-estimate-label{margin:1px 0 6px;color:#63758a}
.mt .mt-estimate-total{margin:0 0 17px;font:400 50px/1.15 Georgia,serif;color:var(--mt-navy)}
.mt .mt-result-kicker{margin:0 0 5px;font-size:14px;color:var(--mt-muted)}
.mt .mt-result-large{margin:0 0 13px;font:400 44px/1.15 Georgia,serif;color:var(--mt-navy)}
.mt .mt-breakdown{border-top:1px solid #e9d4ae}
.mt .mt-row{display:flex;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid #f0e3ce}
.mt .mt-row strong{white-space:nowrap;color:var(--mt-navy)}
.mt .mt-row.mt-loan{margin-top:4px;font-weight:700}
.mt .mt-notice{margin:16px 0 0;color:var(--mt-muted);font-size:13px;line-height:1.5}
.mt .mt-mini-note{margin:14px 0 0;color:var(--mt-muted);font-size:13px;line-height:1.45}
.mt .mt-status{margin-top:14px;padding:12px 14px;border:1px solid #d9bc8a;border-radius:10px;background:#f8f2e9;color:#34516f;font-size:13px;line-height:1.45}

/* The checklist card (portal): rows line up with its heading at every width. */
.mt .mt-check{margin-top:28px;padding:26px 24px 24px;border:1px solid #d4b373;border-top-color:var(--mt-gold);border-radius:19px;background:linear-gradient(112deg,#fffaf3 35%,#f8eae4);box-shadow:inset 0 2px 0 var(--mt-gold),0 8px 22px rgba(18,45,77,.05)}
.mt .mt-check>.mt-head{margin:0 0 18px}
.mt.mt .mt-expand,.mt.mt .mt-dialog-close{flex:none;height:40px;margin:0;padding:0 15px;border:1px solid var(--gold,#cda45d);border-radius:22px;background:#fff;color:var(--mt-navy);font-size:13px;font-weight:700;white-space:nowrap;box-shadow:none}
.mt.mt .mt-dialog-close{padding:0 17px;font-size:16px}
.mt.mt :is(.mt-expand,.mt-dialog-close):focus-visible{background:var(--mt-navy);color:#fff}
@media(hover:hover){.mt.mt :is(.mt-expand,.mt-dialog-close):hover{background:var(--mt-navy);color:#fff}}
.mt .mt-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;width:100%;max-height:342px;padding:0;overflow-x:hidden;overflow-y:auto;scrollbar-color:#bba174 transparent;scrollbar-width:thin}
.mt.mt .mt-checkitem{display:flex;align-items:center;gap:12px;min-height:60px;margin:0;padding:13px 15px;border:1px solid #d5b378;border-radius:13px;background:#f8ebe6;color:var(--mt-navy);font-weight:400;line-height:1.25;cursor:pointer}
.mt .mt-checkitem span{font-size:14px}
.mt.mt .mt-checkitem input{appearance:none;-webkit-appearance:none;flex:none;width:18px;height:18px;margin:0;padding:0;border:1px solid #d8bd89;border-radius:5px;background:#fff;cursor:pointer}
.mt.mt .mt-checkitem:has(input:checked){background:#142c4c;border-color:#142c4c;color:#fff}
.mt.mt .mt-checkitem input:checked{background:#fff;border-color:#fff}
.mt.mt .mt-checkitem input:checked::after{content:'✓';display:block;color:#142c4c;font-size:14px;line-height:17px;text-align:center}
.mt.mt .mt-checkitem input:focus-visible{outline:2px solid var(--mt-navy);outline-offset:2px}

/* The full checklist in a dialog, centered over the page area beside the menu (MortgageTools.js sets --mt-dialog-left). */
.mt .mt-dialog{--mt-dialog-left:0px;width:min(1320px,calc(100vw - var(--mt-dialog-left) - 32px));max-width:none;max-height:calc(100vh - 32px);overflow-y:auto;padding:30px 36px;border:1px solid var(--mt-gold);border-radius:20px;background:#f9f7f2;color:var(--mt-navy);box-shadow:0 24px 80px rgba(8,27,48,.24);transform:translateX(calc(var(--mt-dialog-left) / 2))}
.mt .mt-dialog::backdrop{background:rgba(8,27,48,.58)}
.mt .mt-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:16px}
.mt .mt-dialog-head h2{margin:0;font:400 32px/1.15 Georgia,serif;color:var(--mt-navy)}
.mt .mt-dialog>p{margin:0 0 17px;color:var(--mt-muted);line-height:1.4}
.mt .mt-dialog .mt-checklist{grid-template-columns:minmax(0,1fr);gap:10px;max-height:none;overflow:visible}
.mt.mt .mt-dialog .mt-checkitem{min-height:58px}

/* The phone card row's round chevron: the CRM Home cards' own (.card-collapse in src/crm/crm.css, measured there: 26px, #c4a05a edge,
   white, #003268 arrow, 12px, turned a quarter when folded). */
.mt .mt-card-toggle{display:none}
.mt .mt-chev{display:inline-grid;place-items:center;flex:0 0 auto;width:26px;height:26px;padding:0;border:1px solid #c4a05a;border-radius:50%;background:#fff;color:#003268}
.mt .mt-chev svg{width:12px;height:12px;transition:transform .18s ease}
.mt [data-collapsed] .mt-chev svg{transform:rotate(-90deg)}

@media(max-width:720px){
  .mt .mt-tabs{gap:6px;margin:4px 0 6px;padding:6px 0 12px}
  .mt.mt .mt-tabs button{flex:1 1 auto;display:flex;align-items:center;justify-content:center;min-width:0;height:40px;min-height:40px;padding:0 8px;font-size:13px;line-height:1;white-space:nowrap}
  .mt .mt-head{flex-wrap:wrap}
  .mt .mt-head h2{font-size:27px}
  .mt .mt-fields,.mt .mt-checklist{grid-template-columns:1fr}
  .mt .mt-field{grid-template-rows:minmax(34px,auto) 48px}
  .mt .mt-field.mt-down-field{grid-template-rows:minmax(34px,auto) auto}
  .mt .mt-card{padding:22px 16px 20px}
  /* Each calculator card folds behind its title row; every card's content starts 16px inside its edge. */
  .mt .mt-panel .mt-grid>.mt-card{padding:2px 0 0}
  .mt.mt .mt-card-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:62px;margin:0;padding:16px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--mt-navy);font:400 24px/1.2 Georgia,serif;text-align:left}
  .mt .mt-card-toggle:focus-visible{outline:2px solid var(--mt-navy);outline-offset:-5px}
  .mt .mt-card-body{padding:0 16px 20px}
  .mt .mt-card-body>h3{display:none}
  .mt .mt-check{margin-top:18px;padding:18px 16px 20px}
  .mt .mt-check>.mt-head{flex-direction:column;align-items:flex-start;gap:12px;margin:0 0 14px}
  .mt .mt-check h2{font-size:24px;line-height:1.2}
  .mt .mt-check .mt-head p{margin-top:6px}
  .mt .mt-checklist{max-height:400px}
  .mt.mt .mt-expand{height:38px}
  .mt .mt-dialog{width:calc(100vw - 20px);max-height:calc(100vh - 20px);padding:22px 18px;transform:none}
}
