/* Host score rows (ui_scores.py). Tokens only, from tokens.css.
 * Desktop: portrait + name | score | take or snippet, as a three-column grid.
 * Phone: the score sits beside the name, the take or snippet goes underneath. */

.rv-cards { display: grid; gap: 16px; margin: 14px 0 0; }

.rv-card { background: var(--surface); border: 1px solid var(--hairline);
           border-radius: var(--r-lg); padding: 0 var(--pad); }
.rv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
           margin: 0 -10px; padding: 16px 50px 16px 10px; list-style: none; cursor: pointer;
           font-size: var(--t-body); position: relative; }
.rv-head::-webkit-details-marker { display: none; }
.rv-head::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px;
                  margin-top: -6px; border-right: 2px solid var(--ink-muted);
                  border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg); }
.rv-card[open] > .rv-head::after { transform: rotate(-135deg); margin-top: -2px; }
/* The head is 10px wider than its text on each side, so the inset ring never touches the date. */
.rv-head:focus-visible { outline-offset: -2px; border-radius: var(--r-md); }
.rv-date { font-weight: 700; color: var(--ink); }
.rv-ep { color: var(--ink-2); font-size: var(--t-meta); }
.rv-ep a { color: var(--ink-2); }
.rv-body { padding-bottom: 8px; }

/* Column labels (desktop). The take label is the honesty label: it says the line under
 * each score is a summary, not a quote. */
.rv-cols, .rv-row { display: grid; grid-template-columns: minmax(160px, 250px) 110px minmax(0, 1fr);
                    column-gap: 16px; align-items: center; }
.rv-cols { padding: 0 0 8px; border-bottom: 1px solid var(--hairline); font-size: var(--t-label);
           font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
           color: var(--ink-muted); }

.rv-rows { list-style: none; margin: 0; padding: 0; }
.rv-row { padding: 18px 0; border-top: 1px solid var(--hairline); }
.rv-row:first-child { border-top: 0; }
.rv-row--take { align-items: start; }
.rv-row--take .rv-who, .rv-row--take .rv-score { align-self: center; }

.rv-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.art.rv-face { width: 56px; flex: 0 0 56px; }
.art.rv-face .ph b { font-size: 16px; }
.rv-name { color: var(--ink); font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
a.rv-name:hover { color: var(--accent); }

.rv-score .score.md b { font-size: 32px; }
.rv-row--take .rv-score .score.md b { font-size: 40px; }

.rv-take { margin: 0 0 10px; max-width: 62ch; color: var(--ink); font-size: 17px;
           line-height: 1.55; }
.rv-sub { display: block; margin-bottom: 4px; font-size: var(--t-label); font-weight: 700;
          letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* The snippet line: play chip first, then the muted quote. */
.rv-snip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
           color: var(--ink-muted); font-size: var(--t-meta); }
.rv-quote { font-style: italic; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
a.rv-play { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
            padding: 3px 11px 3px 4px; min-height: 26px; border-radius: 999px;
            border: 1px solid var(--hairline); background: var(--raised);
            color: var(--ink); font-size: var(--t-meta); font-variant-numeric: tabular-nums; }
a.rv-play:hover { text-decoration: none; border-color: var(--ink-muted); }
.rv-play-dot { display: inline-grid; place-items: center; width: 18px; height: 18px;
               border-radius: 999px; background: var(--accent); color: var(--page); }
.rv-play-dot .ic { width: 9px; height: 9px; margin: 0 0 0 1px; vertical-align: 0; }

/* A restated score folds into one muted row, not a row of its own. */
.rv-restated { display: flex; align-items: center; gap: 12px; margin: 4px -12px;
               padding: 10px 12px; border-radius: var(--r-md); background: var(--raised);
               color: var(--ink-muted); font-size: var(--t-meta); }
.rv-restated b { color: var(--ink-2); font-weight: 600; }
.rv-restated a { color: var(--ink-2); text-decoration: underline;
                 text-decoration-color: var(--hairline); text-underline-offset: 2px; }
.rv-restated a:hover { color: var(--accent); }
.rv-faces { display: flex; flex: 0 0 auto; gap: 8px; }
.rv-restated .art.rv-face { width: 36px; flex-basis: 36px; }
.rv-restated .art.rv-face .ph b { font-size: 12px; }
.rv-restated-text { flex: 1; min-width: 0; }
.rv-tag { flex: 0 0 auto; margin-left: auto; padding: 2px 10px; border-radius: 999px;
          background: var(--surface); border: 1px solid var(--hairline);
          font-size: var(--t-label); color: var(--ink-muted); white-space: nowrap; }

.rv-also, .rv-silent { margin: 0; padding: 12px 0 8px; color: var(--ink-muted);
                       font-size: var(--t-meta); }
.rv-rows + .rv-also { border-top: 1px solid var(--hairline); margin-top: 6px; }
.rv-silent a.rv-play { margin-left: 6px; }

@media (max-width: 640px) {
  .rv-card { padding: 0 14px; }
  .rv-head { padding-top: 14px; padding-bottom: 14px; }
  .rv-ep { flex-basis: 100%; }

  /* One label above the rows replaces the column headers. */
  .rv-cols { display: block; padding-bottom: 10px; }
  .rv-cols > span:not(.rv-collabel) { display: none; }
  .rv-collabel { display: inline-block; padding: 4px 10px; border-radius: 999px;
                 background: var(--raised); border: 1px solid var(--hairline);
                 text-transform: none; letter-spacing: 0; font-weight: 500;
                 font-size: var(--t-meta); color: var(--ink-2); }

  /* Portrait | name ... score, then the take or snippet across the full width. */
  .rv-row, .rv-row--take { grid-template-columns: auto minmax(0, 1fr) auto;
                           grid-template-areas: "who who score" "text text text";
                           row-gap: 8px; align-items: center; padding: 12px 0; }
  .rv-who { grid-area: who; }
  .rv-score { grid-area: score; }
  .rv-text { grid-area: text; }
  .rv-text:empty { display: none; }
  .rv-who { gap: 14px; }
  .art.rv-face { width: 48px; flex-basis: 48px; }
  .rv-name { font-size: var(--t-body); }
  .rv-score .score.md b, .rv-row--take .rv-score .score.md b { font-size: 28px; }
  .rv-take { margin-bottom: 8px; max-width: none; font-size: 16px; line-height: 1.5; }
  .rv-quote { font-size: var(--t-meta); }
  a.rv-play { min-height: 32px; }

  .rv-restated { flex-wrap: wrap; margin: 4px -6px; }
  .rv-restated-text { flex-basis: calc(100% - 100px); }
  .rv-tag { margin-left: 0; }
}
