.fund-shell {
  width: min(100% - 2rem, 66rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 6vw, 4.5rem);
}

.fund-heading {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--space-lg);
}

.fund-heading .breadcrumb {
  margin-bottom: var(--space-md);
}

.fund-heading h1 {
  max-width: 23ch;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  overflow-wrap: anywhere;
}

.fund-heading > p:not(.fund-symbol) {
  margin: var(--space-sm) 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.24rem);
}

.fund-explorer main a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.fund-explorer :is(a, summary):focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 3px;
}

.fund-symbol {
  width: fit-content;
  margin: 0 0 var(--space-sm);
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--rule-strong);
  border-radius: 0.4rem;
  color: var(--primary-dark);
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 750;
}

.fund-results-intro {
  max-width: 68ch;
  margin-bottom: var(--space-md);
}

#fund-performance-status {
  color: var(--accent-strong);
}

#fund-performance-status:empty {
  margin: 0;
}

.fund-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-md);
}

.fund-group,
.fund-performance {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.fund-group {
  padding: clamp(0.8rem, 3vw, 1.35rem);
}

#bitcoin {
  margin-top: var(--space-xl);
  border-top: 3px solid var(--accent);
}

.fund-group h2,
.fund-performance h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
}

.fund-group table,
.fund-performance table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.fund-explorer th,
.fund-explorer td {
  border-bottom: 1px solid var(--rule);
  padding-block: var(--space-xs);
  text-align: left;
  vertical-align: top;
}

.fund-explorer thead th {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.fund-group tbody tr:last-child > * {
  border-bottom: 0;
}

.fund-explorer tr > :last-child {
  min-width: 7rem;
  padding-left: var(--space-xs);
  text-align: right;
}

.fund-row-link {
  display: inline-block;
  min-height: 2rem;
  padding-block: var(--space-2xs);
}

.fund-row-link strong {
  display: inline-block;
  min-width: 3rem;
}

.fund-row-link span {
  font-weight: 550;
}

.fund-group small {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.fund-explorer [hidden] {
  display: none;
}

.fund-archive,
.fund-source {
  margin: var(--space-md) 0 0;
}

.fund-performance {
  padding: clamp(0.85rem, 4vw, 2rem);
}

.fund-performance-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  column-gap: var(--space-md);
}

.fund-performance-heading p {
  margin: var(--space-2xs) 0 var(--space-xs);
}

#fund-performance-return {
  color: var(--primary-dark);
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

#fund-chart-figure {
  margin: var(--space-sm) 0;
}

#fund-chart {
  display: block;
  width: 100%;
  height: clamp(15rem, 36vw, 22rem);
}

#fund-chart-figure figcaption {
  color: var(--muted);
}

#fund-chart-data {
  margin-top: var(--space-md);
  border-block: 1px solid var(--rule);
}

#fund-chart-data summary {
  width: fit-content;
  min-height: 2.75rem;
  padding-block: var(--space-xs);
  cursor: pointer;
  font-weight: 650;
}

#fund-chart-data caption {
  color: var(--muted);
  text-align: left;
}

@media (max-width: 48rem) {
  .fund-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .fund-groups {
    display: block;
  }

  .fund-group {
    break-inside: avoid;
    margin-bottom: var(--space-md);
  }
}
