/* ==========================================================================
   Content pages — Reviews (list + single), Blog (list + article), Legal.
   Reuses the existing design tokens (theme.css) and card/typography idioms
   so these pages read as the same site, not a bolted-on template.
   ========================================================================== */

/* --------------------------------------------------------------------------
   View switching. New sections are hidden by default and revealed only in
   their own view; when a new view is active, every other <main> section is
   hidden. This avoids editing every legacy section's CSS.
   -------------------------------------------------------------------------- */
#sec-13, #sec-14, #sec-15, #sec-16, #sec-17 { display: none; }

body[data-view="reviews"]       #sec-13,
body[data-view="review-detail"] #sec-14,
body[data-view="blog"]          #sec-15,
body[data-view="article"]       #sec-16,
body[data-view="legal"]         #sec-17 { display: block; }

body[data-view="reviews"]       #main > section:not(#sec-13),
body[data-view="review-detail"] #main > section:not(#sec-14),
body[data-view="blog"]          #main > section:not(#sec-15),
body[data-view="article"]       #main > section:not(#sec-16),
body[data-view="legal"]         #main > section:not(#sec-17) { display: none; }

/* CLS reservation while the fetch loader populates the shells. */
#sec-13:empty, #sec-14:empty, #sec-15:empty,
#sec-16:empty, #sec-17:empty { min-height: 600px; }

/* --------------------------------------------------------------------------
   Home content teaser (#sec-18) — shown ONLY on the home view, right under
   the hero. It's a <div> so it never affects the section:nth-of-type
   background alternation of the real home sections.
   -------------------------------------------------------------------------- */
#sec-18 { display: none; }
body[data-view="home"] #sec-18 { display: block; }

.section--home-featured { background-color: var(--bg-secondary); }
#sec-18:empty { min-height: 400px; }

.hf-block + .hf-block { margin-top: 3rem; }
.hf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.hf-head h2 {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--text-primary);
}
.hf-all {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.hf-all:hover { color: var(--accent-hover); }
.hf-all::after { content: " →"; }

/* --------------------------------------------------------------------------
   Shared prose — used by review bodies, article bodies, and legal docs.
   -------------------------------------------------------------------------- */
.prose {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}
.prose h3 {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { color: var(--text-primary); }

/* Back link shared across single views. */
.content-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.content-back:hover { color: var(--accent); }
.content-back svg { flex: 0 0 auto; }

/* Star rating — shared by review cards + single. */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.rating__stars { display: inline-flex; gap: 1px; color: #e0e0e0; }
.rating__stars .is-on { color: #f5a623; }
.rating__stars svg { width: 16px; height: 16px; }
.rating__num { font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Card grid — shared shell for reviews + blog listings.
   -------------------------------------------------------------------------- */
.r-grid, .b-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .r-grid, .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .r-grid, .b-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.c-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.c-card:hover, .c-card:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.c-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.c-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, #1a1c22 0%, #0a0a0d 100%);
  border-bottom: 1px solid var(--border);
}
.c-card__media--photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Decorative monogram when no cover image is set. */
.c-card__media-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.14);
  text-transform: uppercase;
}
.c-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.c-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.15rem 1.3rem;
  flex: 1 1 auto;
}
.c-card__title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--text-primary);
}
.c-card__excerpt {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.c-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.c-card__meta-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.c-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Single review + single article — shared reading column.
   -------------------------------------------------------------------------- */
.r-single, .b-single, .legal-doc {
  max-width: 760px;
  margin: 0 auto;
}
.content-head { margin-bottom: 1.75rem; }
.content-head__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.content-head__title {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 0.9rem;
}
.content-head__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.content-head__meta-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.content-cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #1a1c22 0%, #0a0a0d 100%);
  background-size: cover;
  background-position: center;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
}

/* Review verdict + pros/cons blocks. */
.r-verdict {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0;
}
.r-verdict__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.r-verdict p { margin: 0; color: var(--text-primary); font-weight: 500; }

.r-proscons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
}
@media (min-width: 620px) {
  .r-proscons { grid-template-columns: 1fr 1fr; }
}
.r-proscons__col {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}
.r-proscons__col h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  margin: 0 0 0.7rem;
  color: var(--text-primary);
}
.r-proscons__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.r-proscons__col li { position: relative; padding-left: 1.5rem; font-size: 0.92rem; line-height: 1.5; color: var(--text-secondary); }
.r-proscons__col li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.r-proscons__pros li::before { content: "✓"; color: var(--success); }
.r-proscons__cons li::before { content: "✕"; color: var(--accent); }

/* Article category chip. */
.b-single .content-head__eyebrow { color: var(--accent); }

/* Legal doc — slightly tighter, includes "last updated". */
.legal-doc .content-head__title { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.75rem;
}

/* --------------------------------------------------------------------------
   Author byline foot — reused on single review + article.
   -------------------------------------------------------------------------- */
.content-foot {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.content-foot__note { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
