/* The paper. One column, set for reading, with the horizon rule carried over
 * from the rest of the site as the section divider, on the same field of dune
 * bands the console sits on. */

.paper {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 60px;
  padding: 54px 0 20px;
  align-items: start;
}

/* Grid tracks size to their content unless told otherwise, and a column of
 * long links is exactly the content that pushes one open. */
.paper > * {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 94px;
  font-size: 0.87rem;
  background: linear-gradient(to bottom, rgba(24, 17, 40, 0.88), rgba(14, 10, 24, 0.88));
  border: 1px solid rgba(120, 101, 253, 0.2);
  border-radius: 14px;
  padding: 10px;
}

.toc a {
  display: block;
  color: var(--sand-3);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.14s, background 0.14s;
}

.toc a:hover {
  color: var(--sand);
  background: rgba(120, 101, 253, 0.1);
}

.toc a.on {
  color: #fff;
  background: var(--violet);
  box-shadow: 0 6px 20px -10px rgba(120, 101, 253, 0.9);
}

.body h1 {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  max-width: 16ch;
}

.body .standfirst {
  margin-top: 20px;
  font-size: 1.12rem;
  color: var(--sand-2);
  max-width: 58ch;
}

.body section {
  border-top: 1px solid rgba(120, 101, 253, 0.22);
  margin-top: 52px;
  padding-top: 36px;
  scroll-margin-top: 94px;
}

.body h2 {
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  margin-bottom: 18px;
}

.body h3 {
  margin: 26px 0 8px;
  color: var(--sand);
}

.body p {
  max-width: 64ch;
  line-height: 1.62;
}

.body ol,
.body ul {
  max-width: 64ch;
  color: var(--sand-2);
  padding-left: 1.2em;
}

.body li {
  margin-bottom: 8px;
}

.body li::marker {
  color: var(--dune);
}

.body b,
.body strong {
  color: var(--sand);
  font-weight: 600;
}

.body pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--violet-hot);
  background: rgba(5, 4, 10, 0.85);
  border: 1px solid rgba(120, 101, 253, 0.22);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  max-width: 100%;
  line-height: 1.5;
}

.body code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--violet-hot);
}

.body pre code {
  color: inherit;
  font-size: 1em;
}

.body table {
  width: 100%;
  max-width: 64ch;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin: 18px 0;
}

.body th {
  text-align: left;
  font-weight: 500;
  color: var(--sand-3);
  font-size: 0.84rem;
  padding: 0 16px 8px 0;
  border-bottom: 1px solid rgba(120, 101, 253, 0.24);
  font-family: var(--pixel);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.body td {
  padding: 11px 16px 11px 0;
  border-bottom: 1px solid rgba(120, 101, 253, 0.12);
  color: var(--sand-2);
}

.body td:last-child,
.body th:last-child {
  padding-right: 0;
}

.aside {
  border-left: 2px solid var(--violet);
  background: rgba(120, 101, 253, 0.1);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 22px 0;
  max-width: 64ch;
}

.aside p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .paper {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .toc {
    position: static;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 18px;
  }

  .toc a {
    padding: 4px 0;
  }
}
