/* comparison.css — extends theme.css, never duplicates its variables */

/* ─── Nav ─────────────────────────────────────────────────────────────── */
.comp-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.comp-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-muted);
}

.nav-sep { color: var(--border); }

/* ─── Header / Hero ───────────────────────────────────────────────────── */
.comp-header {
  padding: 56px 24px 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
}

.comp-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.comp-breadcrumb {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comp-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.comp-h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.comp-intro {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 760px;
  line-height: 1.75;
  margin-bottom: 36px;
}

/* Quick Picks */
.quick-picks {
  margin-bottom: 32px;
}

.qp-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.qp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.qp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.qp-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity 0.2s;
}

.qp-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-1px);
}

.qp-card:hover::before { opacity: 1; }

.qp-rank {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  min-width: 36px;
}

.qp-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  flex: 1;
}

.qp-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.qp-arrow {
  color: var(--fg-muted);
  font-size: 16px;
  transition: transform 0.15s;
}

.qp-card:hover .qp-arrow { transform: translateX(3px); }

/* Meta row */
.comp-meta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.comp-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-muted);
}

.comp-meta-item svg { opacity: 0.6; }

/* ─── Page Layout (TOC + Main) ────────────────────────────────────────── */
.toc-rail {
  position: sticky;
  top: 60px;
  width: 240px;
  flex-shrink: 0;
  align-self: flex-start;
  padding: 32px 0 32px 24px;
  display: none; /* shown at desktop via media query */
}

.comp-page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* Show TOC + adjust layout at desktop */
@media (min-width: 1024px) {
  .toc-rail { display: block; }

  .toc-sticky {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
  }

  .comp-main {
    flex: 1;
    min-width: 0;
  }
}

/* Make the toc-rail + comp-main siblings layout correctly */
body > .toc-rail,
body > .comp-main {
  display: block;
}

/* On desktop we use a wrapper approach: toc in left col, main in right */
/* The EJS renders them as siblings — we float the toc */
@media (min-width: 1024px) {
  .toc-rail {
    float: left;
    width: 220px;
    margin-left: calc((100vw - var(--max-w)) / 2);
    padding-left: 24px;
  }

  .comp-main {
    margin-left: calc((100vw - var(--max-w)) / 2 + 244px + 24px);
    margin-right: calc((100vw - var(--max-w)) / 2);
    padding-right: 24px;
  }
}

/* TOC styles */
.toc-heading {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.toc-link:hover,
.toc-link.active {
  background: var(--accent-dim);
  color: var(--fg);
}

.toc-rank {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  min-width: 24px;
}

.toc-name { flex: 1; }

.toc-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.toc-link-faq {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ─── Entries ─────────────────────────────────────────────────────────── */
.comp-main {
  padding: 40px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.entries-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entry-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  transition: border-color 0.2s;
}

.entry-section:hover {
  border-color: rgba(0, 232, 157, 0.15);
}

/* Entry header */
.entry-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.entry-rank-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 52px;
}

.entry-rank-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), rgba(0,232,157,0.4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.entry-official-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.entry-title-block { flex: 1; }

.entry-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.entry-tagline {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Rating block */
.entry-rating-block {
  text-align: right;
  flex-shrink: 0;
}

.entry-score {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.entry-stars {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.star { font-size: 16px; }
.star-full  { color: var(--accent); }
.star-half  { color: var(--accent); opacity: 0.6; }
.star-empty { color: var(--fg-muted); opacity: 0.3; }

.entry-review-count {
  font-size: 12px;
  color: var(--fg-muted);
}

/* Entry body */
.entry-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
}

.entry-description {
  padding: 28px 32px;
  border-right: 1px solid var(--border);
}

.entry-description p {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 24px;
}

.entry-details-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.detail-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}

.detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-muted);
  font-weight: 600;
}

.detail-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.accent-val { color: var(--accent); }

/* Pros / Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pc-heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.pc-heading-pros { color: var(--accent); }
.pc-heading-cons { color: #ff6b6b; }

.pc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pc-item {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
  padding-left: 20px;
  position: relative;
}

.pc-item::before {
  position: absolute;
  left: 0;
  font-size: 13px;
  top: 1px;
}

.pc-pro { color: #b8f5d8; }
.pc-pro::before { content: '✓'; color: var(--accent); }
.pc-con::before { content: '✕'; color: #ff6b6b; }

/* CTA column */
.entry-cta {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  background: var(--bg-card);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  width: 100%;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.cta-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.cta-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

.cta-disclaimer {
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.4;
}

/* ─── FAQ ─────────────────────────────────────────────────────────────── */
.faq-section {
  padding: 80px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-header h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.faq-subhead {
  color: var(--fg-muted);
  font-size: 16px;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: rgba(0,232,157,0.2);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  user-select: none;
}

.faq-q::-webkit-details-marker { display: none; }

.faq-chevron {
  flex-shrink: 0;
  color: var(--fg-muted);
  transition: transform 0.25s ease;
}

.faq-a {
  padding: 0 22px 18px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.75;
}

/* ─── Disclosure ──────────────────────────────────────────────────────── */
.disclosure-bar {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.disclosure-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.disclosure-inner svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--fg-muted);
}

.disclosure-inner p {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ─── Footer ──────────────────────────────────────────────────────────── */
.comp-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-top: 40px;
}

.comp-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
}

.footer-sep { color: var(--fg-muted); }

.footer-tagline {
  color: var(--fg-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--fg); }

.footer-legal {
  font-size: 12px;
  color: var(--fg-muted);
  max-width: 600px;
  line-height: 1.5;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .entry-body {
    grid-template-columns: 1fr;
  }

  .entry-description {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 20px;
  }

  .entry-cta {
    padding: 20px 20px;
  }

  .entry-header {
    flex-wrap: wrap;
    padding: 20px 20px 16px;
  }

  .entry-rating-block {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .entry-stars { justify-content: flex-start; }
  .entry-review-count { white-space: nowrap; }
}

@media (max-width: 680px) {
  .qp-grid {
    grid-template-columns: 1fr;
  }

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .comp-h1 {
    font-size: 28px;
  }

  .entry-name {
    font-size: 20px;
  }

  .entry-score {
    font-size: 32px;
  }
}
