.reference-page {
  background: var(--paper);
}

.reference-page .site-header {
  position: relative;
  z-index: 20;
}

.reference-main {
  min-height: calc(100vh - 73px);
  max-width: var(--guide-content);
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.schema-introduction {
  max-width: 46rem;
  padding: 3.5rem 0 2.5rem;
}

.schema-introduction h1 {
  margin: 0.5rem 0 1rem;
}

.schema-lede {
  margin: 0 0 1rem;
}

.schema-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 1.75rem 0 0;
}

.schema-facts div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.schema-facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.schema-facts dd {
  margin: 0;
}

.schema-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.schema-sidebar {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

#schema-index {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}

#schema-index a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.75rem;
  border-left: 2px solid transparent;
  text-decoration: none;
  color: inherit;
}

#schema-index a:hover {
  border-left-color: var(--coral);
  background: var(--paper-raised);
}

#schema-index span {
  font-weight: 600;
}

#schema-index code {
  font-size: 0.75rem;
  color: var(--muted);
}

.schema-definitions {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  min-width: 0;
}

.schema-definition {
  scroll-margin-top: 1.5rem;
}

.schema-definition > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.schema-definition > header h2 {
  margin: 0;
}

.schema-definition > header code {
  font-size: 0.8rem;
  color: var(--muted);
}

.schema-error {
  max-width: 40rem;
  padding: 2rem 0;
}

@media (max-width: 900px) {
  .schema-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .schema-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 700px) {
  .reference-main {
    min-height: calc(100vh - 121px);
  }
}
