/*
 * articles/review.css — the dashboard racquet review template.
 *
 * Linked by pages scripts/generate_racquet_reviews.py writes, after
 * ../redesign.css. Every colour and face is a redesign.css token: the
 * handoff's hexes map onto them almost exactly, and its red "cons" label and
 * amber/red fit bands are carried by fill instead, per the one-accent rule.
 *
 * Specificity: body.bs h2 / body.bs p / body.bs a in redesign.css zero
 * margins and set link colour, so rules that must beat them are prefixed
 * body.bs here too. No !important.
 */

.rv {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(14px, 3vw, 32px) 72px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
  font-family: var(--font-body);
}
.rv * { box-sizing: border-box; }
.rv ul, .rv ol { list-style: none; margin: 0; padding: 0; }
/* Panels hidden by the tabs and goal pills; display:flex would override the attribute. */
.rv [hidden] { display: none; }

.rv-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Type ─────────────────────────────────────────────────────────── */
.rv-eyebrow,
body.bs .rv-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
body.bs .rv-accent { color: var(--accent); }
.rv-small { font-size: 14px; line-height: 1.4; color: var(--body); }

/* ── Layout ───────────────────────────────────────────────────────── */
.rv-grid { display: grid; gap: 14px; }
.rv-grid--130 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
.rv-grid--300 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.rv-grid--460 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.rv-stack-3, .rv-stack-4, .rv-stack-8, .rv-stack-12, .rv-stack-14,
.rv-stack-16, .rv-stack-18 { display: flex; flex-direction: column; }
.rv-stack-3 { gap: 3px; }  .rv-stack-4 { gap: 4px; }   .rv-stack-8 { gap: 8px; }
.rv-stack-12 { gap: 12px; } .rv-stack-14 { gap: 14px; } .rv-stack-16 { gap: 16px; }
.rv-stack-18 { gap: 18px; }
.rv-stack-3 { min-width: 0; }
.rv-row-between {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.rv-baseline { align-items: baseline; }

.rv-panel {
  background: var(--panel);
  border: 1px solid var(--ink);
  padding: 22px;
  min-width: 0;
}
.rv-panel--flush { padding: 0; }

/* ── Breadcrumb ───────────────────────────────────────────────────── */
.rv-crumbs {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-bottom: 8px;
  font-family: var(--display); font-weight: 600; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
body.bs .rv-crumbs a { color: var(--muted); }
body.bs .rv-crumbs a:hover { color: var(--accent); }

/* ── Hero + score ─────────────────────────────────────────────────── */
.rv-hero {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  min-height: 340px;
}
@media (max-width: 660px) { .rv-hero { grid-column: auto; } }
.rv-hero__text {
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  container-type: inline-size;
}
body.bs .rv-h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  /* The design size, capped so the longest word (--chars, set by the
     generator) fits its column: "PRESTIGE" overflowed at 84px. An uppercase
     bold letter is under 0.8em wide even in the fallback face, so --chars x
     0.8em fits 100cqi. */
  font-size: min(clamp(52px, 7vw, 84px), calc(100cqi / (var(--chars, 6) * 0.8)));
  line-height: 0.88;
  text-transform: uppercase;
  color: var(--ink);
}
body.bs .rv-tagline { margin: 0; font-size: 18px; line-height: 1.35; color: var(--body); max-width: 28ch; }
.rv-hero__shot {
  display: flex; align-items: center; justify-content: center;
  min-height: 240px;
  background: repeating-linear-gradient(135deg, var(--note-bg) 0 9px, var(--panel) 9px 18px);
}
.rv-hero__shot img { max-width: 100%; max-height: 300px; width: auto; height: auto; object-fit: contain; }
.rv-slot-label { background: var(--panel); padding: 3px 8px; }

.rv-score { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.rv-ring { position: relative; width: 200px; height: 200px; }
.rv-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rv-ring circle { fill: none; stroke-width: 16; }
.rv-ring__track { stroke: var(--track); }
.rv-ring__fill { stroke: var(--accent); }
.rv-ring__disc {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.rv-ring__num { font-family: var(--display); font-weight: 700; font-size: 76px; line-height: 0.9; }
.rv-rating {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  letter-spacing: 0.02em; text-transform: uppercase; text-align: center;
}

/* ── Key specs ────────────────────────────────────────────────────── */
.rv-spec { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.rv-spec__val { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; }

/* ── Fit check ────────────────────────────────────────────────────── */
.rv-fit {
  border: 2px solid var(--accent);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}
.rv-fit__q { display: flex; flex-direction: column; gap: 18px; margin: 0; }
body.bs .rv-h2 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 36px;
  line-height: 1; text-transform: uppercase; color: var(--ink);
}
.rv-seg-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.rv-seg-group legend { padding: 0; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.rv-seg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px; padding: 4px; background: var(--paper);
}
.rv-seg__opt { position: relative; display: block; cursor: pointer; }
.rv-seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rv-seg__opt span {
  display: block; text-align: center;
  font-size: 14px; font-weight: 600; padding: 10px 6px;
  color: var(--ink); transition: background-color 150ms ease, color 150ms ease;
}
.rv-seg__opt:hover span { background: var(--panel-head); }
.rv-seg__opt input:checked + span { background: var(--ink); color: #fff; }
.rv-seg__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.rv-fit__out {
  background: var(--paper); padding: 22px;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.rv-fit__band {
  font-family: var(--display); font-weight: 700; font-size: clamp(52px, 8vw, 80px);
  line-height: 0.9; text-transform: uppercase; color: var(--accent);
}
/* Three segments: the fill carries the band, not a second colour. */
.rv-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.rv-meter__seg { height: 8px; background: var(--track); transition: background-color 150ms ease; }
.rv-meter__seg.is-on { background: var(--accent); }
.rv-fit__head { font-size: 18px; font-weight: 600; line-height: 1.3; }
.rv-fit__note { font-size: 15px; line-height: 1.4; color: var(--body); }
.rv-fit__why li {
  font-size: 14px; line-height: 1.4; color: var(--body);
  padding: 6px 0 0 14px; position: relative;
}
.rv-fit__why li::before { content: "–"; position: absolute; left: 0; color: var(--accent); }

/* ── Performance chart ────────────────────────────────────────────── */
.rv-legend {
  display: flex; gap: 12px;
  font-family: var(--display); font-weight: 600; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.rv-legend span { display: flex; gap: 6px; align-items: center; }
.rv-key { display: inline-block; width: 10px; height: 10px; background: var(--accent); }
.rv-key--sib { background: var(--chip-border); }
.rv-chart {
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px;
}
.rv-chart__col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.rv-chart__val { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; }
.rv-chart__bars { display: flex; gap: 3px; align-items: flex-end; width: 100%; height: 150px; }
.rv-bar { flex: 1; height: var(--v); background: var(--accent); transition: height 150ms ease; }
.rv-bar--sib { background: var(--chip-border); }
.rv-chart__label {
  font-size: 12px; color: var(--muted); text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Pills (playtest tabs, string goals) ──────────────────────────── */
.rv-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.rv-pill {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 8px 12px; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color 150ms ease, color 150ms ease;
}
.rv-pill--sm { font-size: 13px; padding: 7px 11px; }
.rv-pill:hover { background: var(--panel-head); }
.rv-pill[aria-selected="true"],
.rv-pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ── Playtest ─────────────────────────────────────────────────────── */
.rv-shot { display: flex; flex-direction: column; gap: 16px; }
.rv-shot__top { display: flex; align-items: baseline; gap: 16px; }
.rv-shot__score {
  font-family: var(--display); font-weight: 700; font-size: 72px;
  line-height: 0.85; color: var(--accent);
}
.rv-shot__take { font-size: 20px; font-weight: 600; line-height: 1.3; }
.rv-notes summary { cursor: pointer; list-style: none; align-self: flex-start; }
.rv-notes summary::-webkit-details-marker { display: none; }
.rv-notes summary::after { content: " +"; }
.rv-notes[open] summary::after { content: " −"; }
body.bs .rv-notes p { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: var(--body); }

/* ── Pros / cons / string for ─────────────────────────────────────── */
.rv-list li {
  font-size: 17px; font-weight: 500; line-height: 1.35;
  padding: 10px 0; border-bottom: 1px solid var(--track);
}
.rv-list li:first-child { padding-top: 0; }
.rv-goal { display: flex; flex-direction: column; gap: 6px; }
.rv-goal__lbs { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; }
.rv-goal__setup { font-size: 15px; line-height: 1.4; color: var(--body); }

/* ── Strings + players ────────────────────────────────────────────── */
.rv-rows > li { border-top: 1px solid var(--track); }
.rv-string {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px; padding: 14px 0; align-items: center;
}
.rv-string__rank {
  font-family: var(--display); font-weight: 700; font-size: 40px;
  line-height: 0.9; color: var(--accent);
}
.rv-string__name,
.rv-player__name {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  line-height: 1; text-transform: uppercase;
}
body.bs .rv-string__name a,
body.bs .rv-player__name a { color: var(--ink); }
body.bs .rv-string__name a:hover,
body.bs .rv-player__name a:hover { color: var(--accent); }
.rv-string__tension { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.rv-string__tension > span:first-child {
  font-family: var(--display); font-weight: 700; font-size: 20px; white-space: nowrap;
}
.rv-player {
  display: grid; grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px; padding: 12px 0; align-items: center;
}
.rv-player__photo {
  width: 64px; height: 64px; overflow: hidden;
  border: 1px solid var(--track);
  background: repeating-linear-gradient(135deg, var(--note-bg) 0 6px, var(--panel) 6px 12px);
}
.rv-player__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
body.bs .rv-also { margin: 0; padding-top: 12px; border-top: 1px solid var(--track); font-size: 14px; line-height: 1.6; }

/* ── Verdict band ─────────────────────────────────────────────────── */
.rv-verdict {
  background: var(--accent); color: #fff; padding: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px 32px; align-items: center;
}
body.bs .rv-verdict__score {
  margin: 0; color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 40px;
  line-height: 0.95; text-transform: uppercase;
}
body.bs .rv-verdict__text { margin: 0; grid-column: span 2; font-size: 19px; font-weight: 600; line-height: 1.35; color: #fff; }
@media (max-width: 660px) { body.bs .rv-verdict__text { grid-column: auto; } }
body.bs .rv-verdict a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
body.bs .rv-verdict a:hover { color: var(--paper); }
.rv-verdict :focus-visible { outline-color: #fff; }

/* ── FAQ ──────────────────────────────────────────────────────────── */
.rv-faq__head { padding: 16px 22px; border-bottom: 1px solid var(--track); }
.rv-faq + .rv-faq { border-top: 1px solid var(--track); }
.rv-faq summary {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 22px; cursor: pointer; list-style: none;
  font-size: 16px; font-weight: 500;
}
.rv-faq summary::-webkit-details-marker { display: none; }
.rv-faq summary::after { content: "+"; color: var(--accent); font-weight: 600; }
.rv-faq[open] summary::after { content: "−"; }
.rv-faq summary:hover { background: var(--note-bg); }
body.bs .rv-faq p { margin: 0; padding: 0 22px 16px; font-size: 15px; line-height: 1.55; color: var(--body); max-width: 80ch; }

/* Phones: the tension column steals the name's width, so it drops under it. */
@media (max-width: 520px) {
  .rv-string { grid-template-columns: 36px minmax(0, 1fr); align-items: start; }
  .rv-string__tension { grid-column: 2; align-items: flex-start; text-align: left; }
}

/* Phones: seven columns cannot fit their labels, so the chart turns into
   horizontal pairs, the site's flat score-bar idiom. */
@media (max-width: 520px) {
  .rv-chart { grid-template-columns: 1fr; gap: 10px; }
  .rv-chart__col {
    display: grid; grid-template-columns: 76px minmax(0, 1fr) 28px;
    grid-template-areas: "label bars val"; align-items: center; gap: 10px;
  }
  .rv-chart__label { grid-area: label; text-align: left; }
  .rv-chart__val { grid-area: val; text-align: right; }
  .rv-chart__bars { grid-area: bars; flex-direction: column; align-items: stretch; height: auto; gap: 2px; }
  .rv-bar { flex: none; height: 7px; width: var(--v); }
}

/* ── Full specs (collapsed) ───────────────────────────────────────── */
.rv-fold > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 16px 22px; cursor: pointer; list-style: none;
}
.rv-fold > summary::-webkit-details-marker { display: none; }
.rv-fold > summary::after { content: "+"; color: var(--accent); font-weight: 600; margin-left: auto; }
.rv-fold[open] > summary::after { content: "−"; }
.rv-fold > summary:hover { background: var(--note-bg); }
.rv-table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); }
.rv-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rv-table thead { background: var(--panel-head); }
.rv-table th, .rv-table td { padding: 10px 22px; text-align: left; white-space: nowrap; }
.rv-table thead th {
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.rv-table tbody th { font-weight: 500; color: var(--muted); }
.rv-table tbody tr + tr { border-top: 1px solid var(--rule); }
.rv-table td:nth-child(2), .rv-table thead th:first-of-type { font-weight: 700; }

/* ── Related racquets ─────────────────────────────────────────────── */
.rv-related {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px; padding: 14px 0; align-items: center;
}
.rv-related__score {
  font-family: var(--display); font-weight: 700; font-size: 32px;
  line-height: 0.9; color: var(--accent);
}
@media (max-width: 520px) {
  .rv-related { grid-template-columns: 48px minmax(0, 1fr); }
  .rv-related > a { grid-column: 2; }
}
@media (max-width: 520px) {
  .rv-fold__family { display: none; }
  .rv-table th, .rv-table td { padding: 10px 12px; }
}
