/* Mortgage-held insurance check page (prefix mort-). Tracker, mock check, request letter, print. */
.mort-side { display: grid; gap: 20px; min-width: 0; }
.mort-loan { padding-block: 0; }
.mort-loan > summary { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding-block: 16px; cursor: pointer; list-style: none; position: relative; padding-right: 34px; }
.mort-loan > summary::-webkit-details-marker { display: none; }
.mort-loan > summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.mort-loan[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.mort-loan > summary .tool-card-h { margin: 0; }
.mort-loan > summary small { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.mort-loan[open] { padding-bottom: clamp(20px, 3vw, 30px); }
.mort-loan textarea { min-height: 72px; }
.mort-saved { display: flex; align-items: center; gap: 8px; margin: 0; }
.mort-saved .icon { width: 16px; height: 16px; color: var(--gold-ink); }

.mort-types { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.mort-types label { position: relative; margin: 0; }
.mort-types input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mort-types span { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--tint-2); background: #fff; color: var(--text); font-weight: 600; font-size: .92rem; transition: background .15s, border-color .15s, color .15s; }
.mort-types .icon { width: 17px; height: 17px; color: var(--gold-ink); }
.mort-types input:checked + span { background: var(--dusk); border-color: var(--dusk); color: #fff; }
.mort-types input:checked + span .icon { color: var(--gold-strong); }
.mort-types input:focus-visible + span { outline: 3px solid var(--gold-strong); outline-offset: 2px; }
.mort-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.mort-quick .btn { min-height: 44px; }
.mort-submit { display: grid; gap: 10px; }
.mort-submit .btn { width: 100%; justify-content: center; min-height: 48px; }

.mort-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.mort-totals > div { background: var(--paper, #FAF7F2); border: 1px solid var(--hairline); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.mort-totals dt { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.mort-totals dd { margin: 4px 0 0; font-size: 1.2rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mort-h { font-size: 1rem; margin: 20px 0 4px; color: var(--text); }
#mort .tool-out td .tag { font-size: .76rem; padding: 2px 9px; }
#mort .mort-act { white-space: nowrap; text-align: right; width: 1%; }
#mort .mort-act .x { display: inline-grid; place-items: center; vertical-align: middle; }
#mort .mort-act .icon { width: 18px; height: 18px; }
.mort-file { position: relative; overflow: hidden; cursor: pointer; }
.mort-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.mort-file:focus-within { outline: 3px solid var(--gold-strong); outline-offset: 2px; }
.mort-print-loan { display: none; }

/* Phone rows: each entry is a small card, actions on their own line. */
@media (max-width: 560px) {
  #mort .mort-rows tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #mort .mort-rows td:first-child { grid-column: auto; grid-row: auto; }
  #mort .mort-rows td.mort-act { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: flex-start; width: auto; }
  #mort .mort-rows td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); font-weight: 400; }
  .mort-totals dd { font-size: 1.05rem; }
}
#mort .tool-sum { flex-wrap: wrap; }
#mort .tool-sum b { font-size: clamp(1.9rem, 8vw, 2.8rem); }
@media (max-width: 520px) { #mort .f2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 359px) { .mort-totals { grid-template-columns: minmax(0, 1fr); } .mort-types span { padding-inline: 11px; } }

/* Short answer above the tracker. */
.mort-intro { padding-bottom: 0; }
.mort-intro-in { max-width: 760px; }
.mort-intro-in .note { margin-bottom: 0; }
.mort-intro + .tool-sec { padding-top: clamp(22px, 3vw, 32px); }
@media print { .mort-intro { display: none !important; } }

/* Made-up check, so the two payees are easy to see. */
.mort-mock { margin: 10px 0 1.4em; }
.mort-chk { position: relative; max-width: 560px; padding: 18px 20px 16px; border-radius: 14px; background: linear-gradient(135deg, #F4F8F6, #E8F0EC); border: 1px solid #CBDCD3; box-shadow: var(--lift); color: var(--text); font-variant-numeric: tabular-nums; }
.mort-chk-top { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; color: var(--muted); }
.mort-chk-top b { color: var(--text); font-size: .95rem; }
.mort-chk-pay { margin: 16px 0 10px; padding-bottom: 8px; border-bottom: 1px solid #B9CDC2; }
.mort-chk small { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mort-chk-pay strong { display: block; margin-top: 4px; font-size: 1.02rem; line-height: 1.45; }
.mort-chk-pay em { font-style: normal; padding: 1px 8px; border-radius: 999px; background: var(--gold-tint); color: var(--gold-ink); font-weight: 700; }
.mort-chk-amt { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; }
.mort-chk-amt b { font-size: 1.3rem; padding: 4px 10px; border: 1px solid #B9CDC2; border-radius: 8px; background: #fff; }
.mort-chk-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.mort-chk-sign span { padding-top: 6px; border-top: 1px dashed #8FA99B; font-size: .8rem; color: var(--muted); }

/* Request letter. */
.mort-letter { margin: 8px 0 1.6em; padding: 16px; background: #fff; border: 1px solid var(--hairline); border-radius: 18px; box-shadow: var(--lift); }
.mort-letter textarea { min-height: 420px; font-size: .95rem; line-height: 1.55; font-variant-numeric: tabular-nums; }
.mort-letter .btn-row { margin: 12px 0 0; }
.mort-letter .btn { min-height: 44px; }

@media print {
  .mort-side, .mort-guide, .tool-actions, .mort-act, .mort-types, .closing, [data-warn] { display: none !important; }
  .mort-print-loan { display: block; margin: 0 0 12px; }
  .mort-print-loan dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin: 0; font-size: .9rem; }
  .mort-print-loan dt { font-weight: 650; display: inline; }
  .mort-print-loan dt::after { content: " "; }
  .mort-print-loan dd { display: inline; margin: 0; white-space: pre-line; }
  .mort-totals > div { border: 1px solid #999; }
  .mort-h { break-after: avoid; }
}
