/* The rating view (src/shared/components/rating.js). One stylesheet for the
   panel, the share page and the site's samples; it reads only design-system
   tokens. It reads like a well-set brief (DESIGN.md, plan D32): hairlines over
   boxes, one accent, the display face for a lead line alone, pills for every
   state, quotes on a teal rule, and numbers that don't jitter. What the account
   usually posts about is drawn as flat teal bars on one year scale; each
   finding's posts sit as dots on that scale, keyed to their quotes. */

/* One definite column. Every component below sizes itself to it with
   container queries: the panel is resizable, and the same rating is set on a
   share page and on the site. */
.rv-rating {
  color: var(--tc-body);
  container-type: inline-size;
  display: grid;
  font-size: var(--tc-text-base);
  gap: var(--tc-space-5);
  grid-template-columns: minmax(0, 1fr);
  line-height: var(--tc-leading-normal);
}

/* Readings set on their own (a fact's value, the years under the topic
   bars): lining tabular figures. Repeated here because the share page and the
   site load only this sheet. */
.tc-tnum,
.rv-axis text {
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Zero specificity: a name that truncates or a lead line that balances keeps
   its own wrapping. */
:where(.rv-rating p, .rv-post-text, .rv-fact dd) {
  text-wrap: pretty;
}

/* Labels speak in the sans, even on heading elements. */
.rv-label,
.rv-evidence-label,
.rv-check-name {
  font-family: var(--tc-font-sans);
}

/* Text that comes from the account — quotes, statements, names — may break
   anywhere it must: a long URL or an unbroken token would otherwise widen the
   column and push the rating sideways out of a narrow panel. The product's own
   labels and pills keep whole words. */
.rv-summary,
.rv-statement,
.rv-post,
.rv-fact dd {
  overflow-wrap: anywhere;
}

/* A topic name breaks between words, and inside one only when it must. */
.rv-lane-name {
  overflow-wrap: break-word;
}

/* ---------- the account ---------- */
.rv-identity {
  align-items: center;
  display: flex;
  gap: var(--tc-space-3);
  min-width: 0;
}

.rv-avatar {
  border-radius: var(--tc-radius-pill);
  flex: none;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.rv-avatar--initials {
  align-items: center;
  background: var(--tc-primary-soft);
  color: var(--tc-primary-dark);
  display: inline-flex;
  font-weight: var(--tc-weight-strong);
  justify-content: center;
}

.rv-identity-text { min-width: 0; }

/* The name says who the account is, so it is never cut: a long one wraps,
   between words where it can. */
.rv-name {
  color: var(--tc-ink);
  font-size: var(--tc-text-md);
  font-weight: var(--tc-weight-ui);
  margin: 0;
  overflow-wrap: anywhere;
}

.rv-meta {
  color: var(--tc-muted);
  font-size: var(--tc-text-sm);
  margin: 2px 0 0;
}

/* Links inside a rating carry the action colour and no underline, here as on
   every surface: the share page and the site load this sheet without the
   extension's base link rule. */
.rv-handle,
.rv-post-meta a,
.rv-statement a,
.rv-track-credit a {
  color: var(--tc-primary-dark);
  text-decoration: none;
  transition: color var(--tc-duration-fast) var(--tc-ease-out);
}

/* The handle stands on its own line, not inside a sentence, so it is a 24px
   target (WCAG 2.5.8); the negative margin gives back what that adds to its
   line, so the identity keeps its rhythm. */
.rv-handle { align-items: center; display: inline-flex; margin-block: calc((1lh - var(--tc-space-6)) / 2); min-block-size: 24px; }

/* A lead line: the display face, light, the one editorial voice in a rating. */
.rv-summary {
  color: var(--tc-ink);
  font-family: var(--tc-font-display);
  font-size: var(--tc-text-lg);
  font-weight: var(--tc-weight-display);
  letter-spacing: var(--tc-tracking-display);
  line-height: var(--tc-leading-snug);
  margin: 0;
  text-wrap: balance;
}

/* What was read and when: honest scope, quietly. */
.rv-coverage {
  color: var(--tc-muted);
  font-size: var(--tc-text-sm);
  margin: 0;
}

/* Any concern, named under the scope in the hover's words (plan area 15.1).
   The word carries it, in ink; the polarity colour is the icon's alone. */
.rv-polarity-summary {
  align-items: flex-start;
  color: var(--tc-ink);
  display: flex;
  font-size: var(--tc-text-base);
  font-weight: var(--tc-weight-ui);
  gap: var(--tc-space-icon);
  line-height: 1.4;
  margin: var(--tc-space-1) 0 0;
}

/* Set as the coverage's sibling (the share and owner pages), it reads with
   the scope, not as a section of its own. */
.rv-rating > .rv-coverage + .rv-polarity-summary {
  margin-block-start: calc(var(--tc-space-4) * -1);
}

.rv-polarity-summary .rv-polarity-icon {
  --rv-polarity-ink: var(--tc-cmp-polarity-concern-icon);
  height: 14px;
  margin-block-start: 2px;
  width: 14px;
}

/* A section's name: small capitals led by a teal dot. */
.rv-label {
  align-items: center;
  color: var(--tc-muted);
  display: flex;
  font-size: var(--tc-text-xs);
  font-weight: var(--tc-weight-strong);
  gap: var(--tc-space-icon);
  letter-spacing: var(--tc-tracking-label);
  line-height: 1.2;
  margin: 0 0 var(--tc-space-3);
  text-transform: uppercase;
}

.rv-label::before {
  background: var(--tc-primary);
  border-radius: var(--tc-radius-pill);
  content: "";
  flex: none;
  height: 5px;
  width: 5px;
}

.rv-muted { color: var(--tc-muted); }

/* ---------- topics over time ----------
   One row per topic: its name and first year, then a flat teal bar on the
   rating's year scale from that year to the newest post read, over the bed of
   the years before it. The years below name the scale; nothing rules it. */
.rv-lanes {
  display: grid;
  gap: var(--tc-space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.rv-lane { display: grid; gap: 6px; }

.rv-lane-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--tc-space-3);
  justify-content: space-between;
  margin: 0;
}

.rv-lane-name {
  color: var(--tc-ink);
  font-weight: var(--tc-weight-ui);
  min-width: 0;
}

.rv-lane-since {
  color: var(--tc-muted);
  flex: 0 1 auto;
  font-size: var(--tc-text-sm);
}

.rv-lane-strip {
  display: block;
  height: 8px;
  overflow: visible;
  width: 100%;
}

.rv-lane-bed { fill: var(--tc-neutral-soft); }
.rv-lane-fill { fill: var(--tc-primary); }

.rv-axis {
  color: var(--tc-muted);
  display: block;
  fill: currentColor;
  font-size: var(--tc-text-xs);
  height: 16px;
  margin-top: var(--tc-space-1);
  overflow: visible;
  width: 100%;
}

/* ---------- findings ---------- */
.rv-evidence-source {
  align-items: center;
  color: var(--tc-muted);
  display: flex;
  font-size: var(--tc-text-sm);
  gap: var(--tc-space-icon);
  margin: 0 0 var(--tc-space-2);
}

.rv-evidence-source .x-mark { flex: none; height: 11px; width: 11px; }

.rv-finding-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rv-finding {
  border-top: 1px solid var(--tc-line);
  display: grid;
  gap: var(--tc-space-2);
  padding: var(--tc-space-3) 0;
}

.rv-finding:last-child { padding-block-end: 0; }

/* The polarity, then how many posts back the finding, read left to right. */
.rv-finding-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--tc-space-1) var(--tc-space-2);
}

/* A polarity is a pill with its icon and its word, never colour alone. Its
   edge is the polarity's own colour mixed to a whisper, so the soft fill
   still reads as a shape on a white card. Recipes: design-system.js
   COMPONENTS "polarity" and its three marks. */
.rv-polarity {
  --rv-polarity-ink: var(--tc-muted);
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--rv-polarity-ink) 28%, transparent);
  border-radius: var(--tc-cmp-polarity-radius);
  display: inline-flex;
  flex: none;
  font-size: var(--tc-text-xs);
  font-weight: var(--tc-weight-strong);
  gap: var(--tc-space-icon);
  letter-spacing: -0.01em;
  line-height: 1;
  min-height: var(--tc-cmp-polarity-height);
  padding: var(--tc-cmp-polarity-padding);
  white-space: nowrap;
}

.rv-polarity-icon { color: var(--rv-polarity-ink); flex: none; height: 12px; width: 12px; }

.rv-polarity--positive { --rv-polarity-ink: var(--tc-cmp-polarity-positive-icon); background: var(--tc-cmp-polarity-positive-bg); color: var(--tc-cmp-polarity-positive-text); }
.rv-polarity--note { --rv-polarity-ink: var(--tc-cmp-polarity-note-icon); background: var(--tc-cmp-polarity-note-bg); color: var(--tc-cmp-polarity-note-text); }
.rv-polarity--concern { --rv-polarity-ink: var(--tc-cmp-polarity-concern-icon); background: var(--tc-cmp-polarity-concern-bg); color: var(--tc-cmp-polarity-concern-text); }

.rv-strength {
  color: var(--tc-muted);
  font-size: var(--tc-text-sm);
}

.rv-statement {
  color: var(--tc-ink);
  font-size: var(--tc-text-md);
  line-height: var(--tc-leading-snug);
  margin: 0;
}

/* A finding's posts: the account's words, then one quiet line under them —
   when it was posted, anything said about it, and "Open on X", the only link.
   No rules, no keys, no timeline: the quote marks say whose words they are and
   the date says when. The posts against a finding follow under a plain
   sentence that counts them. */
.rv-evidence { display: grid; gap: var(--tc-space-2); justify-items: start; }
.rv-evidence--counter { margin-top: var(--tc-space-1); }

.rv-evidence-head {
  color: var(--tc-ink);
  font-size: var(--tc-text-sm);
  font-weight: var(--tc-weight-ui);
  margin: 0;
}

/* A look-up's section names: small capitals in the muted ink. */
.rv-evidence-label {
  color: var(--tc-muted);
  font-size: var(--tc-text-xs);
  font-weight: var(--tc-weight-strong);
  letter-spacing: var(--tc-tracking-label);
  line-height: 1.2;
  margin: 0 0 var(--tc-space-1);
  text-transform: uppercase;
}

.rv-post-list { display: grid; gap: var(--tc-space-3); inline-size: 100%; list-style: none; margin: 0; padding: 0; }
/* A quoted post in a list. Scoped to the list: the tapped post's card is also
   .rv-post, and its facts and look-ups run the card's full width, their
   values and chevrons on its right edge like every other card's. */
.rv-post-list > .rv-post { display: grid; gap: 2px; justify-items: start; }

.rv-post-head {
  color: var(--tc-ink);
  font-size: var(--tc-text-sm);
  font-weight: var(--tc-weight-ui);
  margin: 0;
}

.rv-post-text {
  color: var(--tc-body);
  display: block;
  font-size: var(--tc-text-base);
  line-height: var(--tc-leading-normal);
  max-inline-size: 62ch;
  quotes: "\201C" "\201D";
}

.rv-post-meta { color: var(--tc-muted); font-size: var(--tc-text-sm); margin: 0; }
/* The X logo before a quoted post's "Open on X": the same size as the
   attribution line's, on the text's baseline. */
.rv-post-meta .x-mark { display: inline-block; height: 11px; margin-inline-end: var(--tc-space-icon); vertical-align: -1px; width: 11px; }
.rv-post-meta a { font-weight: var(--tc-weight-ui); }

.rv-more,
.rv-flag {
  background: none;
  border: 0;
  border-radius: var(--tc-radius-sm);
  color: var(--tc-primary-dark);
  cursor: pointer;
  font: inherit;
  font-size: var(--tc-text-sm);
  font-weight: var(--tc-weight-ui);
  justify-self: start;
  min-height: var(--tc-control-sm);
  padding: 2px 0;
  transition: color var(--tc-duration-fast) var(--tc-ease-out), transform var(--tc-duration-press) var(--tc-ease-out);
}

/* "This looks wrong" and "Something's missing" are controls, quieter than
   the evidence: the action colour at the reading weight. */
.rv-flag { font-weight: var(--tc-weight-body); }
/* Posts behind a finding since deleted or edited on X, counted, not hidden. */
.rv-evidence-gone { font-size: var(--tc-text-sm); margin: 0; }

.rv-more:active,
.rv-flag:active { transform: scale(0.97); }

.rv-summary-block { display: grid; gap: var(--tc-space-2); }
.rv-reported { color: var(--tc-muted); font-size: var(--tc-text-sm); margin: 0; }

/* ---------- the seven checks ----------
   The same seven questions in the same order on every rating: each a row with
   its name and its pill, then its facts, its findings and, where it has
   nothing to show, why in its own words. */
.rv-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rv-check {
  border-top: 1px solid var(--tc-line);
  display: grid;
  gap: var(--tc-space-2);
  padding: var(--tc-space-3) 0;
}

.rv-check:first-child { border-top: 0; padding-block-start: 0; }
.rv-check:last-child { padding-block-end: 0; }

.rv-check-head {
  align-items: center;
  display: flex;
  gap: var(--tc-space-2);
  justify-content: space-between;
  min-height: 22px;
}

.rv-check-name {
  color: var(--tc-ink);
  font-size: var(--tc-text-base);
  font-weight: var(--tc-weight-ui);
  line-height: var(--tc-leading-snug);
  margin: 0;
}

/* A check's state when it has no polarity to show: an outlined pill in the
   muted ink, never a colour of its own. */
.rv-check-word {
  align-items: center;
  border: 1px dashed var(--tc-line-strong);
  border-radius: var(--tc-radius-pill);
  color: var(--tc-muted);
  display: inline-flex;
  flex: none;
  font-size: var(--tc-text-xs);
  font-weight: var(--tc-weight-ui);
  line-height: 1;
  min-height: var(--tc-cmp-tag-height);
  padding: var(--tc-cmp-tag-padding);
  white-space: nowrap;
}

.rv-check-state {
  color: var(--tc-body);
  font-size: var(--tc-text-sm);
  margin: 0;
}

.rv-check-state--none_found,
.rv-check-state--none_found_all { color: var(--tc-ink); }
.rv-check-facts { display: grid; gap: var(--tc-space-1); margin: 0; }

/* A check's findings sit inside it: the check draws the rule above them. */
.rv-check .rv-finding:first-child { border-top: 0; padding-block-start: var(--tc-space-1); }
.rv-check .rv-finding:last-child { padding-block-end: 0; }

.rv-checks--preview .rv-check { padding: var(--tc-space-2) 0; }

/* ---------- the seven checks as rows (the panel) ----------
   Each check reads on its own in one row: its name and pill, then its first
   statement under them. The whole row opens the check in place — the facts it
   rests on, each finding's strength, timeline and posts, and the reader's way
   to say it is wrong. */
.rv-check--row {
  gap: 0;
  padding: var(--tc-space-3) 0;
}

.rv-check-summary { position: relative; }

.rv-check-row {
  align-items: center;
  display: grid;
  gap: var(--tc-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  min-block-size: 22px;
}

/* Where any row opens, every row keeps the chevron's column, open or not, so
   the seven pills share one right edge. */
.rv-check-list:has(.rv-check-chevron) .rv-check-row { grid-template-columns: minmax(0, 1fr) auto 16px; }

.rv-check-toggle {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: start;
}

/* The toggle covers its summary (the name, the pill and the statement), so
   the row is one target; the open body below it is not. */
.rv-check-toggle::after {
  border-radius: var(--tc-radius-sm);
  content: "";
  inset: 0;
  position: absolute;
}

.rv-check-toggle:focus-visible { outline: none; }
.rv-check-toggle:focus-visible::after { outline: 2px solid var(--tc-focus-ring); outline-offset: 2px; }

/* The row's chevron is its pressable mark, so it carries the action colour;
   the check's name stays a heading in ink until the pointer is on it. */
.rv-check-chevron {
  color: var(--tc-primary-dark);
  height: 16px;
  transition: transform var(--tc-duration-base) var(--tc-ease-out);
  width: 16px;
}

.rv-check--row.is-open .rv-check-chevron,
.rv-check--details details[open] .rv-check-chevron { transform: rotate(180deg); }

/* The same rows with native <details> (the share page runs no script). */
.rv-check--details summary {
  cursor: pointer;
  display: block;
  list-style: none;
}

.rv-check--details summary::-webkit-details-marker { display: none; }
.rv-check--details .rv-check-lead { display: block; }
.rv-check--details summary:focus-visible { border-radius: var(--tc-radius-sm); outline: 2px solid var(--tc-focus-ring); outline-offset: 2px; }
.rv-check--details details[open] .rv-check-lead { color: var(--tc-ink); }

.rv-check-lead {
  color: var(--tc-body);
  font-size: var(--tc-text-base);
  line-height: var(--tc-leading-snug);
  margin: var(--tc-space-1) 0 0;
  overflow-wrap: anywhere;
  padding-inline-end: var(--tc-space-6);
}

.rv-check-lead-text { display: block; }

/* Closed, a statement keeps to three lines — room for a whole claim with its
   qualifier at the narrowest panel; open, it reads in full in ink, at the
   same size, so nothing already read moves. */
.rv-check--row:not(.is-open):not(.rv-check--details) .rv-check-lead-text,
.rv-check--details details:not([open]) .rv-check-lead-text {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.rv-check--row.is-open .rv-check-lead { color: var(--tc-ink); }
.rv-check-lead--state { color: var(--tc-muted); }
.rv-check-more { color: var(--tc-muted); display: block; font-size: var(--tc-text-sm); margin-block-start: 2px; white-space: nowrap; }

.rv-check-body {
  display: grid;
  gap: var(--tc-space-3);
  padding-block-start: var(--tc-space-2);
}

.rv-check-body .rv-finding:first-child { padding-block-start: 0; }

/* The flags at a check's foot share one row. */
.rv-check-foot {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--tc-space-4);
}

.rv-check-foot > .sv-feedback,
.rv-check-foot > .rv-reported { flex-basis: 100%; }

@media (hover: hover) and (pointer: fine) {
  .rv-check-toggle:hover { color: var(--tc-primary-dark); }
  .rv-check--row:has(.rv-check-toggle:hover) .rv-check-chevron { color: color-mix(in srgb, var(--tc-primary-dark) 78%, var(--tc-ink)); }
}

/* Under the rows, where the quotes come from. */
.rv-checks--collapsible .rv-evidence-source { margin: var(--tc-space-3) 0 0; }

/* Before a check: the seven it answers, by name. */
.rv-checks--teaser .rv-preview-note { font-size: var(--tc-text-sm); margin: 0 0 var(--tc-space-3); }

.rv-teaser-list {
  color: var(--tc-ink);
  counter-reset: rv-teaser;
  display: grid;
  gap: var(--tc-space-2) var(--tc-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.rv-teaser-list li {
  align-items: baseline;
  counter-increment: rv-teaser;
  display: flex;
  font-size: var(--tc-text-base);
  gap: var(--tc-space-2);
}

.rv-teaser-list li::before {
  color: var(--tc-muted);
  content: counter(rv-teaser);
  flex: none;
  font-size: var(--tc-text-sm);
  font-variant-numeric: tabular-nums lining-nums;
  inline-size: 1.2em;
}

/* Evidence paged in fades in: opacity only, quickly. */
.rv-post-list > .rv-post {
  transition: opacity var(--tc-duration-fast) var(--tc-ease-out);
  @starting-style { opacity: 0; }
}

/* ---------- look-ups (earlier posts, origin, track record) ----------
   Each look-up is one row: its name, what is left of it, and a chevron. A
   look-up the reader's plan doesn't include names the plan in a neutral pill
   and leads to the plans. Running or answered, its name heads the answer. */
.rv-lookups,
.rv-track { display: grid; }

.rv-lookups > * + *,
.rv-track > .rv-lookup + * { border-top: 1px solid var(--tc-line); }

.rv-lookup {
  align-items: center;
  background: none;
  border: 0;
  border-radius: var(--tc-radius-sm);
  color: var(--tc-ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: var(--tc-space-2);
  grid-template-columns: minmax(0, 1fr) auto 16px;
  inline-size: 100%;
  min-block-size: var(--tc-control-xl);
  padding: var(--tc-space-2) 0;
  text-align: start;
  transition: color var(--tc-duration-fast) var(--tc-ease-out);
}

/* A look-up is an action: its name reads in the action colour. */
.rv-lookup-label { color: var(--tc-primary-dark); font-size: var(--tc-text-base); font-weight: var(--tc-weight-ui); transition: color var(--tc-duration-fast) var(--tc-ease-out); }
.rv-lookup-detail { color: var(--tc-muted); font-size: var(--tc-text-sm); white-space: nowrap; }
/* The same 16px as a check row's chevron: both sit after 13px row names. */
.rv-lookup-chevron { color: var(--tc-primary-dark); height: 16px; transition: transform var(--tc-duration-fast) var(--tc-ease-out); width: 16px; }

/* Not in the plan: the label steps back, the plan that has it is a neutral
   pill — chrome, never a polarity. */
.rv-lookup--locked .rv-lookup-label { font-weight: var(--tc-weight-body); }
.rv-lookup--locked .rv-lookup-detail {
  background: var(--tc-neutral-soft);
  border-radius: var(--tc-radius-pill);
  color: var(--tc-neutral-text);
  font-weight: var(--tc-weight-strong);
  line-height: 1;
  padding: 5px var(--tc-space-2);
}

.rv-lookup-item { display: grid; gap: var(--tc-space-2); padding: var(--tc-space-3) 0; }
.rv-lookup-item:first-child { padding-block-start: 0; }
.rv-lookup-item:last-child { padding-block-end: 0; }
.rv-lookup-head { color: var(--tc-ink); font-size: var(--tc-text-base); font-weight: var(--tc-weight-ui); margin: 0; }
.rv-lookup-note { font-size: var(--tc-text-sm); }

@media (hover: hover) and (pointer: fine) {
  .rv-lookup:hover .rv-lookup-chevron { transform: translateX(2px); }
  .rv-lookup:hover .rv-lookup-label { color: color-mix(in srgb, var(--tc-primary-dark) 78%, var(--tc-ink)); }
}

.rv-lookup:active { transform: scale(0.99); }
.rv-lookup:focus-visible { outline: 2px solid var(--tc-focus-ring); outline-offset: 2px; }
.rv-earlier-points { display: grid; gap: var(--tc-space-3); list-style: none; margin: 0; padding: 0; }
.rv-earlier-point { display: grid; gap: var(--tc-space-2); }
.rv-earlier-point + .rv-earlier-point { border-top: 1px solid var(--tc-line); padding-top: var(--tc-space-3); }
.rv-earlier-point .rv-evidence-label { margin: 0; }

/* ---------- facts ----------
   Measured counts as quiet rows: the field in muted, the value in ink. */
.rv-facts dl,
.rv-post dl { display: grid; gap: var(--tc-space-1); margin: 0; }

.rv-fact {
  align-items: baseline;
  display: flex;
  font-size: var(--tc-text-base);
  gap: var(--tc-space-3);
  justify-content: space-between;
}

/* A long value wraps under itself; its field keeps its words together. */
.rv-fact dt { color: var(--tc-muted); flex-shrink: 0; max-inline-size: 55%; }
.rv-fact dd { color: var(--tc-ink); font-weight: var(--tc-weight-ui); margin: 0; text-align: end; }
.rv-fact dd.rv-muted { color: var(--tc-muted); font-weight: var(--tc-weight-body); }

/* A list (the sites they link most) reads from one left edge under its field
   at every width. */
.rv-fact--stack { display: grid; gap: 2px; }
.rv-fact--stack dt { max-inline-size: none; }
.rv-fact--stack dd { text-align: start; }

/* The tapped post's rows answer in sentences, not figures: each value sits
   under its field, left-aligned, so a wrapped answer keeps one left edge. */
.rv-post .rv-fact { display: grid; gap: 2px; }
.rv-post .rv-fact dd { text-align: start; }

.rv-post-flag { color: var(--tc-body); font-size: var(--tc-text-base); margin: var(--tc-space-1) 0 0; }

.rv-preview-note { margin: 0; }

/* Label and detail share a baseline; align-content centres that line (or two,
   when they wrap) in the button's height. */
.rv-action {
  align-content: center;
  align-items: baseline;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 var(--tc-space-2);
  justify-content: center;
  min-height: var(--tc-control-lg);
}

/* Set apart by size and weight, never faded: faded text drops under the
   contrast floor the button's own colours clear. */
.rv-action-detail { font-size: var(--tc-text-sm); font-weight: var(--tc-weight-body); }

/* ---------- arrival ----------
   When a check's rating first lands, the topic bars grow from their first
   year and the findings rise into place together, 40ms apart, at most five in
   the stagger. Nothing else in the product performs. */
.rv-rating.rv-reveal .rv-lane-fill {
  animation: rv-grow var(--tc-duration-overlay) var(--tc-ease-out) both;
}

.rv-rating.rv-reveal .rv-finding {
  transition: opacity var(--tc-duration-base) var(--tc-ease-out), transform var(--tc-duration-base) var(--tc-ease-out);
  @starting-style {
    opacity: 0;
    transform: translateY(6px);
  }
}

.rv-rating.rv-reveal .rv-finding:nth-child(2) { transition-delay: calc(var(--tc-duration-exit) * 0.4); }
.rv-rating.rv-reveal .rv-finding:nth-child(3) { transition-delay: calc(var(--tc-duration-exit) * 0.8); }
.rv-rating.rv-reveal .rv-finding:nth-child(4) { transition-delay: calc(var(--tc-duration-exit) * 1.2); }
.rv-rating.rv-reveal .rv-finding:nth-child(n + 5) { transition-delay: calc(var(--tc-duration-exit) * 1.6); }

/* In the panel the checks arrive as rows, in the same stagger. */
.rv-rating.rv-reveal .rv-check--row {
  transition: opacity var(--tc-duration-base) var(--tc-ease-out), transform var(--tc-duration-base) var(--tc-ease-out);
  @starting-style {
    opacity: 0;
    transform: translateY(6px);
  }
}

.rv-rating.rv-reveal .rv-check--row:nth-child(2) { transition-delay: calc(var(--tc-duration-exit) * 0.4); }
.rv-rating.rv-reveal .rv-check--row:nth-child(3) { transition-delay: calc(var(--tc-duration-exit) * 0.8); }
.rv-rating.rv-reveal .rv-check--row:nth-child(4) { transition-delay: calc(var(--tc-duration-exit) * 1.2); }
.rv-rating.rv-reveal .rv-check--row:nth-child(n + 5) { transition-delay: calc(var(--tc-duration-exit) * 1.6); }

@keyframes rv-grow {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* Under the pointer a link deepens toward the ink: in light it darkens, in
   dark it brightens, and it never gains an underline. */
@media (hover: hover) and (pointer: fine) {
  .rv-handle:hover,
  .rv-post-meta a:hover,
  .rv-statement a:hover,
  .rv-track-credit a:hover,
  .rv-more:hover,
  .rv-flag:hover { color: color-mix(in srgb, var(--tc-primary-dark) 78%, var(--tc-ink)); }
}

.rv-handle:focus-visible,
.rv-post-meta a:focus-visible,
.rv-statement a:focus-visible,
.rv-track-credit a:focus-visible,
.rv-more:focus-visible,
.rv-flag:focus-visible {
  outline: 2px solid var(--tc-focus-ring);
  outline-offset: 2px;
}

/* Narrow (a sidebar): a long fact's value goes under its label, an action's
   detail under its label. */
@container (max-width: 320px) {
  /* Only a value too long to sit beside its field goes under it: a year or a
     count stays on its row, so a narrow column doesn't double in height. */
  .rv-fact--long { display: grid; gap: 0; }
  .rv-fact--long dt { max-inline-size: none; }
  .rv-fact--long dd { text-align: start; }
  .rv-action { flex-direction: column; }
}

/* Narrower still (a panel zoomed to 150–200%): the years under the topic bars
   name only the first and the last, so none run into each other, and a
   check's pill goes under its question, so the question keeps its line. */
@container (max-width: 240px) {
  .rv-axis-mid { display: none; }
  .rv-check-row,
  .rv-check-list:has(.rv-check-chevron) .rv-check-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rv-check-row > :nth-child(2) { grid-column: 1; grid-row: 2; justify-self: start; }
}

/* Wide (a share page, the site): facts sit in two columns and the topic bars
   grow a little taller. */
@container (min-width: 560px) {
  /* Two columns only once there are enough facts to fill them: a lone fact
     split across half the sheet leaves its value stranded mid-page. */
  .rv-facts dl:has(> .rv-fact:nth-child(4)) { column-gap: var(--tc-space-6); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-facts dl:not(:has(> .rv-fact:nth-child(4))) { max-inline-size: 28rem; }
  .rv-avatar { height: 52px; width: 52px; }
  .rv-lane-strip { height: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .rv-rating.rv-reveal .rv-lane-fill { animation: none; }
  .rv-rating.rv-reveal .rv-finding { transition: opacity var(--tc-duration-fast) linear; transition-delay: 0s; }
  .rv-rating.rv-reveal .rv-finding { @starting-style { opacity: 0; transform: none; } }
  .rv-rating.rv-reveal .rv-check--row { transition: opacity var(--tc-duration-fast) linear; transition-delay: 0s; }
  .rv-rating.rv-reveal .rv-check--row { @starting-style { opacity: 0; transform: none; } }
  .rv-check-chevron,
  .rv-lookup-chevron { transition: none; }
  .rv-lookup:active { transform: none; }
  .rv-more:active,
  .rv-flag:active { transform: none; }
}

@media (forced-colors: active) {
  .rv-polarity,
  .rv-check-word { background: Canvas; border-color: CanvasText; color: CanvasText; forced-color-adjust: none; }
  .rv-polarity-icon { color: CanvasText; }
  .rv-label::before { background: CanvasText; forced-color-adjust: none; }
  .rv-lane-bed { fill: Canvas; stroke: GrayText; }
  .rv-lane-fill { fill: CanvasText; }
}

/* The track record: each call is its own post — what was called and when,
   quiet as a date line, the post's words, then what the price did, in ink. */
.rv-track-call { display: grid; gap: var(--tc-space-1); }
.rv-track-call > .rv-post-head { color: var(--tc-muted); font-weight: var(--tc-weight-body); }
.rv-track-outcome { color: var(--tc-ink); font-size: var(--tc-text-sm); font-weight: var(--tc-weight-ui); margin: 0; }
