
/* =====================================================
   REAL ESTATE CLOSING COSTS ESTIMATOR
   USFinanceCalculators.com
   ===================================================== */
:root {
  --cc-navy:    #002868;
  --cc-dark:    #1D1D1F;
  --cc-gray:    #5F6368;
  --cc-border:  #E0E4E8;
  --cc-bg:      #F7F9FC;
  --cc-white:   #FFFFFF;
  --cc-red:     #BF0A30;
  --cc-green:   #00875A;
  --cc-amber:   #B45309;
  --cc-blue:    #0284C7;
  --cc-purple:  #7C3AED;
  --cc-teal:    #0891B2;
  --cc-buyer:   #0284C7;
  --cc-seller:  #00875A;
  --cc-both:    #7C3AED;
}

#ccWrapper {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 1200px; margin: 0 auto 80px;
  color: var(--cc-dark); -webkit-font-smoothing: antialiased;
}

/* ---- HEADER ---- */
.cc-header {
  background: linear-gradient(135deg, #001840 0%, #002868 50%, #00305a 100%);
  border-radius: 18px; padding: 48px 32px 36px;
  text-align: center; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.cc-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 15% 50%, rgba(2,132,199,0.14) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 50%, rgba(0,135,90,0.1) 0%, transparent 55%);
  pointer-events: none;
}
.cc-header::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px; pointer-events: none;
}
.cc-header-icon { font-size: 2.6rem; display: block; margin-bottom: 12px; position: relative; z-index: 1; }
.cc-title {
  font-family: 'Montserrat','Inter',sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900;
  color: #fff; margin: 0 0 12px; line-height: 1.2;
  position: relative; z-index: 1; letter-spacing: -0.5px;
}
.cc-subtitle {
  font-size: 1rem; color: rgba(255,255,255,0.8);
  max-width: 820px; margin: 0 auto 22px; line-height: 1.65; position: relative; z-index: 1;
}
.cc-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; position: relative; z-index: 1; }
.cc-badge {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.88); font-size: 0.75rem; font-weight: 600;
  padding: 6px 14px; border-radius: 20px; letter-spacing: 0.02em;
}
.cc-badge.hi { background:rgba(0,135,90,.25); border-color:rgba(0,135,90,.4); color:#6ee7b7; }

/* ---- ROLE TABS ---- */
.cc-role-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.cc-role-tab {
  flex: 1; padding: 16px 12px; border: 2px solid var(--cc-border);
  border-radius: 12px; background: var(--cc-white); cursor: pointer;
  text-align: center; transition: all 0.2s; font-family: 'Montserrat','Inter',sans-serif;
  font-weight: 700; font-size: 0.9rem; color: var(--cc-gray);
}
.cc-role-tab.active-buyer { border-color: var(--cc-buyer); background: #EFF8FF; color: var(--cc-buyer); box-shadow: 0 4px 12px rgba(2,132,199,0.15); }
.cc-role-tab.active-seller { border-color: var(--cc-seller); background: #F0FBF6; color: var(--cc-seller); box-shadow: 0 4px 12px rgba(0,135,90,0.15); }
.cc-role-tab.active-both { border-color: var(--cc-both); background: #F5F3FF; color: var(--cc-both); box-shadow: 0 4px 12px rgba(124,58,237,0.15); }
.cc-role-tab:hover:not(.active-buyer):not(.active-seller):not(.active-both) { border-color: var(--cc-navy); color: var(--cc-navy); background: #EEF2FF; }

/* ---- MAIN GRID ---- */
.cc-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.cc-input-panel { background: var(--cc-white); border: 1px solid var(--cc-border); border-radius: 16px; padding: 26px; box-shadow: 0 4px 20px rgba(0,40,104,.06); }
.cc-results-panel { background: var(--cc-bg); border: 1px solid var(--cc-border); border-radius: 16px; padding: 26px; min-height: 400px; box-shadow: 0 4px 20px rgba(0,40,104,.06); }

/* ---- SECTION LABEL ---- */
.cc-sec {
  font-family: 'Montserrat','Inter',sans-serif; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--cc-navy);
  margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--cc-border);
  display: flex; align-items: center; gap: 7px;
}
.cc-gap { margin-top: 24px; }

/* ---- LOAN TYPE TOGGLES ---- */
.cc-loan-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.cc-loan-btn {
  padding: 10px 8px; border: 1.5px solid var(--cc-border); border-radius: 8px;
  background: var(--cc-white); cursor: pointer; text-align: center; transition: all 0.18s;
  font-size: 0.8rem; font-weight: 700; color: var(--cc-gray); font-family: 'Montserrat', sans-serif;
}
.cc-loan-btn.active { border-color: var(--cc-navy); background: var(--cc-navy); color: #fff; box-shadow: 0 2px 8px rgba(0,40,104,0.2); }
.cc-loan-btn:hover:not(.active) { border-color: var(--cc-navy); color: var(--cc-navy); }

/* ---- FORM ---- */
/* =========================================================
   STRICT 50/50 INPUT GRID
   ========================================================= */

/* Force 2-column grids to be exactly equal */
.cc-r2 { 
  display: grid !important; 
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
  gap: 16px; 
  width: 100%;
}

/* Container for the label and input */
.cc-f { 
  display: flex !important; 
  flex-direction: column !important; 
  margin-bottom: 12px; 
  width: 100% !important;
  height: 100%; 
}

/* Force the label to push the input box to the absolute bottom */
.cc-f label { 
  display: flex; 
  flex-direction: column; 
  justify-content: flex-end; 
  flex-grow: 1; 
  font-size: 0.75rem; 
  font-weight: 600; 
  color: var(--navy, #002868); 
  margin-bottom: 6px; 
}

/* Ensure the input wrapper stretches perfectly to fill the 50% column */
.cc-iw, .cc-sel { 
  display: flex; 
  align-items: center; 
  width: 100% !important; 
  box-sizing: border-box !important;
}

/* Mobile Stacking */
@media (max-width: 768px) {
  .cc-r2 { grid-template-columns: 1fr !important; gap: 0px !important; }
}
.cc-field { margin-bottom: 16px; }
.cc-field label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--cc-dark); margin-bottom: 6px; }
.cc-field label span { font-weight: 500; color: var(--cc-gray); font-size: 0.7rem; }
.cc-iw { display: flex; align-items: center; border: 1.5px solid var(--cc-border); border-radius: 8px; overflow: hidden; background: var(--cc-white); transition: border-color 0.2s; }
.cc-iw:focus-within { border-color: var(--cc-navy); box-shadow: 0 0 0 3px rgba(0,40,104,0.08); }
.cc-pre, .cc-suf { background: var(--cc-bg); color: var(--cc-gray); font-size: 0.85rem; font-weight: 700; padding: 0 12px; height: 44px; display: flex; align-items: center; flex-shrink: 0; }
.cc-pre { border-right: 1.5px solid var(--cc-border); }
.cc-suf { border-left: 1.5px solid var(--cc-border); }
.cc-iw input { flex: 1; height: 44px; border: none; outline: none; background: transparent; font-size: 0.95rem; font-weight:600; color: var(--cc-dark); padding: 0 12px; min-width: 0; font-family:'Inter', sans-serif;}
.cc-sel { width: 100%; height: 44px; border: 1.5px solid var(--cc-border); border-radius: 8px; background: var(--cc-white); font-size: 0.9rem; font-weight:600; color: var(--cc-dark); padding: 0 12px; outline: none; cursor: pointer; transition: border-color 0.2s; font-family:'Inter', sans-serif;}
.cc-sel:focus { border-color: var(--cc-navy); box-shadow: 0 0 0 3px rgba(0,40,104,0.08); }

/* ---- OPTIONAL SECTION ---- */
.cc-optional-toggle { font-size: 0.8rem; color: var(--cc-navy); cursor: pointer; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 5px; font-family: 'Montserrat', sans-serif;}
.cc-optional-toggle::before { content: '▸'; transition: transform 0.2s; font-size:1.2rem; }
.cc-optional-toggle.open::before { transform: rotate(90deg); }
.cc-optional-body { display: none; }
.cc-optional-body.show { display: block; }

/* ---- BUTTONS ---- */
.cc-calc-btn { width: 100%; padding: 16px; background: var(--cc-navy); color: #fff; font-family: 'Montserrat','Inter',sans-serif; font-size: 1rem; font-weight: 800; border: none; border-radius: 10px; cursor: pointer; letter-spacing: 0.03em; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.cc-calc-btn:hover { background: #001a4d; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,40,104,0.3); }
.cc-err { background: #FFF5F7; border: 1.5px solid var(--cc-red); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 0.85rem; font-weight:600; color: var(--cc-red); display: none; gap: 8px; align-items: center; }
.cc-err.show { display: flex; }

/* ---- ACTION BUTTON ROW (Bottom of Results) ---- */
.btn-row { display:flex; flex-wrap:wrap; gap:12px; margin-top:32px; padding-top:24px; border-top:1px solid var(--cc-border);}
.action-btn { flex:1; padding:14px; border-radius:8px; font-family:'Montserrat',sans-serif; font-size:0.85rem; font-weight:700; cursor:pointer; display:flex; justify-content:center; align-items:center; gap:8px; transition:all .2s; border:2px solid; white-space:nowrap; }
.btn-pdf { background:var(--cc-navy); border-color:var(--cc-navy); color:#fff; }
.btn-pdf:hover { background:var(--cc-dark); border-color:var(--cc-dark); transform:translateY(-1px); box-shadow: 0 4px 12px rgba(0,40,104,0.2); }
.btn-wa { background:#25D366; border-color:#25D366; color:#fff; }
.btn-wa:hover { background:#128C7E; border-color:#128C7E; transform:translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.2); }
.btn-clear { background:#fff; border-color:var(--cc-red); color:var(--cc-red); }
.btn-clear:hover { background:#FFF5F7; }

/* ---- EMPTY STATE ---- */
.cc-empty { text-align: center; padding: 64px 20px; color: var(--cc-gray); }
.cc-empty-icon { font-size: 4rem; display: block; margin-bottom: 16px; opacity: 0.3; }
.cc-empty p { font-size: 1rem; line-height: 1.65; max-width: 400px; margin: 0 auto;}

/* ---- RESULTS ---- */
.cc-results { display: none; }
.cc-results.show { display: block; }

/* ---- RESULT TABS ---- */
.cc-res-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.cc-res-tab { flex: 1; padding: 12px 8px; border: 1.5px solid var(--cc-border); border-radius: 9px; background: var(--cc-white); cursor: pointer; text-align: center; font-size: 0.85rem; font-family:'Montserrat',sans-serif; font-weight: 700; color: var(--cc-gray); transition: all 0.18s; }
.cc-res-tab.active-b { border-color: var(--cc-buyer); background: #EFF8FF; color: var(--cc-buyer); }
.cc-res-tab.active-s { border-color: var(--cc-seller); background: #F0FBF6; color: var(--cc-seller); }

/* ---- RESULT HERO ---- */
.cc-res-hero {
  border-radius: 16px; padding: 24px;
  text-align: center; margin-bottom: 24px; position: relative; overflow: hidden;
}
.cc-res-hero.buyer-hero { background: linear-gradient(135deg, #003d7a 0%, #0284C7 100%); box-shadow: 0 8px 24px rgba(2,132,199,0.25); }
.cc-res-hero.seller-hero { background: linear-gradient(135deg, #00533a 0%, #00875A 100%); box-shadow: 0 8px 24px rgba(0,135,90,0.25); }
.cc-res-hero::after { content:''; position:absolute; inset:0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 36px 36px; pointer-events: none; }
.cc-res-hero-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 5px; position: relative; z-index: 1; }
.cc-res-hero-amount { font-family: 'Montserrat','Inter',sans-serif; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; color: #fff; margin-bottom: 4px; position: relative; z-index: 1; letter-spacing: -1px; }
.cc-res-hero-sub { font-size: 0.9rem; font-weight:500; color: rgba(255,255,255,0.9); position: relative; z-index: 1; margin-bottom: 16px;}
.cc-res-hero-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.cc-res-hero-pill { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 6px 14px; border-radius: 20px; }

/* ---- STATS GRID ---- */
.cc-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.cc-stat { background: var(--cc-white); border: 1px solid var(--cc-border); border-radius: 12px; padding: 16px; text-align: center; }
.cc-stat.blue { border-left: 4px solid var(--cc-blue); }
.cc-stat.green { border-left: 4px solid var(--cc-green); }
.cc-stat.amber { border-left: 4px solid var(--cc-amber); }
.cc-stat.red { border-left: 4px solid var(--cc-red); }
.cc-stat-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cc-gray); margin-bottom: 6px; }
.cc-stat-value { font-family: 'Montserrat','Inter',sans-serif; font-size: 1.2rem; font-weight: 800; color: var(--cc-dark); }

/* ---- CHART WRAPPER ---- */
.cc-chart-wrap { background: var(--cc-white); border: 1px solid var(--cc-border); border-radius: 16px; padding: 20px; margin-bottom: 24px; height: 300px; display: flex; align-items: center; justify-content: center;}

/* ---- FEE TABLE ---- */
.cc-fee-table-wrap { background: var(--cc-white); border: 1px solid var(--cc-border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.cc-fee-table-head { padding: 12px 16px; font-family: 'Montserrat','Inter',sans-serif; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--cc-border); display: flex; align-items: center; gap: 8px; }
.cc-fee-table-head.buyer-head { background: #EFF8FF; color: var(--cc-buyer); }
.cc-fee-table-head.seller-head { background: #F0FBF6; color: var(--cc-seller); }
.cc-fee-row { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--cc-border); font-size: 0.85rem; gap: 10px; }
.cc-fee-row:last-child { border-bottom: none; }
.cc-fee-row:nth-child(odd) { background: var(--cc-bg); }
.cc-fee-row:nth-child(even) { background: var(--cc-white); }
.cc-fee-name { flex: 1; color: var(--cc-dark); font-weight: 600; }
.cc-fee-tag { font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.5px;}
.cc-fee-tag.neg { background: #DCFCE7; color: #166534; }
.cc-fee-tag.fixed { background: #FEF3C7; color: #92400E; }
.cc-fee-tag.opt { background: #EDE9FE; color: #5B21B6; }
.cc-fee-amount { font-family: 'Montserrat','Inter',sans-serif; font-weight: 800; color: var(--cc-dark); font-size: 0.95rem; min-width: 90px; text-align: right; }
.cc-fee-total-row { display: flex; align-items: center; padding: 14px 16px; font-size: 0.9rem; font-weight: 800; border-top: 2px solid var(--cc-border); background: #f8fafc;}
.cc-fee-total-row .cc-fee-name { font-family: 'Montserrat','Inter',sans-serif; text-transform: uppercase;}
.cc-fee-total-row .cc-fee-amount { font-size: 1.15rem; color: var(--cc-navy);}

/* ---- SAVINGS TIP ---- */
.cc-savings-tip { background: #F0FBF6; border: 1px solid rgba(0,135,90,0.25); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; font-size: 0.85rem; line-height: 1.6; color: var(--cc-dark); }
.cc-savings-tip strong { color: var(--cc-seller); }
.cc-savings-tip-title { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cc-green); margin-bottom: 8px; font-family: 'Montserrat', sans-serif;}

/* ---- SIDE-BY-SIDE PANEL ---- */
.cc-sbs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.cc-sbs-card { background: var(--cc-white); border: 1px solid var(--cc-border); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.03);}
.cc-sbs-head { padding: 14px 20px; font-family: 'Montserrat','Inter',sans-serif; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.cc-sbs-head.b { background: #EFF8FF; color: var(--cc-buyer); border-bottom: 2px solid rgba(2,132,199,0.15); }
.cc-sbs-head.s { background: #F0FBF6; color: var(--cc-seller); border-bottom: 2px solid rgba(0,135,90,0.15); }
.cc-sbs-body { padding: 16px 20px; }
.cc-sbs-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--cc-border); font-size: 0.85rem; }
.cc-sbs-row:last-child { border-bottom: none; }
.cc-sbs-row-key { color: var(--cc-gray); font-weight: 500;}
.cc-sbs-row-val { font-weight: 800; color: var(--cc-dark); font-family: 'Montserrat', sans-serif;}

/* ---- NEGOTIABLE SAVINGS ---- */
.cc-neg-panel { background: #FFFBEB; border: 1px solid rgba(180,83,9,0.25); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; }
.cc-neg-title { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cc-amber); margin-bottom: 12px; font-family:'Montserrat', sans-serif;}
.cc-neg-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; padding: 6px 0; border-bottom: 1px solid rgba(180,83,9,0.1); font-weight:500;}
.cc-neg-row:last-child { border-bottom: none; }
.cc-neg-key { color: var(--cc-dark); }
.cc-neg-val { font-weight: 800; color: var(--cc-amber); font-family:'Montserrat',sans-serif;}
.cc-neg-total { display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; font-weight: 800; padding-top: 12px; margin-top: 8px; border-top: 2px solid rgba(180,83,9,0.25); color: var(--cc-amber); font-family:'Montserrat',sans-serif;}

/* ---- LEGEND ---- */
.cc-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; font-size: 0.75rem; color: var(--cc-gray); align-items: center; font-weight: 500;}
.cc-legend-item { display: flex; align-items: center; gap: 6px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) { 
  .cc-grid { grid-template-columns: 1fr; } 
  .cc-header { padding: 40px 20px 30px; }
}
@media (max-width: 768px) {
  .cc-r2 { grid-template-columns: 1fr; }
  .cc-input-panel, .cc-results-panel { padding: 20px 16px; }
  .cc-stats { grid-template-columns: 1fr 1fr; }
  .cc-sbs { grid-template-columns: 1fr; }
  .cc-role-tabs { flex-direction: column; }
  .btn-row { flex-direction: column; }
  .action-btn { width: 100%; }
}
@media (max-width: 480px) {
  .cc-stats { grid-template-columns: 1fr; }
  .cc-res-hero-amount { font-size: 2rem; }
}


  /* ══════════════════════════════════════════════════════
     SECTION: Legal Disclaimer + Editorial Transparency
     ══════════════════════════════════════════════════════ */

  .ldet-section {
    max-width: 860px;
    margin: 0 auto 64px;
    padding: 0 24px;
    font-family: 'Inter', sans-serif;
  }

  /* ── Section label + heading ──────────────────────────── */
  .ldet-section .edu-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--red, #BF0A30);
    text-transform: uppercase;
    margin-bottom: 10px;
  }

  .ldet-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border, #E0E4E8);
  }

  .ldet-section .ldet-intro {
    font-size: 14.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 72ch;
  }

  /* ── Two-column grid ──────────────────────────────────── */
  .ldet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  @media (max-width: 680px) {
    .ldet-grid { grid-template-columns: 1fr; }
  }

  /* ── Panel base ───────────────────────────────────────── */
  .ldet-panel {
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 12px;
    overflow: hidden;
  }

  .ldet-panel-header {
    padding: 14px 18px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border, #E0E4E8);
  }

  .ldet-panel-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
  }

  .ldet-panel-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
  }

  .ldet-panel-subtitle {
    font-size: 11px;
    color: var(--gray-text, #5F6368);
    margin-top: 2px;
  }

  .ldet-panel-body {
    padding: 16px 18px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--gray-text, #5F6368);
  }

  .ldet-panel-body strong {
    color: var(--charcoal, #1D1D1F);
    font-weight: 600;
  }

  .ldet-panel-body ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .ldet-panel-body ul li {
    position: relative;
    padding-left: 16px;
    font-size: 13px;
    line-height: 1.65;
  }

  .ldet-panel-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--navy, #002868);
  }

  /* ── Full-width disclaimer box ────────────────────────── */
  .ldet-disclaimer-box {
    background: var(--navy, #002868);
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 24px;
    color: rgba(255,255,255,0.9);
    font-size: 13.5px;
    line-height: 1.85;
  }

  .ldet-disclaimer-box .ldet-dis-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .ldet-disclaimer-box strong {
    color: #fff;
    font-weight: 600;
  }

  .ldet-disclaimer-box a {
    color: #7dd3fc;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
  }

  .ldet-disclaimer-box a:hover {
    color: #fff;
  }

  /* ── Authority links grid ─────────────────────────────── */
  .ldet-auth-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--charcoal, #1D1D1F);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .ldet-auth-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #E0E4E8);
  }

  .ldet-auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 10px;
    margin-bottom: 28px;
  }

  .ldet-auth-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.18s;
    color: inherit;
  }

  .ldet-auth-link:hover {
    border-color: var(--navy, #002868);
    box-shadow: 0 2px 12px rgba(0,40,104,0.09);
    transform: translateY(-1px);
  }

  .ldet-auth-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
  }

  .ldet-auth-right {}

  .ldet-auth-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.25;
  }

  .ldet-auth-url {
    font-size: 10.5px;
    color: var(--navy, #002868);
    margin-top: 2px;
    font-weight: 500;
  }

  .ldet-auth-desc {
    font-size: 11px;
    color: var(--gray-text, #5F6368);
    margin-top: 4px;
    line-height: 1.45;
  }

  .ldet-gov-chip {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 4px;
    text-transform: uppercase;
  }

  /* ── Editorial transparency table ────────────────────── */
  .ldet-transparency-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 24px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--border, #E0E4E8);
  }

  .ldet-transparency-table thead tr {
    background: var(--navy, #002868);
  }

  .ldet-transparency-table thead th {
    padding: 11px 16px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.4px;
    white-space: nowrap;
  }

  .ldet-transparency-table tbody tr {
    border-bottom: 1px solid var(--border, #E0E4E8);
    transition: background 0.15s;
  }

  .ldet-transparency-table tbody tr:last-child {
    border-bottom: none;
  }

  .ldet-transparency-table tbody tr:hover {
    background: var(--bg-light, #F7F9FC);
  }

  .ldet-transparency-table tbody tr:nth-child(even) {
    background: var(--bg-light, #F7F9FC);
  }

  .ldet-transparency-table tbody tr:nth-child(even):hover {
    background: #eef1f6;
  }

  .ldet-transparency-table td {
    padding: 10px 16px;
    color: var(--gray-text, #5F6368);
    line-height: 1.55;
    vertical-align: top;
  }

  .ldet-transparency-table td:first-child {
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
    white-space: nowrap;
  }

  .ldet-transparency-table td a {
    color: var(--navy, #002868);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: 12px;
  }

  .ldet-transparency-table td a:hover { color: var(--red, #BF0A30); }

  .ldet-source-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: 4px;
  }

  .chip-gov     { background: #dcfce7; color: #15803d; }
  .chip-state   { background: #dbeafe; color: #1d4ed8; }
  .chip-market  { background: #fef9c3; color: #854d0e; }
  .chip-internal{ background: #f3e8ff; color: #7e22ce; }

  /* ── Bottom legal footer strip ────────────────────────── */
  .ldet-footer-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-light, #F7F9FC);
    border: 1px solid var(--border, #E0E4E8);
    border-radius: 10px;
    flex-wrap: wrap;
  }

  .ldet-footer-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 260px;
  }

  .ldet-footer-left-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .ldet-footer-left p {
    font-size: 12.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.65;
    margin: 0;
  }

  .ldet-footer-left p strong {
    color: var(--charcoal, #1D1D1F);
  }

  .ldet-footer-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
  }

  .ldet-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--navy, #002868);
    text-decoration: none;
  }

  .ldet-footer-link:hover { color: var(--red, #BF0A30); }

  .ldet-version-badge {
    display: inline-block;
    background: var(--border, #E0E4E8);
    color: var(--gray-text, #5F6368);
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-left: 6px;
  }
  
  /* ── Section wrapper ─────────────────────────────────────── */
  .rc-section {
    margin: 0 0 48px;
  }

  .rc-section > h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin-bottom: 8px;
  }

  .rc-section > p {
    font-size: 14.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.75;
    margin-bottom: 28px;
  }

  /* ── Category tabs ───────────────────────────────────────── */
  .rc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
  }

  .rc-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 7px;
    background: var(--white, #fff);
    color: var(--gray-text, #5F6368);
    cursor: pointer;
    transition: all 0.18s;
  }

  .rc-tab:hover {
    border-color: var(--navy, #002868);
    color: var(--navy, #002868);
  }

  .rc-tab.active {
    background: var(--navy, #002868);
    border-color: var(--navy, #002868);
    color: #fff;
  }

  /* ── Card grid ───────────────────────────────────────────── */
  .rc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 12px;
  }

  /* ── Individual card ─────────────────────────────────────── */
  .rc-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 18px;
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    position: relative;
    overflow: hidden;
  }

  .rc-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--navy, #002868);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
  }

  .rc-card:hover {
    border-color: var(--navy, #002868);
    box-shadow: 0 4px 18px rgba(0,40,104,0.10);
    transform: translateY(-2px);
  }

  .rc-card:hover::before {
    transform: scaleX(1);
  }

  .rc-card[data-hidden="true"] { display: none; }

  /* ── Card "Directly related" highlight ───────────────────── */
  .rc-card.rc-featured {
    border-color: var(--navy, #002868);
    background: #f6f8ff;
  }

  .rc-card.rc-featured::before {
    transform: scaleX(1);
    background: var(--red, #BF0A30);
  }

  /* ── Card top row ────────────────────────────────────────── */
  .rc-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }

  .rc-card-emoji {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .rc-card-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .rc-badge {
    font-family: 'Montserrat', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
  }

  .rc-badge-cat {
    background: var(--bg-light, #F7F9FC);
    color: var(--gray-text, #5F6368);
    border: 1px solid var(--border, #E0E4E8);
  }

  .rc-badge-hot {
    background: #fff0f0;
    color: var(--red, #BF0A30);
    border: 1px solid #f5c0c0;
  }

  .rc-badge-key {
    background: #e8f4e8;
    color: #2d7a2d;
    border: 1px solid #b6d9b6;
  }

  /* ── Card name ───────────────────────────────────────────── */
  .rc-card-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.3;
    margin-top: 2px;
  }

  /* ── Card description ────────────────────────────────────── */
  .rc-card-desc {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--gray-text, #5F6368);
    flex: 1;
  }

  /* ── Card CTA row ────────────────────────────────────────── */
  .rc-card-cta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--navy, #002868);
    margin-top: 4px;
  }

  .rc-card:hover .rc-card-cta {
    color: var(--red, #BF0A30);
  }

  .rc-card-arrow {
    transition: transform 0.18s;
  }

  .rc-card:hover .rc-card-arrow {
    transform: translateX(3px);
  }

  /* ── "Directly related" label row ────────────────────────── */
  .rc-group-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--gray-text, #5F6368);
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .rc-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #E0E4E8);
  }

  .rc-group-label[data-hidden="true"] { display: none; }

  /* ── Bottom "view all" bar ───────────────────────────────── */
  .rc-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
    padding: 14px 20px;
    background: var(--bg-light, #F7F9FC);
    border: 1px solid var(--border, #E0E4E8);
    border-radius: 10px;
    flex-wrap: wrap;
  }

  .rc-footer-bar p {
    font-size: 13.5px;
    color: var(--gray-text, #5F6368);
    margin: 0;
    line-height: 1.5;
  }

  .rc-footer-bar a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--navy, #002868);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    border-radius: 7px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s;
  }

  .rc-footer-bar a:hover {
    background: var(--red, #BF0A30);
  }

  /* ── Responsive ──────────────────────────────────────────── */
  @media (max-width: 640px) {
    .rc-grid { grid-template-columns: 1fr; }
    .rc-footer-bar { flex-direction: column; align-items: flex-start; }
  }
   /* ── FAQ Section Wrapper ─────────────────────────────────── */
  .ccfaq-section {
    max-width: 860px;
    margin: 64px auto;
    padding: 0 24px 80px;
    font-family: 'Inter', sans-serif;
  }

  /* ── Header ──────────────────────────────────────────────── */
  .ccfaq-header {
    margin-bottom: 32px;
  }

  .ccfaq-header .edu-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--red, #BF0A30);
    text-transform: uppercase;
    margin-bottom: 10px;
  }

  .ccfaq-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.25;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border, #E0E4E8);
  }

  .ccfaq-header p {
    font-size: 15px;
    color: var(--gray-text, #5F6368);
    line-height: 1.8;
    margin: 0;
  }

  /* ── Category Filter Tabs ────────────────────────────────── */
  .ccfaq-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
  }

  .ccfaq-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 7px;
    background: var(--white, #fff);
    color: var(--gray-text, #5F6368);
    cursor: pointer;
    transition: all 0.18s;
  }

  .ccfaq-filter-btn:hover {
    border-color: var(--navy, #002868);
    color: var(--navy, #002868);
  }

  .ccfaq-filter-btn.active {
    background: var(--navy, #002868);
    border-color: var(--navy, #002868);
    color: var(--white, #fff);
  }

  .ccfaq-filter-btn .ccfaq-count {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 11px;
  }

  .ccfaq-filter-btn:not(.active) .ccfaq-count {
    background: var(--bg-light, #F7F9FC);
    color: var(--gray-text, #5F6368);
  }

  /* ── Group Labels ────────────────────────────────────────── */
  .ccfaq-group-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gray-text, #5F6368);
    padding: 18px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .ccfaq-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #E0E4E8);
  }

  /* ── FAQ List ────────────────────────────────────────────── */
  .ccfaq-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  /* ── FAQ Item ────────────────────────────────────────────── */
  .ccfaq-item {
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .ccfaq-item.open {
    border-color: var(--navy, #002868);
    box-shadow: 0 2px 14px rgba(0,40,104,0.09);
  }

  .ccfaq-item[data-hidden="true"] { display: none; }

  /* ── Question Button ─────────────────────────────────────── */
  .ccfaq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--white, #fff);
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 14px;
    transition: background 0.18s;
  }

  .ccfaq-q:hover { background: var(--bg-light, #F7F9FC); }

  .ccfaq-item.open .ccfaq-q { background: var(--navy, #002868); }

  .ccfaq-q-text {
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.4;
  }

  .ccfaq-item.open .ccfaq-q-text { color: var(--white, #fff); }

  .ccfaq-q-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .ccfaq-pill {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    background: var(--bg-light, #F7F9FC);
    color: var(--gray-text, #5F6368);
    border: 1px solid var(--border, #E0E4E8);
  }

  .ccfaq-item.open .ccfaq-pill {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.2);
  }

  .ccfaq-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-light, #F7F9FC);
    border: 1.5px solid var(--border, #E0E4E8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy, #002868);
    transition: transform 0.25s, background 0.2s;
    flex-shrink: 0;
  }

  .ccfaq-item.open .ccfaq-icon {
    transform: rotate(45deg);
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
    color: var(--white, #fff);
  }

  /* ── Answer Panel ────────────────────────────────────────── */
  .ccfaq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s ease, padding 0.2s;
    background: var(--bg-light, #F7F9FC);
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--gray-text, #5F6368);
    padding: 0 20px;
  }

  .ccfaq-item.open .ccfaq-a {
    max-height: 800px;
    padding: 18px 20px 22px;
    border-top: 1px solid var(--border, #E0E4E8);
  }

  .ccfaq-a strong { color: var(--charcoal, #1D1D1F); font-weight: 600; }

  .ccfaq-a a {
    color: var(--navy, #002868);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .ccfaq-a a:hover { color: var(--red, #BF0A30); }

  .ccfaq-a ul {
    padding: 10px 0 4px 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .ccfaq-a ul li {
    position: relative;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.65;
  }

  .ccfaq-a ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red, #BF0A30);
  }

  /* ── Mini comparison table inside answers ────────────────── */
  .ccfaq-a .mini-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 6px;
    font-size: 13px;
    border-radius: 8px;
    overflow: hidden;
  }

  .ccfaq-a .mini-table th {
    background: var(--navy, #002868);
    color: var(--white, #fff);
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 8px 12px;
    text-align: left;
  }

  .ccfaq-a .mini-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(224,228,232,0.6);
    color: var(--gray-text, #5F6368);
    background: #fff;
  }

  .ccfaq-a .mini-table tr:nth-child(even) td {
    background: #f9f9f8;
  }

  .ccfaq-a .mini-table tr:last-child td { border-bottom: none; }

  .ccfaq-a .mini-table .td-name {
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
    font-size: 12.5px;
  }

  /* ── Empty state ─────────────────────────────────────────── */
  .ccfaq-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-text, #5F6368);
    font-size: 14px;
    display: none;
  }

  .ccfaq-empty.visible { display: block; }

  /* ── Bottom stat bar ─────────────────────────────────────── */
  .ccfaq-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 36px;
    padding: 18px 24px;
    background: var(--bg-light, #F7F9FC);
    border: 1px solid var(--border, #E0E4E8);
    border-radius: 10px;
    flex-wrap: wrap;
  }

  .ccfaq-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--gray-text, #5F6368);
  }

  .ccfaq-stat-item strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--navy, #002868);
  }

  .ccfaq-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border, #E0E4E8);
  }

  /* ── Responsive ──────────────────────────────────────────── */
  @media (max-width: 640px) {
    .ccfaq-section { padding: 0 16px 64px; }
    .ccfaq-q { padding: 14px; }
    .ccfaq-pill { display: none; }
    .ccfaq-stat-divider { display: none; }
    .ccfaq-a .mini-table { font-size: 12px; }
    .ccfaq-a .mini-table th,
    .ccfaq-a .mini-table td { padding: 7px 9px; }
  }
  /* ═══════════════════════════════════════════════════
     SHARED UTILITIES
     ═══════════════════════════════════════════════════ */
  .cc-section {
    max-width: 860px;
    margin: 64px auto;
    padding: 0 24px;
    font-family: 'Inter', sans-serif;
  }

  .cc-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--red, #BF0A30);
    text-transform: uppercase;
    margin-bottom: 10px;
  }

  .cc-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.25;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border, #E0E4E8);
  }

  .cc-section-intro {
    font-size: 15px;
    color: var(--gray-text, #5F6368);
    line-height: 1.8;
    margin: 0 0 36px;
  }

  .cc-section-intro strong {
    color: var(--charcoal, #1D1D1F);
  }

  /* ─── Body Text ─────────────────────────────────── */
  .cc-body {
    font-size: 15px;
    color: var(--gray-text, #5F6368);
    line-height: 1.85;
  }

  .cc-body p { margin-bottom: 18px; }
  .cc-body p:last-child { margin-bottom: 0; }

  .cc-body h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin: 36px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .cc-body h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin: 24px 0 8px;
  }

  .cc-body strong { color: var(--charcoal, #1D1D1F); font-weight: 600; }

  .cc-body a {
    color: var(--navy, #002868);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(0,40,104,0.3);
  }

  .cc-body a:hover {
    color: var(--red, #BF0A30);
    text-decoration-color: var(--red, #BF0A30);
  }

  /* ─── Step Cards ─────────────────────────────────── */
  .cc-step-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 28px 0;
  }

  .cc-step-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0;
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white, #fff);
    transition: box-shadow 0.2s;
  }

  .cc-step-card:hover {
    box-shadow: 0 4px 20px rgba(0,40,104,0.09);
    border-color: var(--navy, #002868);
  }

  .cc-step-num {
    background: var(--navy, #002868);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--white, #fff);
    flex-shrink: 0;
  }

  .cc-step-content {
    padding: 16px 20px;
  }

  .cc-step-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin-bottom: 5px;
  }

  .cc-step-desc {
    font-size: 13.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.65;
  }

  .cc-step-desc strong { color: var(--charcoal, #1D1D1F); }

  /* ─── Input Fields Reference ─────────────────────── */
  .cc-input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px 0;
  }

  .cc-input-item {
    padding: 14px 16px;
    background: var(--bg-light, #F7F9FC);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 9px;
    transition: border-color 0.18s;
  }

  .cc-input-item:hover { border-color: var(--navy, #002868); }

  .cc-input-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--gray-text, #5F6368);
    margin-bottom: 4px;
  }

  .cc-input-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin-bottom: 4px;
  }

  .cc-input-desc {
    font-size: 12.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.55;
  }

  /* ─── Output Metric Cards ────────────────────────── */
  .cc-output-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
  }

  .cc-output-card {
    padding: 16px;
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 10px;
    background: var(--white, #fff);
    text-align: center;
  }

  .cc-output-card.highlight {
    border-color: var(--navy, #002868);
    background: rgba(0,40,104,0.03);
  }

  .cc-output-icon { font-size: 20px; margin-bottom: 6px; }

  .cc-output-metric {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-text, #5F6368);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .cc-output-desc {
    font-size: 12px;
    color: var(--gray-text, #5F6368);
    line-height: 1.5;
  }

  /* ─── Formula Box ────────────────────────────────── */
  .cc-formula-box {
    background: var(--navy, #002868);
    color: var(--white, #fff);
    border-radius: 12px;
    padding: 24px 26px;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
  }

  .cc-formula-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
  }

  .cc-formula-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
  }

  .cc-formula-eq {
    font-family: 'Montserrat', monospace;
    font-size: clamp(13px, 1.8vw, 15.5px);
    font-weight: 700;
    color: var(--white, #fff);
    line-height: 1.85;
    position: relative;
    z-index: 1;
  }

  .cc-formula-eq span {
    color: rgba(255,215,0,0.9);
  }

  /* ─── Loan Type Badge Row ────────────────────────── */
  .cc-loan-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
  }

  .cc-loan-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 8px;
    background: var(--white, #fff);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
    white-space: nowrap;
    transition: all 0.18s;
  }

  .cc-loan-badge:hover {
    border-color: var(--navy, #002868);
    background: rgba(0,40,104,0.04);
    cursor: default;
  }

  .cc-loan-badge .badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .dot-conv { background: var(--navy, #002868); }
  .dot-fha  { background: #E05C00; }
  .dot-va   { background: #007A4C; }
  .dot-usda { background: #6B3FA0; }
  .dot-jumbo{ background: #BF0A30; }
  .dot-cash { background: #5F6368; }

  /* ─── Callout Box ────────────────────────────────── */
  .cc-callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 10px;
    margin: 24px 0;
  }

  .cc-callout.tip {
    background: rgba(0,122,76,0.05);
    border: 1.5px solid rgba(0,122,76,0.18);
  }

  .cc-callout.warning {
    background: rgba(224,92,0,0.05);
    border: 1.5px solid rgba(224,92,0,0.18);
  }

  .cc-callout.info {
    background: rgba(0,40,104,0.04);
    border: 1.5px solid rgba(0,40,104,0.15);
  }

  .cc-callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }

  .cc-callout-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin-bottom: 5px;
  }

  .cc-callout-body {
    font-size: 13.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.7;
  }

  .cc-callout-body strong { color: var(--charcoal, #1D1D1F); }
  .cc-callout-body a { color: var(--navy, #002868); font-weight: 600; }

  /* ═══════════════════════════════════════════════════
     EDUCATIONAL SECTION SPECIFIC STYLES
     ═══════════════════════════════════════════════════ */

  /* ─── Cost Category Accordions ──────────────────── */
  .cc-cat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 20px 0;
  }

  .cc-cat-item {
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
  }

  .cc-cat-item.open {
    border-color: var(--navy, #002868);
    box-shadow: 0 2px 12px rgba(0,40,104,0.08);
  }

  .cc-cat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--white, #fff);
    border: none;
    cursor: pointer;
    gap: 12px;
    transition: background 0.18s;
  }

  .cc-cat-btn:hover { background: var(--bg-light, #F7F9FC); }
  .cc-cat-item.open .cc-cat-btn { background: var(--navy, #002868); }

  .cc-cat-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }

  .cc-cat-icon-wrap {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--bg-light, #F7F9FC);
    border: 1.5px solid var(--border, #E0E4E8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    transition: background 0.2s;
  }

  .cc-cat-item.open .cc-cat-icon-wrap {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
  }

  .cc-cat-title-wrap { flex: 1; text-align: left; }

  .cc-cat-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.3;
  }

  .cc-cat-item.open .cc-cat-title { color: var(--white, #fff); }

  .cc-cat-subtitle {
    font-size: 12px;
    color: var(--gray-text, #5F6368);
    margin-top: 2px;
  }

  .cc-cat-item.open .cc-cat-subtitle { color: rgba(255,255,255,0.6); }

  .cc-cat-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .cc-cat-range {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(0,40,104,0.08);
    color: var(--navy, #002868);
    white-space: nowrap;
  }

  .cc-cat-item.open .cc-cat-range {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
  }

  .cc-cat-chevron {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--bg-light, #F7F9FC);
    border: 1.5px solid var(--border, #E0E4E8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--navy, #002868);
    transition: transform 0.25s, background 0.2s;
    flex-shrink: 0;
  }

  .cc-cat-item.open .cc-cat-chevron {
    transform: rotate(45deg);
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
    color: var(--white, #fff);
  }

  .cc-cat-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg-light, #F7F9FC);
    border-top: 0 solid var(--border, #E0E4E8);
    padding: 0 20px;
  }

  .cc-cat-item.open .cc-cat-panel {
    max-height: 900px;
    padding: 18px 20px 20px;
    border-top: 1px solid var(--border, #E0E4E8);
  }

  /* ─── Fee rows inside panels ─────────────────────── */
  .cc-fee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin-bottom: 14px;
  }

  .cc-fee-table th {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--gray-text, #5F6368);
    padding: 0 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border, #E0E4E8);
  }

  .cc-fee-table td {
    padding: 10px 12px;
    vertical-align: top;
    border-bottom: 1px solid rgba(224,228,232,0.5);
    color: var(--gray-text, #5F6368);
    line-height: 1.55;
  }

  .cc-fee-table tr:last-child td { border-bottom: none; }

  .cc-fee-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
  }

  .cc-neg-yes {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0,122,76,0.1);
    color: #007A4C;
    white-space: nowrap;
  }

  .cc-neg-no {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(191,10,48,0.1);
    color: var(--red, #BF0A30);
    white-space: nowrap;
  }

  .cc-neg-maybe {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(224,92,0,0.1);
    color: #E05C00;
    white-space: nowrap;
  }

  /* ─── State Rate Table ───────────────────────────── */
  .cc-state-table-wrapper {
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
  }

  .cc-state-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
  }

  .cc-state-table thead th {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--white, #fff);
    background: var(--navy, #002868);
    padding: 12px 16px;
    text-align: left;
  }

  .cc-state-table tbody tr:nth-child(even) td {
    background: var(--bg-light, #F7F9FC);
  }

  .cc-state-table tbody td {
    padding: 10px 16px;
    color: var(--gray-text, #5F6368);
    border-bottom: 1px solid var(--border, #E0E4E8);
    font-size: 13.5px;
    line-height: 1.45;
  }

  .cc-state-table tbody tr:last-child td { border-bottom: none; }

  .cc-state-table .td-state {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
  }

  .cc-state-table .td-high { color: var(--red, #BF0A30); font-weight: 700; }
  .cc-state-table .td-low { color: #007A4C; font-weight: 700; }

  /* ─── Real Example Card ──────────────────────────── */
  .cc-example-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
  }

  .cc-example-card {
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 11px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
  }

  .cc-example-card:hover {
    box-shadow: 0 4px 18px rgba(0,40,104,0.1);
    border-color: var(--navy, #002868);
  }

  .cc-example-header {
    padding: 13px 16px 10px;
    background: var(--navy, #002868);
  }

  .cc-example-city {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--white, #fff);
    margin-bottom: 2px;
  }

  .cc-example-type {
    font-size: 11.5px;
    color: rgba(255,255,255,0.6);
  }

  .cc-example-body { padding: 12px 16px 14px; }

  .cc-example-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid rgba(224,228,232,0.6);
    font-size: 13px;
    color: var(--gray-text, #5F6368);
  }

  .cc-example-row:last-child { border-bottom: none; }

  .cc-example-row .er-label { flex: 1; }

  .cc-example-row .er-val {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
    text-align: right;
  }

  .cc-example-row.er-total .er-label {
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
  }

  .cc-example-row.er-total .er-val {
    color: var(--navy, #002868);
    font-size: 14.5px;
  }

  /* ─── Negotiation Tips ───────────────────────────── */
  .cc-tip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px 0;
  }

  .cc-tip-card {
    padding: 16px;
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 10px;
    transition: border-color 0.18s, box-shadow 0.18s;
  }

  .cc-tip-card:hover {
    border-color: var(--navy, #002868);
    box-shadow: 0 2px 12px rgba(0,40,104,0.08);
  }

  .cc-tip-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--red, #BF0A30);
    text-transform: uppercase;
    margin-bottom: 5px;
  }

  .cc-tip-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin-bottom: 7px;
    line-height: 1.3;
  }

  .cc-tip-desc {
    font-size: 13px;
    color: var(--gray-text, #5F6368);
    line-height: 1.65;
  }

  .cc-tip-desc strong { color: var(--charcoal, #1D1D1F); }

  /* ─── Section Divider ────────────────────────────── */
  .cc-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border, #E0E4E8) 20%, var(--border, #E0E4E8) 80%, transparent);
    margin: 48px 0;
  }

  /* ─── Responsive ──────────────────────────────────── */
  @media (max-width: 640px) {
    .cc-section { padding: 0 16px; }
    .cc-step-card { grid-template-columns: 44px 1fr; }
    .cc-input-grid { grid-template-columns: 1fr; }
    .cc-output-grid { grid-template-columns: repeat(2, 1fr); }
    .cc-example-grid { grid-template-columns: 1fr; }
    .cc-tip-grid { grid-template-columns: 1fr; }
    .cc-fee-table { font-size: 12.5px; }
    .cc-fee-table td, .cc-fee-table th { padding: 8px; }
    .cc-cat-range { display: none; }
  }

  /* ── Section wrapper ─────────────────────────────────────── */
  .rce-section {
    max-width: 960px;
    margin: 0 auto 64px;
    padding: 0 24px;
    font-family: 'Inter', sans-serif;
  }

  .rce-section > h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin-bottom: 8px;
  }

  .rce-section > .rce-intro {
    font-size: 14.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.8;
    margin-bottom: 28px;
    max-width: 76ch;
  }

  /* ── Disclaimer strip ────────────────────────────────────── */
  .rce-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #fffbea;
    border: 1px solid #f0d060;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #5a4a00;
  }

  .rce-disclaimer-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  /* ── Tab strip ───────────────────────────────────────────── */
  .rce-tab-strip {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
  }

  .rce-tab {
    padding: 9px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    border: none;
    background: var(--white, #fff);
    color: var(--gray-text, #5F6368);
    cursor: pointer;
    border-right: 1.5px solid var(--border, #E0E4E8);
    transition: all 0.18s;
  }

  .rce-tab:last-child { border-right: none; }

  .rce-tab:hover { background: var(--bg-light, #F7F9FC); color: var(--navy, #002868); }

  .rce-tab.active {
    background: var(--navy, #002868);
    color: #fff;
  }

  /* ── Summary bar ─────────────────────────────────────────── */
  .rce-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
  }

  .rce-summary-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--gray-text, #5F6368);
  }

  .rce-summary-pill strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
  }

  /* ── Example card grid ───────────────────────────────────── */
  .rce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
    gap: 16px;
  }

  /* ── Individual example card ─────────────────────────────── */
  .rce-card {
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
  }

  .rce-card:hover {
    box-shadow: 0 4px 20px rgba(0,40,104,0.09);
  }

  /* ── Card header ─────────────────────────────────────────── */
  .rce-card-header {
    padding: 16px 20px 14px;
    background: var(--navy, #002868);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .rce-city-flag {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 4px;
  }

  .rce-city-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
  }

  .rce-city-sub {
    font-size: 11.5px;
    color: rgba(255,255,255,0.65);
    margin-top: 3px;
    line-height: 1.4;
  }

  .rce-header-right {
    text-align: right;
    flex-shrink: 0;
  }

  .rce-loan-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 5px;
  }

  .rce-loan-conventional { background: rgba(255,255,255,0.15); color: #fff; }
  .rce-loan-fha          { background: #2563eb22; color: #93c5fd; border: 1px solid rgba(147,197,253,0.3); }
  .rce-loan-va           { background: #15803d22; color: #86efac; border: 1px solid rgba(134,239,172,0.3); }
  .rce-loan-usda         { background: #92400e22; color: #fcd34d; border: 1px solid rgba(252,211,77,0.3); }
  .rce-loan-jumbo        { background: rgba(191,10,48,0.25); color: #fca5a5; border: 1px solid rgba(252,165,165,0.3); }
  .rce-loan-cash         { background: rgba(255,255,255,0.1); color: #d1fae5; border: 1px solid rgba(209,250,229,0.3); }

  .rce-price-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
  }

  .rce-price-label {
    font-size: 10.5px;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
  }

  /* ── Key metrics row ─────────────────────────────────────── */
  .rce-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--border, #E0E4E8);
  }

  .rce-metric {
    padding: 12px 14px;
    border-right: 1px solid var(--border, #E0E4E8);
    text-align: center;
  }

  .rce-metric:last-child { border-right: none; }

  .rce-metric-val {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    line-height: 1;
  }

  .rce-metric-val.rce-highlight { color: var(--navy, #002868); }
  .rce-metric-val.rce-red       { color: var(--red, #BF0A30); }

  .rce-metric-label {
    font-size: 10.5px;
    color: var(--gray-text, #5F6368);
    margin-top: 3px;
    line-height: 1.3;
  }

  /* ── Fee rows ────────────────────────────────────────────── */
  .rce-fee-list {
    padding: 6px 0;
  }

  .rce-fee-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 18px;
    border-bottom: 1px solid rgba(224,228,232,0.45);
    transition: background 0.15s;
  }

  .rce-fee-row:hover { background: var(--bg-light, #F7F9FC); }
  .rce-fee-row:last-child { border-bottom: none; }

  .rce-fee-left {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
  }

  .rce-fee-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
  }

  .rce-dot-lender { background: #3b82f6; }
  .rce-dot-title  { background: #8b5cf6; }
  .rce-dot-govt   { background: var(--red, #BF0A30); }
  .rce-dot-third  { background: #10b981; }
  .rce-dot-prepaid{ background: #f59e0b; }
  .rce-dot-zero   { background: #e5e7eb; border: 1px solid #d1d5db; }

  .rce-fee-name {
    font-size: 13px;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.35;
    font-weight: 500;
  }

  .rce-fee-note {
    font-size: 11px;
    color: var(--gray-text, #5F6368);
    line-height: 1.3;
    margin-top: 1px;
  }

  .rce-fee-val {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--charcoal, #1D1D1F);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .rce-fee-val.rce-zero { color: #16a34a; }

  /* ── Section sub-label within fee list ───────────────────── */
  .rce-fee-section-label {
    padding: 9px 18px 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gray-text, #5F6368);
    background: var(--bg-light, #F7F9FC);
    border-bottom: 1px solid var(--border, #E0E4E8);
  }

  /* ── Bar chart of composition ────────────────────────────── */
  .rce-bar-section {
    padding: 12px 18px 4px;
    border-top: 1px solid var(--border, #E0E4E8);
  }

  .rce-bar-label {
    font-size: 10.5px;
    color: var(--gray-text, #5F6368);
    margin-bottom: 7px;
  }

  .rce-bar-track {
    display: flex;
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
    gap: 1px;
    margin-bottom: 8px;
  }

  .rce-bar-seg {
    height: 100%;
    transition: width 0.4s ease;
  }

  .rce-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 6px;
  }

  .rce-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    color: var(--gray-text, #5F6368);
  }

  .rce-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  /* ── Total row ───────────────────────────────────────────── */
  .rce-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: var(--navy, #002868);
    margin: 0;
  }

  .rce-total-left {
    display: flex;
    flex-direction: column;
  }

  .rce-total-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
  }

  .rce-total-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
  }

  .rce-total-right {
    text-align: right;
  }

  .rce-total-amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
  }

  .rce-total-pct {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
  }

  /* ── CTA footer on each card ─────────────────────────────── */
  .rce-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: var(--bg-light, #F7F9FC);
    border-top: 1px solid var(--border, #E0E4E8);
    gap: 10px;
    flex-wrap: wrap;
  }

  .rce-card-footer p {
    font-size: 11.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.4;
    margin: 0;
  }

  .rce-card-footer a {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--navy, #002868);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .rce-card-footer a:hover { color: var(--red, #BF0A30); }

  /* ── Panel for buyer vs seller toggle ────────────────────── */
  .rce-panel { display: block; }
  .rce-panel.hidden { display: none; }

  /* ── Seller grid ─────────────────────────────────────────── */
  .rce-seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
    gap: 16px;
  }

  .rce-seller-card {
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 12px;
    overflow: hidden;
  }

  .rce-seller-header {
    padding: 14px 18px;
    background: #1a1a2e;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }

  .rce-seller-city {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
  }

  .rce-seller-sub {
    font-size: 11.5px;
    color: rgba(255,255,255,0.55);
    margin-top: 3px;
  }

  .rce-seller-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-align: right;
  }

  .rce-seller-price-sub {
    font-size: 10.5px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
    text-align: right;
  }

  /* ── Bottom CTA bar ──────────────────────────────────────── */
  .rce-cta-bar {
    margin-top: 32px;
    padding: 18px 24px;
    background: var(--bg-light, #F7F9FC);
    border: 1px solid var(--border, #E0E4E8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }

  .rce-cta-bar p {
    font-size: 14px;
    color: var(--gray-text, #5F6368);
    margin: 0;
    line-height: 1.6;
  }

  .rce-cta-bar strong { color: var(--charcoal, #1D1D1F); }

  .rce-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--navy, #002868);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s;
  }

  .rce-cta-btn:hover { background: var(--red, #BF0A30); }

  /* ── Responsive ──────────────────────────────────────────── */
  @media (max-width: 640px) {
    .rce-section { padding: 0 14px; }
    .rce-grid, .rce-seller-grid { grid-template-columns: 1fr; }
    .rce-cta-bar { flex-direction: column; align-items: flex-start; }
    .rce-metrics { grid-template-columns: repeat(3, 1fr); }
    .rce-price-tag { font-size: 16px; }
    .rce-summary-bar { gap: 8px; }
  }
/* ══════════════════════════════════════════════════════
     SECTION: 5 Pro Tips
     ══════════════════════════════════════════════════════ */

  .protips-section {
    max-width: 860px;
    margin: 0 auto 64px;
    padding: 0 24px;
    font-family: 'Inter', sans-serif;
  }

  /* ── Section header ───────────────────────────────────── */
  .protips-header {
    margin-bottom: 32px;
  }

  .protips-header .edu-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--red, #BF0A30);
    text-transform: uppercase;
    margin-bottom: 10px;
  }

  .protips-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    margin: 0 0 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border, #E0E4E8);
    line-height: 1.25;
  }

  .protips-header p {
    font-size: 14.5px;
    color: var(--gray-text, #5F6368);
    line-height: 1.8;
    margin: 0;
    max-width: 72ch;
  }

  /* ── Tips stack ───────────────────────────────────────── */
  .protips-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* ── Individual tip card ──────────────────────────────── */
  .protip-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    border: 1.5px solid var(--border, #E0E4E8);
    border-radius: 0;
    border-bottom: none;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    background: var(--white, #fff);
  }

  .protip-card:first-child {
    border-radius: 12px 12px 0 0;
  }

  .protip-card:last-child {
    border-radius: 0 0 12px 12px;
    border-bottom: 1.5px solid var(--border, #E0E4E8);
  }

  .protip-card:only-child {
    border-radius: 12px;
    border-bottom: 1.5px solid var(--border, #E0E4E8);
  }

  .protip-card:hover {
    box-shadow: 0 4px 20px rgba(0,40,104,0.09);
    border-color: var(--navy, #002868);
    z-index: 1;
    position: relative;
  }

  /* ── Left number column ───────────────────────────────── */
  .protip-num-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 22px 0 22px;
    background: var(--navy, #002868);
    gap: 6px;
  }

  .protip-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: rgba(255,255,255,0.18);
    line-height: 1;
    letter-spacing: -1px;
  }

  .protip-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-top: 4px;
  }

  .protip-badge {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-top: 10px;
  }

  /* ── Right content column ─────────────────────────────── */
  .protip-body {
    padding: 22px 22px 20px;
    border-left: 1px solid var(--border, #E0E4E8);
  }

  .protip-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }

  .protip-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.3;
    flex: 1;
  }

  .protip-saving-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dcfce7;
    color: #15803d;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #bbf7d0;
  }

  .protip-desc {
    font-size: 14px;
    color: var(--gray-text, #5F6368);
    line-height: 1.8;
    margin-bottom: 14px;
  }

  .protip-desc strong {
    color: var(--charcoal, #1D1D1F);
    font-weight: 600;
  }

  /* ── Action items row ─────────────────────────────────── */
  .protip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
  }

  .protip-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-light, #F7F9FC);
    border: 1px solid var(--border, #E0E4E8);
    border-radius: 7px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
    color: var(--charcoal, #1D1D1F);
    line-height: 1.3;
  }

  .protip-action-pill .pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--navy, #002868);
    flex-shrink: 0;
  }

  /* ── Pro insight callout ──────────────────────────────── */
  .protip-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 12.5px;
    color: #78350f;
    line-height: 1.65;
  }

  .protip-insight-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .protip-insight strong {
    font-weight: 700;
    color: #78350f;
  }

  /* ── Divider line between cards ───────────────────────── */
  .protip-card + .protip-card {
    border-top: 1px solid var(--border, #E0E4E8);
  }

  /* ── Bottom summary bar ───────────────────────────────── */
  .protips-summary-bar {
    margin-top: 20px;
    background: var(--navy, #002868);
    border-radius: 12px;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
  }

  @media (max-width: 580px) {
    .protips-summary-bar {
      grid-template-columns: 1fr;
    }
  }

  .protips-summary-left p {
    font-size: 13.5px;
    color: rgba(255,255,255,0.75);
    line-height: 1.75;
    margin: 0;
  }

  .protips-summary-left p strong {
    color: #fff;
  }

  .protips-summary-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
  }

  .protips-summary-total .total-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
  }

  .protips-summary-total .total-amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
  }

  .protips-summary-total .total-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
  }

  /* ── Responsive ───────────────────────────────────────── */
  @media (max-width: 520px) {
    .protip-card {
      grid-template-columns: 60px 1fr;
    }
    .protip-num {
      font-size: 20px;
    }
    .protip-icon-wrap {
      width: 32px;
      height: 32px;
      font-size: 16px;
    }
    .protip-badge {
      display: none;
    }
    .protip-body {
      padding: 16px 14px;
    }
    .protip-title {
      font-size: 14px;
    }
  }
/* =========================================================
   📱 MOBILE TABLE SCROLL FIX (For Educational Sections)
   ========================================================= */

/* 1. Prevent the main blog container from blowing out */
.edu-content {
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* 2. Turn the table wrappers into horizontally scrollable swipe-blocks */
.edu-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important; /* Enables smooth momentum swiping on iPhones */
  display: block !important; 
  border-radius: 8px !important;
  border: 1px solid var(--g200, #e2e8f0);
}

/* 3. Force the table to stay wide enough to read, which triggers the scroll */
.edu-table {
  min-width: 650px !important; /* Forces the table to stay wide so it doesn't squish text */
  width: 100% !important;
}

/* 4. Tweak padding on mobile so tables fit better */
@media (max-width: 768px) {
  .edu-table th, .edu-table td {
    padding: 12px 10px !important;
    font-size: 13px !important;
  }
}

/* =========================================================
   📱 CLOSING COSTS: ULTIMATE MOBILE CATCH-ALL FIX
   ========================================================= */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

@media (max-width: 768px) {
  /* 1. Force ALL naked tables to become swipeable (FAQs, Categories, Legal) */
  .cc-fee-table,
  .mini-table,
  .ldet-transparency-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important; /* Stops text from squishing into tall columns */
    border: 1px solid var(--g200, #e2e8f0);
    border-radius: 8px;
  }

  /* 2. Force all multi-column grids to stack vertically */
  .rc-grid,
  .ldet-grid,
  .ldet-auth-grid,
  .rce-seller-grid,
  .cc-input-grid,
  .cc-output-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* 3. Fix side-by-side UI cards so they stack cleanly */
  .cc-sbs,
  .rce-card-header,
  .ldet-footer-strip {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  /* 4. Fix specific text alignments that look weird when stacked */
  .rce-header-right,
  .ldet-footer-right {
    text-align: left !important;
    align-items: flex-start !important;
    width: 100% !important;
  }

  /* 5. Shrink large math formulas so they don't break the screen */
  .cc-formula-eq {
    font-size: 12px !important;
    word-wrap: break-word !important;
    padding: 12px !important;
  }
  
  /* 6. Fix the "Pro Tips" layout so the number sits nicely above the text */
  .protip-card {
    display: flex !important;
    flex-direction: column !important;
  }
  .protip-num-col {
    width: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 12px;
  }
  .protip-num { margin-bottom: 0 !important; margin-right: 12px !important; }

  /* 7. Ensure absolutely no wrapper exceeds screen width */
  #ccWrapper, section, .cc-body, .protips-stack, .ccfaq-list, #rceComparePanel {
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}