  /* =========================================
     TEXT COMPARE TOOL — PREMIUM UI
     ========================================= */
  .da-wrapper {
      --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
      --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
      display: flex;
      justify-content: center;
          padding: clamp(0px, 5vw, 0px) 20px;
  }

  .da-panel {
      position: relative;                
      width: 100%;
      max-width: 1200px;
      border-radius: 28px;
      padding: clamp(28px, 5vw, 56px);
  }

  /* ---------- CONTROLS BAR ---------- */
  .controls-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px 24px; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
  .cb-label { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
  .cb-sep { width: 1px; height: 24px; background: var(--border-color); margin: 0 4px; }
  
  /* ---------- CUSTOM DROPDOWN ---------- */
  .custom-dropdown { position: relative; display: inline-block; user-select: none; margin-left: auto; }
  .cd-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card-bg); border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--text-main); cursor: pointer; transition: all 0.2s; min-width: 140px; }
  .cd-header:hover, .custom-dropdown.active .cd-header { border-color: var(--primary-color); }
  .cd-value { display: flex; align-items: center; gap: 8px; }
  .cd-body { position: absolute; bottom: calc(100% + 8px); right: 0; width: 220px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); padding: 8px; z-index: 100; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s; display: flex; flex-direction: column; gap: 8px; }
  .custom-dropdown.active .cd-body { opacity: 1; visibility: visible; transform: translateY(0); }
  .cd-search input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; font-size: 12px; color: var(--text-main); outline: none; }
  .cd-list { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
  .cd-list::-webkit-scrollbar { width: 4px; }
  .cd-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
  .cd-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-main); cursor: pointer; transition: background 0.2s; }
  .cd-item:hover { background: var(--bg-body); }
  .cd-item.active { background: rgba(var(--primary-color-rgb), 0.05); color: var(--primary-color); }
  
  .mode-tabs, .gran-tabs { display: flex; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 4px; }
  .mt, .gt { background: transparent; border: none; padding: 6px 12px; font-size: 12px; font-weight: 800; color: var(--text-muted); border-radius: 6px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
  .mt.active, .gt.active { background: var(--card-bg); color: var(--primary-color); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
  
  .sw { display: flex; align-items: center; gap: 8px; cursor: pointer; }
  .sw-lbl { font-size: 12px; font-weight: 800; color: var(--text-main); }
  .sw-t { width: 36px; height: 20px; background: var(--border-color); border-radius: 100px; position: relative; transition: all 0.3s; flex-shrink: 0; }
  .sw-t.on { background: var(--primary-color); }
  .sw-thumb { width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: transform 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
  .sw-t.on .sw-thumb { transform: translateX(16px); }

  .dir-toggle { display: flex; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 2px; margin-left: auto; }
  .dir-btn { background: transparent; border: none; padding: 4px 8px; font-size: 11px; font-weight: 800; color: var(--text-muted); border-radius: 6px; cursor: pointer; transition: all 0.2s; }
  .dir-btn.active { background: var(--card-bg); color: var(--primary-color); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

  .compare-btn { background: var(--primary-color); border: none; border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3); }
  .compare-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(var(--primary-color-rgb), 0.4); }

  /* ---------- INPUT SECTION ---------- */
  .input-section { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 30px; }
  @media(max-width: 900px) { .input-section { grid-template-columns: 1fr; } }
  
  .input-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
  .input-panel.panel-b .ip-label.b { color: #3b82f6; }
  
  .ip-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
  .ip-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-main); }
  .ip-meta { display: flex; gap: 12px; align-items: center; }
  
  .ip-badge { background: var(--bg-body); border: 1px solid var(--border-color); font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 4px 10px; border-radius: 100px; }

  .ip-textarea { flex: 1; min-height: 250px; width: 100%; background: transparent; border: none; padding: 20px; font-size: 14px; line-height: 1.6; font-family: 'Space Mono', monospace; color: var(--text-main); outline: none; resize: vertical; }
  
  .ip-footer { display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border-color); background: var(--bg-body); overflow-x: auto; }
  .act-btn { flex: 1; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px; font-size: 12px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
  .act-btn:hover { border-color: var(--primary-color); transform: translateY(-2px); }
  .act-btn.danger { color: #ef4444; }
  .act-btn.danger:hover { border-color: #ef4444; background: rgba(239,68,68,0.05); }
  .act-btn.copied { background: #22c55e !important; border-color: #22c55e !important; color: #fff !important; }

  /* ---------- DIFF OUTPUT ---------- */
  .diff-output { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
  .do-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
  .do-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-main); }
  .do-badges { display: flex; gap: 8px; }
  .do-badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 100px; border: 1px solid transparent; }
  .do-badge.added { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.2); color: #22c55e; }
  .do-badge.removed { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: #ef4444; }
  .do-badge.changed { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); color: #f59e0b; }
  .do-actions { display: flex; gap: 8px; }

  .diff-body { min-height: 200px; padding: 20px; font-family: 'Space Mono', monospace; font-size: 13px; line-height: 1.5; overflow-x: auto; }
  
  .empty-notice, .identical-notice { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 200px; text-align: center; gap: 12px; }
  .empty-notice i { color: var(--border-color); }
  .identical-notice i { color: #22c55e; }
  .identical-notice p { font-size: 16px; font-weight: 800; color: var(--text-main); margin: 0; }
  .identical-notice span { font-size: 13px; color: var(--text-muted); }

  /* SIDE BY SIDE */
  .side-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
  .side-col-header { background: var(--bg-body); padding: 8px 12px; font-weight: 800; font-size: 12px; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--border-color); }
  .side-col-header:first-child { border-right: 1px solid var(--border-color); }
  .side-lines { display: flex; flex-direction: column; }
  .side-lines:first-of-type { border-right: 1px solid var(--border-color); }
  
  .diff-line { display: flex; width: 100%; min-height: 24px; border-bottom: 1px solid rgba(0,0,0,0.02); }
  .diff-line:last-child { border-bottom: none; }
  .dl-num { width: 40px; flex-shrink: 0; background: rgba(var(--text-muted-rgb), 0.05); color: var(--text-muted); text-align: right; padding: 2px 8px; font-size: 11px; border-right: 1px solid var(--border-color); user-select: none; }
  .dl-content { padding: 2px 8px; flex: 1; word-break: break-all; white-space: pre-wrap; }
  
  .dl-empty { background: rgba(0,0,0,0.02); }
  .dl-empty .dl-content { background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 20px); }
  
  .dl-equal { background: transparent; color: var(--text-main); }
  .dl-add { background: rgba(34,197,94,0.05); color: #065f46; }
  .dl-add .dl-num { background: rgba(34,197,94,0.1); color: #059669; border-color: rgba(34,197,94,0.2); }
  .dl-remove { background: rgba(239,68,68,0.05); color: #991b1b; }
  .dl-remove .dl-num { background: rgba(239,68,68,0.1); color: #dc2626; border-color: rgba(239,68,68,0.2); }

  /* UNIFIED */
  .unified-view { display: flex; flex-direction: column; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
  .ul-line { display: flex; width: 100%; min-height: 24px; border-bottom: 1px solid rgba(0,0,0,0.02); }
  .ul-line:last-child { border-bottom: none; }
  .ul-nums { display: flex; width: 80px; flex-shrink: 0; background: rgba(var(--text-muted-rgb), 0.05); border-right: 1px solid var(--border-color); }
  .ul-num { width: 50%; color: var(--text-muted); text-align: right; padding: 2px 6px; font-size: 11px; user-select: none; }
  .ul-num:first-child { border-right: 1px solid rgba(0,0,0,0.05); }
  .ul-marker { width: 24px; text-align: center; font-weight: 800; font-size: 14px; padding: 2px 0; user-select: none; }
  .ul-content { padding: 2px 8px; flex: 1; word-break: break-all; white-space: pre-wrap; }

  .ul-added { background: rgba(34,197,94,0.05); color: #065f46; }
  .ul-added .ul-marker { color: #059669; }
  .ul-removed { background: rgba(239,68,68,0.05); color: #991b1b; }
  .ul-removed .ul-marker { color: #dc2626; }

  /* INLINE TOKENS */
  .w-added { background: rgba(34,197,94,0.2); border-radius: 2px; }
  .w-removed { background: rgba(239,68,68,0.2); text-decoration: line-through; border-radius: 2px; opacity: 0.8; }

  /* ---------- STATS STRIP ---------- */
  .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 40px; }
  .sc { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s; }
  .sc:hover { transform: translateY(-2px); }
  .sc-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
  .sc-ico.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
  .sc-ico.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
  .sc-ico.warn { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
  .sc-ico.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
  .sc-ico.purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
  .sc-ico.teal { background: rgba(20, 184, 166, 0.1); color: #14b8a6; }
  .sc-val { font-size: 28px; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 4px; transition: transform 0.3s; }
  /* ── Comparison Panel & Analytics ── */
  .comparison-panel {
      background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
      padding: 28px; margin-top: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); margin-bottom: 40px;
  }
  .cp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
  .cp-title { font-size: 16px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
  .cp-badge { font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 100px; }
  .badge-high { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); border: 1px solid color-mix(in srgb, var(--success, #10b981) 30%, transparent); }

  .cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
  .cp-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
  .cpc-header { display: flex; justify-content: space-between; align-items: center; }
  .cpc-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); }
  .cpc-tag { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 6px; }
  .cpc-tag.success { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); }

  .cpc-body { display: flex; flex-direction: column; gap: 10px; }
  .cpc-stat-row { font-size: 13px; color: var(--text-muted); display: flex; justify-content: space-between; }
  .cpc-stat-row strong { color: var(--text-main); font-weight: 700; }
  .cpc-progress-bar { width: 100%; height: 8px; background: var(--border-color); border-radius: 100px; overflow: hidden; margin-top: 4px; }
  .cpc-progress-fill { height: 100%; background: var(--primary-color); border-radius: 100px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
  .cpc-progress-fill.bg-gradient { background: linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); }
  .cpc-progress-fill.w-100 { width: 100%; }

  /* Zero-Inline Enhancements */
  #bgCv { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
  .rw-hero-badge i { width: 14px; height: 14px; }
  .mt i { width: 12px; height: 12px; }
  .cd-value i, .cd-item i { width: 16px; height: 16px; color: var(--text-muted); }
  .cd-header i.cd-chevron { width: 14px; height: 14px; }
  .compare-btn i { width: 15px; height: 15px; }
  .ip-label i { width: 14px; height: 14px; }
  .act-btn i { width: 12px; height: 12px; }
  .d-none { display: none; }
  .do-title i { width: 14px; height: 14px; }
  .cp-title i { color: var(--primary-color); }
  .sc.border-red { border-top: 2px solid #ef4444; }
  .sc.border-green { border-top: 2px solid #22c55e; }
  .sc.border-amber { border-top: 2px solid #f59e0b; }
  .sc.border-blue { border-top: 2px solid #3b82f6; }
  .sc.border-purple { border-top: 2px solid #a855f7; }
  .sc.border-teal { border-top: 2px solid #14b8a6; }
  .sc-ico i { width: 18px; height: 18px; }
  .info-div-t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-main); margin-bottom: 20px; margin-top: 40px; }
  .info-div-t i { width: 16px; height: 16px; color: var(--primary-color); }

  