/* =============================================
   REPORT COMPONENTS — shared across all reports
   Extends report-styles.css with common patterns
   that were previously duplicated in inline <style> blocks.
   ============================================= */

/* ===== DOT GRID BACKGROUND ===== */
.page-body { position: relative; }
.page-body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(circle, rgba(34,197,94,.12) 1px, transparent 1px);
  background-size: 32px 32px;
}
.page-body > * { position: relative; z-index: 1; }

/* ===== GRADIENT H1 ===== */
.report-hero h1 {
  background: linear-gradient(135deg, #f0f0f0 0%, #22c55e 60%, #4ade80 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hl { font-style: normal; }

/* ===== HERO NUMBERS (big stat row) ===== */
.hero-numbers {
  display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; margin: 32px 0;
}
.hero-num { padding: 28px 16px; text-align: center; }
.hero-num .big {
  font-size: 2.25rem; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  line-height: 1; margin-bottom: 4px;
}
.hero-num .big.green { color: var(--accent); }
.hero-num .big.blue { color: var(--blue); }
.hero-num .big.amber { color: var(--amber); }
.hero-num .big.red { color: var(--red); }
.hero-num .label {
  font-size: .6875rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); line-height: 1.3;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.vis, .reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== HERO CTA PAIR ===== */
.hero-cta-pair {
  display: flex; gap: 10px; align-items: center;
  margin: 16px 0 0; flex-wrap: wrap;
}

/* ===== SUMMARY CARD OVERRIDES ===== */
.summary-card {
  background: var(--bg-card); border: none; border-radius: 12px;
  padding: 28px; margin: 28px 0; position: relative; overflow: hidden;
}
.summary-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--accent), var(--blue), var(--purple), var(--accent));
  background-size: 200% 100%;
  animation: shimmerBar 3s ease infinite;
}
@keyframes shimmerBar { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.summary-card .sc-header,
.sc-header {
  font-size: 1.25rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); margin-bottom: 20px;
}
.summary-card .sc-items,
.sc-items {
  display: flex; flex-direction: column; gap: 14px;
}
.summary-card .sc-item,
.sc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 0; border-bottom: none;
  text-decoration: none; color: inherit;
}
.summary-card .sc-item span:last-child,
.sc-item span:last-child {
  font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.4;
}
.sc-item a {
  text-decoration: none; color: var(--text); font-size: 1rem; font-weight: 600; line-height: 1.4;
}
.summary-card .sc-num,
.sc-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; padding: 6px 12px; border-radius: 8px;
  font-size: .875rem; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  background: var(--accent); color: var(--bg);
}

/* ===== SPEED-STAT (Why Care cards) ===== */
.speed-stat {
  display: flex; align-items: center; gap: 20px;
  padding: 24px; margin: 24px 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
}
.speed-stat .ss-num {
  font-size: 3rem; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); line-height: 1; flex-shrink: 0;
}
.speed-stat .ss-num.green { color: var(--accent); }
.speed-stat .ss-num.amber { color: var(--amber); }
.speed-stat .ss-num.red { color: var(--red); }
.speed-stat .ss-body { flex: 1; }
.speed-stat .ss-body strong { color: var(--text); }
.speed-stat .ss-body p { margin: 0; font-size: .9375rem; color: var(--text-dim); line-height: 1.6; }
.speed-stat .ss-src { font-size: .6875rem; color: var(--text-muted); margin-top: 4px; }
.speed-stat .ss-src a { color: var(--text-muted); text-decoration: underline; }

/* ===== CAROUSEL ===== */
.carousel-row {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding: 4px 0; scrollbar-width: none;
}
.carousel-row::-webkit-scrollbar { display: none; }
.carousel-wrap { position: relative; margin: 0 -4px; padding: 0 4px; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(34,197,94,.25); background: rgba(34,197,94,.06);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .25s ease; backdrop-filter: blur(8px); padding: 0;
}
.carousel-arrow:hover {
  background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.5);
  box-shadow: 0 0 20px rgba(34,197,94,.15);
}
.carousel-arrow svg {
  width: 18px; height: 18px; stroke: var(--accent); stroke-width: 2;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.carousel-arrow.left { left: -18px; }
.carousel-arrow.right { right: -18px; }

.carousel-card {
  flex: 0 0 300px; scroll-snap-align: start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column;
}
.carousel-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.carousel-card .card-thumb {
  aspect-ratio: 1200 / 630; margin: 0; border-radius: 0;
  overflow: hidden; position: relative; background: #111;
}
.carousel-card .card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.carousel-card .card-thumb iframe {
  width: 1440px; height: 900px; transform: scale(0.25); transform-origin: top left;
  pointer-events: none; border: none; position: absolute; top: 0; left: 0;
}
.carousel-card .card-thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: var(--text-muted); font-weight: 600;
  background: linear-gradient(135deg, var(--bg-card) 0%, #111 100%); border-radius: 0;
}
.carousel-card .card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.carousel-card .card-body .sc-badge { margin-bottom: 8px; }
.carousel-card .card-body .sc-title { font-size: .9375rem; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.carousel-card .card-body .sc-desc { font-size: .8125rem; color: var(--text-dim); line-height: 1.5; flex: 1; }
.carousel-card .card-body .sc-arrow { font-size: .8125rem; font-weight: 600; color: var(--accent); margin-top: 8px; display: block; }

/* ===== YOUTUBE THUMBNAIL CARDS ===== */
.yt-thumb-card {
  position: relative; display: block; border-radius: 12px; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); margin: 0 0 12px;
  transition: border-color .3s, transform .2s;
}
.yt-thumb-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.yt-thumb-wrap { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.yt-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s; }
.yt-thumb-card:hover .yt-thumb-wrap img { opacity: .8; }
.yt-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 68px; height: 48px; background: rgba(255,0,0,.85); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; transition: background .3s;
}
.yt-thumb-card:hover .yt-play-btn { background: #ff0000; }
.yt-play-btn::after {
  content: ''; display: block; width: 0; height: 0;
  border-style: solid; border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff; margin-left: 3px;
}
.yt-thumb-caption {
  padding: 12px 16px; font-size: .8125rem; color: var(--text-dim);
  border-top: 1px solid var(--border);
}
.yt-thumb-caption strong { color: var(--text); }
.yt-ext-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .625rem; color: var(--text-muted); font-weight: 600;
  margin-left: 8px; text-transform: uppercase; letter-spacing: .05em;
}

/* ===== EMBED GRID ===== */
.embed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }

/* ===== SECTION HEADER ===== */
.section-hd { margin: 48px 0 24px; }
.section-hd h2 { margin: 0 0 6px; }
.sh-sub, .section-sub { font-size: .9375rem; color: var(--text-dim); margin: 0; line-height: 1.5; }

/* ===== KEY FINDINGS (LLM citation target) ===== */
.key-findings {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 28px;
  margin: 24px 0;
}
.key-findings h2 {
  font-size: .875rem; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px;
}
.key-findings ul { list-style: none; margin: 0; padding: 0; }
.key-findings li {
  padding: 6px 0; color: var(--text-dim); font-size: .9375rem;
  line-height: 1.6; border-bottom: 1px solid var(--border);
}
.key-findings li:last-child { border-bottom: none; }

/* ===== DATA FRESHNESS BADGE ===== */
.data-freshness {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: .75rem;
  color: var(--text-dim);
}
.data-freshness .pulse, .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

/* ===== IMPLEMENT GRID (5 takeaways) ===== */
.implement-grid {
  display: grid; gap: 16px; margin: 24px 0; counter-reset: implement;
}
.implement-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 20px 20px 64px; position: relative; counter-increment: implement;
}
.implement-item::before {
  content: counter(implement); position: absolute; left: 20px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 700; color: var(--accent);
}
.implement-item h4 { font-size: .9375rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.implement-item p { font-size: .875rem; color: var(--text-dim); line-height: 1.6; margin: 0; }

/* ===== LM CALLOUT (soft CTA) ===== */
.lm-callout {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid rgba(34,197,94,.2);
  border-radius: 12px; padding: 24px; margin: 32px 0;
}
.lm-callout-icon {
  font-size: 1.5rem; color: var(--accent); flex-shrink: 0; margin-top: 2px;
}
.lm-callout-body { flex: 1; }
.lm-callout-body h4 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.lm-callout-body p { font-size: .9375rem; color: var(--text-dim); line-height: 1.6; margin: 0 0 12px; }
.lm-callout .lm-link, .lm-link {
  font-size: .9375rem; font-weight: 600; color: var(--accent);
  text-decoration: none; display: inline-block;
}
.lm-link:hover { text-decoration: underline; }

/* ===== FAQ SECTION ===== */
.faq-section {
  margin: 48px 0; border-top: 1px solid var(--border); padding-top: 32px;
}
.faq-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px; font-weight: 600; font-size: .9375rem;
  cursor: pointer; color: var(--text); background: var(--bg-card); list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-answer, .faq-item div {
  padding: 0 20px 16px; color: var(--text-dim); font-size: .9375rem;
  line-height: 1.7; background: var(--bg-card);
}

/* ===== CALLOUT / INSIGHT BOX ===== */
.callout {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px; margin: 32px 0;
}
.callout.insight { border-left: 3px solid var(--accent); }
.callout-label {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent); margin-bottom: 8px;
}
.callout p { font-size: .9375rem; color: var(--text-dim); line-height: 1.6; margin: 0; }
.callout strong { color: var(--text); }

/* ===== LEAD MAGNET UNIFIED ===== */
.free-report-unified {
  background: var(--bg-card); border: 1px solid rgba(34,197,94,.25);
  border-radius: 16px; padding: 40px 32px; margin: 48px 0; text-align: center;
}
.lmu-eyebrow {
  font-size: .6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 12px;
}
.free-report-unified h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.free-report-unified > p { color: var(--text-dim); font-size: .9375rem; line-height: 1.6; max-width: 600px; margin: 0 auto 24px; }
.lmu-points {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin-bottom: 24px;
}
.lmu-point {
  font-size: .875rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px;
}
.lmu-point .check { color: var(--accent); font-weight: 700; }
.lmu-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--bg); padding: 14px 32px;
  font-size: 1rem; font-weight: 700; border-radius: var(--radius);
  text-decoration: none; transition: all .2s;
}
.lmu-cta:hover { background: var(--accent-dim); transform: translateY(-2px); box-shadow: 0 6px 24px var(--accent-glow); }
.lmu-sub { display: block; font-size: .75rem; color: var(--text-muted); margin-top: 12px; }

/* ===== SOURCES & REFERENCES ===== */
.sources-section {
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border);
}
.sources-section h3 {
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 16px;
}
.source-grid { display: grid; gap: 8px; }
.source-card {
  font-size: .9375rem; color: var(--text-dim); line-height: 1.6;
  padding: 10px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
}
.source-card strong { color: var(--text); }
.source-card a { color: var(--accent); text-decoration: none; }
.source-card a:hover { text-decoration: underline; }
.source-card code {
  font-size: .75rem; background: var(--bg-elevated); padding: 2px 7px;
  border-radius: 4px; font-family: 'JetBrains Mono', monospace; color: var(--accent);
}

/* ===== PRODUCT MENTION ===== */
.product-mention {
  padding: 20px 0; font-size: .875rem; color: var(--text-muted);
  border-top: 1px solid var(--border); margin-top: 40px;
}
.product-mention a { color: var(--accent); text-decoration: none; }
.product-mention a:hover { text-decoration: underline; }

/* ===== SHARED RESPONSIVE ===== */
@media (max-width: 900px) {
  .embed-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .report-hero .subtitle { font-size: .8125rem; }
  .hero-cta-pair { flex-direction: column !important; }
  .hero-cta-pair a { width: 100%; text-align: center; justify-content: center; }
  .hero-numbers { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-num .big { font-size: 1.25rem; }
  .summary-card { padding: 16px; }
  .speed-stat { flex-direction: column; text-align: center; }
  .speed-stat .ss-num { font-size: 2.25rem; }
  .carousel-card { width: 260px !important; min-width: 260px !important; }
  .carousel-arrow { display: none !important; }
  .embed-grid { grid-template-columns: 1fr; }
}

/* ===== TTS DEBUG OVERLAY =====
   Activated by adding ?show_audio_transcript=1 to the URL.
   A tiny script adds .tts-debug to <html> when the param is present.
   Orange wash  = WILL be read by TTS
   No wash      = skipped by TTS
   ========================================= */
html.tts-debug .page-body :is(
  h1, h2, h3, h4, p, li, summary,
  .faq-answer, .tool-name, .tool-desc,
  .check-label, .check-detail,
  .sc-header, .sc-item,
  .source-card,
  .lmu-eyebrow, .lmu-point, .lmu-sub,
  .ct-body, .ct-year, .callout-label,
  .implement-item h4, .implement-item p,
  .why-card h4, .why-card p,
  .lm-callout-body h4, .lm-callout-body p,
  .ss-body p, .section-sub
) {
  position: relative;
}
html.tts-debug .page-body :is(
  h1, h2, h3, h4, p, li, summary,
  .faq-answer, .tool-name, .tool-desc,
  .check-label, .check-detail,
  .sc-header, .sc-item,
  .source-card,
  .lmu-eyebrow, .lmu-point, .lmu-sub,
  .ct-body, .ct-year, .callout-label,
  .implement-item h4, .implement-item p,
  .why-card h4, .why-card p,
  .lm-callout-body h4, .lm-callout-body p,
  .ss-body p, .section-sub
)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 165, 0, 0.18);
  pointer-events: none;
  z-index: 9999;
  border-radius: inherit;
}
/* Cancel orange for text inside [data-tts-skip] ancestors */
html.tts-debug [data-tts-skip] :is(
  h1, h2, h3, h4, p, li, summary,
  .faq-answer, .tool-name, .tool-desc,
  .check-label, .check-detail,
  .sc-header, .sc-item,
  .source-card,
  .lmu-eyebrow, .lmu-point, .lmu-sub,
  .ct-body, .ct-year, .callout-label,
  .implement-item h4, .implement-item p,
  .why-card h4, .why-card p,
  .lm-callout-body h4, .lm-callout-body p,
  .ss-body p, .section-sub
)::after,
html.tts-debug [data-tts-skip]::after {
  display: none !important;
}
/* ct-body: lower z-index so [data-tts-skip] children visually cover the wash */
html.tts-debug .page-body .ct-body::after { z-index: 1; }
html.tts-debug .page-body .ct-body [data-tts-skip] { position: relative; z-index: 2; background: var(--bg-card, #1a1a2e); }
