/* ===== RESET ===== */
.mp-wrap *, .mp-wrap *::before, .mp-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== BASE — no layout, just component styles ===== */
.mp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(13px, 1.5vw, 15px);
  color: #1e293b;
  max-width: 1060px; margin: 0 auto;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; overflow: hidden;
}

/* ===== HEADER ===== */
.mp-header {
  padding: clamp(14px, 2vw, 22px) clamp(14px, 2.5vw, 24px);
  background: #422006;
  display: flex; align-items: center; gap: clamp(10px, 1.5vw, 14px);
}
.mp-header-icon {
  width: clamp(40px, 5vw, 50px); height: clamp(40px, 5vw, 50px);
  border-radius: 12px; background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.mp-title    { font-size: clamp(16px, 2vw, 20px); font-weight: 700; color: #fff; margin-bottom: 3px; }
.mp-subtitle { font-size: clamp(11px, 1.3vw, 13px); color: rgba(255,255,255,0.7); line-height: 1.4; }

/* ===== BODY — default: stacked (mobile first) ===== */
.mp-body { display: flex; flex-direction: column; }
.mp-form    { padding: 16px; display: flex; flex-direction: column; gap: 13px; width: 100%; }
.mp-results { padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fdf8f6; width: 100%; border-top: 1px solid #e2e8f0; }

/* ===== SECTION LABELS ===== */
.mp-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #64748b;
  padding-bottom: 4px; border-bottom: 1px solid #f1f5f9;
  margin-top: 2px; display: flex; align-items: center; gap: 8px;
}
.mp-section-tag {
  font-size: 9.5px; font-weight: 600; background: #fed7aa; color: #9a3412;
  padding: 2px 7px; border-radius: 20px; text-transform: none; letter-spacing: 0;
}

/* ===== FIELDS ===== */
.mp-field { display: flex; flex-direction: column; gap: 6px; }
.mp-label { font-size: 13px; font-weight: 600; color: #334155; }
.mp-label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-badge { font-size: 11px; font-weight: 700; background: #dcfce7; color: #15803d; padding: 2px 8px; border-radius: 20px; }
.mp-field-hint { font-size: 12px; color: #64748b; line-height: 1.5; }

/* ===== INPUTS ===== */
.mp-prefix-wrap, .mp-suffix-wrap {
  display: flex; align-items: center;
  border: 1.5px solid #cbd5e1; border-radius: 8px;
  overflow: hidden; background: #f8fafc; min-width: 0;
}
.mp-prefix-wrap:focus-within, .mp-suffix-wrap:focus-within { border-color: #422006; background: #fff; }
.mp-prefix, .mp-suffix {
  padding: 0 10px; height: 42px;
  display: flex; align-items: center;
  font-size: 14px; font-weight: 600; color: #64748b;
  background: #f1f5f9; white-space: nowrap; flex-shrink: 0;
}
.mp-prefix { border-right: 1px solid #e2e8f0; }
.mp-suffix { border-left: 1px solid #e2e8f0; }
.mp-input {
  flex: 1; border: none; background: transparent;
  padding: 0 12px; height: 42px;
  font-size: 14px; color: #1e293b; outline: none; min-width: 0;
  -moz-appearance: textfield;
}
.mp-input::-webkit-outer-spin-button,
.mp-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ===== SELECT ===== */
.mp-select {
  width: 100%; height: 42px; padding: 0 32px 0 12px;
  border: 1.5px solid #cbd5e1; border-radius: 8px;
  background: #f8fafc; font-size: 13.5px; color: #1e293b;
  outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; min-width: 0;
}
.mp-select:focus { border-color: #422006; }

/* ===== ROW 2 — default 1 col, wider screens 2 col ===== */
.mp-row-2 { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* ===== MODE BUTTONS ===== */
.mp-mode-group { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mp-mode-btn {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1.5px solid #e2e8f0;
  border-radius: 10px; background: #f8fafc;
  cursor: pointer; transition: all .15s; text-align: left;
}
.mp-mode-btn.active { background: #422006; border-color: #422006; }
.mp-mode-btn:hover:not(.active) { border-color: #422006; color: #422006; background: #fdf8f6; }
.mp-mode-name { font-size: 13px; font-weight: 700; color: #334155; }
.mp-mode-btn.active .mp-mode-name { color: #fff; }
.mp-mode-desc { font-size: 11px; color: #94a3b8; }
.mp-mode-btn.active .mp-mode-desc { color: rgba(255,255,255,0.7); }

/* ===== BIWEEKLY TIP ===== */
.mp-biweekly-tip {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; padding: 10px 12px;
  font-size: 12.5px; color: #78350f; line-height: 1.5;
}

/* ===== TOGGLE ===== */
.mp-toggle-label { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; flex-shrink: 0; }
.mp-toggle-label input { opacity: 0; width: 0; height: 0; }
.mp-toggle-track { position: absolute; inset: 0; background: #cbd5e1; border-radius: 24px; transition: .2s; }
.mp-toggle-label input:checked + .mp-toggle-track { background: #422006; }
.mp-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.mp-toggle-label input:checked + .mp-toggle-track .mp-toggle-thumb { left: 23px; }

/* ===== TARGET RESULT ===== */
.mp-target-result {
  background: #fdf8f6; border: 1.5px solid #fed7aa;
  border-radius: 8px; padding: 10px 14px;
  font-size: 13.5px; color: #422006; margin-top: 6px; line-height: 1.5;
}

/* ===== INVEST CARD ===== */
.mp-invest-card { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; }
.mp-invest-rate    { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.mp-invest-verdict { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.mp-invest-hint    { font-size: 12px; color: #64748b; line-height: 1.5; }
.mp-invest-yes     { color: #15803d; }
.mp-invest-no      { color: #dc2626; }
.mp-invest-neutral { color: #d97706; }

/* ===== DISCLAIMER ===== */
.mp-disclaimer {
  background: #fefce8; border: 1px solid #fde68a;
  border-radius: 8px; padding: 12px 14px;
  font-size: 12px; color: #78350f; line-height: 1.5;
}

/* ===== HERO CARD ===== */
.mp-hero-card {
  display: flex; align-items: center;
  border-radius: 14px; overflow: hidden; border: 1px solid #e2e8f0;
}
.mp-hero-col   { flex: 1; padding: clamp(14px, 2vw, 18px) clamp(12px, 2vw, 16px); text-align: center; }
.mp-hero-base  { background: #64748b; color: #fff; }
.mp-hero-new   { background: #422006; color: #fff; }
.mp-hero-arrow {
  font-size: 20px; color: rgba(255,255,255,0.6);
  background: #1e0f02; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  align-self: stretch; flex-shrink: 0;
}
.mp-hero-label { font-size: 10px; font-weight: 600; opacity: .7; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.mp-hero-date  { font-size: clamp(18px, 3vw, 24px); font-weight: 800; line-height: 1.1; }
.mp-hero-sub   { font-size: 11px; opacity: .7; margin-top: 3px; }

/* ===== SAVINGS STRIP ===== */
.mp-savings-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.mp-savings-item  { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 8px; text-align: center; }
.mp-savings-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; margin-bottom: 3px; }
.mp-savings-val   { font-size: clamp(13px, 1.5vw, 15px); font-weight: 800; color: #1e293b; }
.mp-green { color: #16a34a; }
.mp-red   { color: #dc2626; }

/* ===== TIPPING POINT ===== */
.mp-tip-card  { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1.5px solid #bbf7d0; border-radius: 12px; padding: 14px 16px; }
.mp-tip-icon  { font-size: 22px; flex-shrink: 0; }
.mp-tip-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #15803d; margin-bottom: 3px; }
.mp-tip-val   { font-size: 15px; font-weight: 700; color: #1e293b; }
.mp-tip-sub   { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ===== COMPARE TABLE ===== */
.mp-compare-card  { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.mp-compare-title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 3px; }
.mp-compare-hint  { font-size: 12px; color: #64748b; margin-bottom: 12px; }
.mp-table-wrap    { overflow-x: auto; border-radius: 8px; border: 1px solid #e2e8f0; }
.mp-table         { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 360px; }
.mp-table th      { background: #422006; color: #fff; padding: 9px 10px; text-align: left; font-size: 11px; font-weight: 600; white-space: nowrap; }
.mp-table td      { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; white-space: nowrap; }
.mp-table tr:last-child td       { border-bottom: none; }
.mp-table tr.mp-current-row td   { background: #f8fafc; color: #94a3b8; }
.mp-table tr.mp-best-row td      { background: #fef9ee; font-weight: 600; }
.mp-table .mp-strategy-desc      { font-size: 11px; color: #94a3b8; margin-top: 2px; font-weight: 400; }

/* ===== RECAST CARD ===== */
.mp-recast-card  { background: #fff; border: 1.5px solid #bfdbfe; border-radius: 12px; padding: 16px; }
.mp-recast-title { font-size: 13px; font-weight: 700; color: #1d4ed8; margin-bottom: 8px; }
.mp-recast-body  { font-size: 13px; color: #475569; line-height: 1.6; }
.mp-recast-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0 8px; }
.mp-recast-item  { background: #eff6ff; border-radius: 8px; padding: 10px 12px; }
.mp-recast-label { font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 3px; }
.mp-recast-val   { font-size: 16px; font-weight: 700; color: #1d4ed8; }
.mp-recast-note  { font-size: 11.5px; color: #94a3b8; }

/* ==============================================
   SCREEN 1 — MOBILE: max 480px
   Single column everything
   ============================================== */
@media (max-width: 480px) {
  .mp-wrap        { font-size: 13px; border-radius: 12px; }
  .mp-header      { padding: 14px; gap: 10px; }
  .mp-header-icon { width: 38px; height: 38px; }
  .mp-title       { font-size: 15px; }
  .mp-subtitle    { font-size: 11px; }
  .mp-form, .mp-results { padding: 14px; gap: 12px; }

  .mp-body        { flex-direction: column; }
  .mp-row-2       { grid-template-columns: 1fr; }
  .mp-mode-group  { grid-template-columns: 1fr; }
  .mp-savings-strip { grid-template-columns: 1fr; }
  .mp-recast-grid { grid-template-columns: 1fr; }
  .mp-hero-date   { font-size: 18px; }
  .mp-hero-label  { font-size: 9px; }
}

/* ==============================================
   SCREEN 2 — TABLET: 481px – 899px
   Stacked, 2-col grids, more breathing room
   ============================================== */
@media (min-width: 481px) and (max-width: 899px) {
  .mp-wrap   { font-size: 14px; }
  .mp-header { padding: 18px 20px; }
  .mp-form, .mp-results { padding: 18px; gap: 14px; }

  .mp-body    { flex-direction: column; }
  .mp-results { border-top: 1px solid #e2e8f0; }
  .mp-row-2   { grid-template-columns: 1fr 1fr; }
  .mp-mode-group { grid-template-columns: 1fr 1fr; }
  .mp-mode-btn { flex-direction: column; align-items: center; text-align: center; }
  .mp-savings-strip { grid-template-columns: repeat(3,1fr); }
  .mp-recast-grid   { grid-template-columns: 1fr 1fr; }
  .mp-hero-date     { font-size: 22px; }
}

/* ==============================================
   SCREEN 3 — DESKTOP: 900px+
   Side by side, NO sticky, NO max-height
   ============================================== */
@media (min-width: 900px) {
  .mp-wrap   { font-size: 15px; }
  .mp-header { padding: 22px 24px; }
  .mp-form, .mp-results { padding: 20px; gap: 14px; }

  .mp-body    { flex-direction: row; align-items: flex-start; }
  .mp-form    { width: 50%; border-right: 1px solid #e2e8f0; border-top: none; }
  .mp-results { width: 50%; border-top: none; }
  .mp-row-2   { grid-template-columns: 1fr 1fr; }
  .mp-mode-group { grid-template-columns: 1fr 1fr; }
  .mp-mode-btn { flex-direction: column; align-items: center; text-align: center; }
  .mp-savings-strip { grid-template-columns: repeat(3,1fr); }
  .mp-recast-grid   { grid-template-columns: 1fr 1fr; }
  .mp-hero-date     { font-size: 24px; }
}
