@font-face {
  font-family: "CMU Typewriter";
  src: url("/assets/fonts/cmuntt.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "CMU Typewriter", ui-monospace, monospace;
  background: var(--page);
  color: var(--text);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  margin: 0;
  background:
    linear-gradient(90deg, transparent 49.9%, rgb(235 197 151 / 2%) 50%, transparent 50.1%),
    var(--page);
  line-height: 1.58;
}

a {
  color: var(--hot);
  text-decoration-color: var(--edge-strong);
  text-underline-offset: 0.17em;
}

a:hover,
a:focus-visible {
  color: #fff0d7;
  text-decoration-color: var(--hot);
}

.site-head {
  display: flex;
  justify-content: space-between;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 13px 0 11px;
  border-bottom: 1px solid var(--edge);
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.075em;
}

.site-head a {
  text-decoration: none;
}

article {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 66px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  line-height: 1.16;
  text-wrap: balance;
}

h1 {
  margin: 0;
  color: var(--hot);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--edge);
  color: var(--hot);
  font-size: 1.2rem;
  letter-spacing: -0.018em;
}

h3 {
  margin: 1.45rem 0 0.45rem;
  color: #d5c5aa;
  font-size: 0.95rem;
}

.lede {
  margin: 1rem 0 0;
  color: #c5b9a4;
  font-size: 1rem;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.035em;
}

.abstract,
.theorem,
.caveat {
  margin: 1.7rem 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--edge);
  border-radius: 2px;
  background: var(--surface);
}

.abstract h2 {
  margin: 0 0 0.6rem;
  padding: 0;
  border: 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.abstract p:last-child,
.caveat p:last-child {
  margin-bottom: 0;
}

.theorem {
  border-color: var(--edge-strong);
  background: #18140f;
}

.theorem strong,
.caveat strong {
  color: var(--hot);
}

p,
li {
  color: #d4cab7;
}

ol {
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.55rem;
}

.display {
  margin: 1.25rem -8px;
  padding: 0.85rem 8px;
  overflow-x: auto;
  color: #fff0d7;
  text-align: center;
}

math {
  font-size: 1.04em;
}

code {
  color: var(--hot);
  font: 0.88em "CMU Typewriter", ui-monospace, monospace;
}

.frontier {
  color: var(--hot);
  font-size: clamp(0.92rem, 3vw, 1.15rem);
}

.artifact-shelf {
  margin: 1.8rem 0 2.1rem;
}

.artifact-shelf h2 {
  margin-top: 0;
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.artifact-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--edge-strong);
  border-radius: 2px;
  background: var(--raised);
  color: inherit;
  text-decoration: none;
  transition: transform 110ms ease, border-color 110ms ease, box-shadow 110ms ease;
}

.artifact-card:hover,
.artifact-card:focus-visible {
  border-color: var(--hot);
  outline: none;
  transform: translateY(-3px);
  box-shadow: 0 5px 0 rgb(0 0 0 / 26%);
}

.artifact-card strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.22;
}

.artifact-card > span:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.38;
}

.artifact-card b {
  margin-top: 2px;
  color: var(--hot);
  font-size: 0.63rem;
}

.references {
  padding-left: 1.25rem;
  font-size: 0.78rem;
}

.article-foot {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--edge);
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.055em;
}

@media (max-width: 600px) {
  :root {
    font-size: 15px;
  }

  .site-head,
  article,
  .article-foot {
    width: min(100% - 22px, 720px);
  }

  article {
    padding-top: 30px;
  }

  .artifact-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .artifact-card {
    transition-duration: 0.01ms;
  }
}
