.theory-article {
  max-width: 960px;
  margin-inline: auto;
  padding-bottom: clamp(2rem, 6vw, 5rem);
}

.theory-intro {
  padding-block: clamp(2.75rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.5rem);
}

.theory-intro h1 {
  max-width: 19ch;
  font-size: clamp(2.65rem, 5.3vw, 4.75rem);
  line-height: 1.04;
  text-wrap: balance;
}

.theory-lead {
  max-width: 62ch;
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: #d2cfc7;
}

.theory-section {
  padding-block: clamp(2rem, 4.5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.theory-section h2 {
  margin-bottom: 1.1rem;
  font: 750 clamp(1.6rem, 2.8vw, 2.2rem)/1.13 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.theory-section p {
  color: #d2cfc7;
  line-height: 1.66;
}

.theory-section strong,
.theory-section h3 {
  color: var(--text);
}

.theory-copy {
  max-width: 66ch;
}

.theory-copy p + p {
  margin-top: .85rem;
}

.theory-section a:not(.figure-link) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .16em;
}

.theory-split {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.theory-figure {
  width: 100%;
  max-width: 340px;
  margin: 0;
}

.figure-link,
.figure-link img {
  display: block;
}

.figure-link img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.theory-figure figcaption {
  margin-top: .6rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--muted);
}

.spend-steps {
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.7rem;
  list-style-position: inside;
}

.spend-steps li::marker {
  color: var(--accent);
  font: 600 .92rem var(--mono);
}

.spend-steps h3 {
  display: inline;
  font-size: 1.06rem;
}

.spend-steps p {
  margin-top: .5rem;
}

.spend-once {
  max-width: 66ch;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.fors-example {
  max-width: 72ch;
  margin: 1.4rem 0 1.7rem;
}

.fors-example img {
  display: block;
  width: 100%;
  height: auto;
  background: #202524;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.fors-example figcaption {
  margin-top: .6rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

#signature-tree h3 {
  margin: 1.5rem 0 .6rem;
  font-size: 1.2rem;
}

#signature-tree code,
#signature-tree samp {
  font-family: var(--mono);
}

.proof-files,
.proof-scope,
.proof-method {
  max-width: 72ch;
}

.proof-files > div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: .25rem 1rem;
  padding: .8rem 0;
  border-top: 1px solid var(--line);
}

.proof-files dt,
.proof-method summary {
  font-weight: 650;
}

.proof-files dd {
  color: #d2cfc7;
}

.proof-scope,
.proof-method {
  margin-top: 1rem;
}

.proof-method summary {
  cursor: pointer;
  color: var(--accent);
  padding: .4rem 0;
}

.proof-method summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.proof-method pre {
  padding: .85rem;
  background: #191919;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.proof-method p {
  margin-block: .65rem;
}

@media (max-width: 560px) {
  .proof-files > div { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .theory-split,
  .spend-steps {
    grid-template-columns: 1fr;
  }

  .spend-steps {
    gap: 1rem;
  }

  .theory-figure {
    justify-self: center;
  }
}
