/* dubai-mortgage-calculator — page-local rules (★#59 M6). Moved verbatim from dubai-mortgage-calculator.html's inline <style>. Token-only; shared components live in chrome.css. */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout — wider than the 760px prose scaffold */
.data-wrap { max-width: var(--page-max); margin: 0 auto; padding: 8px 20px 80px; }
.section { margin-top: 48px; }
.section-title { font-family: 'Inter Tight', sans-serif; font-size: var(--fs-6); font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 0 0 8px; }
.section-intro { color: var(--text-muted); font-size: var(--fs-3); line-height: 1.6; margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card strong { color: var(--text); font-weight: 600; }

/* Calculator */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: var(--fs-2); font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.field input { width: 100%; padding: 11px 13px; border: 1.5px solid var(--border-ui); border-radius: var(--radius); font-family: 'Inter', sans-serif; font-size: var(--fs-3); color: var(--text); background: var(--surface); outline: none; transition: border-color var(--transition); }
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--text-subtle); }
.section-label { display: block; font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }

.toggle-group, .bool-group { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.bool-group { max-width: 220px; }
.toggle-opt, .bool-opt { flex: 1; padding: 9px; text-align: center; font-family: 'Inter', sans-serif; font-size: var(--fs-2); font-weight: 500; cursor: pointer; background: var(--surface); color: var(--text-muted); border: none; border-right: 1px solid var(--border); transition: background var(--transition), color var(--transition); user-select: none; }
.toggle-opt:last-child, .bool-opt:last-child { border-right: none; }
.toggle-opt:hover, .bool-opt:hover { background: var(--surface-alt); }
.toggle-opt.active, .bool-opt.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Result */
.result-box { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.result-label { font-size: var(--fs-1); color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.result-monthly { font-family: 'Inter Tight', sans-serif; font-size: var(--fs-7); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
table.breakdown { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: var(--fs-2); }
table.breakdown td { padding: 9px 4px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
table.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
table.breakdown tr.total td { font-weight: 700; font-size: var(--fs-3); border-top: 2px solid var(--border); border-bottom: none; padding-top: 12px; color: var(--text); }
table.breakdown tr.total td:last-child { color: var(--accent); font-size: var(--fs-4); }
.dbr-box { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius); font-size: var(--fs-2); font-weight: 500; }
.dbr-box.safe { background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
.disclaimer { margin-top: 18px; padding: 12px 14px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); font-size: var(--fs-1); color: var(--text-muted); }


@media (max-width: 640px) {
  .calc-layout { grid-template-columns: 1fr; }
  .data-wrap { padding: 8px 16px 64px; }
}

/* ★#59 M6 — classes that replace this page's static style="" attributes (values unchanged). */
.explainer-body { color: var(--text-muted); font-size: var(--fs-3); margin-top: 8px; }
.calc-empty { color: var(--text-subtle); text-align: center; padding: 48px 0; font-size: var(--fs-3); }
/* ★#59 M6 — classes for the static style="" this page's JS used to build (values unchanged). */
.calc-hint { color: var(--text-subtle); text-align: center; padding: 48px 0; font-size: .88rem;   /* the JS reset state; the template's .calc-empty uses --fs-3 */ }
.result-box.is-lead { margin-bottom: 16px; }
.calc-rate-note { font-size: var(--fs-1); color: var(--text-muted); margin-top: 4px; }
.calc-cash-note { color: var(--text-muted); font-size: .88rem; }
.calc-warn-icon { vertical-align: -2px; margin-right: 4px; }
