/* =========================
   report.css
   Orientiert an pages.css + base.css Design-Tokens
========================= */

/* ── Hero / section spacing (match users_analysis, how_to) ─ */

.page-content > .about-hero {
  padding-bottom: 20px;
}

.page-content > .about-section {
  padding-top: 28px;
}

.report-page .section-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

/* ── Body text ─────────────────────────────────── */

.report-body {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.9;
  max-width: 720px;
  margin-bottom: 20px;
}

.report-note {
  font-size: 0.78rem;
  line-height: 1.75;
  opacity: 0.9;
}

.report-body code {
  font-family: var(--font-data);
  font-size: 0.8em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

.report-body:last-of-type {
  margin-bottom: 0;
}

.report-internal-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.report-internal-link:hover {
  opacity: 0.85;
}

/* ── Pull quote ────────────────────────────────── */

.report-pullquote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.02em;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 20px 28px;
  margin: 28px 0 28px;
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  max-width: 680px;
}

/* ── Tip-style explanation boxes (like how_to) ─── */

.report-tip {
  margin: 26px 0 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 920px;
}

.about-section > .report-tip {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.report-tip > p,
.report-tip .report-body {
  margin: 10px 0 0;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
  max-width: none;
}

.report-tip > p:first-child,
.report-tip .report-body:first-child {
  margin-top: 0;
}

.report-tip .katex {
  font-size: 1.05em;
}

.report-tip .katex-display {
  margin: 0.6em 0;
}

.report-tip .report-note {
  margin-top: 12px;
  font-size: inherit;
  opacity: 0.9;
}

/* ── Collapsible infoboxes (PDF: ADD INFOBOX …) ─ */

.report-infobox {
  margin: 26px 0 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-width: 720px;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
}

.about-section > .report-infobox {
  max-width: 720px;
}

.report-infobox-summary {
  position: relative;
  display: block;
  padding: 14px 44px 14px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--surface);
  transition: background 0.15s;
}

.report-infobox-summary::-webkit-details-marker {
  display: none;
}

.report-infobox-summary::marker {
  content: '';
}

.report-infobox-summary:hover {
  background: rgba(74, 222, 128, 0.04);
}

.report-infobox-summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-data);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.report-infobox[open] .report-infobox-summary::after {
  content: '−';
  color: var(--text);
}

.report-infobox[open] .report-infobox-summary {
  border-bottom: 1px solid var(--border);
}

.report-infobox-body {
  padding: 16px 18px 18px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.75;
}

.report-infobox-body > p {
  margin: 0 0 12px;
}

.report-infobox-body > p:last-child {
  margin-bottom: 0;
}

.report-infobox-body .report-note {
  margin-top: 12px;
  opacity: 0.9;
}

.report-infobox-body .report-table-wrap {
  margin-bottom: 0;
  overflow-x: visible;
}

.report-infobox .report-table {
  table-layout: fixed;
  min-width: 0;
}

.report-infobox .report-table thead th,
.report-infobox .report-table tbody td {
  padding: 8px 10px;
  vertical-align: top;
}

.report-infobox .report-table thead th {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--text);
  text-align: left;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
  padding-top: 10px;
  padding-bottom: 10px;
}

.report-infobox .report-table tbody td {
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--text-dim);
  word-break: break-word;
}

.report-infobox .report-table th:nth-child(1),
.report-infobox .report-table td:nth-child(1) {
  width: 33%;
}

.report-infobox .report-table th:nth-child(2),
.report-infobox .report-table td:nth-child(2) {
  width: 11%;
}

.report-infobox .report-table thead th:nth-child(2) {
  text-align: center;
  white-space: nowrap;
}

.report-infobox .report-table tbody td:nth-child(2) {
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--text);
}

.report-infobox .report-table th:nth-child(3),
.report-infobox .report-table td:nth-child(3) {
  width: 56%;
}

.report-infobox .report-table thead th:nth-child(3) {
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-align: right;
}

.report-infobox .report-table tbody td:nth-child(3) {
  font-family: var(--font-data);
  font-size: 0.64rem;
  line-height: 1.4;
  text-align: right;
}

.report-infobox-list {
  margin: 0 0 12px;
  padding-left: 20px;
}

.report-infobox-list li {
  margin-bottom: 6px;
}

.report-infobox-list li:last-child {
  margin-bottom: 0;
}

.report-infobox-body code {
  font-family: var(--font-data);
  font-size: 0.8em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

.report-infobox .katex {
  font-size: 1.05em;
}

.report-infobox .katex-display {
  margin: 0.75em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.report-infobox-body .report-math-block {
  margin: 12px 0;
  text-align: center;
}

.report-infobox-body .report-math .katex {
  font-size: 1em;
}

.report-figure-caption .ref-link {
  margin-left: 2px;
}

/* ── Figures & placeholders ────────────────────── */

.report-figure {
  margin: 26px 0 30px;
  max-width: 720px;
  width: 100%;
}

.report-figure-media {
  overflow: hidden;
  border-radius: 10px;
  line-height: 0;
}

.report-figure-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
}

.report-figure-placeholder {
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 18px;
}

.report-figure-placeholder-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 8px;
}

.report-figure-placeholder-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 10px;
}

.report-figure-placeholder-hint {
  font-family: var(--font-data);
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.85;
  line-height: 1.6;
}

.report-figure-caption {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 720px;
}

/* ── Tables ────────────────────────────────────── */

.report-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  background: rgba(255, 255, 255, 0.01);
}

.report-table thead th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--text);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.report-table tbody td {
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.report-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ── Highlight cards (3-col) ───────────────────── */

.report-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.report-highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
}

.report-highlight-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.report-highlight-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 8px;
}

.report-highlight-card p {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.report-highlight-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.75;
}

.report-highlight-card li + li {
  margin-top: 8px;
}

/* ── Feature pills ─────────────────────────────── */

.report-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.report-pill {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  letter-spacing: 0.02em;
}

/* ── References ────────────────────────────────── */

.report-references {
  list-style: none;
  counter-reset: ref-counter;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  padding: 0;
}

.report-references li {
  counter-increment: ref-counter;
  position: relative;
  padding: 16px 20px 16px 52px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.75;
  /* Keep target visible below fixed nav when jumping from [n] links */
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.report-references li:target {
  animation: report-ref-highlight 2.8s ease-out forwards;
}

@keyframes report-ref-highlight {
  0% {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.45), 0 4px 18px rgba(74, 222, 128, 0.1);
    background: rgba(74, 222, 128, 0.12);
  }
  15% {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.07);
  }
  100% {
    border-color: var(--border);
    box-shadow: none;
    background: var(--surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  .report-references li:target {
    animation: report-ref-highlight-reduced 0.4s ease-out forwards;
  }

  @keyframes report-ref-highlight-reduced {
    0% {
      border-color: var(--accent);
      background: rgba(74, 222, 128, 0.08);
    }
    100% {
      border-color: var(--border);
      background: var(--surface);
    }
  }
}

.report-references li::before {
  content: counter(ref-counter);
  position: absolute;
  left: 16px;
  top: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
  width: 22px;
  text-align: center;
}

.report-references li em {
  color: var(--text);
  font-style: italic;
}

/* ── Inline reference links ────────────────────── */

.ref-link {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  transition: opacity 0.15s;
}

.ref-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

body.report-page {
  scroll-behavior: smooth;
}

/* ── External URL links in reference list ──────── */

.ref-url {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-data);
  font-size: 0.73rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.ref-url:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Responsive ────────────────────────────────── */

@media (max-width: 600px) {
  .report-highlight-grid {
    grid-template-columns: 1fr;
  }
  .report-pullquote {
    font-size: 0.92rem;
    padding: 16px 20px;
  }
}