html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: #111;
  background: #fff;
  font: 15px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

h1,
h2,
h3,
h4,
p,
blockquote,
figure {
  font: inherit;
  margin: 0;
}

h1 {
  margin-top: 3rem;
}

h2,
.h2 {
  font-weight: 700;
  margin: 2.6rem 0 1.15rem;
}

h3,
h4 {
  font-weight: 700;
  margin: 2rem 0 1.15rem;
}

p {
  margin-bottom: 1.15rem;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0 0 1.15rem;
  padding-left: 3ch;
}

li {
  margin-bottom: 0.85rem;
}

blockquote {
  margin: 1.7rem 0 1.7rem 4ch;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
}

figure {
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.7rem 0;
}

th,
td {
  border: 1px solid #111;
  padding: 0.45rem;
  vertical-align: top;
  text-align: left;
}

sup {
  line-height: 0;
}

.date {
  margin-bottom: 3rem;
}

.date + .epigraph {
  margin-top: -1.85rem;
}

.epigraph,
.subtitle,
.motto {
  margin-bottom: 3rem;
}

.site-link {
  margin-bottom: 0;
}

.sc,
.latin {
  font-variant: small-caps;
}

.article-body,
.references {
  display: block;
}

.definition,
.definition-block,
.theorem,
.theorem-statement,
.lemma,
.proposition,
.proof,
.abstract,
.authors-note,
.author-note,
.paper-link,
.callout,
.emphasis-block,
.announcement,
.key-point,
.update-note,
.extended-quote,
.verse,
.matrix-container,
.toc,
.eq {
  margin: 1.7rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.verse {
  margin-left: 4ch;
}

.definition p:last-child,
.definition-block p:last-child,
.theorem p:last-child,
.theorem-statement p:last-child,
.lemma p:last-child,
.proposition p:last-child,
.proof p:last-child,
.abstract p:last-child,
.authors-note p:last-child,
.author-note p:last-child,
blockquote p:last-child {
  margin-bottom: 0;
}

.theorem-title,
.lemma-title,
.proposition-title,
.proof-label,
.def-header,
.subsight-title,
.matrix-title,
.toc-title {
  display: block;
  font-weight: 700;
  margin-bottom: 1.15rem;
}

.proof {
  margin-left: 2ch;
}

.qed {
  text-align: right;
}

.positive,
.negative {
  color: inherit;
}

.infinite {
  font-weight: 700;
}

.hero-image,
.subsight-image {
  margin: 2rem 0;
}

.hero-image img,
.subsight-image img {
  margin: 0 auto;
}

.image-caption,
.date-marker,
.subsight-number,
.appendix-note {
  margin-bottom: 0.85rem;
}

.subsight {
  margin: 1.7rem 0;
}

.subsight-content {
  margin-top: 0.45rem;
}

.references {
  margin-top: 3rem;
}

.references h2 {
  margin-top: 0;
}

.note {
  padding-left: 3ch;
  text-indent: -3ch;
}

.cite-link,
.appendix-ref a,
.note a {
  text-decoration: underline;
}

.katex {
  font-size: 1.02em;
}

.katex-display {
  margin: 1.7rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

nav {
  margin-top: 3rem;
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  main {
    padding: 32px 18px 72px;
  }

  blockquote,
  .verse {
    margin-left: 2ch;
  }
}
