/*
 * Publication styles maintained outside the SCSS build that produces style.css
 * (see README). Loaded after style.css on publication pages.
 */

.publication {
  --publication-link-accent: var(--gray-500);
}

.publication--accent-orange {
  --publication-link-accent: var(--orange);
}

/* Inline links in article text, the verdict and the citations */
.publication-content p a,
.publication-content li a,
.publication-content blockquote a,
.publication-content td a,
.verdict-text a,
.citations-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--publication-link-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.publication-content p a:hover,
.publication-content li a:hover,
.publication-content blockquote a:hover,
.publication-content td a:hover,
.citations-body a:hover {
  color: var(--publication-link-accent);
}

/* Footnote references (^[n]) */
.publication sup.ref {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
  padding-left: 1px;
}

.publication sup.ref a {
  color: var(--publication-link-accent);
  text-decoration: none;
}

/*
 * Table captions sit above the table. Scoped to captioned tables: a flex
 * container stops the table's margins collapsing, which would change the
 * spacing of every existing uncaptioned table.
 */
.page-content .wp-block-table:has(> .wp-element-caption) {
  display: flex;
  flex-direction: column;
  margin: 1.5rem 0;
}

.page-content .wp-block-table > .wp-element-caption {
  order: -1;
  margin: 0 0 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-400);
  text-align: left;
}

.page-content .wp-block-table:has(> .wp-element-caption) table {
  margin: 0;
}

/* People timeline block */
.people-timeline {
  overflow-x: auto;
  margin: 2.5rem 0;
}

.people-timeline-caption {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.6rem;
}

.people-timeline-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  line-height: 1.5;
  background: #fff;
}

.people-timeline-table th {
  background: var(--black);
  color: #fff;
  text-align: left;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.6rem;
  padding: 0.8rem 0.9rem;
}

.people-timeline-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  color: var(--gray-600);
}

.people-timeline-table tr:nth-child(even) td {
  background: var(--gray-100);
}

.people-timeline-table td.people-timeline-name {
  font-weight: 600;
  color: var(--black);
}

.people-timeline-role {
  display: block;
  font-weight: 400;
  font-size: 0.66rem;
  color: var(--gray-400);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.people-timeline-date {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  color: var(--gray-400);
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.people-timeline-photo {
  display: block;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--gray-200);
}

.people-timeline-photo-pair {
  display: flex;
}

.people-timeline-photo-pair .people-timeline-photo + .people-timeline-photo {
  margin-left: -14px;
}
