.wrap:has(.constitutional-layout) {
  --investigation-gap: clamp(2rem, 5vw, 4.5rem);
}

.hero.constitutional-hero {
  display: block;
  padding: clamp(1.5rem, 4vw, 3.125rem) 0 clamp(1.5rem, 3vw, 2.375rem);
}

.constitutional-hero h1 {
  max-width: 1000px;
  font-size: clamp(2.5rem, 5.4vw, 4.375rem);
  letter-spacing: -.055em;
  line-height: 1.02;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.constitutional-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(12rem, 1fr);
  column-gap: var(--investigation-gap);
  align-items: start;
  padding: 2.25rem 0 1.5rem;
}

.constitutional-contents {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 4.75rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  border-top: 1px solid var(--rule);
  padding: 1rem 4px .25rem;
}

.constitutional-contents > p {
  color: var(--muted);
  font: 600 .75rem/1.4 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.constitutional-contents ol {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
}

.constitutional-contents li {
  border-bottom: 1px solid var(--rule);
}

.constitutional-contents a {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: .5rem;
  align-items: baseline;
  padding: .65rem 0;
  color: var(--ink);
  font-size: .875rem;
  line-height: 1.35;
  text-decoration: none;
}

.constitutional-contents a:hover {
  color: var(--red);
  text-decoration: underline;
}

.constitutional-contents a:focus-visible {
  outline-offset: 1px;
}

.constitutional-contents a span {
  color: var(--red);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.constitutional-report {
  grid-column: 1;
  grid-row: 1;
  counter-reset: investigation-section;
  max-width: none;
  min-width: 0;
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.76;
}

.constitutional-report > section {
  counter-increment: investigation-section;
  border-top: 1px solid var(--rule);
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(2rem, 4vw, 3.125rem);
}

.constitutional-report > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.constitutional-report h2 {
  scroll-margin-top: .75rem;
  margin: 0 0 .95rem;
  font-size: clamp(1.85rem, 3.25vw, 2.85rem);
  letter-spacing: -.045em;
  line-height: 1.12;
}

.constitutional-report h2::before {
  content: counter(investigation-section, decimal-leading-zero) / "";
  display: block;
  width: fit-content;
  margin-bottom: .55rem;
  color: var(--red);
  font: 600 .75rem/1.4 var(--sans);
  letter-spacing: .12em;
}

.constitutional-report h2:target {
  color: var(--red);
}

.constitutional-report section > :is(p, ul, ol) {
  max-width: 68ch;
}

.constitutional-report section > * + :is(p, ul, ol, .constitutional-table) {
  margin-top: 1.05rem;
}

.constitutional-report :is(ul, ol) {
  padding-inline-start: 1.4em;
}

.constitutional-report li + li {
  margin-top: .7rem;
}

.constitutional-report [aria-labelledby="how-the-process-works"] > ol {
  max-width: none;
  margin-block: 1.4rem 1.6rem;
  padding: 0 .9rem 0 2.45rem;
  border-top: 2px solid var(--red);
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}

.constitutional-report [aria-labelledby="how-the-process-works"] > ol li {
  margin: 0;
  padding: .85rem 0 .85rem .2rem;
}

.constitutional-report [aria-labelledby="how-the-process-works"] > ol li + li {
  border-top: 1px solid var(--rule);
}

.constitutional-report [aria-labelledby="how-the-process-works"] > ol li::marker {
  color: var(--red);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.constitutional-table {
  border-top: 2px solid var(--red);
  margin: 1.35rem 0 0;
}

.constitutional-table table {
  table-layout: fixed;
  font-size: clamp(.91rem, 1.2vw, .98rem);
  line-height: 1.55;
}

.constitutional-table :is(th, td) {
  padding: .75em .65em;
  overflow-wrap: break-word;
}

.constitutional-table thead th {
  background: var(--panel);
  color: var(--ink);
  font-size: .9em;
  font-weight: 600;
}

.constitutional-table tbody tr:nth-child(even) {
  background: #f4efe6;
}

.constitutional-table tbody td p + p {
  margin-top: .55em;
}

.constitutional-report [aria-labelledby="three-texts-that-govern-the-vote"] th:first-child {
  width: 25%;
}

.constitutional-report [aria-labelledby="three-texts-that-govern-the-vote"] th:last-child {
  width: 30%;
}

.constitutional-report [aria-labelledby="how-the-process-works"] th:first-child {
  width: 48%;
}

.constitutional-report [aria-labelledby="chronology"] th:first-child {
  width: 22%;
}

.constitutional-report [aria-labelledby="chronology"] th:last-child {
  width: 25%;
}

.constitutional-report [aria-labelledby="chronology"] :is(th, td):first-child {
  overflow-wrap: normal;
  word-break: normal;
  font-variant-numeric: tabular-nums;
}

.constitutional-report [aria-labelledby="chronology"] td:first-child {
  font-weight: 600;
}

@media (max-width: 900px) {
  .constitutional-layout {
    display: block;
    padding-top: 1.5rem;
  }

  .constitutional-contents {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 2rem;
  }

  .constitutional-contents ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.1rem;
  }
}

@media (max-width: 480px) {
  .constitutional-hero h1 {
    font-size: clamp(2.05rem, 9.4vw, 2.7rem);
  }

  .constitutional-contents ol {
    column-gap: .75rem;
  }

  .constitutional-contents a {
    gap: .25rem;
  }

}

.constitutional-report h2:focus-visible {
  outline-offset: .25rem;
}

.constitutional-column-label {
  display: none;
}

@media (max-width: 44rem) {
  .constitutional-table {
    overflow-x: auto;
  }

  .constitutional-table table {
    min-width: 32rem;
    font-size: 1rem;
  }

  .constitutional-table :is(th, td) {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .constitutional-report[data-stacked-tables] .constitutional-table {
    overflow: visible;
  }

  .constitutional-report[data-stacked-tables] .constitutional-table :is(table, tbody, tr, td) {
    display: block;
    width: auto;
    min-width: 0;
  }

  .constitutional-report[data-stacked-tables] .constitutional-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .constitutional-report[data-stacked-tables] .constitutional-table tbody tr {
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--rule);
  }

  .constitutional-report[data-stacked-tables] .constitutional-table tbody td {
    padding: 0;
    border: 0;
  }

  .constitutional-report[data-stacked-tables] .constitutional-table tbody td + td {
    margin-top: .75rem;
  }

  .constitutional-report[data-stacked-tables] .constitutional-column-label {
    display: block;
    margin-bottom: .2rem;
    color: var(--muted);
    font: 600 .75rem/1.35 var(--sans);
    letter-spacing: .06em;
  }
}
