 /* modern styles - starting from main-wrapper */
    .main-wrapper {
      max-width: 1800px;
      margin: 0 auto;
      padding: 2rem 1rem;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: #f8fafc;
    }

    /* mortgage header with fresh gradient */
    .mortgage-header {
      background: linear-gradient(135deg, #0b2c5f 0%, #1e4b8a 40%, #2a6eb0 100%);
      color: #fff;
      padding: 2rem;
      border-radius: 24px 24px 0 0;
      border-bottom: 4px solid rgba(255,255,255,0.15);
    }

    .mortgage-header h3 {
      font-weight: 600;
      letter-spacing: -0.01em;
    }

    .mortgage-header i {
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }

    .opacity-80 {
      opacity: 0.9;
    }

    /* tool card */
    .tool-card {
      border: none;
      border-radius: 28px;
      background: #ffffff;
      box-shadow: 0 20px 35px -10px rgba(0,30,60,0.15);
      overflow: hidden;
      transition: all 0.25s ease;
    }

    .tool-card:hover {
      box-shadow: 0 25px 40px -12px rgba(0,50,100,0.25);
    }

    .calc-note {
      font-size: 0.9rem;
      color: #334155;
      background: #f1f5f9;
      padding: 0.75rem 1rem;
      border-radius: 14px;
      border-left: 4px solid #2563eb;
    }

    /* result card */
    .result-card {
      border-radius: 20px;
      border: 1px solid rgba(100, 116, 139, 0.2);
      padding: 1.5rem 1.8rem;
      background: #f9fafc;
      box-shadow: inset 0 1px 4px rgba(255,255,255,0.8), 0 6px 10px -6px rgba(0,0,0,0.1);
    }

    .result-main {
      font-size: 2.2rem;
      font-weight: 700;
      color: #0b2c5f;
      line-height: 1.2;
      letter-spacing: -0.02em;
    }

    .mini-label {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: #4b5563;
      font-weight: 600;
    }

    .split-box {
      border-radius: 16px;
      background: #ffffff;
      border: 1px dashed #94a3b8;
      padding: 1.1rem 1.2rem;
      font-size: 0.9rem;
      box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    }

    /* input group modern */
    .input-group-text {
      background: #f1f4f9;
      border: 1px solid #d1d9e6;
      color: #1e293b;
      font-weight: 500;
      padding: 0.5rem 1rem;
    }

    .form-control {
      border: 1px solid #d1d9e6;
      border-radius: 0.5rem;
      padding: 0.5rem 1rem;
      font-size: 1rem;
      transition: all 0.15s;
      background: white;
    }

    .form-control:focus {
      border-color: #2563eb;
      box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
      outline: none;
    }

    .btn-primary {
      background: linear-gradient(145deg, #1d4ed8, #2563eb);
      border: none;
      border-radius: 60px;
      padding: 0.9rem 1.5rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      box-shadow: 0 10px 18px -8px #1e3a8a;
      transition: all 0.2s;
    }

    .btn-primary:hover {
      background: linear-gradient(145deg, #1e3a8a, #1d4ed8);
      transform: translateY(-2px);
      box-shadow: 0 20px 25px -8px #0f2b5e;
    }

    /* ===== ad sidebars (modern & sticky) ===== */
    .ad-sidebar {
      position: sticky;
      top: 100px;
      height: fit-content;
      max-height: 700px;
      min-width: 180px;        /* slightly wider for ad iframe 160px + padding */
      width: 180px;
      background: transparent;
      border-radius: 28px;
      border: 1px solid rgba(0, 0, 0, 0.08);
      box-shadow: 0 20px 30px -12px rgba(0,40,80,0.15);
      overflow: hidden;
      transition: all 0.3s ease;
      display: flex;
      flex-direction: column;
      backdrop-filter: blur(2px);
      background: rgba(255,255,255,0.9);
    }

    .ad-sidebar:hover {
      transform: translateY(-4px);
      box-shadow: 0 30px 40px -16px rgba(0,60,120,0.25);
    }

    .ad-label {
      background: linear-gradient(145deg, #0f2b5e, #1f4a9e);
      color: #fff;
      text-align: center;
      padding: 0.6rem 0.3rem;
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .ad-content {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem 0.5rem;
      background: #fafcff;
      min-height: 320px;        /* enough for 300px ad */
    }

    /* ad iframe injected style (to make sure it fits) */
    .ad-content iframe {
      max-width: 100%;
      border-radius: 16px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    /* mobile & tablet responsive: hide sidebars under xxl */
    @media (max-width: 1399.98px) {
      .ad-sidebar {
        display: none !important;
      }
      .main-content {
        width: 100%;
      }
    }

    /* extra large fine tuning */
    @media (min-width: 1400px) and (max-width: 1700px) {
      .ad-sidebar {
        min-width: 160px;
        width: 160px;
      }
    }

    /* small screen spacing */
    @media (max-width: 768px) {
      .main-wrapper {
        padding: 1rem 0.5rem;
      }
      .mortgage-header {
        padding: 1.5rem;
      }
      .result-main {
        font-size: 1.8rem;
      }
      .btn-primary {
        padding: 0.75rem;
      }
    }

    /* card body touches */
    .card-body {
      background: white;
    }

    /* placeholder fallback (in case ad doesn't load) */
    .ad-content:empty::before {
      content: "ad space";
      display: block;
      text-align: center;
      color: #64748b;
      font-size: 0.8rem;
      padding: 2rem 0;
    }

    /* fine tune split box */
    .split-box .fw-semibold {
      color: #0b2c5f;
      font-size: 1.1rem;
    }

    /* small text */
    .text-muted.small {
      color: #546a7a !important;
    }

    /* modern mortgage header icon animation */
    .fa-house-chimney-dollar {
      animation: soft-pulse 2s infinite;
    }
    @keyframes soft-pulse {
      0% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.9; transform: scale(1.02); }
      100% { opacity: 1; transform: scale(1); }
    }

    /* info circle */
    .bi-info-circle {
      opacity: 0.8;
    }