/* Race reviews mockup v2. Built on the live Run Houston tokens in styles.css.
   Contrast on paper #f2eee6: mute 4.6:1, heat 4.5:1, ink 15:1. */

.mockup-strip {
  background: var(--ink); color: var(--paper);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
  text-align: center; padding: 0.4rem 1rem; line-height: 1.4;
}

/* I'm running this: same outline pill as Share */
.race-actions-secondary { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-share { min-height: 44px; }
.btn-running .running-check { display: none; }
.btn-running[aria-pressed="true"] { background: rgba(46,107,72,.1); border-color: var(--trail); color: var(--trail); }
.btn-running[aria-pressed="true"] .running-check { display: inline; }

/* Section breaks out of the 720px article so the two columns fit */
.rv {
  margin: 2.25rem 0 0.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
}
@media (min-width: 1000px) {
  .rv {
    width: min(1060px, calc(100vw - 3rem));
    margin-left: calc(50% - min(530px, calc(50vw - 1.5rem)));
  }
}
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rv-head-text { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.rv-title { font-family: var(--font-body); font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 0; }
.rv-example-tag {
  display: inline-block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); background: #f6e3b8; border: 1px dashed var(--track);
  padding: 0.2rem 0.55rem; border-radius: 4px; margin: 0;
}
.rv-example-inline {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); background: #f6e3b8; border-radius: 3px; padding: 0.05rem 0.35rem; margin-left: 0.35rem;
  vertical-align: middle;
}
.rv-write { display: inline-flex; align-items: center; padding: 0 1.4rem; min-height: 44px; font-size: 0.75rem; border: 0; cursor: pointer; }
.rv-note { margin: 0.5rem 0 1.5rem; color: var(--mute); font-size: 0.9rem; }

.rv-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.rv-side-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.6rem;
}

/* Display stars: outline in mute, fill in heat */
.stars { --pct: 0%; position: relative; display: inline-block; line-height: 1; font-size: 1rem; letter-spacing: 0.06em; white-space: nowrap; vertical-align: -0.1em; }
.stars::before { content: "\2605\2605\2605\2605\2605"; color: transparent; -webkit-text-stroke: 1.2px var(--mute); }
.stars::after { content: "\2605\2605\2605\2605\2605"; position: absolute; left: 0; top: 0; width: var(--pct); overflow: hidden; color: var(--heat); -webkit-text-stroke: 1.2px var(--heat); }
.stars--lg { font-size: 1.45rem; }
.stars--sm { font-size: 0.9rem; }

/* Left column */
.rv-left { position: sticky; top: 76px; }
.rv-overall { display: flex; align-items: center; gap: 0.6rem; }
.rv-overall-num { font-size: 1.15rem; font-weight: 700; }
.rv-overall-count { margin: 0.25rem 0 0.9rem; font-size: 0.88rem; color: var(--mute); }
.rv-bd { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.rv-bd-row {
  appearance: none; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer;
  width: 100%; min-height: 44px; padding: 0 0.35rem; border-radius: 6px;
  display: grid; grid-template-columns: 3.4rem 1fr 2.6rem; align-items: center; gap: 0.6rem; text-align: left;
}
.rv-bd-label { font-size: 0.88rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.rv-bd-bar { height: 14px; background: var(--tyvek); border: 1px solid var(--mute); border-radius: 3px; overflow: hidden; }
.rv-bd-bar > span { display: block; height: 100%; background: var(--heat); }
.rv-bd-pct { font-size: 0.88rem; text-align: right; color: var(--ink); }
.rv-bd-row:hover .rv-bd-label { text-decoration-color: currentColor; }
.rv-bd-row:hover { background: rgba(28,25,23,.04); }
.rv-bd-row[aria-pressed="true"] { background: var(--tyvek); box-shadow: inset 0 0 0 1.5px var(--ink); }
.rv-bd-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.rv-feats { margin: 0 0 1rem; display: grid; gap: 0.35rem; }
.rv-feat { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.rv-feat dt { font-size: 0.9rem; }
.rv-feat dd { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.rv-feat-num { font-size: 0.88rem; font-weight: 700; min-width: 1.6rem; text-align: right; }
.rv-side-note { margin: 0; font-size: 0.8rem; color: var(--mute); line-height: 1.5; }

/* Right column */
.rv-say { background: var(--tyvek); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.rv-say-text { margin: 0 0 0.5rem; font-size: 0.98rem; line-height: 1.6; }
.rv-say-src { margin: 0; font-size: 0.8rem; color: var(--mute); }

.rv-photos { margin-top: 1.5rem; }
.rv-photo-strip { list-style: none; margin: 0; padding: 0 0 0.25rem; display: flex; gap: 0.5rem; overflow-x: auto; }
.rv-photo {
  flex: 0 0 auto; width: 86px; height: 86px; border-radius: 6px; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; color: var(--mute);
}
.rv-photo-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #5a554f; }
.rv-photo--0 { background: #e6e0d5; }
.rv-photo--1 { background: #dfe3e0; }
.rv-photo--2 { background: #e9e4dc; }
.rv-photo--3 { background: #dde2e6; }

.rv-top { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rv-top-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 0.6rem; background: var(--paper); }
.rv-top-card .rv-text { font-size: 0.92rem; }

.rv-filters { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.75rem; scroll-margin-top: 80px; }
.rv-sel { display: flex; flex-direction: column; gap: 0.2rem; }
.rv-sel > span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.rv-sel select {
  font: inherit; font-size: 0.9rem; color: var(--ink); min-height: 44px; padding: 0 0.6rem;
  background: var(--tyvek); border: 1px solid var(--mute); border-radius: 6px;
}
.rv-sel select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.rv-active { margin: 0.75rem 0 0; font-size: 0.92rem; font-weight: 700; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.rv-count { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--mute); }
.rv-sep { color: var(--mute); margin: 0 0.2rem; }

/* Review */
.rv-item { padding: 1.1rem 0 0.4rem; border-bottom: 1px solid var(--line); }
.rv-name { margin: 0 0 0.2rem; font-weight: 700; font-size: 0.92rem; }
.rv-line { margin: 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.rv-headline { font-weight: 700; font-size: 1rem; }
.rv-ran { margin: 0.15rem 0 0; font-size: 0.83rem; color: var(--mute); }
.rv-text { margin: 0.45rem 0 0.4rem; font-size: 0.98rem; line-height: 1.6; }
.rv-thumbs { list-style: none; margin: 0.4rem 0 0.5rem; padding: 0; display: flex; gap: 0.4rem; }
.rv-thumb { width: 56px; height: 56px; border-radius: 5px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--mute); }
.rv-helpful-count { margin: 0.2rem 0 0; font-size: 0.83rem; color: var(--mute); }
.rv-actions { margin: 0; display: flex; align-items: center; gap: 0.1rem; flex-wrap: wrap; }
.rv-reported { font-size: 0.88rem; color: var(--trail); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.rv-helpful[aria-pressed="true"] { color: var(--trail); }
.rv-helpful[aria-pressed="true"]::after { content: " \2713"; }
.rv-empty { margin: 1.25rem 0; color: var(--mute); font-size: 0.95rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.rv-checked { margin: 1rem 0 0; font-size: 0.83rem; color: var(--mute); }

/* Text-link buttons, 44px tall */
.rv-textlink {
  appearance: none; background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 0.35rem; display: inline-flex; align-items: center;
  font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.rv-item .rv-textlink:first-child, .rv-top-card .rv-textlink { padding-left: 0; }
.rv-textlink:focus-visible, .rv-write:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }

/* Form dialog: modal on desktop */
.rv-dialog {
  width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--tyvek); color: var(--ink); box-shadow: 0 18px 50px rgba(28,25,23,.25);
}
.rv-dialog::backdrop { background: rgba(28,25,23,.45); }
.rvf-wrap { padding: 1.5rem 1.5rem 1.25rem; }
.rvf-title { font-family: var(--font-body); font-size: 1.3rem; font-weight: 700; line-height: 1.25; margin: 0; }
.rvf-race { margin: 0.2rem 0 1rem; color: var(--mute); font-size: 0.9rem; }
.rvf-sub { margin: 0.25rem 0; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.rvf-optional { color: var(--mute); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.8rem; }
.rvf-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.15rem 1.25rem; margin: 0.75rem 0 0.5rem; padding: 0.75rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rvf-cats .rvf-sub { grid-column: 1 / -1; }
.rvf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.rvf-field { display: block; margin: 0.6rem 0; }
.rvf-label { display: block; margin-bottom: 0.25rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.rvf-input { width: 100%; min-height: 44px; font: inherit; font-size: 0.95rem; color: var(--ink); background: #fff; border: 1px solid var(--mute); border-radius: 6px; padding: 0.55rem 0.65rem; }
.rvf-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
textarea.rvf-input { resize: vertical; min-height: 6.5rem; line-height: 1.5; }
.rvf-hint { display: block; margin-top: 0.25rem; font-size: 0.8rem; color: var(--mute); }
.rvf-upload {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; min-height: 52px; padding: 0.5rem 0.85rem;
  border: 1.5px dashed var(--mute); border-radius: 6px; cursor: pointer;
}
.rvf-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rvf-upload:has(.rvf-file:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.rvf-upload-text { font-weight: 700; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; }
.rvf-upload-names { font-size: 0.85rem; color: var(--mute); word-break: break-all; }
.rvf-spam {
  display: flex; align-items: center; justify-content: center; width: 300px; max-width: 100%; height: 65px; margin: 0.75rem 0 0.4rem;
  border: 1.5px dashed var(--mute); border-radius: 6px; font-size: 0.8rem; font-weight: 700; color: var(--mute);
}
.rvf-checked { margin: 0 0 0.9rem; font-size: 0.85rem; color: var(--mute); }
.rvf-error { margin: 0.1rem 0 0; color: #a33215; font-size: 0.85rem; font-weight: 700; }
.rvf-actions { display: flex; align-items: center; gap: 1.25rem; }
.rvf-submit { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; min-height: 44px; padding: 0 1.75rem; }
.rvf-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rvf-thanks { padding: 0.5rem 0; }
.rvf-thanks:focus { outline: none; }
.rvf-thanks .rv-example-tag { margin: 0.5rem 0 0.5rem; }

/* Star picker: native radio group (arrow keys work) */
.star-pick { border: 0; margin: 0.35rem 0; padding: 0; min-width: 0; }
.star-pick legend { padding: 0; margin-bottom: 0.15rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.star-pick--sm legend { text-transform: none; letter-spacing: 0; font-size: 0.85rem; font-weight: 500; }
.star-row { display: flex; align-items: center; }
.star-pick label { position: relative; cursor: pointer; line-height: 1; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; }
.star-pick--sm label { min-width: 36px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.star-glyph { display: block; font-size: 1.35rem; color: transparent; -webkit-text-stroke: 1.4px var(--mute); }
.star-pick--lg .star-glyph { font-size: 2rem; }
.star-pick label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: -2px; }
.star-pick[data-value="1"] label:nth-of-type(-n+1) .star-glyph,
.star-pick[data-value="2"] label:nth-of-type(-n+2) .star-glyph,
.star-pick[data-value="3"] label:nth-of-type(-n+3) .star-glyph,
.star-pick[data-value="4"] label:nth-of-type(-n+4) .star-glyph,
.star-pick[data-value="5"] label:nth-of-type(-n+5) .star-glyph { color: var(--heat); -webkit-text-stroke-color: var(--heat); }
.star-value { margin-left: 0.4rem; font-size: 0.85rem; color: var(--mute); }

/* Tablet and phone: one column */
@media (max-width: 999px) {
  .rv-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .rv-left { position: static; }
}
@media (max-width: 640px) {
  .race-detail-actions { gap: 0.6rem; }
  .rv-write { width: 100%; justify-content: center; }
  .rv-top { grid-template-columns: 1fr; }
  .rv-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .rv-sel select { width: 100%; }
  .rv-photo { width: 78px; height: 78px; }

  .rv-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .rvf-wrap { padding: 1.25rem 1rem 1.5rem; }
  .rvf-cats { grid-template-columns: 1fr; }
  .rvf-row { grid-template-columns: 1fr; gap: 0; }
  .rvf-actions { position: sticky; bottom: 0; background: var(--tyvek); padding: 0.75rem 0 0.25rem; }
  .rvf-submit { flex: 1; }
  .star-pick--sm label { min-width: 44px; }
}

.rv [hidden], .rv-dialog [hidden] { display: none !important; }
.rv-photo { width: 80px; height: 80px; text-align: center; }
.rv-photo-label { line-height: 1.2; }

/* Live build additions */
.btn-running[hidden], .rv[hidden] { display: none !important; }
.rv-bd-row:disabled, .rv-bd-row.is-empty { opacity: 0.45; cursor: not-allowed; }
.rv-bd-row:disabled:hover { background: transparent; }
.rv-bd-row:disabled .rv-bd-label { text-decoration: none; }
.rv-overall-wait { font-size: 0.95rem; font-weight: 600; color: var(--mute); line-height: 1.4; }
.rv-first { margin: 1.25rem 0 0.5rem; padding: 1.25rem 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius, 8px); background: var(--tyvek); }
.rv-first-title { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 700; }
.rv-first-text { margin: 0; color: var(--mute); }
.rv-photo { overflow: hidden; padding: 0; background: #e6e0d5; flex: 0 0 auto; }
.rv-photo a, .rv-thumb a { display: block; width: 100%; height: 100%; }
.rv-photo img, .rv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-thumb { overflow: hidden; }
.rvf-turnstile { margin: 0.75rem 0 0.25rem; min-height: 65px; }
.rv-helpful:disabled { cursor: default; opacity: 1; }
