/* panel-verify.css: the citation states under an answer (D49, panel-verify.js).

   ITS OWN MARK. Each state is a shape, not a colour, so it reads in both
   themes and in grey: a filled disc (verified), a half disc (wording
   differs), a crossed ring (not found), a broken ring (couldn't open) and a
   dotted ring (unchecked). Severity is carried as the design system carries
   it, in ground and spine (panel-cards.js): NOT FOUND alone takes a spine and
   a stronger ground; the accent (--rim) is the citation colour already. */

.px-qv { margin: 2px 0 6px; font-size: var(--fs-sm); color: var(--t-meta); }
.px-qv:empty { display: none; }

.px-qv-line { display: flex; align-items: baseline; gap: 7px; min-height: 22px; }
.px-qv-mark {
  flex: none; align-self: center; width: 13px; height: 11px; position: relative;
}
/* The strip's own seal: a tick over a short rule, a checked line in a ledger.
   No box, so it never reads as a checkbox to tick. */
.px-qv-mark::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rim); opacity: .55;
}
.px-qv-mark::after {
  content: ""; position: absolute; left: 4px; top: 0; width: 3px; height: 7px;
  border: solid var(--rim); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
/* Not checked yet: the rule without the tick, so it never reads as checked. */
.px-qv-mark.is-idle::after { display: none; }
.px-qv-mark.is-busy::after { animation: px-qv-blink 1.2s ease-in-out infinite; }
@keyframes px-qv-blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .px-qv-mark.is-busy::after { animation: none; } }

.px-qv-summary { flex: 0 1 auto; min-width: 0; color: var(--t-secondary); font-variant-numeric: tabular-nums; }
.px-qv-note { color: var(--t-faint); }
/* The panel's .px-btn, at the strip's size: a quiet word after the counts. */
.px-qv-check.px-btn { flex: none; align-self: center; height: 20px; padding: 0 9px; margin-left: auto; letter-spacing: .12em; }

.px-qv-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.px-qv-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  height: 20px; padding: 0 7px 0 5px; border: 1px solid var(--hair); border-radius: var(--r-ctl);
  background: transparent; color: var(--t-meta); font: inherit; font-size: var(--fs-xs); cursor: pointer;
  transition: color var(--dur-2) ease, background-color var(--dur-2) ease, border-color var(--dur-2) ease;
}
.px-qv-chip:hover, .px-qv-chip[aria-expanded="true"] { color: var(--t-primary); background: var(--hair); }
.px-qv-chip:focus-visible { outline: 1px solid var(--rim); outline-offset: 1px; }
.px-qv-chip[data-state="not_found"] { color: var(--t-primary); border-color: rgba(var(--danger-rgb), .45); box-shadow: inset 2px 0 0 rgba(var(--danger-rgb), .7); }
.px-qv-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }
.px-qv-word { color: var(--t-faint); white-space: nowrap; }
.px-qv-chip[data-state="not_found"] .px-qv-word { color: inherit; }

/* The five shapes. */
.px-qv-g { flex: none; width: 9px; height: 9px; border-radius: 50%; box-sizing: border-box; position: relative; }
.px-qv-g-verified { background: var(--rim); }
.px-qv-g-wording { border: 1px solid var(--rim); background: linear-gradient(90deg, var(--rim) 50%, transparent 50%); }
.px-qv-g-notfound { border: 1.5px solid rgb(var(--danger-rgb)); }
.px-qv-g-notfound::after {
  content: ""; position: absolute; left: 50%; top: -1px; width: 1.5px; height: 9px; margin-left: -.75px;
  background: rgb(var(--danger-rgb)); transform: rotate(45deg);
}
.px-qv-g-unopened { border: 1.5px dashed var(--t-meta); }
.px-qv-g-unchecked { border: 1.5px dotted var(--t-faint); }

/* The located passage, opened from a chip. */
.px-qv-detail {
  margin-top: 6px; padding: 8px 10px; border-radius: var(--r-ctl);
  border: 1px solid var(--hair); background: rgba(var(--bone-rgb), .03);
}
.px-qv-detail[data-state="not_found"] { box-shadow: inset 2px 0 0 rgba(var(--danger-rgb), .7); }
.px-qv-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.px-qv-state { color: var(--t-primary); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-xs); }
.px-qv-reason { color: var(--t-meta); }
.px-qv-k { margin-top: 6px; color: var(--t-faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; }
.px-qv-claim { margin-top: 2px; color: var(--t-secondary); line-height: 1.45; }
.px-qv-passage {
  margin: 3px 0 0; padding: 0 0 0 9px; border-left: 2px solid var(--rim);
  color: var(--t-primary); line-height: 1.5; font-style: normal;
}
.px-qv-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.px-qv-open { color: var(--rim); text-decoration: none; }
.px-qv-open:hover { text-decoration: underline; }
.px-qv-via { color: var(--t-faint); }

/* ---- inside the answer (panel-cite.js) ----------------------------------------

   A SOURCE BUBBLE: a link that names a source is a small pill with the site's
   favicon, not underlined words run into the sentence. Found by more than its
   colour (the ground and the rim), as WCAG 1.4.1 asks (audit F-016). */
.chat-bubble.assistant .chat-prose a.px-srcpill,
.chat-bubble.assistant :is(p, li, td, blockquote) > a.px-srcpill {
  display: inline-flex; align-items: center; gap: 4px; max-width: 18ch; height: 19px;
  margin: 0 1px; padding: 0 7px 0 4px; vertical-align: middle; box-sizing: border-box;
  border: 1px solid var(--hair); border-radius: var(--r-pill); background: var(--s-inter);
  color: var(--t-secondary); font: 400 var(--fs-md)/1 var(--sans); white-space: nowrap;
  text-decoration: none; transition: background-color var(--dur-2) ease, color var(--dur-2) ease;
}
.chat-bubble.assistant .chat-prose a.px-srcpill:hover,
.chat-bubble.assistant .chat-prose a.px-srcpill:focus-visible { color: var(--t-primary); background: rgba(var(--rim-rgb), .18); text-decoration: none; }
.chat-bubble.assistant .chat-prose a.px-srcpill:focus-visible { outline: 1px solid var(--rim); outline-offset: 1px; }
/* A bubble moved to the end of the sentence its link was written into. */
.chat-bubble.assistant .chat-prose a.px-srcpill.is-after { margin-left: 4px; }
.px-srcpill-ico { flex: none; display: inline-flex; width: 12px; height: 12px; border-radius: var(--r-xs); overflow: hidden; }
.px-srcpill-ico img { width: 12px; height: 12px; display: block; }
/* No favicon (offline, or the site has none): the host's first letter. */
.px-srcpill-ico.is-letter { align-items: center; justify-content: center; background: rgba(var(--rim-rgb), .25);
  color: var(--t-primary); font: 600 var(--fs-3xs)/1 var(--sans); text-transform: uppercase; }
.px-srcpill-ico.is-letter::before { content: attr(data-letter); }
.px-srcpill-label { overflow: hidden; text-overflow: ellipsis; line-height: 1; }

/* THE CITED SENTENCE: underlined, in the style of its state once checked. */
.px-claim {
  text-decoration-line: underline; text-decoration-style: dotted; text-decoration-thickness: 1px;
  text-decoration-color: rgba(var(--rim-rgb), .45); text-underline-offset: 4px;
  border-radius: var(--r-xs); cursor: default; transition: background-color var(--dur-2) ease;
}
.px-claim.is-hot { background: rgba(var(--rim-rgb), .12); }
.px-claim[data-state="verified"] { text-decoration-style: solid; text-decoration-color: rgba(var(--rim-rgb), .7); }
.px-claim[data-state="wording_differs"] { text-decoration-style: dashed; text-decoration-color: rgba(var(--rim-rgb), .7); }
.px-claim[data-state="not_found"] { text-decoration-style: wavy; text-decoration-color: rgba(var(--danger-rgb), .8); }
.px-claim[data-state="couldnt_open"], .px-claim[data-state="unchecked"] { text-decoration-color: rgba(var(--bone-rgb), .35); }

/* The card: the source, and what the check found. */
.px-claimcard {
  position: fixed; z-index: var(--z-popover); display: none; box-sizing: border-box;
  padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-ctl);
  background: linear-gradient(var(--s-card), var(--s-card)), var(--ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35); color: var(--t-secondary);
  font: 400 var(--fs-base)/1.45 var(--sans);
}
.px-claimcard.is-open { display: block; }
.px-cp-item + .px-cp-item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair); }
.px-cp-src { display: flex; align-items: center; gap: 6px; color: var(--t-meta); font-size: var(--fs-xs); }
.px-cp-title { margin-top: 4px; color: var(--t-primary); font-weight: 600; }
.px-cp-snip { margin-top: 3px; color: var(--t-meta); }
.px-cp-state { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.px-cp-state .px-qv-g { align-self: center; }
.px-cp-word { color: var(--t-primary); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-xs); }
.px-cp-reason { color: var(--t-meta); }
.px-cp-none { color: var(--t-faint); }
.px-cp-passage { margin: 5px 0 0; padding: 0 0 0 9px; border-left: 2px solid var(--rim); color: var(--t-primary); font-style: normal; }
.px-cp-state[data-state="not_found"] + .px-cp-passage { border-left-color: rgb(var(--danger-rgb)); }
.px-cp-open { display: inline-block; margin-top: 8px; color: var(--rim); text-decoration: none; font-size: var(--fs-xs); }
.px-cp-open:hover { text-decoration: underline; }
