/* Page-specific styles for hearings, efficacy, WHO, and under-reporting pages. */
.content-article { margin-top: 0.4rem; }
.content-article .page-title { margin: 0.2rem 0 0.4rem; }
.content-toc { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.content-toc a { color: var(--accent); font-size: 0.92rem; }
.kind-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.kind-official { background: var(--accent-soft); color: var(--accent); }
.kind-party { background: #ece8df; color: var(--muted); }
.kind-unofficial { background: #f3e6e0; color: #7a3e2a; }
.kind-perspective { background: #e8eef3; color: var(--other); }
.flag-box {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin: 0.7rem 0;
  font-size: 0.95rem;
}
.quote-block {
  margin: 0.8rem 0;
  padding: 0.7rem 0.9rem 0.7rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-accent);
  border-radius: 0 12px 12px 0;
}
.quote-block p { margin: 0; }
.quote-attr { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--muted); }
.article-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.6rem 0 0.3rem; }
.article-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 28rem; }
.article-table th, .article-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.article-table th { font-weight: 600; background: var(--bg-accent); }
.article-table caption {
  text-align: left;
  font-weight: 600;
  margin: 0 0 0.4rem;
  caption-side: top;
}
.chart-source, .table-source, .retrieved {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0.6rem;
}
.content-article .chart-wrap {
  position: relative;
  max-width: 100%;
  height: 280px;
  min-height: 220px;
  margin: 0.4rem 0 0.2rem;
  overflow: hidden;
}
.chart-wrap.pie { height: 360px; }
.source-list { margin: 0.3rem 0 0; padding-left: 1.15rem; }
.source-list li { margin: 0.35rem 0; }
.source-list a { color: var(--accent); word-break: break-word; }
.resource-item { margin: 0.85rem 0 0; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.resource-item:first-of-type { border-top: 0; padding-top: 0; }
.resource-item h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.calc-box {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  margin: 0.6rem 0;
  overflow-x: auto;
}
.calc-box code, .calc-box .formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88rem; }
@media (max-width: 640px) {
  .chart-wrap { height: 240px; }
  .content-article .chart-wrap { height: 240px; }
  .chart-wrap.pie, .content-article .chart-wrap.pie { height: 420px; }
  .article-table { font-size: 0.86rem; min-width: 24rem; }
}

/* Full main-column cards (match /studies and /influenza); /next keeps 46rem. */
.content-article .content-card { max-width: none; }
.content-article, .content-article p, .content-article h2, .content-article h3,
.content-article a, .content-toc a, .quote-block, .flag-box, .calc-box,
.calc-box .formula, .resource-item {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

/* Keep pie charts reasonably square in the full-width article column. */
.content-article .chart-wrap.pie {
  max-width: min(36rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.article-table-caption {
  margin: 0.6rem 0 0.35rem;
  font-weight: 600;
  overflow-wrap: break-word;
  word-break: normal;
}
.table-scroll-hint {
  display: none;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.article-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.article-table-wrap::-webkit-scrollbar { height: 8px; }
.article-table-wrap::-webkit-scrollbar-thumb {
  background: #c4b8a4;
  border-radius: 99px;
}
.article-table th:first-child,
.article-table td:first-child {
  word-break: keep-all;
  overflow-wrap: break-word;
  min-width: 5.5em;
}
.article-table td a { overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 700px) {
  .article-table-wrap:not(.is-stack) .table-scroll-hint { display: block; }
  .article-table-wrap:not(.is-stack) .article-table th:first-child,
  .article-table-wrap:not(.is-stack) .article-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--paper);
    box-shadow: 1px 0 0 var(--line);
  }
  .article-table-wrap:not(.is-stack) .article-table th:first-child { background: var(--bg-accent); }

  .article-table-wrap.is-stack {
    overflow: visible;
  }
  .article-table-wrap.is-stack .table-scroll-hint { display: none; }
  .article-table-wrap.is-stack .article-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }
  .article-table-wrap.is-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .article-table-wrap.is-stack tbody tr {
    display: block;
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.65rem;
    background: var(--bg-accent);
    border-radius: 12px;
  }
  /* Label above the value at every stacked width. A two-column grid broke
     when a title cell had both an official English line and an unofficial
     Chinese line: the translation landed in the label column and squeezed
     the official title to a single character per line. */
  .article-table-wrap.is-stack tbody td {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem 0;
    border-bottom: 0;
    padding: 0.28rem 0;
    min-width: 0;
    max-width: 100%;
    word-break: normal;
    overflow-wrap: anywhere;
  }
  .article-table-wrap.is-stack tbody td > * {
    min-width: 0;
    max-width: 100%;
  }
  .article-table-wrap.is-stack tbody td:first-child {
    min-width: 0;
    position: static;
    box-shadow: none;
    background: transparent;
  }
  .article-table-wrap.is-stack tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    word-break: keep-all;
    overflow-wrap: normal;
    margin-bottom: 0.05rem;
  }
  .article-table-wrap.is-stack tbody td a { word-break: break-word; }
}

/* Featured section (US Senate hearings). Editorial emphasis only — not official branding. */
.content-card.is-featured {
  border-color: #9ebbb4;
  background: #f4f8f6;
  box-shadow: 0 10px 30px rgba(36, 92, 85, 0.08);
}
.content-card.is-featured > h2 {
  font-size: 1.35rem;
  line-height: 1.3;
}
.section-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}
html[lang="en"] .section-kicker { text-transform: uppercase; }
.content-toc .toc-featured a { font-weight: 700; }

/* Official English title with unofficial Chinese translation on a second line. */
.title-cell {
  min-width: 0;
  max-width: 100%;
}
.title-official {
  display: block;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.title-translation {
  display: block;
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--line);
  font-size: 0.92em;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.title-translation-label {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Official quotes and two-line title cells: keep labels aligned and prevent
   horizontal overflow on narrow screens, including the featured US Senate panel. */
.content-card.is-featured,
.content-card.is-featured > h2,
.section-kicker,
.content-toc,
.content-toc li,
.content-toc a,
.resource-item,
.official-links,
.quote-block,
.quote-block .title-official,
.quote-block .title-translation {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.content-card.is-featured { box-sizing: border-box; }
.quote-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
html[lang="en"] .quote-label { text-transform: uppercase; }
.quote-block.is-long .title-official,
.quote-block.is-long > p:not(.quote-attr):not(.quote-label) {
  font-size: 0.92em;
}
.official-links a { overflow-wrap: anywhere; word-break: break-word; }
