.home-equity-container {
  max-width: 960px;
  margin: 40px auto;
  padding: 40px 56px;
  border-radius: 28px;
  background: radial-gradient(140% 140% at 0% 0%, #f4e9ff 0%, #ffffff 45%, #f4e9ff 100%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.06);
  text-align: left;
  font-family: Gotham, Arial, Sans-serif !important;
}

.heq-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.home-equity-container h2,
.home-equity-container h3,
.home-equity-container h4,
.home-equity-container h5,
.home-equity-container p,
.home-equity-container label,
.home-equity-container button,
.home-equity-container table {
  font-family: Gotham, Arial, Sans-serif !important;
}

.heq-subhead {
  margin-top: 8px;
  margin-bottom: 4px;
  color: #4f566b;
  line-height: 1.5;
}

/* Always stacked */
.heq-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* Grouped form layout */
.heq-form--grouped {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Cards */
.heq-input-group {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.05);
  border: 1px solid #eceff6;
}

.heq-group-heading {
  margin: 0 0 14px 0;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.heq-field {
  width: 100%;
  margin-bottom: 14px;
}

.heq-field--inline {
  margin-bottom: 10px;
}

.heq-label {
  display: block;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

/* Inputs */
.heq-input {
  width: 100%;
  height: 48px;
  border-radius: 25px !important;
  border: 1px solid #dde3ef;
  background: #ffffff;
  font-size: 16px;
  text-align: center;
  outline: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
  font-family: Gotham, Arial, Sans-serif !important;
}

.heq-input::placeholder {
  color: #a0a7b8;
}

.heq-input:disabled {
  background: #f7f7fb;
  color: #7c859b;
}

.heq-percent-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heq-suffix {
  position: absolute;
  right: 16px;
  color: #4f566b;
  font-size: 14px;
  pointer-events: none;
}

.heq-helptext {
  margin-top: 6px;
  font-size: 12px;
  color: #4f566b;
  text-align: center;
}

.heq-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  font-weight: 600;
  color: #2c3240;
}

.heq-check input {
  width: 18px;
  height: 18px;
}

.heq-note {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f7fb;
  border: 1px solid #eceff6;
  font-size: 12px;
  line-height: 1.4;
  color: #4f566b;
}

/* CTA */
.heq-actions {
  text-align: center;
  margin-top: 4px;
}

.heq-cta {
  text-decoration: none !important;
  font-weight: 600;
}

/* Disclaimer */
.heq-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #4f566b;
}

/* Results card */
.heq-results-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.06);
  border: 1px solid #eceff6;
}

.heq-results-title {
  margin: 0 0 10px 0;
}

/* KPIs */
.heq-kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.heq-kpi {
  border: 1px solid #eceff6;
  border-radius: 16px;
  padding: 14px 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.heq-kpi-label {
  font-size: 12px;
  color: #4f566b;
  margin-bottom: 6px;
  font-weight: 600;
}

.heq-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: #2c3240;
}

.heq-kpi-subvalue {
  margin-top: 4px;
  font-size: 12px;
  color: #4f566b;
}

/* Ownership bars */
.heq-bars {
  margin-bottom: 14px;
  border: 1px solid #eceff6;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.heq-bars-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.heq-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 140px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.heq-bar-label {
  font-size: 13px;
  color: #4f566b;
  font-weight: 700;
}

.heq-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #f0f2f8;
  display: flex;
}

.heq-bar-seg {
  height: 100%;
}

.heq-bar-seg--eq {
  background: #8d7bff;
}

.heq-bar-seg--mort {
  background: #c9d1e6;
}

.heq-bar-text {
  text-align: right;
  font-size: 12px;
  color: #4f566b;
  white-space: nowrap;
}

.heq-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: #4f566b;
  font-weight: 600;
}

.heq-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.heq-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.heq-dot--eq {
  background: #8d7bff;
}

.heq-dot--mort {
  background: #c9d1e6;
}

/* Secondary metrics */
.heq-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.heq-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f7fb;
  border: 1px solid #eceff6;
  font-size: 13px;
}

.heq-metric-label {
  color: #4f566b;
  font-weight: 600;
}

.heq-metric-value {
  color: #2c3240;
  font-weight: 700;
  white-space: nowrap;
}

/* Tables */
.heq-table-wrap {
  border: 1px solid #eceff6;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 12px;
}

.heq-table-title {
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 1px solid #eceff6;
  background: #fbfbfe;
}

.heq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.heq-table th,
.heq-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f2f8;
  text-align: right;
}

.heq-table th:first-child,
.heq-table td:first-child {
  text-align: left;
}

.heq-table thead th {
  font-size: 12px;
  color: #4f566b;
  font-weight: 700;
  background: #ffffff;
}

.heq-table tbody tr:last-child td {
  border-bottom: none;
}

/* =========================
   BRAND TOGGLES (FIX HOVER)
   ========================= */
.heq-toggle {
  width: 100%;
  border-radius: 16px;
  border: 2px solid #6f5cff;
  background: #6f5cff;
  color: #ffffff !important;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 26px rgba(111, 92, 255, 0.22);
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none !important;
}

.heq-toggle:hover,
.heq-toggle:focus,
.heq-toggle:active {
  background: #5b49ff;
  border-color: #5b49ff;
  color: #ffffff !important;
}

.heq-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(111, 92, 255, 0.25), 0 10px 26px rgba(111, 92, 255, 0.22);
}

.heq-toggle--secondary {
  margin-top: 10px;
}

/* Amort panel */
.heq-amort-panel {
  margin-top: 10px;
  border: 1px solid #eceff6;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.heq-amort-head {
  padding: 12px 14px;
  border-bottom: 1px solid #eceff6;
  background: #fbfbfe;
  display: grid;
  gap: 6px;
}

.heq-amort-sub {
  font-size: 12px;
  color: #4f566b;
}

.heq-amort-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.heq-table--amort th,
.heq-table--amort td {
  white-space: nowrap;
}

/* Explainer panel */
.heq-explainer-panel {
  margin-top: 10px;
  border: 1px solid #eceff6;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.heq-explainer-body {
  padding: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #2c3240;
}

.heq-explainer-body p {
  margin: 0 0 10px 0;
}

.heq-explainer-h {
  margin: 14px 0 8px 0;
  font-size: 13px;
  font-weight: 900;
  color: #2c3240;
}

.heq-explainer-eq {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f7fb;
  border: 1px solid #eceff6;
  color: #2c3240;
}

.heq-explainer-sub {
  font-size: 12px;
  color: #4f566b;
}

.heq-math {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.heq-explainer-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eceff6;
  font-size: 12px;
  color: #4f566b;
}

/* Notes */
.heq-notes {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #4f566b;
}

/* Mobile */
@media (max-width: 767px) {
  .home-equity-container {
    padding: 28px 20px;
  }

  .heq-bar-row {
    grid-template-columns: 1fr;
  }

  .heq-bar-text {
    text-align: left;
  }

  .heq-table {
    font-size: 12px;
  }

  .heq-table th,
  .heq-table td {
    padding: 9px 10px;
  }
}
@media (max-width: 767px) {
  .home-equity-container {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
  }