/* Metric Vault — Domain mode for Keyword Strategy (js/mv-domainkw.js).
 *
 * Two surfaces: a live progress panel while the site is being read, and the
 * opportunity dashboard it becomes.
 *
 * Tokens only, radius from the scale. --mvr-* are scoped to .mvr result shells,
 * so each use falls back to a canonical token from tokens.css.
 */

/* ----------------------------------------------------------- mode toggle */

.mvdk-modes {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--mvr-surface, var(--panel));
  border: 1px solid var(--mvr-line, var(--hairline));
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}
.mvdk-mode {
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.mvdk-mode:hover { color: var(--text); }
.mvdk-mode.is-on {
  background: var(--purple);
  color: #fff;
}
.mvdk-modehint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}

/* -------------------------------------------------------------- progress */

.mvdk-prog {
  background: var(--mvr-surface, var(--panel));
  border: 1px solid var(--mvr-line, var(--hairline));
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.mvdk-prog-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mvdk-prog-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--mvr-line, var(--hairline));
  color: var(--purple);
}
.mvdk-prog-ic svg { width: 17px; height: 17px; }
.mvdk-prog-t {
  font-family: 'Inter Tight', Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.mvdk-prog-s {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.mvdk-prog-pct {
  margin-left: auto;
  font-size: 20px;
  font-weight: 800;
  color: var(--purple);
  font-variant-numeric: tabular-nums;
}

.mvdk-bar {
  display: block;
  height: 6px;
  margin: 14px 0 4px;
  background: var(--mvr-line, var(--hairline));
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.mvdk-bar-fill {
  display: block;
  height: 100%;
  background: var(--purple);
  border-radius: var(--radius-pill);
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.mvdk-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.mvdk-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-3);
  transition: color .2s;
}
.mvdk-step-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.mvdk-step-ic svg { width: 15px; height: 15px; }
/* Its own spinner rather than .mvr-spin: that one draws its ring from
   --mvr-line, which is defined only on .mvr result shells, so outside one the
   border-color is invalid and the whole spinner renders as nothing. The live
   step showed no icon at all. */
.mvdk-spin {
  width: 14px;
  height: 14px;
  border: 2px solid var(--mvr-line, var(--hairline));
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: mvdkSpin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes mvdkSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .mvdk-spin { animation-duration: 2.4s; }
  .mvdk-bar-fill { transition: none; }
}

.mvdk-step.is-done { color: var(--text-2); }
.mvdk-step.is-done .mvdk-step-ic { color: var(--green); }
.mvdk-step.is-live { color: var(--text); font-weight: 600; }
.mvdk-step.is-wait .mvdk-step-ic { opacity: .35; }
.mvdk-step-n {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------- results */

.mvdk-wrap { display: block; }
.mvdk-card {
  background: var(--mvr-surface, var(--panel));
  border: 1px solid var(--mvr-line, var(--hairline));
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-top: 14px;
}
.mvdk-note {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
}

.mvdk-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.mvdk-kpi {
  background: var(--mvr-surface, var(--panel));
  border: 1px solid var(--mvr-line, var(--hairline));
  border-radius: var(--radius);
  padding: 14px 16px;
}
.mvdk-kpi-v {
  font-family: 'Inter Tight', Inter, sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.mvdk-kpi-v.good { color: var(--green); }
.mvdk-kpi-l {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mvdk-kpi-s {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .mvdk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.mvdk-sum {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.mvdk-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 12px 0;
  border-top: 1px solid var(--mvr-line, var(--hairline));
  border-bottom: 1px solid var(--mvr-line, var(--hairline));
}
.mvdk-fact { display: flex; flex-direction: column; gap: 2px; }
.mvdk-fact span {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mvdk-fact strong { font-size: 13.5px; font-weight: 700; color: var(--text); }

.mvdk-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.mvdk-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}
.mvdk-chip.is-have { color: var(--text-3); border-style: dashed; }

/* ---------------------------------------------------------- opportunities */

.mvdk-tablewrap { overflow-x: auto; }
.mvdk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mvdk-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--mvr-line, var(--hairline));
  white-space: nowrap;
}
.mvdk-table td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--mvr-line, var(--hairline));
  vertical-align: top;
}
.mvdk-kw { font-weight: 600; color: var(--text); }
.mvdk-num { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.mvdk-intent {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--mvr-surface, var(--panel));
  border: 1px solid var(--mvr-line, var(--hairline));
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  text-transform: capitalize;
}
.mvdk-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}
.mvdk-score.is-good { color: var(--green); background: rgba(20, 184, 127, 0.14); }
.mvdk-score.is-warn { color: var(--gold); background: rgba(230, 179, 71, 0.16); }
.mvdk-score.is-neutral { color: var(--text-3); background: rgba(135, 123, 168, 0.15); }

.mvdk-place { min-width: 210px; }
.mvdk-place-t {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--text);
  flex-wrap: wrap;
}
.mvdk-url {
  display: inline-block;
  margin-top: 5px;
  font-family: var(--cc-mono, ui-monospace, monospace);
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--mvr-surface, var(--panel));
  border: 1px solid var(--mvr-line, var(--hairline));
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.mvdk-act { margin-top: 5px; font-size: 11.5px; color: var(--muted); }
/* The fallback reads as a different KIND of answer, not a quieter version of
   the same one: this keyword has no home yet. */
.mvdk-act.is-new { color: var(--purple-bright); font-weight: 600; }
/* The page we found, named. This is the thing the column exists to say. */
.mvdk-place-pg {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Why that page, and where the keyword goes on it. Wrapped rather than
   truncated: a reason cut off mid-sentence is not a reason. */
.mvdk-place-why {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 300px;
}
.mvdk-place-slots {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-3);
}

.mvdk-err { display: flex; align-items: flex-start; gap: 11px; }
.mvdk-err > svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; color: var(--gold); }
.mvdk-err-t {
  font-family: 'Inter Tight', Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* Defeat the legacy result reset (.mvx * { margin:0; padding:0 }) — same fix
   and same reason as css/rec-panel.css, css/placement.css and css/sitekw.css. */
.mvx .mvdk-prog { padding: 18px 20px; }
.mvx .mvdk-card { padding: 18px 20px; margin-top: 14px; }
.mvx .mvdk-kpi { padding: 14px 16px; }
.mvx .mvdk-steps { margin: 12px 0 0; padding: 0; }
.mvx .mvdk-step { padding: 7px 0; }
.mvx .mvdk-bar { margin: 14px 0 4px; }
.mvx .mvdk-note { margin: 0 0 12px; }
.mvx .mvdk-sum { margin: 0 0 12px; }
.mvx .mvdk-facts { padding: 12px 0; }
.mvx .mvdk-chips { margin-top: 12px; }
.mvx .mvdk-chip { padding: 5px 12px; }
.mvx .mvdk-modes { padding: 4px; margin-bottom: 10px; }
.mvx .mvdk-mode { padding: 7px 16px; }
.mvx .mvdk-table th { padding: 9px 12px 9px 0; }
.mvx .mvdk-table td { padding: 11px 12px 11px 0; }
.mvx .mvdk-url { padding: 2px 7px; margin-top: 5px; }
.mvx .mvdk-intent { padding: 2px 9px; }
.mvx .mvdk-score { padding: 3px 8px; }
/* The matched and missing words. Data, so it is monospaced like the URL and
   carries translate="no" in the markup. */
.mvdk-place-words {
  margin-top: 4px;
  font-family: var(--cc-mono, ui-monospace, monospace);
  font-size: 11px;
  color: var(--text-3);
  max-width: 300px;
}
