:root {
  --paper: #fffaf0;
  --paper-deep: #f5ead7;
  --ink: #1e1b19;
  --ink-soft: #5f554e;
  --coral: #ff756d;
  --coral-deep: #d94746;
  --gold: #f1bd45;
  --mint: #78c7a4;
  --blue: #78a9df;
  --line: rgba(45, 34, 28, .16);
  --white: rgba(255, 255, 255, .76);
  --shadow: 0 24px 70px rgba(98, 58, 38, .14);
  --shadow-small: 0 12px 30px rgba(98, 58, 38, .11);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --round: "Avenir Next Rounded", "SF Pro Rounded", "Avenir Next", "Trebuchet MS", sans-serif;
  --body: "Avenir Next", Avenir, "Gill Sans", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --measure: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 5%, rgba(255, 117, 109, .19), transparent 29rem),
    radial-gradient(circle at 92% 25%, rgba(241, 189, 69, .2), transparent 30rem),
    linear-gradient(180deg, #fffaf0 0%, #fffdf8 50%, #f9efdf 100%);
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .34;
  background-image:
    linear-gradient(rgba(77, 52, 40, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 52, 40, .025) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-thickness: .09em;
  text-underline-offset: .18em;
}

a:hover {
  text-decoration-color: var(--coral-deep);
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: .7rem;
  left: .7rem;
  z-index: 100;
  padding: .65rem .9rem;
  border-radius: .7rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header,
.site-footer,
main {
  width: min(100%, var(--measure));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--round);
  font-size: .94rem;
  font-weight: 850;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid var(--ink);
  border-radius: 42% 58% 55% 45%;
  background: var(--coral);
  transform: rotate(8deg);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: .38rem;
  width: .18rem;
  height: .18rem;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.brand-mark::before {
  left: .3rem;
}

.brand-mark::after {
  right: .3rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 3vw, 1.7rem);
}

.site-header nav a {
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .78rem;
  font-weight: 760;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--ink);
}

main {
  min-height: calc(100vh - 12rem);
  padding: 0 var(--gutter) clamp(5rem, 9vw, 9rem);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .75rem;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.site-footer p:first-child {
  color: var(--ink);
  font-size: .9rem;
}

.site-footer p:last-child {
  display: flex;
  gap: .55rem;
}

.eyebrow {
  margin: 0 0 .7rem;
  color: var(--coral-deep);
  font-family: var(--round);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .72rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--round);
  font-size: .75rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.button-dark {
  background: var(--ink);
  color: white;
}

.button-dark:hover {
  background: var(--coral-deep);
  border-color: var(--coral-deep);
}

.button-plain {
  background: rgba(255, 255, 255, .4);
}

.button-plain:hover {
  background: white;
}

/* Home */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, .8fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 8rem);
  min-height: min(780px, calc(100vh - 5rem));
  padding: clamp(3rem, 8vw, 7rem) 0;
}

.hero-copy {
  animation: rise .7s both cubic-bezier(.2, .8, .2, 1);
}

.hero-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 8.2vw, 7.4rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .88;
}

.hero-lede {
  max-width: 38rem;
  margin: 1.8rem 0 0;
  color: #4f4540;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.52;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 2rem;
}

.hero-creature {
  position: relative;
  width: min(100%, 25rem);
  justify-self: center;
  animation: rise .7s .14s both cubic-bezier(.2, .8, .2, 1);
}

.hero-creature::before {
  position: absolute;
  inset: 9% -9% 1%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 117, 109, .22);
  content: "";
  filter: blur(36px);
}

.hero-creature img {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 42% 58% 48% 52% / 45% 45% 55% 55%;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
  animation: float 6s 1s infinite ease-in-out;
}

.hero-creature p {
  width: fit-content;
  margin: 1rem auto 0;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(255, 255, 255, .62);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .69rem;
  font-weight: 760;
  transform: rotate(-2deg);
}

.orbit {
  position: absolute;
  z-index: -1;
  border: 1px dashed rgba(30, 27, 25, .2);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  inset: -7% -14% 4%;
  transform: rotate(22deg);
}

.orbit-two {
  inset: 8% -25% -11%;
  transform: rotate(-19deg);
}

.featured-section,
.latest-section {
  padding-top: clamp(4rem, 8vw, 8rem);
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.2vw, 5rem);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .95;
}

.section-heading-inline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  gap: 1rem;
}

.section-heading-inline > a {
  flex: 0 0 auto;
  margin-bottom: .45rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .73rem;
  font-weight: 820;
}

.post-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.post-card {
  --accent: var(--coral);
  position: relative;
  display: flex;
  min-height: 22rem;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  border: 1px solid rgba(45, 34, 28, .14);
  border-radius: 1.65rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 252, 244, .58));
  box-shadow: var(--shadow-small);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.post-card::before {
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 12rem;
  height: 12rem;
  border-radius: 42% 58% 53% 47%;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  content: "";
  transform: rotate(18deg);
}

.post-card:hover {
  box-shadow: 0 25px 54px rgba(98, 58, 38, .16);
  transform: translateY(-3px);
}

.post-card:focus-within {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, var(--ink));
  outline-offset: 4px;
}

.post-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.post-card-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .64rem;
  font-weight: 720;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: .28rem .58rem;
  border: 1px solid rgba(30, 27, 25, .15);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 28%, white);
  color: var(--ink);
  font-family: var(--round);
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.post-card h2 {
  position: relative;
  z-index: 2;
  max-width: 15ch;
  margin: 1.2rem 0 .85rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .98;
}

.post-card > p {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.58;
}

.post-card-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 2rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag-row span {
  padding: .24rem .5rem;
  border-radius: .45rem;
  background: rgba(30, 27, 25, .055);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .61rem;
  font-weight: 700;
}

.read-arrow {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1rem;
}

.post-card-large {
  min-height: 32rem;
  padding: clamp(1.5rem, 4vw, 3.3rem);
  background:
    radial-gradient(circle at 89% 14%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 17rem),
    linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 249, 235, .72));
}

.post-card-large::after {
  position: absolute;
  right: 8%;
  bottom: 12%;
  width: min(22vw, 17rem);
  aspect-ratio: 1;
  border: 1px dashed rgba(30, 27, 25, .18);
  border-radius: 50%;
  content: "";
  box-shadow:
    inset 0 0 0 2.5rem rgba(255, 255, 255, .17),
    inset 0 0 0 5rem rgba(255, 255, 255, .13);
}

.post-card-large h2 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 6.2vw, 6.2rem);
}

.post-card-large > p {
  max-width: 42rem;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
}

.editorial-note {
  display: grid;
  grid-template-columns: minmax(8rem, .25fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: clamp(5rem, 10vw, 10rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.editorial-note p {
  margin: 0;
}

.editorial-note > p:last-child {
  max-width: 36ch;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
}

/* Posts */

.post {
  --accent: var(--coral);
}

.accent-coral {
  --accent: var(--coral);
}

.accent-gold {
  --accent: var(--gold);
}

.accent-mint {
  --accent: var(--mint);
}

.accent-blue {
  --accent: var(--blue);
}

.post-header {
  position: relative;
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 7vw, 6rem);
  text-align: center;
}

.post-header::before {
  position: absolute;
  top: 14%;
  left: 50%;
  z-index: -1;
  width: clamp(15rem, 40vw, 32rem);
  height: clamp(15rem, 40vw, 32rem);
  border-radius: 47% 53% 43% 57%;
  background: color-mix(in srgb, var(--accent) 23%, transparent);
  content: "";
  filter: blur(1px);
  transform: translateX(-50%) rotate(12deg);
}

.back-link {
  position: absolute;
  top: 1.2rem;
  left: 0;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .72rem;
  font-weight: 780;
}

.post-header h1 {
  max-width: 14ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 8vw, 7.3rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .9;
}

.post-summary {
  max-width: 42rem;
  margin: 1.8rem auto 0;
  color: #514741;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  line-height: 1.55;
}

.post-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.7rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .67rem;
  font-weight: 720;
}

.post-tags {
  justify-content: center;
  margin-top: .8rem;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(5rem, 9rem) minmax(0, 48rem);
  justify-content: center;
  gap: clamp(1rem, 4vw, 4rem);
}

.article-rail {
  position: sticky;
  top: 2rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.15rem .75rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, .58);
  text-align: center;
}

.article-rail span {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
}

.article-rail small {
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .55rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-body {
  min-width: 0;
  color: #282321;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  line-height: 1.78;
}

.article-body > p:first-child {
  font-size: 1.18em;
}

.article-body h2 {
  margin: 4rem 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
}

.article-body h3 {
  margin: 3rem 0 1rem;
  font-family: var(--round);
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.heading-anchor {
  margin-left: .35rem;
  color: color-mix(in srgb, var(--accent) 74%, var(--ink));
  font-family: var(--round);
  font-size: .45em;
  text-decoration: none;
  vertical-align: middle;
  opacity: 0;
}

.article-body h2:hover .heading-anchor,
.article-body h3:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre,
.article-body table {
  margin: 1.25rem 0;
}

.article-body strong {
  font-weight: 750;
}

.article-body ul,
.article-body ol {
  padding-left: 1.35rem;
}

.article-body li {
  margin: .5rem 0;
  padding-left: .25rem;
}

.article-body blockquote {
  margin-inline: 0;
  padding: .4rem 0 .4rem 1.25rem;
  border-left: .3rem solid var(--accent);
  color: #443b36;
  font-size: 1.12em;
  font-style: italic;
}

.article-body code,
.run-command code {
  font-family: var(--mono);
}

.article-body :not(pre) > code {
  padding: .08rem .27rem;
  border-radius: .3rem;
  background: rgba(30, 27, 25, .075);
  font-size: .83em;
}

.article-body pre {
  max-width: 100%;
  overflow: auto;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(30, 27, 25, .12);
  border-radius: .9rem;
  background: #25211f;
  color: #fff9ee;
  font: .76rem/1.6 var(--mono);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--body);
  font-size: .82rem;
}

.article-body th,
.article-body td {
  padding: .7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  font-family: var(--round);
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.katex-display {
  max-width: 100%;
  margin: 1.8rem 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .25rem 0 .45rem;
}

.katex-display > .katex {
  min-width: max-content;
}

.canon-line {
  margin-top: 4rem !important;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .68rem;
}

.attachments {
  max-width: 63rem;
  margin: clamp(5rem, 10vw, 10rem) auto 0;
  padding-top: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--ink);
}

.attachments > h2 {
  max-width: 12ch;
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  letter-spacing: -.05em;
  line-height: .96;
}

.attachment-list {
  display: grid;
  gap: 1rem;
}

.attachment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .8fr);
  min-width: 0;
  gap: 1.5rem;
  overflow: hidden;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background:
    radial-gradient(circle at 92% 15%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 13rem),
    rgba(255, 255, 255, .64);
  box-shadow: var(--shadow-small);
}

.attachment-card > * {
  min-width: 0;
}

.attachment-kind {
  margin: 0 0 .3rem;
  color: var(--coral-deep);
  font-family: var(--round);
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.attachment-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -.035em;
  line-height: 1;
}

.attachment-card > div:first-child > p:last-child {
  margin: .75rem 0 0;
  color: var(--ink-soft);
  font-size: .85rem;
}

.run-command {
  position: relative;
  align-self: center;
  width: 100%;
  min-width: 0;
  padding: 1rem;
  border-radius: .9rem;
  background: var(--ink);
  color: #fff9ee;
}

.run-command > span {
  display: block;
  margin-bottom: .35rem;
  color: #f5ba71;
  font-family: var(--round);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.run-command code {
  display: block;
  overflow-x: auto;
  padding-right: 3rem;
  font-size: .67rem;
  white-space: nowrap;
}

.run-command button {
  position: absolute;
  top: .65rem;
  right: .65rem;
  padding: .32rem .48rem;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: .45rem;
  background: rgba(255, 255, 255, .1);
  color: white;
  font-family: var(--round);
  font-size: .56rem;
  font-weight: 800;
  cursor: pointer;
}

.attachment-foot {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .25rem;
}

.attachment-foot .button {
  min-width: 0;
  max-width: min(100%, 36rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-foot > span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .58rem;
}

.post-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 63rem;
  margin: clamp(5rem, 10vw, 10rem) auto 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 1.5rem;
  background: var(--ink);
  color: white;
}

.post-end p {
  max-width: 28ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  line-height: 1.1;
}

.post-end .button {
  flex: 0 0 auto;
  border-color: white;
  background: white;
  color: var(--ink);
}

/* Archive */

.archive-head {
  max-width: 58rem;
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
}

.archive-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: .86;
}

.archive-head > p:last-child {
  max-width: 44rem;
  margin: 1.7rem 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.archive-controls {
  position: sticky;
  top: .7rem;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(15rem, .8fr) auto;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  padding: .75rem;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 1.15rem;
  background: rgba(255, 250, 240, .88);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(18px);
}

.filter-tabs {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tabs button,
.empty-state button {
  flex: 0 0 auto;
  padding: .55rem .72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .64rem;
  font-weight: 830;
  cursor: pointer;
}

.filter-tabs button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.search-box input {
  width: 100%;
  min-height: 2.4rem;
  padding: .55rem .72rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  outline: none;
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
  font-size: .72rem;
}

.search-box input:focus {
  border-color: var(--coral-deep);
  box-shadow: 0 0 0 3px rgba(217, 71, 70, .12);
}

.filter-status {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .6rem;
  font-weight: 760;
  white-space: nowrap;
}

.archive-grid .post-card[hidden] {
  display: none;
}

.empty-state {
  padding: 4rem 1rem;
  text-align: center;
}

.empty-state p {
  font-family: var(--serif);
  font-size: 1.6rem;
}

/* Papers */

.papers-head {
  max-width: 66rem;
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 7vw, 6rem);
}

.papers-head h1 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: .86;
}

.papers-head > p:last-child {
  max-width: 44rem;
  margin: 1.8rem 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.45rem);
}

.paper-shelf {
  display: grid;
  gap: 1rem;
}

.manuscript-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, .42fr);
  gap: 1.2rem 2rem;
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at 94% 10%, rgba(120, 169, 223, .2), transparent 15rem),
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 249, 236, .7));
  box-shadow: var(--shadow-small);
}

.manuscript-card:nth-child(3n + 2) {
  background:
    radial-gradient(circle at 94% 10%, rgba(120, 199, 164, .22), transparent 15rem),
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 249, 236, .7));
}

.manuscript-card:nth-child(3n + 3) {
  background:
    radial-gradient(circle at 94% 10%, rgba(241, 189, 69, .22), transparent 15rem),
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 249, 236, .7));
}

.manuscript-meta {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: .45rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .62rem;
  font-weight: 760;
}

.manuscript-meta span,
.manuscript-meta time {
  padding: .28rem .52rem;
  border: 1px solid rgba(30, 27, 25, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
}

.manuscript-card h2 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .98;
}

.manuscript-summary {
  grid-column: 1;
  max-width: 52rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

.manuscript-note {
  grid-column: 1;
  max-width: 52rem;
  margin: 0;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: .77rem;
}

.manuscript-actions {
  display: flex;
  grid-column: 2;
  grid-row: 2 / span 3;
  align-content: start;
  align-self: center;
  flex-wrap: wrap;
  gap: .55rem;
}

.manuscript-actions .button {
  background: rgba(255, 255, 255, .72);
}

.manuscript-actions .button:hover {
  background: white;
}

.download-size {
  margin-left: .38rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .72em;
  font-weight: 500;
}

.manuscript-related {
  display: flex;
  grid-column: 1;
  flex-wrap: wrap;
  gap: .75rem;
  font-family: var(--round);
  font-size: .7rem;
  font-weight: 820;
}

.manuscript-hash {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .57rem;
}

.not-found {
  display: grid;
  min-height: 70vh;
  place-content: center;
  text-align: center;
}

.not-found h1 {
  max-width: 9ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: -.07em;
  line-height: .85;
}

.not-found > p:not(.eyebrow) {
  font-family: var(--serif);
  font-size: 1.2rem;
}

.not-found .button {
  justify-self: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(1.5deg);
  }
  50% {
    transform: translateY(-.55rem) rotate(-.5deg);
  }
}

@media (max-width: 860px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 5rem;
  }

  .hero-copy h1 {
    max-width: 10ch;
  }

  .hero-creature {
    width: min(75vw, 23rem);
  }

  .post-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-rail {
    position: static;
    width: fit-content;
    flex-direction: row;
    gap: .45rem;
    padding: .5rem .7rem;
  }

  .article-rail span {
    font-size: 1rem;
  }

  .attachment-card {
    grid-template-columns: 1fr;
  }

  .attachment-foot {
    grid-column: auto;
  }

  .archive-controls {
    grid-template-columns: 1fr;
  }

  .manuscript-card {
    grid-template-columns: 1fr;
  }

  .manuscript-actions {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
  }

  .filter-status {
    display: none;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding-top: .9rem;
  }

  .site-header nav {
    gap: .75rem;
  }

  .site-header nav a {
    font-size: .68rem;
  }

  .site-header nav a:nth-child(4) {
    display: none;
  }

  .home-hero {
    padding-top: 3.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(3.6rem, 18vw, 5.5rem);
  }

  .section-heading-inline {
    align-items: start;
    flex-direction: column;
  }

  .post-card,
  .post-card-large {
    min-height: 25rem;
    border-radius: 1.25rem;
  }

  .post-card-large h2 {
    font-size: 3.1rem;
  }

  .editorial-note {
    grid-template-columns: 1fr;
  }

  .post-header {
    padding-top: 6rem;
    text-align: left;
  }

  .post-header h1,
  .post-summary {
    margin-left: 0;
  }

  .post-header h1 {
    font-size: clamp(3.3rem, 16vw, 5rem);
  }

  .post-byline,
  .post-tags {
    justify-content: flex-start;
  }

  .article-body {
    font-size: 1.05rem;
    line-height: 1.72;
  }

  .article-body h2 {
    margin-top: 3.3rem;
  }

  .attachment-foot,
  .post-end,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-foot .button {
    display: block;
    width: 100%;
  }

  .post-end .button {
    width: 100%;
  }

  .archive-head h1 {
    font-size: clamp(4rem, 20vw, 6.3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Proof-path ledger */

:root {
  --paper: #f1f2ed;
  --paper-deep: #e3e5df;
  --ink: #111318;
  --ink-soft: #5b6068;
  --coral: #ef594f;
  --coral-deep: #c93831;
  --line: rgba(17, 19, 24, .16);
  --white: rgba(255, 255, 255, .86);
  --shadow: 0 28px 80px rgba(22, 27, 35, .14);
  --shadow-small: 0 12px 28px rgba(22, 27, 35, .1);
  --display: "Avenir Next Condensed", "DIN Condensed", "Helvetica Neue Condensed", sans-serif;
  --measure: 96rem;
  --grey: #8d939c;
  --green: #36b96a;
  --blue: #367fd8;
  --purple: #9b57d3;
  --rarity-gold: #d7a928;
}

body {
  background:
    radial-gradient(circle at 84% 3%, rgba(54, 127, 216, .12), transparent 28rem),
    radial-gradient(circle at 8% 20%, rgba(54, 185, 106, .09), transparent 24rem),
    linear-gradient(180deg, #f5f6f2 0%, #eceee8 100%);
}

.paper-noise {
  opacity: .5;
  background-image:
    linear-gradient(rgba(17, 19, 24, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, .035) 1px, transparent 1px);
  background-size: 32px 32px;
}

.site-header {
  position: relative;
  z-index: 30;
  margin-top: .8rem;
  padding: .78rem 1rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 1rem;
  background: #111318;
  box-shadow: 0 15px 34px rgba(17, 19, 24, .18);
  color: #f8f8f3;
}

.brand {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  border-color: #f8f8f3;
  border-radius: .18rem;
  background: var(--rarity-gold);
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after {
  display: none;
}

.site-header nav a {
  color: rgba(248, 248, 243, .7);
  font-family: var(--display);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header nav a:hover {
  color: white;
}

.site-footer {
  border-color: rgba(17, 19, 24, .18);
  font-family: var(--display);
  letter-spacing: .03em;
}

.home-page main {
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.ledger-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, .65fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 8rem);
  padding: clamp(5rem, 10vw, 10rem) 0 clamp(3rem, 6vw, 6rem);
  animation: rise .65s both cubic-bezier(.2, .8, .2, 1);
}

.ledger-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(5.5rem, 13vw, 13rem);
  font-stretch: condensed;
  font-weight: 950;
  letter-spacing: -.075em;
  line-height: .72;
  text-transform: uppercase;
}

.ledger-hero .hero-lede {
  max-width: 42rem;
  margin-top: 2.2rem;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.45;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.hero-stats div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .2rem;
  padding: 1.1rem .7rem;
  border-right: 1px solid var(--line);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats strong {
  font-family: var(--display);
  font-size: clamp(2.1rem, 4vw, 4rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
}

.hero-stats span {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rarity-panel {
  display: grid;
  grid-template-columns: minmax(18rem, .75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(1.5rem, 4vw, 3.2rem);
  overflow: hidden;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 98% 0%, rgba(215, 169, 40, .18), transparent 20rem),
    #111318;
  box-shadow: var(--shadow);
  color: #f7f8f3;
  animation: rise .65s .1s both cubic-bezier(.2, .8, .2, 1);
}

.rarity-copy .eyebrow {
  color: #e8c55a;
}

.rarity-copy h2 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.8vw, 4.7rem);
  font-weight: 920;
  letter-spacing: -.055em;
  line-height: .9;
  text-transform: uppercase;
}

.rarity-copy > p:last-child {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  color: rgba(247, 248, 243, .66);
  font-size: .82rem;
  line-height: 1.65;
}

.rarity-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: .55rem;
}

.legend-item {
  --rarity: var(--grey);
  display: flex;
  min-height: 11rem;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: .45rem;
  padding: 1rem .5rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: .9rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rarity) 18%, transparent), transparent 55%),
    rgba(255, 255, 255, .035);
  text-align: center;
}

.legend-item:nth-child(2) {
  min-height: 12.5rem;
}

.legend-item:nth-child(3) {
  min-height: 14rem;
}

.legend-item:nth-child(4) {
  min-height: 15.5rem;
}

.legend-item:nth-child(5) {
  min-height: 17rem;
}

.rarity-grey {
  --rarity: var(--grey);
}

.rarity-green {
  --rarity: var(--green);
}

.rarity-blue {
  --rarity: var(--blue);
}

.rarity-purple {
  --rarity: var(--purple);
}

.rarity-gold {
  --rarity: var(--rarity-gold);
}

.rarity-gem {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid color-mix(in srgb, var(--rarity) 60%, white);
  border-radius: .14rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--rarity) 45%, white), var(--rarity) 55%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rarity) 50%, transparent);
  transform: rotate(45deg);
}

.legend-item .rarity-gem {
  width: 1.8rem;
  height: 1.8rem;
  margin-bottom: .4rem;
}

.legend-item strong {
  color: var(--rarity);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.legend-item small {
  color: rgba(247, 248, 243, .45);
  font-size: .58rem;
}

.ledger-section {
  padding-top: clamp(5rem, 9vw, 9rem);
  animation: rise .65s .18s both cubic-bezier(.2, .8, .2, 1);
}

.ledger-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.ledger-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 950;
  letter-spacing: -.065em;
  line-height: .8;
  text-transform: uppercase;
}

.ledger-heading > p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ledger-controls {
  position: sticky;
  top: .5rem;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(17rem, 1fr) minmax(22rem, 1.3fr) minmax(13rem, .75fr) minmax(12rem, .65fr);
  gap: .65rem;
  margin-bottom: .7rem;
  padding: .65rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 1rem;
  background: rgba(17, 19, 24, .94);
  box-shadow: 0 16px 40px rgba(17, 19, 24, .2);
  color: white;
  backdrop-filter: blur(18px);
}

.filter-block,
.ledger-search,
.ledger-sort {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .35rem;
}

.filter-block > span,
.ledger-search > span,
.ledger-sort > span {
  padding-left: .15rem;
  color: rgba(255, 255, 255, .45);
  font-family: var(--display);
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ledger-controls .filter-tabs button {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  color: rgba(255, 255, 255, .65);
}

.ledger-controls .filter-tabs button[aria-pressed="true"] {
  border-color: white;
  background: white;
  color: var(--ink);
}

.rarity-tabs button:nth-child(2)[aria-pressed="true"] {
  border-color: var(--grey);
  background: var(--grey);
}

.rarity-tabs button:nth-child(3)[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
}

.rarity-tabs button:nth-child(4)[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
}

.rarity-tabs button:nth-child(5)[aria-pressed="true"] {
  border-color: var(--purple);
  background: var(--purple);
}

.rarity-tabs button:nth-child(6)[aria-pressed="true"] {
  border-color: var(--rarity-gold);
  background: var(--rarity-gold);
}

.ledger-search input,
.ledger-sort select {
  width: 100%;
  min-height: 2.35rem;
  padding: .48rem .65rem;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: .55rem;
  outline: 0;
  background: rgba(255, 255, 255, .075);
  color: white;
  font-size: .72rem;
}

.ledger-search input::placeholder {
  color: rgba(255, 255, 255, .35);
}

.ledger-search input:focus,
.ledger-sort select:focus {
  border-color: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .1);
}

.ledger-sort select {
  color-scheme: dark;
}

.ledger-table-shell {
  overflow: auto;
  border: 1px solid rgba(17, 19, 24, .14);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, .64);
  box-shadow: var(--shadow-small);
}

.proof-table {
  width: 100%;
  min-width: 68rem;
  border-spacing: 0;
  border-collapse: separate;
  font-size: .78rem;
}

.proof-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: .72rem .8rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: #111318;
  color: rgba(255, 255, 255, .52);
  font-family: var(--display);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
}

.proof-table th:first-child {
  width: 23%;
}

.proof-table th:nth-child(2) {
  width: 8%;
}

.proof-table th:nth-child(3) {
  width: 36%;
}

.proof-table th:nth-child(4) {
  width: 12%;
}

.proof-table th:nth-child(5) {
  width: 21%;
}

.path-row {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--rarity) 14%, white),
      rgba(255, 255, 255, .88) 48%
    );
}

.path-row:nth-child(6n + 4),
.path-row:nth-child(6n + 5),
.path-row:nth-child(6n + 6) {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--rarity) 18%, #eef0eb),
      rgba(239, 241, 236, .9) 48%
    );
}

.path-row[hidden] {
  display: none;
}

.path-row td {
  padding: .88rem .8rem;
  border-bottom: 1px solid rgba(17, 19, 24, .1);
  vertical-align: top;
}

.path-row td:first-child {
  border-left: .3rem solid var(--rarity);
}

.path-row:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--rarity) 9%, white), rgba(255, 255, 255, .95));
}

.path-identity {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.problem-label {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.path-identity strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.05;
}

.path-identity p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .67rem;
  line-height: 1.45;
}

.path-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .2rem;
}

.path-tags span {
  padding: .12rem .28rem;
  border-radius: .25rem;
  background: rgba(17, 19, 24, .055);
  color: var(--ink-soft);
  font-size: .5rem;
  line-height: 1.3;
}

.horizon-badge {
  display: inline-flex;
  padding: .32rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--display);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.horizon-closed {
  border-color: rgba(54, 185, 106, .38);
  background: rgba(54, 185, 106, .12);
  color: #14783d;
}

.horizon-next {
  border-color: rgba(54, 127, 216, .35);
  background: rgba(54, 127, 216, .1);
  color: #225fa8;
}

.horizon-terminal {
  border-color: rgba(17, 19, 24, .24);
  background: #111318;
  color: white;
}

.result-cell > p {
  margin: 0;
  color: #252930;
  font-family: var(--serif);
  font-size: .9rem;
  line-height: 1.48;
}

.result-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .55rem;
  color: var(--ink-soft);
  font-size: .57rem;
}

.evidence-link {
  color: color-mix(in srgb, var(--rarity) 80%, var(--ink));
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.evidence-pending {
  color: rgba(91, 96, 104, .62);
  font-style: italic;
}

.chance-value {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 950;
  letter-spacing: -.04em;
}

.chance-track {
  width: 100%;
  height: .34rem;
  margin-top: .35rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 19, 24, .1);
}

.chance-track span {
  display: block;
  width: var(--chance);
  height: 100%;
  border-radius: inherit;
  background: var(--rarity);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rarity) 45%, transparent);
}

.rarity-cell {
  min-width: 10rem;
  color: var(--rarity);
}

.rarity-cell .rarity-gem {
  width: 1rem;
  height: 1rem;
  margin: .1rem .65rem 0 .18rem;
}

.rarity-cell strong {
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.rarity-cell small {
  display: block;
  margin: .35rem 0 0 2rem;
  color: var(--ink-soft);
  font-size: .58rem;
}

.ledger-empty {
  padding: 4rem 1rem;
  text-align: center;
}

.ledger-empty strong {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ledger-empty button {
  margin-top: 1rem;
  padding: .6rem .9rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-family: var(--display);
  font-weight: 900;
  cursor: pointer;
}

.forecast-note {
  display: grid;
  grid-template-columns: minmax(12rem, .3fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .55);
}

.forecast-note strong {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
}

.forecast-note p {
  max-width: 70rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: .72rem;
}

.archive-head h1,
.papers-head h1,
.not-found h1 {
  font-family: var(--display);
  font-weight: 950;
  text-transform: uppercase;
}

.post-header h1,
.section-heading h2,
.attachments > h2,
.manuscript-card h2 {
  font-family: var(--display);
  font-weight: 900;
}

@media (max-width: 1120px) {
  .ledger-controls {
    grid-template-columns: 1fr 1.2fr;
  }

  .rarity-panel {
    grid-template-columns: 1fr;
  }

  .rarity-legend {
    min-height: 14rem;
  }
}

@media (max-width: 860px) {
  .site-header {
    margin-inline: .7rem;
  }

  .ledger-hero {
    grid-template-columns: 1fr;
  }

  .ledger-hero h1 {
    font-size: clamp(5rem, 22vw, 9rem);
  }

  .rarity-legend {
    grid-template-columns: repeat(5, minmax(5.2rem, 1fr));
    overflow-x: auto;
    padding-bottom: .4rem;
  }

  .ledger-controls {
    position: static;
    grid-template-columns: 1fr;
  }

  .ledger-table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .proof-table {
    min-width: 0;
  }

  .proof-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .proof-table,
  .proof-table tbody,
  .path-row,
  .path-row td {
    display: block;
    width: 100%;
  }

  .path-row {
    margin-bottom: .7rem;
    overflow: hidden;
    border: 1px solid rgba(17, 19, 24, .12);
    border-left: .4rem solid var(--rarity);
    border-radius: 1rem;
    box-shadow: var(--shadow-small);
  }

  .path-row td {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: .75rem;
    padding: .75rem .85rem;
    border-bottom: 1px solid rgba(17, 19, 24, .08);
  }

  .path-row td::before {
    color: var(--ink-soft);
    content: attr(data-label);
    font-family: var(--display);
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
  }

  .path-row td:first-child {
    border-left: 0;
  }

  .path-row td:last-child {
    border-bottom: 0;
  }

  .path-identity {
    min-width: 0;
  }

  .chance-track {
    max-width: 14rem;
  }

  .rarity-cell small {
    margin-left: 1.5rem;
  }

  .forecast-note {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
}

@media (max-width: 600px) {
  .site-header nav a {
    font-size: .59rem;
  }

  .ledger-hero {
    padding-top: 4rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-stats div:last-child {
    border-bottom: 0;
  }

  .rarity-panel {
    margin-inline: -.2rem;
    border-radius: 1rem;
  }

  .rarity-copy h2 {
    font-size: 2.5rem;
  }

  .ledger-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: .8rem;
  }

  .filter-tabs {
    padding-bottom: .1rem;
  }

  .path-row td {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .path-row td::before {
    margin-bottom: .1rem;
  }

  .result-cell > p {
    font-size: .98rem;
  }
}
