.theory-shell {
  max-width: 1040px;
}

.theory-registry-header {
  max-width: 820px;
  padding: 72px 0 46px;
}

.theory-registry-header h1 {
  max-width: 760px;
  font-size: 3.35rem;
  line-height: 1;
}

.theory-registry-intro {
  margin-top: 22px;
}

.theory-registry-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.theory-registry-intro p:first-child {
  color: var(--text);
}

.theory-registry {
  padding-bottom: 24px;
}

.theory-registry > h2 {
  margin: 0 0 14px;
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.theory-registry-list {
  border-top: 1px solid var(--line-strong);
}

.theory-registry-row {
  display: grid;
  grid-template-columns: 150px minmax(220px, 0.9fr) minmax(250px, 1.2fr) 190px;
  gap: 22px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  color: var(--text);
  text-decoration: none;
}

.theory-registry-row:hover,
.theory-registry-row:focus-visible {
  background: rgba(117, 231, 240, 0.035);
  outline: none;
}

.theory-registry-id,
.theory-status {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
}

.theory-registry-title {
  display: grid;
  gap: 5px;
}

.theory-registry-title strong {
  font-size: 0.94rem;
}

.theory-registry-title span,
.theory-registry-thesis {
  color: var(--muted);
  font-size: 0.84rem;
}

.theory-status {
  color: var(--amber);
  text-align: right;
}

@media (min-width: 861px) {
  .theory-status {
    white-space: nowrap;
  }
}

.theory-back {
  display: inline-flex;
  margin-top: 34px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  text-decoration: none;
}

.theory-back:hover,
.theory-back:focus-visible {
  color: var(--cyan);
  outline: none;
}

.theory-document {
  max-width: 820px;
  margin-top: 52px;
}

.theory-document-header {
  padding-bottom: 48px;
}

.theory-document-id {
  margin: 0 0 20px;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.theory-document-header h1 {
  max-width: 780px;
  font-size: 3.15rem;
  line-height: 1.03;
}

.theory-title-ru {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 1.28rem;
}

.theory-metadata {
  max-width: 520px;
  margin: 42px 0 0;
  border-top: 1px solid var(--line);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.theory-metadata > div {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.theory-metadata dt,
.theory-metadata dd {
  margin: 0;
}

.theory-metadata dt {
  color: var(--dim);
  font-size: 0.7rem;
}

.theory-metadata dd {
  color: var(--text);
  font-size: 0.78rem;
}

.theory-sections {
  border-top: 1px solid var(--line-strong);
}

.theory-section {
  border-bottom: 1px solid var(--line);
  padding: 38px 0 42px;
}

.theory-section h2,
.theory-relations h2 {
  margin: 0 0 22px;
  font-size: 1.28rem;
}

.theory-section h2 span {
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  font-weight: 500;
}

.theory-section p,
.theory-section li {
  max-width: 740px;
  color: #c4cbd0;
  font-size: 1rem;
  line-height: 1.72;
}

.theory-section p {
  margin: 0;
}

.theory-section p + p,
.theory-definitions + p {
  margin-top: 18px;
}

.theory-subsection {
  max-width: 740px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.theory-subsection h3 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1rem;
}

.theory-section ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.theory-formula {
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid rgba(117, 231, 240, 0.38);
  border-bottom: 1px solid rgba(117, 231, 240, 0.38);
  margin: 26px 0;
  padding: 18px 0;
  color: var(--cyan);
  background: transparent;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  white-space: pre-wrap;
  word-break: normal;
}

.theory-definitions {
  max-width: 680px;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
}

.theory-definitions > div {
  display: grid;
  grid-template-columns: minmax(90px, 150px) minmax(0, 1fr);
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.theory-definitions dt,
.theory-definitions dd {
  margin: 0;
}

.theory-definitions dt {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.theory-definitions dd {
  color: var(--muted);
  font-size: 0.9rem;
}

.theory-section blockquote {
  max-width: 680px;
  border-left: 2px solid var(--cyan);
  margin: 28px 0 0;
  padding: 4px 0 4px 20px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.55;
}

.theory-relations {
  padding: 38px 0 16px;
}

.theory-relations a {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
  color: var(--text);
  text-decoration: none;
}

.theory-relations a:last-child {
  border-bottom: 1px solid var(--line);
}

.theory-relations a:hover,
.theory-relations a:focus-visible {
  color: var(--cyan);
  outline: none;
}

.theory-relations span {
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
}

.theory-relations strong {
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .theory-registry-row {
    grid-template-columns: 145px minmax(210px, 1fr) minmax(0, 1.2fr);
  }

  .theory-status {
    grid-column: 2 / -1;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .theory-registry-header {
    padding: 46px 0 30px;
  }

  .theory-registry-header h1 {
    font-size: 2.25rem;
  }

  .theory-registry-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .theory-registry-title {
    gap: 2px;
  }

  .theory-registry-thesis {
    margin-top: 8px;
  }

  .theory-status {
    grid-column: auto;
    margin-top: 4px;
  }

  .theory-back {
    margin-top: 24px;
  }

  .theory-document {
    margin-top: 38px;
  }

  .theory-document-header {
    padding-bottom: 36px;
  }

  .theory-document-header h1 {
    font-size: 2.2rem;
  }

  .theory-title-ru {
    font-size: 1.08rem;
  }

  .theory-metadata {
    margin-top: 32px;
  }

  .theory-metadata > div {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .theory-section {
    padding: 30px 0 34px;
  }

  .theory-section h2,
  .theory-relations h2 {
    font-size: 1.16rem;
  }

  .theory-section p,
  .theory-section li {
    font-size: 0.96rem;
    line-height: 1.68;
  }

  .theory-definitions > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .theory-relations a {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
