.indexed-reader {
  grid-template-columns: minmax(0, 1.6fr) minmax(205px, 1fr);
  grid-template-areas: "sections index" "sections related" "sections .";
  grid-template-rows: max-content max-content 1fr;
  row-gap: 32px;
}

.reader-sections {
  grid-area: sections;
}

.indexed-reader aside {
  grid-area: related;
}

.reader-index {
  grid-area: index;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--edge);
}

.reader-index summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 16px 2px;
  list-style: none;
  font-size: 17px;
  font-weight: 580;
  letter-spacing: -0.025em;
}

.reader-index summary::-webkit-details-marker {
  display: none;
}

.reader-index summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
}

.reader-index[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.reader-index nav {
  padding-bottom: 10px;
}

.reader-index a {
  display: block;
  width: fit-content;
  padding: 7px 2px;
  font-size: 15px;
  line-height: 1.4;
}

.reader-index a:hover,
.reader-index a[aria-current],
.asset-tabs a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.reader-index summary:focus-visible,
.reader .read-block:focus-visible {
  outline: 3px solid #4e9bff;
  outline-offset: 4px;
}

.reader-sections .read-block,
.reserve-ledger {
  scroll-margin-top: 24px;
}

.reader-sections .read-block:target {
  border-color: var(--blue);
}

.asset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(12px, 2.5vw, 36px);
  border-bottom: 1px solid var(--edge);
}

.asset-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 560;
}

.asset-tabs a[aria-selected="true"] {
  border-color: var(--blue);
  color: var(--blue);
}

.asset-explorer .read-block {
  scroll-margin-top: 84px;
}

.asset-explorer .read-block[role="tabpanel"] {
  min-height: 210px;
  padding-block: clamp(24px, 3vw, 44px);
  border-top: 0;
}

.asset-explorer [role="tabpanel"] h2 {
  margin-bottom: 12px;
  font-size: clamp(38px, 4.4vw, 64px);
  font-weight: 480;
  letter-spacing: -0.065em;
  line-height: 1;
}

.asset-explorer [role="tabpanel"] .asset-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .indexed-reader {
    grid-template-areas: "index" "sections" "related";
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 24px;
  }

  .reader-index a {
    padding-block: 10px;
  }

  .asset-explorer .read-block[role="tabpanel"] {
    min-height: 188px;
    padding-bottom: 0;
  }
}

@media print {
  .reader-index,
  .asset-tabs {
    display: none;
  }

  .asset-explorer .read-block[hidden] {
    display: block !important;
  }

  .asset-explorer .read-block[role="tabpanel"] {
    min-height: auto;
    padding-block: 16px;
  }

  .asset-explorer [role="tabpanel"] h2 {
    font-size: 20px;
  }

  .asset-explorer [role="tabpanel"] .asset-name {
    position: static;
    clip-path: none;
  }
}
