@charset "utf-8";
.take-home-hero {
    background: linear-gradient(135deg, var(--green-d), var(--green));
    border-radius: 16px;
    padding: 22px 22px 18px;
    margin-bottom: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .take-home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M20 20.5V18H0v5h5v5H0v5h20v-5h-5v-5h10v5h5V20H20zM0 0v5h5V0H0zm5 5v5H0v5h10V5H5zm10 0h5V0h-5v5zm5 5h-5v5h5v-5z'/%3E%3C/g%3E%3C/svg%3E");
  }
  .take-home-hero__label {
    font-size: .78rem;
    color: rgba(255,255,255,.7);
    letter-spacing: .5px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
    position: relative;
  }
  .take-home-hero__amount {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--white);
    line-height: 1;
    position: relative;
  }
  .take-home-hero__sub {
    font-size: .72rem;
    color: rgba(255,255,255,.55);
    margin-top: 6px;
    position: relative;
  }
  .take-home-hero__badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    position: relative;
  }
  .take-home-hero__badge {
    background: rgba(255,255,255,.15);
    color: var(--white);
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    font-family: var(--font-head);
  }
 
  /* ── Deductions mini-row ─────────────────────────────────── */
  .deduction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: .83rem;
  }
  .deduction-row__label { color: var(--text); }
  .deduction-row__amount {
    font-family: var(--font-head);
    font-weight: 700;
    color: #dc2626;
  }
  .deduction-row.pf-row   { background: #eff6ff; }
  .deduction-row.pt-row   { background: #f0fdf4; }
  .deduction-row.tds-row  { background: #fff7ed; }
  .deduction-row.gross-row {
    background: var(--light);
    border: 1px solid var(--gray-l);
    margin-bottom: 10px;
  }
  .deduction-row.gross-row .deduction-row__label { font-weight: 600; color: var(--navy); }
  .deduction-row.gross-row .deduction-row__amount { color: var(--navy); }
 
  /* ── Budget planner section ──────────────────────────────── */
  .budget-planner {
    margin-top: 4px;
  }
  .budget-planner__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .9rem;
    color: var(--navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .budget-planner__title i { color: var(--green); }
 
  /* Budget allocation bars */
  .budget-alloc {
    margin-bottom: 6px;
  }
  .budget-alloc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    margin-bottom: 4px;
  }
  .budget-alloc__label { color: var(--text); font-weight: 500; }
  .budget-alloc__values {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .8rem;
  }
  .budget-alloc__track {
    height: 7px;
    background: var(--gray-l);
    border-radius: 100px;
    overflow: hidden;
  }
  .budget-alloc__fill {
    height: 100%;
    border-radius: 100px;
    transition: width .5s ease;
  }
 
  /* ── 50-30-20 rule visual ────────────────────────────────── */
  .rule-503020 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }
  .rule-503020-cell {
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
  }
  .rule-503020-cell.needs  { background: #eff6ff; border: 1px solid #bfdbfe; }
  .rule-503020-cell.wants  { background: #fff0e8; border: 1px solid #fed7aa; }
  .rule-503020-cell.savings{ background: #e6f4ec; border: 1px solid #bbf7d0; }
  .rule-503020-cell__pct {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.1rem;
  }
  .needs   .rule-503020-cell__pct { color: #1a73e8; }
  .wants   .rule-503020-cell__pct { color: var(--orange); }
  .savings .rule-503020-cell__pct { color: var(--green); }
  .rule-503020-cell__label {
    font-size: .68rem;
    color: var(--gray);
    margin: 3px 0 2px;
    font-weight: 600;
  }
  .rule-503020-cell__amount {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .82rem;
    color: var(--navy);
  }
 
  /* ── EMI capacity gauge ──────────────────────────────────── */
  .emi-capacity {
    background: var(--light);
    border: 1px solid var(--gray-l);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .emi-capacity__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .emi-capacity__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .85rem;
    color: var(--navy);
  }
  .emi-capacity__value {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: .95rem;
    color: var(--green);
  }
  .emi-capacity__sub {
    font-size: .72rem;
    color: var(--gray);
    margin-bottom: 8px;
  }
  .emi-gauge-track {
    height: 10px;
    background: var(--gray-l);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
  }
  .emi-gauge-safe   { position: absolute; top: 0; left: 0; height: 100%; background: var(--green); border-radius: 100px; transition: width .5s; }
  .emi-gauge-marker {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 16px;
    background: var(--orange);
    border-radius: 2px;
    transform: translateX(-50%);
  }
  .emi-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: .68rem;
    color: var(--gray);
    margin-top: 4px;
  }
 
  /* ── Savings potential pill ─────────────────────────────── */
  .savings-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e6f4ec;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: .82rem;
    color: var(--navy);
  }
  .savings-pill i { color: var(--green); font-size: .95rem; flex-shrink: 0; }
  .savings-pill strong { font-family: var(--font-head); color: var(--green); }
 
  /* ── Horizontal stacked bar chart ──────────────────────── */
  .take-home-chart-wrap { position: relative; height: 180px; }
 
  /* ── Responsive ─────────────────────────────────────────── */
  @media (max-width: 480px) {
    .take-home-hero__amount { font-size: 1.7rem; }
    .rule-503020 { grid-template-columns: 1fr; }
  }