/* Half-Truths content; shared paper typography and header live in half-truths.css. */
:root {
  --line: #abb6c4;
}
#idea h2,
#results h2,
#takeaway h2 {
  max-width: 850px;
  margin-inline: auto;
  text-wrap: balance;
}
#half-demo {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
#half-image {
  border-radius: 8px;
  max-height: 370px;
  object-fit: contain;
}
.demo-controls {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.demo-choices {
  gap: 4px;
}
.demo-choices label,
.metric-switch label {
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--wash);
  font-size: 0.9rem;
}
.demo-choices label:has(:checked),
.metric-switch label:has(:checked) {
  border-color: var(--accent);
}
.demo-caption {
  margin: 20px 0;
  min-height: 2.8em;
}
.demo-explanation {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: #f3f7fc;
  min-height: 6em;
}
.demo-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 0.9rem;
}
.abstract-section {
  margin-top: 0;
}
#method {
  background: #fff;
}
.ht-method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.ht-method-steps li {
  padding: 24px;
}
.ht-method-steps li + li {
  border-left: 1px solid var(--line);
}
.ht-step-number {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}
.ht-method-steps h3 {
  margin: 8px 0 18px;
  font-size: 1.15rem;
}
.ht-method-steps p {
  font-size: 0.95rem;
}
.ht-method-steps p:last-child {
  color: var(--muted);
  margin-top: 18px;
}
.ht-units {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.ht-units span,
.ht-pair span:not([aria-hidden]) {
  padding: 5px 8px;
  background: #eef4fb;
  color: #185aa5;
  border-radius: 4px;
  font-size: 0.85rem;
}
.ht-pair {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.ht-pair span.ht-foil {
  background: #fff0e9;
  color: #a13b26;
}
.ht-training-rule {
  padding: 12px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.ht-training-rule strong {
  display: block;
  color: var(--accent);
  font-weight: 500;
}
.ht-inference-note {
  margin-top: 24px;
  text-align: center;
  font-size: 1rem;
}
.ht-pipeline-detail {
  margin-top: 24px;
  font-size: 1rem;
}
.ht-pipeline-detail h3 {
  font-size: 1rem;
  color: var(--muted);
}
.result-overview {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dataset-panel .ht-dataset-label {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.dataset-panel h3 {
  font-size: 1.15rem;
}
.dataset-panel header > span:last-child {
  font-size: 0.85rem;
}
.result-bar-row {
  font-size: 0.9rem;
  grid-template-columns: 76px minmax(0, 1fr) 36px;
  gap: 8px;
}
.result-axis {
  margin-inline: 84px 44px;
}
.result-track,
.result-bar {
  border-radius: 3px;
}
.ht-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  font-size: 0.9rem;
}
.ht-table-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
#half-results {
  min-width: 560px;
}
#half-results th,
#half-results td {
  padding: 10px 14px;
}
#half-results thead th {
  background: #f3f5f8;
  color: var(--ink);
  font-weight: 600;
}
#half-results thead span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}
#half-results tbody tr:nth-child(even):not(.highlight) {
  background: #fafbfd;
}
#half-results tbody th {
  white-space: nowrap;
  font-size: 0.9rem;
}
.ht-table-score {
  display: block;
  padding: 5px 8px;
  background: linear-gradient(to right, #e4ebf4 var(--score), transparent var(--score));
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}
.ht-table-score.is-best {
  font-weight: 700;
  color: #144b88;
}
.highlight .ht-table-score {
  background: linear-gradient(to right, #d3e3f6 var(--score), transparent var(--score));
}
.ablation-panel {
  margin-top: 44px;
}
.ht-ablation-intro {
  margin-top: 16px;
  max-width: 820px;
  font-size: 1rem;
}
.ablation-panel thead {
  background: #f3f5f8;
}
.ht-ours-label {
  display: block;
  font-size: 0.8rem;
}
.ablation-panel tr.highlight td {
  color: var(--ink);
  font-weight: 400;
}
.ablation-panel tr.highlight td:nth-child(2),
.ablation-panel tr.highlight td:last-child {
  font-weight: 700;
  color: var(--accent);
}
.ht-conclusion {
  background: #f5f7f9;
}
.ht-summary-figure {
  max-width: 920px;
  margin: 0 auto;
}
.ht-summary-figure img {
  width: 100%;
}
.ht-summary-figure figcaption {
  font-size: 0.85rem;
}
.ht-takeaway {
  border-left: 3px solid var(--accent);
  padding: 18px 24px;
  margin-top: 28px;
  background: #fff;
  font-size: 1rem;
}
.ht-takeaway strong {
  display: block;
  margin-bottom: 4px;
}
@media (max-width: 900px) {
  .ht-method-steps {
    grid-template-columns: 1fr;
  }
  .ht-method-steps li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 600px) {
  #half-demo,
  .result-overview {
    padding: 18px 14px;
  }
  .demo-choices label {
    font-size: 0.8rem;
    padding-inline: 7px;
  }
  .demo-explanation {
    min-height: 7.5em;
  }
  .ht-summary-figure {
    max-width: 430px;
  }
}
