/* Mortgage calculator page (/mortgage-calculator.html) only.

   Kept out of site.css on purpose: site.css is hash-stamped into every baked
   listing page, so a change there re-uploads ~7,600 pages. This file is linked
   by one page.

   Everything is scoped under .mc. site.css has a global `* { padding: 0 }`
   reset and an older `.rl-calc` block, so paddings here are explicit and the
   class names do not reuse rl-calc. Text controls are 17px: anything under
   16px makes iOS Safari zoom on focus (see rl-phone-layout). */

.mc { --mc-hair: var(--grid); --mc-card: #fff; }
.mc-wrap { width: min(1280px, calc(100% - 2 * var(--page-gutter))); margin: 0 auto 72px; }

.mc-intro { max-width: 44rem; margin: 32px 0 32px; color: var(--ink-2); font-size: clamp(1.02rem, 1.4vw, 1.12rem); line-height: 1.65; }

.mc .mc-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--charcoal); margin: 0 0 8px; }
.mc h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.15; margin: 0 0 20px; }

.mc-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
.mc-card { background: var(--mc-card); border: 1px solid var(--mc-hair); border-radius: var(--radius); padding: 28px; }
.mc-panel { background: var(--surface); }

.mc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.mc-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mc-field.full { grid-column: 1 / -1; }
.mc-label { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--charcoal); }

.mc-input { display: flex; align-items: stretch; min-height: 50px; background: #fff; border: 1.5px solid #bdbab3; border-radius: 10px; overflow: hidden; transition: border-color 120ms ease-out; }
.mc-input:hover { border-color: var(--ink); }
.mc-input:focus-within { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
.mc-input > span { display: flex; align-items: center; padding: 0 12px; color: var(--ink-3); font-weight: 500; }
.mc-input > span:first-child { padding-right: 0; }
.mc-input > span:last-child { padding-left: 0; }
.mc-input input, .mc-input select {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 17px; font-weight: 500; line-height: 1.2; padding: 0 12px; border-radius: 0;
  -webkit-appearance: none; appearance: none; font-variant-numeric: tabular-nums;
}
.mc-input input:focus, .mc-input select:focus { outline: none; }
/* site.css (UI pass, 2026-11-02) rings every focused text control with an
   !important outline. Here the .mc-input wrapper carries the ring, and its
   overflow:hidden clipped the inner one to a stray vertical line after the
   "$". Out-specify it (0,4,1 vs 0,3,1) for calculator fields only. */
.mc .mc-field .mc-input :is(input, select):focus-visible { outline: none !important; }
.mc-input select {
  cursor: pointer; padding-right: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%231C1C1C' stroke-width='1.75' stroke-linecap='square'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.mc-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.mc-help { font-size: 14px; line-height: 1.5; color: var(--ink-3); margin: 0; }
.mc-help:empty { display: none; }

.mc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-chip {
  min-height: 46px; min-width: 104px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid #bdbab3; background: #fff; color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: border-color 120ms ease-out, background-color 120ms ease-out, color 120ms ease-out;
}
.mc-chip:hover { border-color: var(--ink); }
.mc-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mc-chip:disabled { color: #9a978f; background: var(--linen); border-color: var(--grid); cursor: not-allowed; }

.mc-checks { display: flex; gap: 8px 28px; flex-wrap: wrap; }
.mc-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; font-size: 16px; color: var(--ink); }
.mc-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }

.mc-chip:focus-visible, .mc-check input:focus-visible, .mc-btn:focus-visible, .mc details summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.mc-error { display: none; margin: 0; padding: 8px 0 8px 14px; border-left: 3px solid var(--orange); color: var(--red-text); font-weight: 600; font-size: 15px; line-height: 1.5; }
.mc-error.show { display: block; }

/* Results */
.mc-results { position: sticky; top: 96px; }
.mc-figure { margin: 6px 0 6px; font-size: clamp(2.6rem, 5.2vw, 4rem); line-height: 1; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.mc-figure small { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.mc-rows { margin: 22px 0 0; border-top: 2px solid var(--ink); }
.mc-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--mc-hair); font-size: 15.5px; }
.mc-row dt { color: var(--ink-2); font-weight: 500; }
.mc-row dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.mc-cta { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  background: var(--orange); color: #fff; font-weight: 600; font-size: 16px;
  text-decoration: none; transition: background-color 120ms ease-out;
}
.mc-btn:hover { background: var(--ink); color: #fff; }

/* Sections below the calculator */
.mc-block { margin-top: 64px; }
.mc-lead { margin: -6px 0 22px; max-width: 44rem; font-size: 15px; line-height: 1.55; color: var(--ink-3); }
.mc-closing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mc-stat { background: var(--surface); border: 1px solid var(--mc-hair); border-radius: var(--radius); padding: 24px; }
.mc-stat .mc-val { font-size: 2rem; font-weight: 700; line-height: 1.1; margin: 8px 0; font-variant-numeric: tabular-nums; }
.mc-stat p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.mc-note { margin: 16px 0 0; max-width: 52rem; font-size: 14px; line-height: 1.55; color: var(--ink-3); }

.mc-compare { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mc-scn { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: #fff; border: 1px solid var(--mc-hair); border-radius: var(--radius); }
.mc-scn.base { background: var(--surface); border: 2px solid var(--ink); }
.mc-scn .mc-tag { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--charcoal); }
.mc-scn .mc-input { min-height: 46px; }
.mc-scn .mc-pay { margin: 0; font-size: 1.6rem; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.mc-scn .mc-pay small { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.mc-mini { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--mc-hair); font-size: 14px; }
.mc-mini:first-child { padding-top: 0; border-top: 0; }
.mc-mini b { font-variant-numeric: tabular-nums; text-align: right; }
.mc-diff { margin: 0; min-height: 42px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.mc-bar { display: flex; height: 16px; margin: 6px 0 10px; border-radius: 999px; overflow: hidden; background: var(--grid); }
.mc-bar i { display: block; height: 100%; }
.mc-bar .mc-bp { background: var(--ink); }
.mc-bar .mc-bn { background: var(--orange); }
.mc-legend { display: flex; gap: 8px 24px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.mc-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 3px; vertical-align: -1px; }
.mc-legend .mc-lp::before { background: var(--ink); }
.mc-legend .mc-ln::before { background: var(--orange); }
.mc details { margin-top: 14px; }
.mc details summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.mc-tablewrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--mc-hair); border-radius: 12px; }
.mc-amort { width: 100%; border-collapse: collapse; background: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.mc-amort th { background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-align: right; padding: 12px 16px; white-space: nowrap; }
.mc-amort th:first-child, .mc-amort td:first-child { text-align: left; }
.mc-amort td { padding: 10px 16px; border-bottom: 1px solid var(--mc-hair); text-align: right; white-space: nowrap; }
.mc-amort tbody tr:nth-child(even) td { background: var(--surface); }
.mc-amort tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; }

.mc-prose { margin-top: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.mc-prose h2 { font-size: clamp(1.3rem, 2.2vw, 1.55rem); margin-bottom: 14px; }
.mc-prose p { margin: 0 0 14px; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.mc-prose p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.mc-disclaimer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--mc-hair); font-size: 13.5px; line-height: 1.6; color: var(--ink-3); max-width: 60rem; }

@media (max-width: 1180px) { .mc-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .mc-grid { grid-template-columns: 1fr; }
  .mc-results { position: static; }
  .mc-prose { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 640px) {
  .mc-card { padding: 20px; }
  .mc-fields { grid-template-columns: 1fr; gap: 18px; }
  .mc-closing, .mc-compare { grid-template-columns: 1fr; }
  .mc-block { margin-top: 48px; }
  .mc-chip { flex: 1; min-width: 0; }
}

/* The title block and the calculator on one width and one left edge, and the
   site's 32px from the breadcrumb to the title (2026-11-15): the heading sat on
   the old 1080px article shell while the calculator used 1280px. */
.mc .blog-art-hero .shell { width: min(1280px, calc(100% - 2 * var(--page-gutter))); }
.mc .blog-art-hero h1 { margin-top: 32px; }
@media (max-width: 760px) { .mc .blog-art-hero h1 { margin-top: 24px; } }
