/* Excelergy Mortgages - comparison page (index.html).
   Uses the tokens from brand.css. */

.panel h2 { margin: 0 0 12px; font-size: 18px; letter-spacing: -.02em; }
.panel h2 .sub { font-weight: 600; letter-spacing: 0; }
.mc-results a { color: var(--primary); }
h2 { margin: 0 0 12px; font-size: 1.15rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
label { display: block; font-size: .82rem; line-height: 1.5; color: var(--muted); margin-bottom: 4px; }
input, select { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-soft); color: var(--text); font: inherit; }
.summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pill { background: var(--primary-soft); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: .88rem; }
.pill b { color: var(--primary); }
.filters { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin: 2px 0 12px; }
.flabel { color: var(--muted); font-size: .8rem; font-weight: 600; }
.terms { display: flex; flex-wrap: wrap; gap: 8px; }
.terms button { font: inherit; font-size: .88rem; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.terms button .n { color: var(--muted); margin-left: 4px; font-size: .8rem; }
.terms button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.terms button[aria-pressed="true"] .n { color: rgba(255,255,255,.8); }
.terms button:disabled { opacity: .45; cursor: default; }
.tablewrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; user-select: none; }
th[data-sort] { cursor: pointer; }
th[data-sort]:hover, th[data-sort]:focus-visible { color: var(--primary); outline: none; }
th[data-sort]::after, th.num[data-sort]::before { display: inline-block; width: 1em; text-align: center; opacity: .35; }
th[data-sort]:not(.num)::after { content: "\2195"; margin-left: 2px; }
th.num[data-sort]::before { content: "\2195"; margin-right: 2px; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--primary); }
th[aria-sort="ascending"]:not(.num)::after, th.num[aria-sort="ascending"]::before { content: "\25B2"; opacity: 1; font-size: .7em; }
th[aria-sort="descending"]:not(.num)::after, th.num[aria-sort="descending"]::before { content: "\25BC"; opacity: 1; font-size: .7em; }
.labelrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 4px 8px; min-height: calc(.82rem * 1.5 + 4px); }
.labelrow label { margin: 0; }
.seg { display: inline-flex; flex-shrink: 0; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg button { font: inherit; font-size: .72rem; padding: 2px 9px; white-space: nowrap; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
td.num, th.num { text-align: right; }
tr.best td { background: var(--good-soft); }
tr:hover td { background: var(--primary-soft); }
.lender { font-weight: 600; }
.sub { color: var(--muted); font-size: .8rem; }
.tag { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--good); color: var(--card); margin-left: 6px; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.stat { border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.stat .v { font-size: 1.35rem; font-weight: 700; }
.stat .k { color: var(--muted); font-size: .82rem; }
.note { color: var(--muted); font-size: .82rem; margin-top: 10px; }
.row-actions button { font: inherit; font-size: .8rem; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--primary); cursor: pointer; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.terms button, .seg button, .row-actions button { min-height: 0; font-weight: 600; line-height: 1.4; }
.terms button[aria-pressed="true"], .seg button[aria-pressed="true"] { color: #fff; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
th { color: var(--table-head-text); }
tr:hover td { background: var(--table-row-hover); }
tr.best td { background: var(--good-soft); }
.tag { color: #fff; }
:root[data-theme="dark"] .tag { color: #000713; }

/* "Use a local average" area picker (assets/js/area-picker.js) */
.area-picker { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.ap-title { margin: 0 0 8px; font-weight: 700; font-size: .9rem; color: var(--text); }
.ap-title .sub { font-weight: 500; }
.ap-note { margin: 10px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.55; }
.ap-note:empty { display: none; }
