/* Reviews page (/reviews). Loaded before modern.css, so rules that must win over a component scope themselves under the
   page's own classes (.rv-*). Built on the shared components: .pagehead--split, .orbit-photo, .seal, .float-card, the
   reviews marquee (.reviews--marquee, .marquee), .head, .check-list, .cta-band. Colors are the modern.css tokens only.
   Light theme only. Every motion rule is gated on html.motion inside prefers-reduced-motion: no-preference; the plain
   rules are the settled state. */

/* ---------- 1. Header: Dr. Saad in an orbit frame, the seal on its edge, a rating card and one quote floating ---------- */
.pagehead.rv-head { padding-bottom: 112px; }
@media (min-width: 1024px) { .pagehead.rv-head { padding-bottom: 168px; } }
.rv-hero { position: relative; max-width: 480px; margin-inline: auto; }
.rv-hero .rv-hero__orbit { padding: 9% 0; }
.rv-hero .rv-hero__orbit > .photo { width: 80%; margin-inline: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.rv-hero__orbit .orbit-photo__ring { width: 100%; aspect-ratio: 0.96; }
.rv-hero__node {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: #fff; box-shadow: 0 10px 30px rgba(14, 42, 58, 0.12);
}
.rv-hero__node .icon { width: 24px; height: 24px; }
.rv-hero__node--a { left: 33%; top: 9%; color: var(--star); }
.rv-hero__node--b { left: 84%; top: 86%; color: var(--brand); }
@media (max-width: 639.98px) {
  .rv-hero__node { width: 46px; height: 46px; margin: -23px 0 0 -23px; } .rv-hero__node .icon { width: 20px; height: 20px; }
  /* On phones the rating card and the quote cover the ring's lower right, so the quote disc rides its upper right. */
  .rv-hero__node--b { left: 93%; top: 30%; }
}
.rv-hero .seal--rv { position: absolute; z-index: 4; left: 0; top: 30%; width: 104px; height: 104px; }
.rv-hero .seal--rv .seal__mark { width: 32px; height: 32px; }
.rv-hero .rv-hero__rating { top: 6%; right: 0; }
.rv-hero__rating .float-card__icon--num { width: 48px; height: 48px; }
.rv-hero__rating .float-card__body { gap: 4px; }
.rv-hero .rv-hero__quote {
  left: 0; right: auto; bottom: 0; margin: 0; max-width: min(320px, 88%);
  flex-direction: column; align-items: stretch; gap: 12px; padding: 18px 20px 16px;
}
.rv-hero__quote blockquote { margin: 0; }
.rv-hero__quote p { margin: 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.rv-hero__quote p::before { content: "\201C"; }
.rv-hero__quote p::after { content: "\201D"; }
.rv-hero__quote figcaption { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 0.8125rem; line-height: 1.3; color: var(--muted); }
.rv-hero__quote figcaption > span:last-child { display: grid; }
.rv-hero__quote figcaption b { font-size: 0.875rem; color: var(--ink); }
.rv-hero__quote .review__avatar { width: 34px; height: 34px; font-size: 0.875rem; }
@media (max-width: 639.98px) {
  .rv-hero .seal--rv { width: 88px; height: 88px; top: 4%; }
  .rv-hero .seal--rv .seal__mark { width: 26px; height: 26px; }
  .rv-hero .rv-hero__rating { top: 47%; right: 0; padding: 10px 14px 10px 10px; }
  /* On phones the quote leaves the photo and tucks under its bottom edge, so it covers none of Dr. Saad. */
  .rv-hero .rv-hero__quote { position: relative; left: auto; bottom: auto; max-width: none; margin: -40px 12px 0; }
  .rv-hero .rv-hero__orbit { padding-bottom: 0; }
}
@media (min-width: 1024px) {
  .rv-hero { max-width: none; }
  .rv-hero .seal--rv { left: -30px; top: 34%; width: 124px; height: 124px; }
  .rv-hero .seal--rv .seal__mark { width: 38px; height: 38px; }
  .rv-hero .rv-hero__rating { top: 9%; right: -24px; }
  .rv-hero .rv-hero__quote { left: -64px; bottom: 4%; }
}

/* The two buttons share one row at 1440 (the ghost pill gives back a few pixels of padding). */
.rv-head .pagehead__actions .btn--ghost { padding-inline: 22px; }

/* ---------- 2. Stat cards straddling the header's bottom edge ---------- */
.rv-stats { position: relative; z-index: 3; margin-top: -80px; margin-bottom: 8px; }
.rv-stats__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.rv-stat {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px 18px 16px;
  border-radius: var(--r-card); background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-float);
}
.rv-stat__label { order: 0; font-size: 0.8125rem; font-weight: 650; line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.rv-stat__num {
  margin: 0; font-family: var(--display); font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem); font-weight: 700; line-height: 1;
  letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums lining-nums;
}
.rv-stat__num small { font-size: 0.42em; font-weight: 700; letter-spacing: -0.01em; color: var(--accent); margin-left: 3px; }
.rv-stat__extra { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 0.875rem; line-height: 1.35; color: var(--muted); }
.rv-stat__extra > .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.rv-stat__extra .stars { color: var(--star); }
@media (max-width: 639.98px) {
  .rv-stats { margin-top: -64px; } .rv-stat__extra--note { display: none; }
  /* Two lines kept for every label, so the numbers line up across each row when one label wraps. */
  .rv-stat__label { font-size: 0.75rem; min-height: 2.6em; }
}
@media (min-width: 1024px) {
  .rv-stats { margin-top: -112px; }
  .rv-stats__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .rv-stat { padding: 26px 28px 24px; }
}

/* ---------- 3. The moving band ---------- */
.reviews--marquee.rv-band { padding-block: 56px; }
@media (min-width: 1024px) { .reviews--marquee.rv-band { padding-block: 80px; } }
.rv-band__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; }
.rv-band__title { max-width: 18ch; }
.rv-band__lede { margin-top: 12px; max-width: 46ch; color: var(--on-ink-muted); font-size: 1rem; }
.rv-band .marquee { margin-top: 36px; }
/* The band holds the shortest reviews so none is cut short; the shared seven-line clamp is lifted as a guarantee. */
.reviews--marquee.rv-band .review__text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.rv-band .rv-band__controls { margin-top: 0; }

/* ---------- 4. The wall ---------- */
.rv-all__span {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--offwhite); color: var(--muted); font-size: 0.9375rem; line-height: 1.35;
}
.rv-all__span .icon { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--mint); color: var(--ink); flex: none; }
.rv-all__span b { color: var(--ink); font-weight: 650; }

/* The filter: chips are radio labels. Hidden unless :has() exists (it is what applies the filter without a script). It is
   not sticky: a choice made deep in the wall would shrink the wall above the reader and leave them past it. The chips
   wrap onto as many lines as they need, so every topic, and the one picked, is always in view. */
.rv-filter { display: none; min-width: 0; margin: 0 0 32px; padding: 0; border: 0; }
@supports selector(:has(*)) {
  .rv-filter {
    display: block; position: relative; z-index: 2;
    padding: 10px; border-radius: var(--r-card); background: var(--glass); border: 1px solid var(--rule);
    box-shadow: var(--shadow-float);
  }
}
.rv-filter__legend { float: left; width: 100%; padding: 2px 6px 8px; font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.rv-filter__chips { display: flex; flex-wrap: wrap; gap: 8px; clear: both; } /* below the full-width legend */
/* "8 of 30 reviews mention First visits": written by site.js when a chip is picked, read out by screen readers. */
.rv-filter__status { clear: both; margin: 0; padding: 12px 6px 2px; font-size: 0.9375rem; color: var(--muted); }
.rv-filter__status:empty { display: none; }
.rv-filter__status b { color: var(--ink); font-weight: 650; }
/* The legend sits beside the chips only where they fit on about two lines; below 1280 it stays above them. */
@media (min-width: 1280px) { .rv-filter__legend { width: auto; padding: 0 14px 0 8px; line-height: 44px; } .rv-filter__chips { clear: none; } }
.rv-filter__input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.rv-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 6px 0 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--rule); color: var(--ink); cursor: pointer;
  font-family: var(--display); font-size: 0.9375rem; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease, color var(--t-ui) ease;
}
.rv-chip .icon { width: 18px; height: 18px; color: var(--accent); margin-left: -2px; transition: color var(--t-ui) ease; }
.rv-chip__n {
  display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px;
  background: var(--mint-soft); color: var(--ink); font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease;
}
/* Phones: slightly smaller chips, so the wrapped set takes fewer lines. */
@media (max-width: 639.98px) {
  .rv-chip { min-height: 40px; gap: 6px; padding: 0 4px 0 12px; font-size: 0.875rem; }
  .rv-chip__n { min-width: 28px; height: 28px; padding: 0 7px; font-size: 0.75rem; }
}
.rv-chip:hover { border-color: var(--ink); }
.rv-filter__input:checked + .rv-chip { background: var(--ink); border-color: var(--ink); color: #fff; }
.rv-filter__input:checked + .rv-chip .icon { color: var(--on-ink-accent); }
.rv-filter__input:checked + .rv-chip .rv-chip__n { background: #fff; color: var(--ink); }
.rv-filter__input:focus-visible + .rv-chip { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The filter itself: the chosen key hides every card that does not carry it. site.js does the same with the hidden
   attribute (and shows the matching cards at once); these rules are the no-script path. */
.rv-item[hidden] { display: none !important; }
@supports selector(:has(*)) {
  .rv-browse:has(#rv-t-staff:checked) .rv-item:not([data-topics~="staff"]),
  .rv-browse:has(#rv-t-saad:checked) .rv-item:not([data-topics~="saad"]),
  .rv-browse:has(#rv-t-first:checked) .rv-item:not([data-topics~="first"]),
  .rv-browse:has(#rv-t-ease:checked) .rv-item:not([data-topics~="ease"]),
  .rv-browse:has(#rv-t-clean:checked) .rv-item:not([data-topics~="clean"]),
  .rv-browse:has(#rv-t-kids:checked) .rv-item:not([data-topics~="kids"]),
  .rv-browse:has(#rv-t-urgent:checked) .rv-item:not([data-topics~="urgent"]) { display: none; }
}

/* Masonry by columns: one, two from 640, three from 1024; a card never splits across columns. */
.rv-wall { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 20px; }
@media (min-width: 640px) { .rv-wall { columns: 2; } }
@media (min-width: 1024px) { .rv-wall { columns: 3; column-gap: 24px; } }
.rv-item { display: block; break-inside: avoid; padding-bottom: 20px; }
@media (min-width: 1024px) { .rv-item { padding-bottom: 24px; } }

.rv-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 26px 24px 20px;
  border-radius: var(--r-card); background: var(--offwhite); box-shadow: var(--shadow-sm);
}
.rv-card::before {
  content: ""; position: absolute; right: 22px; top: 22px; width: 34px; height: 27px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 32'%3E%3Cpath fill='%23C6E3DE' d='M0 32V19.2C0 8.6 5.4 2.2 16.2 0l2 4.4C12.6 6 9.8 9.6 9.4 15H17v17H0Zm23 0V19.2C23 8.6 28.4 2.2 39.2 0l2 4.4C35.6 6 32.8 9.6 32.4 15H40v17H23Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.rv-card--mint { background: var(--mint-soft); }
.rv-card--mint::before { filter: brightness(0.92); }
.rv-card--sky { background: linear-gradient(160deg, var(--tint) 0%, #fff 92%); box-shadow: inset 0 0 0 1px var(--tint-2); }
.rv-card__top { display: flex; align-items: center; gap: 10px; padding-right: 48px; }
.rv-card__top .stars { color: var(--star); }
.rv-card__src { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.rv-card__quote { margin: 0; }
.rv-card__quote p { margin: 0; font-size: 1.0625rem; font-weight: 500; line-height: 1.6; color: var(--ink); text-wrap: pretty; overflow-wrap: break-word; }
.rv-card__quote p::before { content: "\201C"; }
.rv-card__quote p::after { content: "\201D"; }
.rv-card--big .rv-card__quote p { font-size: 1.25rem; font-weight: 550; line-height: 1.45; letter-spacing: -0.012em; }
@media (min-width: 1024px) { .rv-card--big .rv-card__quote p { font-size: 1.375rem; } }
.rv-card__cut { display: flex; align-items: flex-start; gap: 6px; margin: -4px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.rv-card__cut .icon { width: 15px; height: 15px; margin-top: 1px; flex: none; color: var(--accent); }
.rv-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rv-card__tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: #fff; border: 1px solid var(--rule); font-size: 0.75rem; font-weight: 650; line-height: 1; color: var(--accent); }
.rv-card--mint .rv-card__tag { border-color: transparent; }
.rv-card__by { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.35; }
.rv-card--mint .rv-card__by { border-top-color: rgba(14, 42, 58, 0.1); }
.rv-card__by > span:last-child { display: grid; }
.rv-card__name { font-weight: 700; color: var(--ink); }
.rv-card__when { font-size: 0.8125rem; color: var(--muted); }
.rv-card--mint .review__avatar { background: #fff; }

/* ---------- 5. How they are printed, and the Google profile card ---------- */
.rv-how__text .head { margin-bottom: 32px; }
.rv-how .rv-how__list li { font-size: 1rem; }
.rv-profile {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 28px; padding: 32px 24px;
  border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-lg);
}
.rv-profile__orbit { position: absolute; z-index: -1; width: 420px; height: 420px; right: -190px; top: -200px; border-radius: 50%; border: 1px solid var(--rule-ink); pointer-events: none; }
.rv-profile__orbit::before { content: ""; position: absolute; inset: 56px; border-radius: 50%; border: 1px dashed rgba(14, 42, 58, 0.12); }
.rv-profile__orbit::after { content: ""; position: absolute; left: 14%; bottom: 14.6%; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 6px rgba(1, 171, 238, 0.18); }
.rv-profile__label { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--tint); font-size: 0.875rem; font-weight: 650; color: var(--ink); }
.rv-profile__label .icon { width: 18px; height: 18px; color: var(--accent); }
.rv-profile__body { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px; }
.rv-profile__score { display: grid; gap: 8px; justify-items: start; }
.rv-profile__num { font-family: var(--display); font-size: clamp(3.5rem, 2.6rem + 3vw, 5rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em; color: var(--ink); }
.rv-profile__score .stars { color: var(--star); }
.rv-profile__score p { margin: 0; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.rv-profile__score p b { color: var(--ink); }
.rv-profile__more { margin: -8px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }
.rv-profile .rv-profile__btn { width: 100%; justify-content: space-between; }
.rv-ring { position: relative; width: 136px; aspect-ratio: 1; flex: none; }
.rv-ring svg { width: 100%; height: 100%; overflow: visible; }
.rv-ring circle { fill: none; stroke-width: 9; }
.rv-ring__track { stroke: var(--tint); }
.rv-ring__arc {
  stroke: var(--brand); stroke-linecap: round; stroke-dasharray: var(--circ); stroke-dashoffset: var(--arc);
  transform: rotate(-90deg); transform-box: fill-box; transform-origin: 50% 50%;
}
.rv-ring__in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 18px; }
.rv-ring__in b { font-family: var(--display); font-size: 1.75rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.rv-ring__in span { margin-top: 4px; font-size: 0.75rem; line-height: 1.3; color: var(--muted); }
@media (max-width: 479.98px) {
  .rv-profile__body { grid-template-columns: 1fr; justify-items: start; }
  .rv-profile .rv-profile__btn { white-space: normal; text-align: left; line-height: 1.25; }
}
@media (min-width: 768px) { .rv-profile { padding: 44px 40px; } .rv-ring { width: 164px; } .rv-ring__in b { font-size: 2.125rem; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* The hero quote and rating bob gently once they are in (the rise comes from the shared pagehead sequence). */
  html.motion .rv-hero .rv-hero__rating { animation: pw-rise 600ms var(--ease-apex) 450ms backwards, pw-float 7s ease-in-out 2.2s infinite; }
  html.motion .rv-hero .rv-hero__quote { animation: pw-rise 600ms var(--ease-apex) 540ms backwards, pw-float 8s ease-in-out 3s infinite; }
  /* Stat cards rise in on load, one after another, as the reference's do. */
  html.motion .rv-stat { animation: pw-rise 800ms var(--ease-apex) backwards; }
  html.motion .rv-stat:nth-child(1) { animation-delay: 550ms; }
  html.motion .rv-stat:nth-child(2) { animation-delay: 650ms; }
  html.motion .rv-stat:nth-child(3) { animation-delay: 750ms; }
  html.motion .rv-stat:nth-child(4) { animation-delay: 850ms; }
  /* Each time a chip is picked, the matching cards fade up into place (site.js replays it with .is-filtered). */
  html.motion .rv-browse.is-filtered .rv-item { animation: rv-in 500ms var(--ease-apex) backwards; }
  html.motion .rv-chip:active { transform: scale(0.97); }
  html.motion .rv-chip { transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease, color var(--t-ui) ease, transform 160ms ease; }
  /* The ring draws its arc when the card comes in. */
  html.motion .rv-ring__arc { transition: stroke-dashoffset 1600ms var(--ease-io) 350ms; }
  html.motion .rv-profile:not(.is-in) .rv-ring__arc { stroke-dashoffset: var(--circ); }
  
  html.motion .rv-hero__node { animation: pw-scale-in 700ms var(--ease-apex) backwards; }
  html.motion .rv-hero__node--a { animation-delay: 950ms; }
  html.motion .rv-hero__node--b { animation-delay: 1100ms; }
  @keyframes rv-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media print {
  .rv-filter, .rv-band, .rv-hero__quote, .rv-hero__rating, .seal--rv { display: none !important; }
  .rv-wall { columns: 2; }
}
