/* ==========================================================================
   coverage-model.css
   HomeCV Coverage card — COMMITTED model (count-only, index-card trio).

   Replaces the retired 0–100 "ladder" AND the earlier rings / bars / strip
   exploration variants. ONE card now, always visible.

   Model (see CLAUDE.md):
     • Headline  — ONE gated count = Basic + Core + Advanced items organized.
     • Readings  — Basic / Core / Advanced as PLAIN COUNTS (no denominators).
     • Features  — a SEPARATE count of tangible things the home has
                   (present/absent). Never folded into the headline.
     • Disclosure Readiness — a preparation status (3 states), excluded.
   No denominators, no "out of", no %, no progress bar with a target,
   no score / grade / quality rating / "verified" language.

   Depends on dashboard tokens: --brown*, --accent, --gold, --success,
   --surface*, --line, --line-strong, --radius*, --serif, --sans.
   ========================================================================== */

:root {
  /* Cluster accents — NEUTRAL hues for wayfinding only, NOT a good→better
     ramp. Toggled on/off by the "Tint the readings" tweak (data-meter-tint). */
  --c-basic: #7b6f5b;     /* stone  */
  --c-core: #175f64;      /* teal   */
  --c-advanced: #b3884a;  /* gold   */
}

/* ─── Card shell ─────────────────────────────────────────────────────────
   NOTE: no overflow:hidden — the ⓘ / kebab popovers must escape the box. */
.cv2-card {
  position: relative;
  min-height: 100%;
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(184,138,74,0.025) 0%, rgba(184,138,74,0) 46%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 8px);
  padding: 16px 20px 18px;
}
.cv2-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-basic) 0%, var(--c-core) 52%, var(--c-advanced) 100%);
  border-radius: var(--radius-lg, 8px) var(--radius-lg, 8px) 0 0;
  opacity: 0.92; z-index: 2;
}

/* identity eyebrow (.hcv-id-line) keeps its dashboard styles */

/* ─── Header: title + ⓘ, kebab → Present ─────────────────────────────── */
.cv2-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.cv2-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brown-2); font-weight: 600;
}
.cv2-tag > i { font-size: 14px; color: var(--accent); }
.cv2-tag .hcv-disclaim-pop,
.cv2-tag .hcv-disclaim-pop * { text-transform: none; letter-spacing: normal; }
.cv2-tag .hcv-disclaim-pop .hdp-eyebrow { letter-spacing: 0.2em; text-transform: uppercase; }
.cv2-tag .hcv-disclaim-trigger { font-weight: 400; color: var(--brown-4); }
.cv2-tag .hcv-disclaim-trigger:hover { color: var(--accent); }

/* kebab menu — native <details>, no JS */
.cv2-menu { position: relative; }
.cv2-menu > summary { list-style: none; cursor: pointer; }
.cv2-menu > summary::-webkit-details-marker { display: none; }
.cv2-menu-btn {
  width: 28px; height: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg);
  color: var(--brown-3);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .14s ease, color .14s ease;
}
.cv2-menu[open] .cv2-menu-btn,
.cv2-menu-btn:hover { border-color: var(--accent); color: var(--accent); }
.cv2-menu-btn i { font-size: 16px; }
.cv2-menu-pop {
  position: absolute; top: 34px; right: 0; width: 168px; z-index: 30;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 5px;
  box-shadow: 0 14px 30px -10px rgba(36,30,22,0.4);
}
.cv2-menu-pop a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 4px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  color: var(--brown); text-decoration: none;
}
.cv2-menu-pop a:hover { background: var(--surface-2); }
.cv2-menu-pop a i { font-size: 15px; color: var(--accent); }

/* ─── Headline — ONE gated count, shown in a green count seal ─────────── */
.cv2-hl { display: flex; align-items: center; gap: 14px; }
.cv2-hl-badge {
  width: 82px; height: 82px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 36%, #237b80 0%, #175f64 70%, #073539 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 5px 16px -7px rgba(23,95,100,0.55);
}
.cv2-hl-num {
  font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1;
  color: #f5f2e7; letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}
.cv2-hl-lab {
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  color: var(--brown-3); letter-spacing: 0.02em;
}

/* ─── Headline count — selectable mark variants (Tweaks) ──────────────
   The default solid green ball is replaced by one of four lighter marks.
   Switch via [data-hl-variant] on .cv2-hl. Default = "editorial".      */

/* A · Editorial — no container; an oversized numeral set off by a rule */
.cv2-hl[data-hl-variant="editorial"] { gap: 0; }
.cv2-hl[data-hl-variant="editorial"] .cv2-hl-badge {
  width: auto; height: auto; background: none; box-shadow: none; border-radius: 0;
}
.cv2-hl[data-hl-variant="editorial"] .cv2-hl-num {
  font-size: 60px; color: var(--accent); line-height: 0.9;
}
.cv2-hl[data-hl-variant="editorial"] .cv2-hl-lab {
  align-self: center; margin-left: 16px; padding-left: 16px;
  border-left: 1px solid var(--line-strong);
  max-width: 6.5em; font-size: 13px; color: var(--brown-2);
}

/* B · Stamp — passport rubber-stamp: thin double ring, open center */
.cv2-hl[data-hl-variant="stamp"] .cv2-hl-badge {
  background: none;
  border: 1.5px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4.5px var(--accent);
}
.cv2-hl[data-hl-variant="stamp"] .cv2-hl-num { color: var(--accent); }

/* C · Plate — engraved nameplate (rounded rect, gold hairline) */
.cv2-hl[data-hl-variant="plate"] .cv2-hl-badge {
  width: auto; height: 72px; min-width: 92px; padding: 0 22px; border-radius: 12px;
  background: linear-gradient(180deg, #237b80 0%, #175f64 100%);
  box-shadow: inset 0 0 0 1px rgba(179,136,74,0.55),
              inset 0 1px 0 rgba(255,255,255,0.12),
              0 6px 16px -8px rgba(23,95,100,0.55);
}

/* D · Seal — ivory disc with a fine gold ring (inverse of the solid ball) */
.cv2-hl[data-hl-variant="seal"] .cv2-hl-badge {
  background: radial-gradient(circle at 50% 38%, #fbfaf4 0%, #f1ede0 100%);
  box-shadow: inset 0 0 0 1.5px var(--gold),
              inset 0 1px 0 rgba(255,255,255,0.85),
              0 4px 14px -8px rgba(36,30,22,0.40);
}
.cv2-hl[data-hl-variant="seal"] .cv2-hl-num { color: var(--accent); }

/* ─── Three readings — index-card trio (plain counts) ────────────────── */
.cv2-readings {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
  margin-top: 16px;
}
.cv2-ic {
  position: relative;
  border: 1px solid var(--line); background: var(--bg);
  border-radius: 5px; padding: 12px 11px 11px;
}
.cv2-ic::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 5px 0 0 5px;
  background: var(--brown-4);  /* neutral; tinted when meter-tint is on */
}
.cv2-ic-n {
  display: block;
  font-family: var(--serif); font-weight: 600; font-size: 33px; line-height: 1;
  color: var(--brown); font-variant-numeric: tabular-nums;
}
.cv2-ic-nm {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  color: var(--brown-2); margin-top: 7px;
}
.cv2-ic-ds {
  display: block;
  font-family: var(--sans); font-size: 10px; color: var(--brown-4);
  line-height: 1.3; margin-top: 2px; text-wrap: pretty;
}

/* ─── Features — SEPARATE count, deliberately a different kind of thing ── */
.cv2-feat {
  margin-top: 14px;
  border: 1px solid var(--line); background: var(--bg);
  border-radius: 5px; padding: 11px 12px;
}
.cv2-feat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 9px;
}
.cv2-feat-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brown-4); font-weight: 600;
}
.cv2-feat-label > i { font-size: 12px; color: var(--gold); }
.cv2-feat-label .hcv-disclaim-pop,
.cv2-feat-label .hcv-disclaim-pop * { text-transform: none; letter-spacing: normal; }
.cv2-feat-count {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  color: var(--brown); line-height: 1; font-variant-numeric: tabular-nums;
}
.cv2-feat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv2-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  color: var(--brown-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  white-space: nowrap;
}
.cv2-chip i { font-size: 12px; color: var(--gold); }

/* ─── Disclosure Readiness — anchored to the card foot ────────────────── */
.cv2-disc {
  margin-top: auto; padding-top: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line);
}
.cv2-disc-label {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500; color: var(--brown-3);
}
.cv2-disc-label .hcv-disclaim-pop,
.cv2-disc-label .hcv-disclaim-pop * { text-transform: none; letter-spacing: normal; }
.cv2-disc-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  padding: 4px 11px; border-radius: 100px; white-space: nowrap;
}
.cv2-disc-state i { font-size: 13px; }
.cv2-disc-state.is-notstarted { color: var(--brown-4); background: rgba(123,111,91,0.13); }
.cv2-disc-state.is-progress   { color: #8a6630; background: rgba(184,138,74,0.17); border: 1px solid rgba(184,138,74,0.28); }
.cv2-disc-state.is-complete   { color: var(--success); background: rgba(93,122,61,0.15); }

/* ─── Tint toggle (data-meter-tint) — wayfinding hues on the spines ─────
   ON by default (the committed look). OFF = monochrome neutral spines. */
html[data-meter-tint="on"] .cv2-ic.is-basic::before    { background: var(--c-basic); }
html[data-meter-tint="on"] .cv2-ic.is-core::before     { background: var(--c-core); }
html[data-meter-tint="on"] .cv2-ic.is-advanced::before { background: var(--c-advanced); }

/* ─── Per-cluster ⓘ tooltip (reuses .hcv-disclaim hover popover) ───────── */
.cov-cluster-info { margin-left: 5px; }
.cov-cluster-info .hcv-disclaim-trigger { width: 14px; height: 14px; color: var(--brown-4); }
.cov-cluster-info .hcv-disclaim-trigger:hover { color: var(--accent); }
.cov-cluster-info .hcv-disclaim-trigger i { font-size: 12.5px; }
.cov-cluster-info .hcv-disclaim-pop { width: 224px; }
.cov-cluster-info .hcv-disclaim-pop,
.cov-cluster-info .hcv-disclaim-pop * { text-transform: none; letter-spacing: normal; font-weight: 400; }
.cov-cluster-info .hcv-disclaim-pop .hdp-eyebrow { letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
/* Rightmost (Advanced) cluster: right-anchor its popup so it stays on-card. */
.cov-cluster-info--right .hcv-disclaim-pop { left: auto; right: -4px; transform: translateX(0) translateY(2px); }
.cov-cluster-info--right:hover .hcv-disclaim-pop,
.cov-cluster-info--right:focus-within .hcv-disclaim-pop,
.cov-cluster-info--right .hcv-disclaim-trigger:focus + .hcv-disclaim-pop { transform: translateX(0) translateY(0); }
.cov-cluster-info--right .hcv-disclaim-pop::before { left: auto; right: 8px; }

/* ─── Responsive — match the dashboard's compact hero treatment ───────── */
@media (max-width: 1100px) {
  .cv2-card { padding: 14px 16px; }
  .cv2-hl-badge { width: 72px; height: 72px; }
  .cv2-hl-num { font-size: 35px; }
  .cv2-ic-n { font-size: 29px; }
}
@media (max-width: 760px) {
  .cv2-readings { gap: 6px; }
  .cv2-ic { padding: 10px 9px; }
}
