/* Program pages: vertical "On this page" list, inline citations, tables that stay in the column. */

.pagetoc {
  min-width: 0;
  max-width: 100%;
}

.pagetoc-d > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  list-style: none;
  cursor: pointer;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pagetoc-d > summary::-webkit-details-marker {
  display: none;
}

.pagetoc-d > summary::marker {
  content: "";
}

.pagetoc-d > summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.pagetoc-d[open] > summary::after {
  margin-top: 2px;
  transform: rotate(-135deg);
}

.pagetoc nav {
  margin-top: 4px;
}

.pagetoc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagetoc li {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.pagetoc li:last-child {
  border-bottom: 1px solid var(--line);
}

.pagetoc a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 1.35;
  text-decoration: none;
}

.pagetoc a:hover {
  color: var(--ink);
}

.pagetoc .num {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  color: var(--ink-3);
  font-size: 1rem;
  line-height: 1.2;
}

.pagetoc-pdf {
  margin-top: 22px;
  max-width: 100%;
}

.pagetoc a.btn[data-hg-briefing],
.pagetoc button.btn[data-hg-briefing] {
  white-space: normal;
  height: auto;
  min-height: 44px;
  max-width: 100%;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.3;
  text-wrap: balance;
}

/* Desktop: the list stays open and sticks beside the article.
   Closed details hide their content with content-visibility, so the
   desktop rule has to show that box again. */
@media (min-width: 1024px) {
  .pagetoc {
    position: sticky;
    top: 110px;
    align-self: start;
  }

  .pagetoc-d > summary {
    margin-bottom: 8px;
    min-height: 0;
    pointer-events: none;
    cursor: default;
  }

  .pagetoc-d > summary::after {
    content: none;
  }

  .pagetoc-d::details-content,
  .pagetoc-d:not([open])::details-content {
    content-visibility: visible;
    display: block;
    height: auto;
    overflow: visible;
  }
}

.pagetoc ~ * [id] {
  scroll-margin-top: 120px;
}

/* Key-facts tables stay inside the column and wrap at spaces. */
main .grid12 > * {
  min-width: 0;
}

main .ct2,
main .not-prose {
  min-width: 0;
  max-width: 100%;
}

.ct2 {
  min-width: 0;
  max-width: 100%;
}

.ct2:not(:has(th:nth-child(3))) .ctable {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ct2:not(:has(th:nth-child(3))) .ctable th:first-child,
.ct2:not(:has(th:nth-child(3))) .ctable td:first-child {
  width: 34%;
}

.ct2:not(:has(th:nth-child(3))) .ctable th,
.ct2:not(:has(th:nth-child(3))) .ctable td {
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
  hyphens: manual;
}

@media (max-width: 767px) {
  .ct2:not(:has(th:nth-child(3))) .ctable th:first-child,
  .ct2:not(:has(th:nth-child(3))) .ctable td:first-child {
    width: 40%;
  }
}

@media (max-width: 370px) {
  .ct2:not(:has(th:nth-child(3))) .ctable th:first-child,
  .ct2:not(:has(th:nth-child(3))) .ctable td:first-child {
    width: 46%;
  }
}

/* Three-column key-facts scroll inside the box instead of widening the page. */
.ct2:has(th:nth-child(3)) {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 820px) {
  .tstack .ctable td,
  .tstack .ctable th,
  .tstack .ctable td:first-child,
  .tstack .ctable thead th,
  .tstack .ctable thead th:first-child,
  .tstack .ctable thead th:nth-child(n+2),
  .tstack .ctable td:nth-child(n+2) {
    overflow-wrap: break-word;
    word-break: normal;
    max-width: 100%;
  }
}

/* A citation inside a sentence stays on that line, brackets included.
   Links that are the whole cell keep the block hit area from the base sheet. */
main td > a.underline,
main td > a.underline:first-of-type,
main td > a.underline:last-of-type {
  display: inline;
  padding: 0;
  margin: 0;
  min-height: 0;
  white-space: normal;
  overflow-wrap: break-word;
  vertical-align: baseline;
}

/* The 18rem floor on a status sentence pushes the band past a phone screen. */
.sband > span,
.sband span.flex-1 {
  min-width: 0;
  flex: 1 1 auto;
}

/* About banner. Same box as the page container, one ratio, then space before the meadow band. */
.about-hero {
  display: block;
  width: 100%;
  margin: 48px 0 0;
  aspect-ratio: 21 / 9;
  border-radius: 8px;
}
@media (min-width: 1024px) {
  .about-hero { margin-top: 64px; }
}
.wrap:has(> .about-hero) {
  padding-bottom: clamp(48px, 5vw, 80px);
}
.about-hero img {
  object-position: 50% 58%;
}
