/* =====================================================================
   calc.css — styling for the native portal calculators (assets/calc-*.js)
   Palette matches the portal: navy #1b2a41, gold #b6793a, ink #1a1a18,
   muted #6b6960, faint #9a988f, lines #e3e1d9 / #f1efe6, cream #f4f2ec.
   All classes are `calc-` prefixed so they never collide with portal styles.
   ===================================================================== */

.calc-core, .calc-body, .calc-mortgage, .calc-affordability, .calc-rental,
.calc-sellernet, .calc-homevalue { color: #1a1a18; }

/* ---- tab bar (tools.js) ---- */
.calc-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid #e3e1d9;
  margin-bottom: 20px; padding-bottom: 12px; }
.calc-tab { background: #fff; border: 1px solid #e3e1d9; color: #6b6960; border-radius: 999px;
  padding: 8px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.calc-tab:hover { border-color: #b6793a; color: #b6793a; }
.calc-tab.active { background: #1b2a41; color: #fff; border-color: #1b2a41; }
.calc-mount { display: block; }

/* ---- field groups ---- */
.calc-group { border: 1px solid #e3e1d9; background: #fff; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05); padding: 20px; margin-bottom: 16px; }
@media (min-width: 768px) { .calc-group { padding: 24px; } }
.calc-group > h4, .calc-panel-title { font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-size: 18px; color: #1b2a41; margin: 0 0 4px; }
.calc-desc, .calc-modenote { color: #6b6960; font-size: 12.5px; line-height: 1.5;
  margin: 2px 0 14px; max-width: 46rem; }

/* ---- input grids ---- */
.calc-grid { display: grid; gap: 16px; }
.calc-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.calc-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.calc-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ---- fields ---- */
.calc-field { display: block; }
.calc-lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em;
  color: #6b6960; margin-bottom: 6px; }
.calc-unitrow { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 6px; }
.calc-unitrow .calc-lbl { margin-bottom: 0; }
.calc-inputwrap { display: flex; align-items: center; background: #fff; border: 1px solid #e3e1d9;
  border-radius: 12px; padding: 9px 14px; transition: border-color .15s; }
.calc-inputwrap:focus-within { border-color: #b6793a; }
.calc-input { flex: 1; min-width: 0; width: 100%; background: transparent; border: none; outline: none;
  color: #1a1a18; font-size: 14px; font-family: inherit; }
.calc-select { cursor: pointer; }
.calc-affix { color: #6b6960; font-size: 14px; user-select: none; }
.calc-affix:first-child { margin-right: 6px; }
.calc-affix:last-child { margin-left: 6px; }
.calc-hint { color: #9a988f; font-size: 11px; margin-top: 4px; }

/* ---- segmented control ---- */
.calc-seg { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e3e1d9;
  background: #fff; border-radius: 12px; padding: 4px; }
.calc-seg-btn { background: transparent; border: none; color: #6b6960; border-radius: 8px;
  padding: 8px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  font-family: inherit; cursor: pointer; transition: all .15s; }
.calc-seg.sm .calc-seg-btn { padding: 4px 10px; font-size: 10px; }
.calc-seg-btn:hover { color: #b6793a; }
.calc-seg-btn.active { background: #1b2a41; color: #fff; }

/* ---- mode bar / chips / toggles ---- */
.calc-modebar, .calc-schedbar { display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.calc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.calc-chips-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: #6b6960;
  margin-right: 4px; }
.calc-chip { background: #fff; border: 1px solid #e3e1d9; color: #6b6960; border-radius: 8px;
  padding: 4px 12px; font-size: 11px; cursor: pointer; transition: all .15s; }
.calc-chip:hover { border-color: #b6793a; }
.calc-chip.active { border-color: #b6793a; color: #b6793a; background: rgba(182,121,58,0.1); }
.calc-toggle { background: none; border: none; color: #b6793a; font-family: inherit; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.2em; cursor: pointer; padding: 0; transition: color .15s; }
.calc-toggle:hover { color: #1b2a41; }

/* ---- headline result ---- */
.calc-headline { border: 1px solid rgba(182,121,58,0.4); background: rgba(182,121,58,0.1);
  border-radius: 16px; padding: 24px; margin-bottom: 20px; text-align: center; }
.calc-headline-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em;
  color: #6b6960; margin-bottom: 8px; }
.calc-headline-val { font-family: Georgia, serif; font-style: italic; font-size: 40px; line-height: 1.05;
  color: #b6793a; }
@media (min-width: 768px) { .calc-headline-val { font-size: 48px; } }
.calc-headline-sub { color: #6b6960; font-size: 12px; margin-top: 8px; }
.calc-headline-warn { color: #b6793a; font-size: 12px; margin-top: 12px; }

/* ---- stat cards ---- */
.calc-stats { display: grid; gap: 16px; margin-bottom: 16px; }
.calc-stats.cols-2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.calc-stats.cols-3 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.calc-stats.cols-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.calc-stat { border: 1px solid #e3e1d9; background: #fff; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05); padding: 18px; }
.calc-stat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: #6b6960;
  margin-bottom: 6px; }
.calc-stat-val { font-family: Georgia, serif; font-style: italic; font-size: 22px; color: #1b2a41; }
.calc-stat-val.accent { color: #b6793a; }
.calc-stat-sub { color: #6b6960; font-size: 12px; margin-top: 4px; }

/* ---- panels / callouts ---- */
.calc-panel { border: 1px solid #e3e1d9; background: #fff; border-radius: 16px; padding: 20px;
  margin-bottom: 20px; }
.calc-panel-accent { border-color: rgba(182,121,58,0.4); background: rgba(182,121,58,0.07); }
.calc-callout { border: 1px solid #e3e1d9; background: #f4f2ec; border-radius: 12px; padding: 16px;
  margin-top: 16px; }
.calc-callout-main { color: #1a1a18; font-size: 14px; }
.calc-callout-main b, .calc-callout-main strong { color: #1b2a41; }
.calc-callout-sub { color: #6b6960; font-size: 12px; margin-top: 6px; }

/* ---- donut + legend ---- */
.calc-donutpanel { border: 1px solid #e3e1d9; background: #fff; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05); padding: 20px; margin-bottom: 20px; }
.calc-donutrow, .calc-donutwrap, .calc-chartwrap { display: flex; flex-direction: column;
  align-items: center; gap: 24px; }
@media (min-width: 768px) { .calc-donutrow, .calc-donutwrap, .calc-chartwrap { flex-direction: row;
  gap: 32px; } }
.calc-donut { flex-shrink: 0; }
.calc-donutlegend, .calc-legend { width: 100%; }
.calc-legend-row { display: flex; align-items: center; gap: 12px; padding: 6px 0;
  border-bottom: 1px solid #f1efe6; }
.calc-legend-row:last-child { border-bottom: none; }
.calc-legend-dot { height: 10px; width: 10px; border-radius: 999px; flex-shrink: 0; }
.calc-legend-label { color: #1a1a18; font-size: 14px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-legend-share { color: #9a988f; font-size: 12px; font-variant-numeric: tabular-nums; }
.calc-legend-val { color: #1b2a41; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---- tables (amortization / projections / net-sheet rows) ---- */
.calc-tablewrap, .calc-tablewrap-scroll { overflow-x: auto; border: 1px solid #e3e1d9;
  border-radius: 16px; background: #fff; margin-bottom: 8px; }
.calc-tablewrap-scroll { overflow: auto; max-height: 560px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.calc-table th { text-align: right; padding: 12px 16px; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.05em; color: #6b6960; border-bottom: 1px solid #e3e1d9; white-space: nowrap; }
.calc-table th:first-child { text-align: left; }
.calc-table td { padding: 10px 16px; text-align: right; color: #1a1a18;
  border-bottom: 1px solid #f1efe6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-table td:first-child { text-align: left; }
.calc-table tr:last-child td { border-bottom: none; }
.calc-tablewrap-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.calc-tr-yearend td { background: #f4f2ec; }
.calc-td-muted { color: #9a988f !important; }

/* ---- misc ---- */
.calc-note { color: #6b6960; font-size: 12px; line-height: 1.5; margin-top: 12px; }
.calc-empty { color: #6b6960; font-size: 13px; padding: 8px 0; }
.calc-biweekly { margin-bottom: 20px; }
.calc-disclaimer { color: #6b6960; font-size: 12px; line-height: 1.6; border-top: 1px solid #e3e1d9;
  padding-top: 16px; margin-top: 32px; }
.calc-disclaimer-list { color: #6b6960; font-size: 12px; line-height: 1.6; margin: 8px 0 0;
  padding-left: 18px; }
.calc-disclaimer-list li { margin-bottom: 4px; }

/* Hide number-input spinners for a cleaner look (matches the site). */
.calc-input[type="number"]::-webkit-outer-spin-button,
.calc-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
