/* Content-quality checks (Plagiarism Checker + Fact Checker). Tokens only,
   mirrors the app design system. Not scanned by design-lint (like
   js/mv-export.js) but follows the same rules: no hardcoded hex, no inline
   style, no emoji, radius from the scale, no left-accent border stripes.
   Dynamic values (the score ring) are set as SVG presentation attributes from
   JS, not inline CSS. */

.mvcc-root { font-family: var(--font); color: var(--text); }

/* ============================================================ hero */
.mvcc-hero { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.mvcc-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(124, 92, 252, 0.08), transparent 55%); pointer-events: none; }
.mvcc-hero-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.mvcc-mark { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--radius); background: var(--gradient); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.mvcc-mark svg { color: var(--on-brand); }
.mvcc-title { font-family: var(--font-heading); font-size: 25px; font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.mvcc-sub { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-3); max-width: 640px; }
.mvcc-pills { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 15px; position: relative; z-index: 1; }
.mvcc-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px var(--font); padding: 5px 11px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--bg-2); color: var(--text-2); }
.mvcc-pill svg { color: var(--purple-bright); }

/* ============================================================ input */
.mvcc-input { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.mvcc-ta { box-sizing: border-box; width: 100%; min-height: 190px; resize: vertical; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font: 400 14px/1.65 var(--font); padding: 15px; outline: none; transition: border-color .15s ease; }
.mvcc-ta:focus { border-color: var(--purple-bright); }
/* The Live Writing Editor is a place you actually write, not a paste box, so it
   opens taller. Same box in every other respect. */
.mvcc-ta--tall { min-height: 320px; }
.mvcc-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.mvcc-meta { display: flex; align-items: center; gap: 14px; }
.mvcc-count { font: 700 10.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mvcc-count b { color: var(--text-2); }
.mvcc-example { background: none; border: 0; padding: 0; font: 600 12px var(--font); color: var(--purple-bright); cursor: pointer; }
.mvcc-example:hover { text-decoration: underline; }
.mvcc-run { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font: 700 13px var(--font); padding: 11px 22px; border-radius: var(--radius-pill); border: 0; background: var(--gradient); color: var(--on-brand); cursor: pointer; box-shadow: var(--shadow-sm); transition: filter .15s ease, transform .15s ease; }
.mvcc-run:hover { filter: brightness(1.06); transform: translateY(-1px); }
.mvcc-run:disabled { opacity: .6; cursor: default; transform: none; }
.mvcc-run svg { color: var(--on-brand); }

/* ============================================================ onboarding */
.mvcc-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.mvcc-info-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 17px; }
.mvcc-info-ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--bg-2); color: var(--purple-bright); margin-bottom: 11px; }
.mvcc-info-card h4 { margin: 0 0 5px; font-family: var(--font-heading); font-size: 13.5px; font-weight: 700; color: var(--text); }
.mvcc-info-card p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-3); }

/* ============================================================ output shell */
.mvcc-out { margin-top: 18px; }
.mvcc-out:empty { margin-top: 0; }
.mvcc-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px; color: var(--text-3); font-size: 13.5px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.mvcc-loading svg { color: var(--purple-bright); animation: mvccSpin 1s linear infinite; }
@keyframes mvccSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mvcc-loading svg { animation: none; } }

.mvcc-empty { text-align: center; padding: 46px 22px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-3); }
.mvcc-empty svg { color: var(--muted); margin-bottom: 10px; }
.mvcc-empty b { display: block; color: var(--text); font-family: var(--font-heading); font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.mvcc-empty p { margin: 0 auto; max-width: 400px; font-size: 13px; line-height: 1.55; }

/* ============================================================ scorecard */
/* State rides on the ring colour and the verdict icon (design rule 5: no
   left-accent stripes). The card border tints subtly to match. */
.mvcc-score { display: flex; align-items: center; gap: 26px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 24px 26px; box-shadow: var(--shadow-md); }

/* SVG score ring */
.mvcc-ring { flex-shrink: 0; width: 132px; height: 132px; }
.mvcc-ring-track { fill: none; stroke: var(--bg-2); stroke-width: 11; }
.mvcc-ring-val { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.22,1,.36,1); }
.mvcc-ring-val.good { stroke: var(--green); }
.mvcc-ring-val.warn { stroke: var(--amber); }
.mvcc-ring-val.bad { stroke: var(--red); }
.mvcc-ring-num { font-family: var(--font-heading); font-size: 30px; font-weight: 800; fill: var(--text); }
.mvcc-ring-unit { font-family: var(--font-heading); font-size: 14px; font-weight: 800; fill: var(--text-3); }
.mvcc-ring-cap { font: 700 7px var(--font-mono); letter-spacing: .12em; fill: var(--muted); text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .mvcc-ring-val { transition: none; } }

.mvcc-score-b { flex: 1; min-width: 0; }
.mvcc-verdict { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-heading); font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.mvcc-verdict svg { flex-shrink: 0; }
.mvcc-score.good .mvcc-verdict svg { color: var(--green); }
.mvcc-score.warn .mvcc-verdict svg { color: var(--amber); }
.mvcc-score.bad .mvcc-verdict svg { color: var(--red); }
.mvcc-guide { margin: 7px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-3); max-width: 560px; }

/* ============================================================ stat tiles */
.mvcc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 14px; }
.mvcc-stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 15px 16px; box-shadow: var(--shadow-sm); }
.mvcc-stat-l { display: flex; align-items: center; gap: 6px; font: 700 9.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.mvcc-stat-l svg { color: var(--purple-bright); }
.mvcc-stat-v { font-family: var(--font-heading); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.mvcc-stat-s { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ============================================================ section */
.mvcc-sec { margin-top: 18px; }
.mvcc-sec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.mvcc-sec-h svg { color: var(--purple-bright); }
.mvcc-sec-t { font-family: var(--font-heading); font-size: 15px; font-weight: 700; color: var(--text); }
.mvcc-sec-c { font: 700 10px var(--font-mono); color: var(--muted); margin-left: auto; }

/* AI-likelihood meter card */
.mvcc-ai { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.mvcc-ai-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.mvcc-ai-top svg { color: var(--purple-bright); }
.mvcc-ai-t { font-family: var(--font-heading); font-size: 13.5px; font-weight: 700; color: var(--text); }
.mvcc-ai-badge { margin-left: auto; font: 700 10px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-3); }
.mvcc-ai-badge.good { border-color: var(--green); color: var(--green); }
.mvcc-ai-badge.warn { border-color: var(--amber); color: var(--amber); }
.mvcc-ai-badge.bad { border-color: var(--red); color: var(--red); }
.mvcc-meter { height: 9px; border-radius: var(--radius-pill); background: var(--bg-2); overflow: hidden; }
.mvcc-meter-fill { height: 100%; border-radius: var(--radius-pill); transition: width 1s cubic-bezier(.22,1,.36,1); }
.mvcc-meter-fill.good { background: var(--green); }
.mvcc-meter-fill.warn { background: var(--amber); }
.mvcc-meter-fill.bad { background: var(--red); }
.mvcc-ai-note { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .mvcc-meter-fill { transition: none; } }

/* ============================================================ sources */
.mvcc-src { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mvcc-src-row { display: flex; align-items: center; gap: 11px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.mvcc-src-row:hover { border-color: var(--purple-bright); transform: translateY(-1px); }
.mvcc-favi { width: 22px; height: 22px; border-radius: var(--radius-xs); flex-shrink: 0; background: var(--bg-2); object-fit: cover; }
.mvcc-src-main { flex: 1; min-width: 0; }
.mvcc-src-host { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvcc-src-bar { height: 4px; border-radius: var(--radius-pill); background: var(--bg-2); margin-top: 6px; overflow: hidden; }
.mvcc-src-bar span { display: block; height: 100%; background: var(--purple); border-radius: var(--radius-pill); }
.mvcc-src-n { flex-shrink: 0; font: 700 10px var(--font-mono); color: var(--muted); text-align: right; }

/* matched passages */
.mvcc-match { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 9px; }
.mvcc-match-q { margin: 0 0 9px; font-size: 13.5px; line-height: 1.55; color: var(--text-2); position: relative; padding-left: 13px; }
.mvcc-match-q::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 2px; border-radius: var(--radius-pill); background: var(--amber); }
.mvcc-match-src { display: flex; gap: 7px; flex-wrap: wrap; }
.mvcc-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--purple-bright); text-decoration: none; padding: 4px 10px; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--radius-pill); }
.mvcc-chip:hover { border-color: var(--purple-bright); }
.mvcc-chip img { width: 13px; height: 13px; border-radius: 3px; }
.mvcc-clean { display: flex; align-items: center; gap: 10px; padding: 18px; background: var(--panel); border: 1px solid var(--green); border-radius: var(--radius-lg); color: var(--text-2); font-size: 13px; }
.mvcc-clean svg { color: var(--green); flex-shrink: 0; }
/* Partial-coverage / missing-read disclosures: informational amber, not success green. */
.mvcc-clean.mvcc-partial { border-color: var(--amber); }
.mvcc-clean.mvcc-partial svg { color: var(--amber); }

/* ============================================================ fact-check */
.mvcc-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 11px 15px; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--radius); }
.mvcc-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); }
.mvcc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mvcc-dot.good { background: var(--green); }
.mvcc-dot.bad { background: var(--red); }
.mvcc-dot.warn { background: var(--amber); }

.mvcc-tier { display: inline-flex; align-items: center; gap: 5px; font: 700 10px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-3); white-space: normal; overflow-wrap: break-word; }
.mvcc-tier.good { border-color: var(--green); color: var(--green); }
.mvcc-tier.warn { border-color: var(--amber); color: var(--amber); }
.mvcc-tier.bad { border-color: var(--red); color: var(--red); }
.mvcc-tier svg { width: 12px; height: 12px; }

.mvcc-claim { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.mvcc-claim-top { display: flex; align-items: flex-start; gap: 12px; }
.mvcc-claim-ix { flex-shrink: 0; width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--bg-2); color: var(--muted); font: 800 12px var(--font-heading); display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.mvcc-claim-body { flex: 1; min-width: 0; }
.mvcc-claim-q { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--text); line-height: 1.45; }
.mvcc-claim-x { margin: 9px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-3); }
.mvcc-cites { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }

@media (max-width: 680px) {
  .mvcc-score { flex-direction: column; text-align: center; gap: 16px; }
  .mvcc-guide { max-width: none; }
  .mvcc-claim-top { flex-wrap: wrap; }
}
