#cvt ─────
     Every selector starts with #cvt. Nothing leaks to the host page.
     No Tailwind, no global resets, no preflight. WordPress / Elementor
     theme styles (container borders, headings, etc.) remain untouched. */

  #cvt, #cvt *, #cvt *::before, #cvt *::after { box-sizing: border-box; }
  #cvt, #cvt button, #cvt input, #cvt textarea, #cvt p, #cvt h2, #cvt span, #cvt div, #cvt a {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  /* Internal reset — only applies INSIDE the widget */
  #cvt div, #cvt p, #cvt h2, #cvt span { margin: 0; padding: 0; }
  #cvt button { margin: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
  #cvt textarea { margin: 0; font: inherit; color: inherit; }
  #cvt svg { display: inline-block; vertical-align: middle; }

  /* Container */
  #cvt {
    width: 100%; max-width: 56rem; margin: 0 auto;
    padding: 8px 4px;
    font-size: 14px; line-height: 1.5; color: #1f2937;
  }
  @media (min-width: 640px) { #cvt { padding: 8px; } }
  @media (min-width: 768px) { #cvt { padding: 8px 16px; } }

  /* Mobile breakout — pull widget outside parent column padding */
  @media (max-width: 767px) {
    #cvt { margin-left: -25px; margin-right: -25px; width: calc(100% + 50px); max-width: none; }
  }

  /* Subtitle */
  #cvt .cvt-subtitle { text-align: center; font-size: 14px; color: #4b5563; font-weight: 500; margin-bottom: 16px; }
  @media (min-width: 768px) { #cvt .cvt-subtitle { font-size: 16px; } }

  /* Input */
  #cvt .cvt-input {
    width: 100%; max-width: 42rem; display: block; margin: 0 auto;
    padding: 12px 14px; border-radius: 10px;
    border: 2px solid #d1d5db; background: #fff; color: #1f2937;
    font-size: 14px; font-weight: 500; line-height: 1.65;
    transition: all .15s; resize: vertical; min-height: 7.5rem;
  }
  @media (min-width: 768px) { #cvt .cvt-input { font-size: 15px; min-height: 8.5rem; } }
  #cvt .cvt-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.18); border-color: #3b82f6; }
  #cvt .cvt-input::placeholder { color: #9ca3af; font-weight: 400; }

  /* Action row */
  #cvt .cvt-actions {
    display: flex; gap: 8px; margin: 8px auto 0; max-width: 42rem;
    flex-wrap: wrap; justify-content: center;
  }
  #cvt .cvt-button {
    padding: 12px 24px; background: #2563eb; color: #fff;
    font-size: 14px; font-weight: 600; border-radius: 8px;
    transition: background .15s; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }
  #cvt .cvt-button:hover { background: #1d4ed8; }
  #cvt .cvt-button:active { background: #1e40af; }
  #cvt .cvt-button:disabled { opacity: .7; cursor: not-allowed; }
  #cvt .cvt-btn-ghost {
    padding: 10px 16px; border-radius: 8px; background: #fff;
    border: 2px solid #d1d5db; color: #4b5563;
    font-size: 13px; font-weight: 600; transition: all .15s;
    display: inline-flex; align-items: center; gap: 7px;
  }
  #cvt .cvt-btn-ghost:hover { border-color: #93c5fd; color: #2563eb; background: #f8fafc; }
  #cvt .cvt-btn-ghost:active { transform: translateY(1px); }
  #cvt .cvt-btn-ghost.cvt-copied { color: #059669; border-color: #a7f3d0; background: #ecfdf5; }
  #cvt .cvt-ic { width: 16px; height: 16px; flex-shrink: 0; }

  /* Card */
  #cvt .cvt-card-wrap { width: 100%; margin-top: 18px; }
  #cvt .cvt-card-bg {
    border-radius: 12px;
    border: 1px solid #93c5fd; /* blue-300 mobile */
    padding: 20px 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #eef2ff 100%);
    box-shadow: 0 4px 20px -8px rgba(59,130,246,.18), 0 1px 3px rgba(0,0,0,.04);
    position: relative; overflow: hidden;
  }
  @media (min-width: 768px) {
    #cvt .cvt-card-bg { border-radius: 16px; padding: 28px; border-color: #bfdbfe; /* blue-200 desktop */ }
  }

  /* Top-edge scan-progress bar */
  #cvt .cvt-card-bg::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 50%, #2563eb 100%);
    transform-origin: left center; transform: scaleX(0); opacity: 0;
    pointer-events: none; z-index: 2;
    box-shadow: 0 0 12px rgba(37,99,235,.5);
  }
  #cvt .cvt-card-bg.cvt-wave-go::before {
    animation: cvtLoadBar 1.4s cubic-bezier(.45,.05,.4,1) forwards;
  }
  @keyframes cvtLoadBar {
    0%   { transform: scaleX(0); opacity: 0; }
    8%   { opacity: 1; }
    78%  { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0; }
  }

  /* Section labels */
  #cvt .cvt-sec-label {
    font-size: 11px; color: #6b7280; text-transform: uppercase;
    letter-spacing: .06em; font-weight: 800; margin-bottom: 8px;
  }

  /* Case buttons */
  #cvt .cvt-cases { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
  #cvt .cvt-case-btn {
    padding: 8px 11px; border-radius: 8px;
    border: 1.5px solid #d1d5db; background: #fff; color: #374151;
    font-size: 12.5px; font-weight: 600; line-height: 1.25;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
  }
  #cvt .cvt-case-btn:hover { border-color: #93c5fd; color: #2563eb; background: #f8fafc; }
  #cvt .cvt-case-btn:active { transform: translateY(1px); }
  #cvt .cvt-case-btn.cvt-hit { background: #2563eb; border-color: #2563eb; color: #fff; }

  /* Output panel */
  #cvt .cvt-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
  #cvt .cvt-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 10px 8px 14px; background: #f8fafc; border-bottom: 1px solid #e5e7eb;
  }
  #cvt .cvt-panel-title {
    font-size: 12px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: #374151;
  }
  #cvt .cvt-panel-tools { display: flex; align-items: center; gap: 6px; }
  #cvt .cvt-chip {
    font-size: 11px; font-weight: 700; color: #6b7280;
    background: #eef2f7; border-radius: 9999px; padding: 3px 9px;
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  #cvt .cvt-out {
    padding: 14px; font-size: 14.5px; line-height: 1.75; color: #1f2937;
    white-space: pre-wrap; word-break: break-word;
    min-height: 8rem; max-height: 22rem; overflow: auto;
  }
  @media (min-width: 768px) { #cvt .cvt-out { padding: 16px 18px; font-size: 15px; } }

  #cvt .cvt-out-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

  /* Output copy button keeps the reference icon-swap behaviour */
  #cvt .cvt-copy-btn { color: #9ca3af; transition: all .15s; padding: 6px; border-radius: 8px; flex-shrink: 0; }
  #cvt .cvt-copy-btn:hover { color: #2563eb; background: rgba(59,130,246,.08); }
  #cvt .cvt-copy-btn.cvt-copied { color: #059669; }
  #cvt .cvt-copy-btn svg { width: 20px; height: 20px; }

  /* Stats */
  #cvt .cvt-stats { padding-top: 22px; margin-top: 22px; border-top: 1px solid #dbeafe; }
  #cvt .cvt-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    column-gap: 12px; row-gap: 14px;
  }
  @media (min-width: 640px) { #cvt .cvt-grid { column-gap: 20px; } }
  @media (min-width: 768px) { #cvt .cvt-grid { grid-template-columns: repeat(4, 1fr); column-gap: 24px; row-gap: 18px; } }
  #cvt .cvt-cell { padding: 6px 0; min-width: 0; }
  #cvt .cvt-label {
    font-size: 11px; color: #6b7280; text-transform: uppercase;
    letter-spacing: .06em; font-weight: 800; margin-bottom: 4px;
  }
  #cvt .cvt-val {
    font-size: 16px; color: #1f2937; font-weight: 700;
    font-variant-numeric: tabular-nums; word-break: break-word;
  }
  #cvt .cvt-val.cvt-pop { animation: cvtPop .45s ease-out; }
  @keyframes cvtPop {
    0%   { transform: scale(.86); filter: brightness(1.35); }
    45%  { transform: scale(1.07); filter: brightness(1.12); }
    100% { transform: scale(1); filter: brightness(1); }
  }

  /* Footnote */
  #cvt .cvt-foot {
    font-size: 12.5px; color: #6b7280; text-align: center;
    margin-top: 16px; line-height: 1.6; max-width: 42rem;
    margin-left: auto; margin-right: auto; font-weight: 500;
  }
  #cvt .cvt-foot strong { color: #374151; font-weight: 700; }

  /* Hidden util + loading state */
  #cvt .cvt-hidden { display: none !important; }
  #cvt .is-loading { color: #9ca3af !important; font-style: italic; font-weight: 400 !important; }