/* ============================================================================
   ALTERVIEW — the EVIDENCE CHIP system  (signature component / the brand)

   A claim carries exactly ONE evidence level. The seal is a "moon-phase":
   fill = how much receipt exists; COLOUR = whether it is verified.
     ✔ issuer-verified     full green seal + check   (verified family)
     ● third-party corrob.  full green seal           (verified family)
     ◐ artifact-backed      half-filled ink seal      (neutral — has basis)
     ◦ identity-linked      ink ring + node           (neutral — linked)
     ○ self-attested        open muted ring           (neutral — asserted)
     ⚠ inconsistent         AMBER TRIANGLE + !        (flag — the only amber)
     — unresolved           faint dashed ring / dash  ("no receipt — ask live")
   Chips are quiet by default (colour lives in the seal, not a candy wash) so a
   claims table stays calm. Only ⚠ inconsistent carries a persistent amber wash.
   Tap a chip → it expands to the underlying source excerpt.
   ============================================================================ */

.alterview .ev-chip{
  --c:  var(--muted);      /* mark colour */
  --ci: var(--muted);      /* label colour */
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-weight: 600; font-size: 12.5px; line-height: 1;
  color: var(--ci);
  padding: 4px 9px 4px 6px; border-radius: 999px;
  border: 1px solid transparent; background: transparent;
  white-space: nowrap; cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
.alterview .ev-chip:hover{ background: var(--paper-2); border-color: var(--border-soft); }

/* -- the seal -- */
.alterview .ev-seal{
  width: 15px; height: 15px; flex: 0 0 auto; position: relative;
  border-radius: 999px; border: 1.5px solid var(--c); background: transparent;
}
.alterview .ev-seal::after{ content: ""; position: absolute; inset: 0; }

/* families ------------------------------------------------------------------ */
/* ✔ issuer-verified — full green seal + white check */
.alterview .ev-issuer{ --c: var(--verified); --ci: var(--verified-ink); }
.alterview .ev-issuer .ev-seal{ background: var(--verified-mark); border-color: var(--verified-mark); }
.alterview .ev-issuer .ev-seal::after{
  background: none;
  /* white check drawn with two borders */
  width: 4px; height: 8px; inset: auto; left: 5px; top: 2.5px;
  border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(43deg);
  border-radius: 0;
}

/* ● third-party corroborated — full green seal (solid) */
.alterview .ev-corrob{ --c: var(--verified); --ci: var(--verified-ink); }
.alterview .ev-corrob .ev-seal{ background: var(--verified-mark); border-color: var(--verified-mark); }

/* ◐ artifact-backed — half-filled ink seal (the "half moon") */
.alterview .ev-artifact{ --c: var(--ink); --ci: var(--ink-2); }
.alterview .ev-artifact .ev-seal::after{
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
  border-radius: 999px;
}

/* ◦ identity-linked — ink ring with a small centre node */
.alterview .ev-identity{ --c: var(--muted); --ci: var(--ink-2); }
.alterview .ev-identity .ev-seal{ border-color: var(--ink-2); }
.alterview .ev-identity .ev-seal::after{
  width: 5px; height: 5px; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: var(--ink-2); border-radius: 999px;
}

/* ○ self-attested — open muted ring */
.alterview .ev-self{ --c: var(--faint); --ci: var(--muted); }
.alterview .ev-self .ev-seal{ border-color: var(--faint); }

/* ⚠ inconsistent — amber TRIANGLE + ! (the one flag; persistent amber wash) */
.alterview .ev-incons{ --c: var(--amber); --ci: var(--amber-ink);
  background: var(--amber-wash); border-color: var(--amber-line); }
.alterview .ev-incons:hover{ background: var(--amber-wash); border-color: var(--amber); }
.alterview .ev-incons .ev-seal{
  border: 0; border-radius: 2px; background: var(--amber);
  clip-path: polygon(50% 6%, 96% 92%, 4% 92%);
}
.alterview .ev-incons .ev-seal::after{
  content: "!"; color: #fff; font-size: 9px; font-weight: 800; font-family: var(--sans);
  display: grid; place-items: center; inset: 1px 0 0 0; line-height: 1;
}

/* — unresolved — faint dashed ring ("no receipt yet") */
.alterview .ev-unres{ --c: var(--faint); --ci: var(--muted); }
.alterview .ev-unres .ev-seal{ border-style: dashed; border-color: var(--faint); }

/* count suffix e.g. "· 2 sources" ---------------------------------------- */
.alterview .ev-chip .ev-count{ color: var(--faint); font-weight: 500; font-size: 11.5px; }

/* ---------------------------------------------------------------------------
   EXPANDED chip — the source excerpt revealed on tap
   --------------------------------------------------------------------------- */
.alterview .ev-source{
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--sh-1);
  padding: 12px 14px; max-width: 420px;
}
.alterview .ev-source .ev-src-head{
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 12px; font-weight: 600; color: var(--ci, var(--ink-2));
}
.alterview .ev-source .ev-src-head .ev-src-name{ color: var(--ink); }
.alterview .ev-source .ev-src-head .ev-src-date{ color: var(--faint); font-weight: 500; margin-left: auto; }
.alterview .ev-source blockquote{
  margin: 0; padding: 8px 0 8px 12px; border-left: 2px solid var(--border-strong);
  font-family: var(--serif); font-style: italic; font-size: 14px; line-height: 1.5;
  color: var(--ink-2);
}
.alterview .ev-source .ev-src-foot{
  margin-top: 9px; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--muted);
}
.alterview .ev-source .ev-src-foot a{ color: var(--verified-ink); text-decoration: none; font-weight: 600; }

/* ---------------------------------------------------------------------------
   THE "NO RECEIPT" state — first-class: "not in my materials — ask me live"
   --------------------------------------------------------------------------- */
.alterview .no-receipt{
  border: 1px dashed var(--border-strong); border-radius: var(--r);
  background: var(--paper-2); padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 11px;
}
.alterview .no-receipt .nr-seal{
  width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto;
  border: 1.5px dashed var(--faint); border-radius: 999px;
}
.alterview .no-receipt .nr-body{ flex: 1; }
.alterview .no-receipt .nr-title{ font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.alterview .no-receipt .nr-say{ font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.alterview .no-receipt .nr-add{
  margin-top: 9px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong);
  padding: 6px 11px; border-radius: var(--r-sm); cursor: pointer;
}
.alterview .no-receipt .nr-add:hover{ background: var(--paper-3); }
.alterview .no-receipt .nr-add .plus{ color: var(--verified); font-weight: 800; }

/* ---------------------------------------------------------------------------
   Evidence LEGEND row (used in packs / footer) — the ladder at a glance
   --------------------------------------------------------------------------- */
.alterview .ev-legend{ display: flex; flex-wrap: wrap; gap: 6px 16px; }
.alterview .ev-legend .ev-chip{ cursor: default; }
.alterview .ev-legend .ev-chip:hover{ background: transparent; border-color: transparent; }
.alterview .ev-incons.ev-legend-item,
.alterview .ev-legend .ev-incons{ background: transparent; border-color: transparent; }
