.document-page {
  background:
    radial-gradient(circle at 12% 4%, rgb(101 71 232 / 22%), transparent 24rem),
    var(--canvas);
}

/* The authority example is a reading sequence of decisions, not a comparison table. */
.article-document #what-an-authority-map-actually-maps + p + ol {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  counter-reset: authority-step;
}

.article-document #what-an-authority-map-actually-maps + p + ol > li {
  position: relative;
  counter-increment: authority-step;
  padding: 1.25rem 1.4rem 1.25rem 4.5rem;
  margin: 0 0 2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(111 82 232 / 10%);
}

.article-document #what-an-authority-map-actually-maps + p + ol > li::before {
  content: counter(authority-step);
  position: absolute;
  left: 1.25rem;
  top: 1.25rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #c05c3f;
  color: #ffffff;
  font-weight: 700;
  line-height: 1;
}

.article-document #what-an-authority-map-actually-maps + p + ol > li:not(:last-child)::after {
  content: "↓";
  position: absolute;
  bottom: -1.9rem;
  left: 50%;
  color: #b8aaff;
  font-size: 1.5rem;
  line-height: 1.5rem;
}

.article-document #what-an-authority-map-actually-maps + p + ol > li strong {
  display: block;
  margin-bottom: 0.4rem;
  color: #e58b6e;
}

.article-document #what-an-authority-map-actually-maps ~ ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
}

.article-document #what-an-authority-map-actually-maps ~ ul > li {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(111 82 232 / 8%);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.article-document #what-an-authority-map-actually-maps ~ ul > li strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #e58b6e;
  font-size: 1.05rem;
}

.article-document #what-an-authority-map-actually-maps ~ ul > li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .article-document #what-an-authority-map-actually-maps ~ ul {
    grid-template-columns: 1fr;
  }
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  color: var(--canvas);
  background: var(--ink);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.document-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 68px) 36px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding-bottom: 26px;
  background: rgb(25 21 41 / 92%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.compact-wordmark {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
  text-decoration: none;
}

.compact-wordmark span {
  color: var(--clay);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.header-download {
  padding: 9px 14px;
  font-size: 0.82rem;
}

.header-download svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.header-download-pdf {
  background: #ce3d39;
  border: 1px solid #ce3d39;
  box-shadow: 0 8px 24px rgb(255 93 85 / 18%);
}

.header-download-pdf:hover,
.header-download-pdf:focus-visible {
  background: #d13f3c;
  border-color: #d13f3c;
  box-shadow: 0 10px 28px rgb(255 93 85 / 28%);
  transform: translateY(-1px);
}

.header-download-spec {
  color: var(--ink);
  background: rgb(111 82 232 / 18%);
  border: 1px solid rgb(184 170 255 / 42%);
  box-shadow: 0 8px 24px rgb(38 28 78 / 20%);
}

.header-download-spec:hover,
.header-download-spec:focus-visible {
  background: rgb(111 82 232 / 30%);
  border-color: rgb(202 192 255 / 66%);
  box-shadow: 0 10px 28px rgb(38 28 78 / 32%);
  transform: translateY(-1px);
}

.document-layout {
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(0, 760px);
  gap: clamp(48px, 8vw, 112px);
  justify-content: center;
  padding: clamp(64px, 9vw, 112px) 0 96px;
}

.article-layout {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) 0 96px;
}

.article-document .document-header h1,
.series-document .document-header h1 {
  max-width: 14ch;
  font-size: clamp(3.4rem, 7vw, 6rem);
}

.article-document > p:last-child {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.series-document > ol {
  margin: 32px 0 64px;
  padding: 0;
  list-style: none;
  counter-reset: essays;
  border-top: 1px solid var(--line);
}

.series-document > ol li {
  counter-increment: essays;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.series-document > ol li::before {
  content: counter(essays, decimal-leading-zero);
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.series-document > ol a {
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  text-decoration: none;
}

.series-document > ol a:hover,
.series-document > ol a:focus-visible {
  color: var(--oxide);
}

.document-toc {
  align-self: start;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding-right: 18px;
}

.toc-label {
  margin: 0 0 16px;
  color: var(--oxide);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.document-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.document-toc li + li {
  margin-top: 10px;
}

.document-toc ul ul {
  margin: 9px 0 0 12px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.document-toc a {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.35;
  text-decoration: none;
}

.document-toc a:hover,
.document-toc a:focus-visible {
  color: var(--ink);
}

.document {
  min-width: 0;
}

.document-header {
  display: block;
  margin-bottom: clamp(66px, 9vw, 104px);
  padding-bottom: clamp(46px, 6vw, 68px);
  border-bottom: 1px solid var(--line);
}

.document-header h1 {
  max-width: 13ch;
  font-size: clamp(3.4rem, 7vw, 6.5rem);
  line-height: 0.94;
}

.document-lead {
  max-width: 40rem;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.22rem, 2.1vw, 1.55rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.document-credit {
  margin-top: 28px;
}

.document-author {
  margin: 0;
}

.document-author {
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.5;
}

.document-author strong {
  color: var(--ink);
  font-weight: 600;
}

.document > h2 {
  margin: 76px 0 24px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
  scroll-margin-top: 104px;
}

.document > h3 {
  margin: 52px 0 18px;
  color: var(--oxide);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  scroll-margin-top: 104px;
}

.document > p {
  margin: 0 0 1.35em;
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 1.45vw, 1.16rem);
  line-height: 1.75;
  text-wrap: pretty;
}

.document > p strong,
.document > p em {
  color: var(--ink);
}

.document a {
  color: var(--oxide);
  text-underline-offset: 0.22em;
}

.document-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.document-footer a {
  color: var(--ink-soft);
  text-underline-offset: 0.22em;
}

@media (max-width: 860px) {
  .document-layout {
    display: block;
  }

  .document-toc {
    position: static;
    max-height: none;
    margin-bottom: 56px;
    padding: 0 0 26px;
    border-bottom: 1px solid var(--line);
  }

  .document-toc ul ul {
    display: none;
  }

  .document-toc > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 22px;
  }

  .document-toc li + li {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .document-layout {
    padding-top: 48px;
  }

  .document-toc > ul {
    grid-template-columns: 1fr;
  }

  .document-header h1 {
    font-size: clamp(3rem, 15vw, 4.4rem);
  }

  .header-download {
    width: 100%;
    padding: 8px 12px;
    text-align: center;
    white-space: normal;
  }

  .document-footer {
    flex-direction: column;
    gap: 8px;
  }
}
