:root {
  --bg: #f0f4f8;
  --surface: #fff;
  --surface-alt: #f7fafc;
  --surface-raised: #fff;
  --border: #e2e8f0;
  --border-strong: #cbd5e0;
  --border-light: #edf2f7;
  --text: #1a202c;
  --text-strong: #2d3748;
  --text-muted: #4a5568;
  --text-subtle: #718096;
  --text-faint: #a0aec0;
  --primary: #4299e1;
  --primary-hover: #3182ce;
  --primary-tint: #ebf8ff;
  --primary-border: #bee3f8;
  --primary-text: #2b6cb0;
  --success: #38a169;
  --success-bg: #c6f6d5;
  --success-tint: #f0fdf4;
  --danger: #e53e3e;
  --danger-bg: #fed7d7;
  --danger-border: #feb2b2;
  --danger-border-hover: #fc8181;
  --danger-tint: #fff5f5;
  --warning: #d69e2e;
  --warning-bg: #fef9c3;
  --warning-border: #fde047;
  --warning-text: #92400e;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.12);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: -4px 0 20px rgba(0,0,0,0.12);
  --shadow-tooltip: 0 2px 8px rgba(0,0,0,0.25);
  --tab-track: #e2e8f0;
  --chevron: #a0aec0;
}

[data-theme="dark"] {
  --bg: #0f1620;
  --surface: #1a2332;
  --surface-alt: #232c3d;
  --surface-raised: #222c3d;
  --border: #2d3748;
  --border-strong: #4a5568;
  --border-light: #232c3d;
  --text: #e2e8f0;
  --text-strong: #f7fafc;
  --text-muted: #cbd5e0;
  --text-subtle: #a0aec0;
  --text-faint: #718096;
  --primary: #63b3ed;
  --primary-hover: #90cdf4;
  --primary-tint: rgba(99,179,237,0.14);
  --primary-border: rgba(99,179,237,0.4);
  --primary-text: #90cdf4;
  --success: #68d391;
  --success-bg: rgba(104,211,145,0.18);
  --success-tint: rgba(104,211,145,0.08);
  --danger: #fc8181;
  --danger-bg: rgba(252,129,129,0.16);
  --danger-border: rgba(252,129,129,0.4);
  --danger-border-hover: rgba(252,129,129,0.7);
  --danger-tint: rgba(252,129,129,0.08);
  --warning: #ecc94b;
  --warning-bg: rgba(236,201,75,0.14);
  --warning-border: rgba(236,201,75,0.45);
  --warning-text: #f6e05e;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.45);
  --shadow-lg: -4px 0 24px rgba(0,0,0,0.5);
  --shadow-tooltip: 0 2px 10px rgba(0,0,0,0.7);
  --tab-track: #232c3d;
  --chevron: #cbd5e0;
}

html { color-scheme: light; }
[data-theme="dark"] html, html[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 2rem 1rem;
  transition: background-color 0.2s, color 0.2s;
}

.lang-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

.lang-select {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--border);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  outline: none;
}

.lang-select:focus { box-shadow: 0 0 0 2px var(--primary); }

h1 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-strong);
}

.subtitle {
  text-align: center;
  color: var(--text-subtle);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  outline: none;
  background: var(--surface);
  color: var(--text);
}

input:focus { border-color: var(--primary); }

.month-year-pair {
  display: flex;
  gap: 0.5rem;
}

.month-year-pair select {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 1.75rem 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a0aec0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
  cursor: pointer;
  color: var(--text);
  line-height: 1.5;
}

[data-theme="dark"] .month-year-pair select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23cbd5e0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.month-year-pair select:focus { border-color: var(--primary); }
.month-year-pair .year-sel { flex: 0 0 6.5rem; }

#erp-type {
  width: 100%;
  padding: 0.6rem 1.75rem 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a0aec0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
  cursor: pointer;
  color: var(--text);
  line-height: 1.5;
}

[data-theme="dark"] #erp-type {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23cbd5e0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

#erp-type:focus { border-color: var(--primary); }

.input-wrapper { position: relative; }

.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 0.9rem;
  pointer-events: none;
}

.input-prefix { left: 0.75rem; }
.input-suffix { right: 0.75rem; }

.input-prefix ~ input { padding-left: 1.6rem; }
.input-suffix ~ input { padding-right: 1.8rem; }

button.calc-btn {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

button.calc-btn:hover { background: var(--primary-hover); }

.rate-periods-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.rate-periods-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rate-periods-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rate-periods-hint {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.rate-period-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.rate-period-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.rate-period-field input {
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
}

.rate-period-sublabel {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rate-period-arrow {
  color: var(--text-faint);
  font-size: 0.9rem;
  padding-bottom: 0.6rem;
  user-select: none;
}

.add-rate-period-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  border: 1.5px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-subtle);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.add-rate-period-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-tint);
}

tbody tr.rate-change td {
  background: var(--primary-tint) !important;
  color: var(--primary-text);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: left !important;
  padding: 0.4rem 1rem;
  border-top: 1px dashed var(--primary-border);
  border-bottom: 1px dashed var(--primary-border);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

@media (max-width: 560px) {
  .summary { grid-template-columns: 1fr; }
}

.summary-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 1.2rem 1.4rem;
  text-align: center;
}

.summary-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  margin-bottom: 0.4rem;
}

.summary-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-strong);
}

.summary-value.highlight { color: var(--primary); }

.table-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

.table-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  background: var(--surface-alt);
  text-align: center;
  padding: 0.65rem 1rem;
  font-weight: 600;
  color: var(--text-subtle);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

thead th:first-child { text-align: center; }

tbody tr:nth-child(even) { background: var(--surface-alt); }

tbody td {
  padding: 0.6rem 1rem;
  text-align: center;
  color: var(--text-strong);
  border-bottom: 1px solid var(--border-light);
}

tbody td:first-child { text-align: center; color: var(--text-faint); font-weight: 600; }

.interest-cell { color: var(--danger); }
.principal-cell { color: var(--success); }

.erp-separator td {
  background: var(--warning-bg) !important;
  color: var(--warning-text);
  font-weight: 600;
  font-size: 0.82rem;
  text-align: left !important;
  padding: 0.5rem 1rem;
  border-top: 2px solid var(--warning-border);
  border-bottom: 2px solid var(--warning-border);
}

.erp-new td { background: var(--success-tint) !important; }

.loan-picker {
  display: flex;
  max-width: 680px;
  margin: 0 auto 1rem;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.loan-pill {
  padding: 0.5rem 0.95rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loan-pill:hover:not(.active) { border-color: var(--primary); color: var(--text-strong); }
.loan-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.loan-pill.all-loans { border-style: dashed; background: var(--surface-alt); }
.loan-pill.all-loans.active { background: var(--text-strong); border-color: var(--text-strong); color: var(--surface); }

.tabs {
  display: flex;
  max-width: 680px;
  margin: 0 auto 1.5rem;
  gap: 0.25rem;
  background: var(--tab-track);
  border-radius: 10px;
  padding: 0.25rem;
}

.tab {
  flex: 1;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tab:hover:not(.active) { color: var(--text-strong); }

.tab.active {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

#erp-results .erp-results-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.chart-card { padding: 1.25rem 1.5rem; }
.chart-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.chart-wrapper { width: 100%; }
.chart-wrapper svg { width: 100%; height: auto; display: block; }
.chart-wrapper-donut { max-width: 280px; margin: 0 auto; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.chart-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart-legend-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.chart-legend-swatch.dot { border-radius: 50%; width: 10px; height: 10px; }
.chart-legend-swatch.line { height: 3px; border-radius: 2px; }
.chart-legend-swatch.line.dashed {
  background-image: linear-gradient(to right, var(--text-faint) 0, var(--text-faint) 4px, transparent 4px, transparent 7px);
  background-size: 7px 100%;
  background-color: transparent !important;
}
.chart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-faint);
  font-size: 0.9rem;
  display: none;
}
#tab-graphs.charts-empty .chart-card { display: none; }
#tab-graphs.charts-empty .chart-empty { display: block; }

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border-strong);
  color: var(--surface);
  font-size: 0.65rem;
  font-weight: 700;
  font-style: normal;
  cursor: default;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1;
}

/* Tooltip rendered as a fixed-position div via JS */
#tooltip {
  position: fixed;
  background: var(--text-strong);
  color: var(--surface);
  font-size: 0.78rem;
  font-weight: 400;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  white-space: normal;
  max-width: min(260px, calc(100vw - 24px));
  pointer-events: none;
  z-index: 9999;
  box-shadow: var(--shadow-tooltip);
  line-height: 1.5;
  display: none;
}

#tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text-strong);
}

#tooltip.chart-tooltip::after { display: none; }
#tooltip.chart-tooltip { font-variant-numeric: tabular-nums; }

.chart-overlay { cursor: crosshair; }

/* Config panel */
.config-panel {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(calc(100% - 36px));
  transition: transform 0.25s ease;
  display: flex;
  align-items: stretch;
  z-index: 200;
}

.config-panel:hover,
.config-panel.pinned {
  transform: translateY(-50%) translateX(0);
}

.config-tab {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 0.55rem;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}

.config-body {
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.25rem;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.config-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.config-row.config-row-stack { flex-direction: column; align-items: stretch; gap: 0.35rem; }

.config-row-label {
  font-size: 0.85rem;
  color: var(--text-strong);
  line-height: 1.3;
}

.config-sublabel {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.config-input {
  width: 100%;
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, background-color 0.2s, color 0.2s;
  background: var(--surface);
  color: var(--text);
}

.config-input:focus { border-color: var(--primary); }

.config-btn {
  width: 100%;
  padding: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  color: var(--text-muted);
}

.config-btn:hover { border-color: var(--primary); color: var(--primary); }
.config-btn-danger { border-color: var(--danger-border); color: var(--danger); }
.config-btn-danger:hover { border-color: var(--danger); color: #fff; background: var(--danger); }

.config-section { display: flex; flex-direction: column; gap: 0.9rem; }
.config-section + .config-section { border-top: 1px solid var(--border); padding-top: 1rem; }

/* Toggle switch */
.toggle {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle input:checked + .toggle-track { background: var(--primary); }

.toggle-track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

/* Early Repayment Calculator */
.erp-top-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
.erp-heading { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.erp-type-control { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.erp-type-control span { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.erp-type-control #erp-type { width: auto; padding: 0.4rem 1.5rem 0.4rem 0.6rem; font-size: 0.85rem; background-position: right 0.5rem center; }
.repayment-entry { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; margin-bottom: 0.6rem; }
.repayment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.repayment-number { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; }
@media (max-width: 560px) { .rp-grid { grid-template-columns: 1fr; } }
.rp-recurring-control { display: flex; flex-direction: column; gap: 0.4rem; align-self: end; }
.rp-remove-btn { background: none; border: 1.5px solid var(--border); border-radius: 6px; color: var(--text-faint); cursor: pointer; font-size: 1rem; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; padding: 0; }
.rp-remove-btn:hover { border-color: var(--danger-border-hover); color: var(--danger); background: var(--danger-tint); }
.add-repayment-btn { display: block; width: 100%; margin-top: 0.25rem; padding: 0.6rem; background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: 8px; color: var(--text-subtle); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.add-repayment-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }

.erp-error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.erp-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .erp-results-grid { grid-template-columns: 1fr; }
}

.erp-result-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.erp-result-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.erp-result-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-strong);
}

.erp-penalty-value { color: var(--warning); }

.erp-note {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.75rem;
}

.erp-term-saved-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--primary-tint);
  border: 1px solid var(--primary-border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin-top: 0.75rem;
}

.erp-term-saved-bar .erp-result-label { color: var(--primary-text); }
.erp-term-saved-bar .erp-result-value { font-size: 1.1rem; color: var(--primary-text); }
