/* Shared styles for standalone review digest / report pages. */

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(24px, 5vw, 48px);
  border-bottom: 1px solid var(--divider);
}

.report-shell {
  display: flex;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px);
}

.report-card {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 48px);
  max-width: 760px;
  width: 100%;
}

.report-card h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 4px;
}

.report-meta {
  color: var(--neutral-600);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.report-card h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neutral-600);
  margin: 2.25rem 0 1rem;
}

.report-headline {
  background: var(--tint, #fdf1f6);
  border: 1px solid var(--divider);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  font-size: 1.02rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Stat tiles */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.stat-tile {
  background: var(--bg);
  padding: 1rem 1.15rem;
}

.stat-tile .num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text);
}

.stat-tile .label {
  font-size: 0.76rem;
  color: var(--neutral-600);
  margin-top: 0.2rem;
}

@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
}

/* Sentiment bar */

.sentiment-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.sentiment-bar span:nth-child(1) { background: var(--pink-dark); }
.sentiment-bar span:nth-child(2) { background: var(--neutral-300); }
.sentiment-bar span:nth-child(3) { background: var(--text); }

.sentiment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--neutral-600);
  margin-bottom: 0.5rem;
}

.sentiment-legend .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.sentiment-legend .dot.pos { background: var(--pink-dark); }
.sentiment-legend .dot.neu { background: var(--neutral-300); }
.sentiment-legend .dot.neg { background: var(--text); }
.sentiment-legend strong { color: var(--text); }

/* Source + complaint table */

.source-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--divider);
}

.source-row:last-child { border-bottom: none; }
.source-row .avg { color: var(--neutral-600); }

.complaint-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
}

.complaint-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.complaint-table th,
.complaint-table td {
  padding: 0.75rem 1rem;
  text-align: left;
}

.complaint-table th {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg);
}

.complaint-table td:nth-child(2),
.complaint-table td:nth-child(3),
.complaint-table th:nth-child(2),
.complaint-table th:nth-child(3) {
  text-align: center;
  white-space: nowrap;
}

.complaint-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--divider);
}

.complaint-quote {
  display: block;
  color: var(--neutral-600);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

/* Trend chart */

.trend-caption {
  color: var(--neutral-600);
  font-size: 0.85rem;
  margin: -0.6rem 0 1.25rem;
}

.trend-chart-wrap {
  overflow-x: auto;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
  height: 150px;
  min-width: min-content;
}

.trend-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 52px;
  height: 100%;
}

.trend-bar-value {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--neutral-600);
  margin-bottom: 0.35rem;
}

.trend-bar {
  width: 100%;
  background: var(--pink-dark);
  border-radius: 3px 3px 1px 1px;
  min-height: 4px;
}

.trend-bar-label {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--neutral-600);
  white-space: nowrap;
  text-align: center;
}

/* What's working / root causes / recommendations */

.working-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

.working-card {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}

.working-card h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.98rem;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.working-card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--neutral-700);
}

.cause {
  margin-bottom: 1.35rem;
}

.cause:last-child { margin-bottom: 0; }

.cause h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.98rem;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.cause p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--neutral-700);
}

.rec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
}

.rec:not(:last-child) { border-bottom: 1px solid var(--divider); }

.rec .num {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--neutral-600);
}

.rec h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.98rem;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.rec p { margin: 0; font-size: 0.9rem; color: var(--neutral-700); }

.rec .impact {
  display: inline-block;
  margin-top: 0.55rem;
  background: var(--pink);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
}

/* Reports index */

.report-index-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.report-index-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

/* Hub pages still use a whole-card <a> (single report type) */
a.report-index-card {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

a.report-index-card:hover {
  border-color: var(--pink-dark);
}

.report-index-card-title {
  text-decoration: none;
  color: inherit;
  display: block;
}

.report-index-card-title:hover h3 {
  color: var(--pink-dark);
}

.report-index-card h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 0.3rem;
  transition: color 0.2s ease;
}

.report-index-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--neutral-600);
}

.report-index-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.data-badge {
  display: inline-flex;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.data-badge.live {
  background: var(--pink);
  color: var(--text);
}

.data-badge.live:hover {
  background: var(--pink-dark);
  color: #ffffff;
}

.data-badge.sample {
  background: var(--neutral-300);
  color: var(--text);
}

/* Sample-data banner on illustrative reports */

.sample-banner {
  background: var(--text);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.6rem 1rem;
}

/* Data tables (sources, complaints) */

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
}

.data-table th {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg);
}

.data-table td.num,
.data-table th.num {
  text-align: right;
  white-space: nowrap;
}

.data-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--divider);
}

.data-table tfoot td {
  border-top: 1px solid var(--divider);
  font-family: var(--font-heading);
  color: var(--text);
}

/* Callouts */

.callout {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--pink-dark);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  margin: 1.25rem 0;
}

.callout .kicker {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink-dark);
  margin-bottom: 0.3rem;
}

.callout p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--neutral-700);
  line-height: 1.55;
}

.callout p + p {
  margin-top: 0.5rem;
}

/* Opportunity / signal list */

.signal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.signal-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--neutral-700);
  line-height: 1.55;
}

.signal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink-dark);
}

.signal-list strong {
  color: var(--text);
}

/* Quote pairs (compare page) */

.quote-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1rem 0 1.5rem;
}

@media (max-width: 620px) {
  .quote-pair {
    grid-template-columns: 1fr;
  }
}

.quote-col h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--neutral-600);
  margin: 0 0 0.5rem;
}

.quote-col blockquote {
  margin: 0 0 0.6rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--divider);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--neutral-700);
  line-height: 1.5;
}

.vs-row {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--neutral-600);
  margin: 1.75rem 0 0.5rem;
}

.vs-row .lead {
  color: var(--pink-dark);
}

/* Share / QR */

.share-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
}

.share-block #qr-code {
  flex-shrink: 0;
  line-height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.share-block p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--neutral-600);
}

@media (max-width: 480px) {
  .share-block {
    flex-direction: column;
    text-align: center;
  }
}
