   :root {
      --max-width: 1200px;
      --accent: #ff7350;
      --deep: #254054;
      --muted: #94a3b8;
      --card-bg: #ffffff;
      --surface: #f8fafc;
      --radius: 14px;
      --shadow: 0 8px 24px rgba(37,64,84,0.06);
      --gap: 1rem;
      --pad: 1rem;
    }
    * { box-sizing: border-box; }
    body {
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
      background: #f6f8fb;
      color: var(--deep);
      margin: 0;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      line-height: 1.35;
    }
    .rmc-container {
      max-width: var(--max-width);
      margin: 2rem auto;
      padding: 1.25rem;
    }
    .rmc-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem;
    }
    @media (max-width: 980px) {
      .rmc-grid { grid-template-columns: 1fr; }
    }
    .rmc-card {
      background: var(--card-bg);
      border-radius: var(--radius);
      padding: 1.25rem;
      box-shadow: var(--shadow);
    }
    .rmc-stack > * + * { margin-top: 1rem; }
    .rmc-field { margin-bottom: 0; }
    .rmc-label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--deep); font-size: 0.95rem; }
    .rmc-input {
      width: 100%;
      padding: 0.6rem 0.75rem;
      border: 1px solid #e6edf3;
      border-radius: 10px;
      font-size: 1rem;
      background: #fff;
    }
    .rmc-input:focus { outline: none; box-shadow: 0 0 0 4px rgba(37,64,84,0.04); border-color: var(--deep); }
    .rmc-readonly { background: #fbfdff; }
    .rmc-row { display: flex; align-items: center; gap: 0.5rem; }
    .rmc-align-center { align-items: center; }
    .rmc-inline-right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
    .rmc-between { justify-content: space-between; }
    .rmc-gap { gap: 0.5rem; }
    .rmc-small { width: 6.25rem; padding: 0.45rem 0.5rem; text-align: right; }
    .rmc-suffix { color: var(--muted); font-size: 0.95rem; }
    .rmc-currency { padding: 0.45rem 0.65rem; border-radius: 8px; background: #f1f5f9; color: var(--deep); }
    .rmc-range {
      width: 100%;
      height: 6px;
      background: #e9eef5;
      border-radius: 6px;
      -webkit-appearance: none;
    }
    .rmc-range::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--deep);
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(37,64,84,0.2);
    }
    .rmc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    @media (max-width: 520px) { .rmc-grid-2 { grid-template-columns: 1fr; } }

    /* Updated Results Section Styles */
    .rmc-results {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    /* Main Payment Display */
    .rmc-main-payment {
      background: #e5e7eb;
      padding: 1.5rem;
      border-radius: 12px;
      text-align: left;
    }
    
    .rmc-main-payment .rmc-total {
      font-size: 2rem;
      font-weight: 800;
      color: var(--deep);
      margin: 0;
    }
    
    .rmc-main-payment .rmc-sub {
      color: #64748b;
      margin-top: 0.5rem;
      font-size: 0.95rem;
    }

    /* Monthly Payment Breakdown */
    .rmc-monthly-breakdown {
      background: white;
      border-radius: 12px;
      overflow: hidden;
    }

    .rmc-breakdown-header {
      background: #374151;
      color: white;
      padding: 1rem 1.25rem;
      font-weight: 600;
      font-size: 1.1rem;
      margin: 0;
    }

    .rmc-breakdown-list {
      padding: 0;
      margin: 0;
      list-style: none;
    }

    .rmc-breakdown-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.75rem 1.25rem;
      border-bottom: 1px solid #f1f5f9;
      font-size: 0.95rem;
    }

    .rmc-breakdown-item:last-child {
      border-bottom: none;
    }

    .rmc-breakdown-item .label {
      color: #64748b;
    }

    .rmc-breakdown-item .value {
      font-weight: 600;
      color: var(--deep);
    }

    /* Loan Breakdown Chart Section */
    .rmc-loan-breakdown {
      background: white;
      border-radius: 12px;
      overflow: hidden;
    }

    .rmc-loan-breakdown-header {
      background: #374151;
      color: white;
      padding: 1rem 1.25rem;
      font-weight: 600;
      font-size: 1.1rem;
      margin: 0;
    }

    .rmc-chart-content {
      padding: 1.25rem;
    }

    .rmc-break-inner {
      display: flex;
      gap: 1.5rem;
      align-items: flex-start;
    }

    @media (max-width: 720px) {
      .rmc-break-inner { flex-direction: column; align-items: center; }
    }

    .rmc-chartWrap {
      width: 180px;
      height: 180px;
      flex-shrink: 0;
    }

    .rmc-legend {
      flex: 1;
      font-size: 0.95rem;
    }

    .rmc-legend-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem 0;
      border-bottom: 1px solid #f1f5f9;
    }

    .rmc-legend-item:last-child {
      border-bottom: none;
    }

    .rmc-legend-item .label {
      color: #64748b;
    }

    .rmc-legend-item .value {
      font-weight: 600;
      color: var(--deep);
    }

    /* Button Styling */
    .rmc-actions {
      display: flex;
      justify-content: center;
    }

    .rmc-btn {
      background: #ff7350;
      color: white;
      border: none;
      padding: 0.75rem 1.5rem;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 600;
      font-size: 0.95rem;
      transition: background-color 0.2s;
    }

    .rmc-btn:hover {
      background: #e85a32;
    }

    /* Hidden sections */
    .rmc-compact { display: none; }
    .rmc-breakdown { display: none; }

    /* Amortization table styles remain the same */
    .rmc-amort { margin-top: 0.75rem; }
    .rmc-tableWrap { overflow: auto; max-height: 420px; border-radius: 12px; border: 1px solid #eef2f7; background: #fff; }
    .rmc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 760px; }
    .rmc-thead th { position: sticky; top: 0; background: #fbfdff; padding: 0.65rem 0.9rem; text-align: left; border-bottom: 1px solid #eef2f7; }
    .rmc-table td { padding: 0.55rem 0.9rem; border-bottom: 1px solid #f1f5f9; }
    .rmc-right { text-align: right; }
    .rmc-table tbody tr:nth-child(even) { background: #fbfdff; }
    .hidden { display: none; }

    @media (max-width: 420px) {
      .rmc-input { padding: 0.5rem; font-size: 0.95rem; }
      .rmc-currency { padding: 0.35rem 0.5rem; font-size: 0.95rem; }
      .rmc-chartWrap { width: 140px; height: 140px; }
      .rmc-main-payment .rmc-total { font-size: 1.75rem; }
    }