@font-face {
  font-family: "Mluvka";
  src: url("/assets/fonts/Mluvka-Regular-web.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #212121;
  --muted: #686868;
  --line: #e9e9e9;
  --title-font: "Mluvka", ui-sans-serif, system-ui, sans-serif;
  --text-font: "Crimson Text", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--title-font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  zoom: 0.75;
}

a {
  color: inherit;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #000000;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: clamp(1.25rem, 3.733333vw, 2.5rem);
  pointer-events: none;
}

.site-logo,
.site-header nav {
  pointer-events: auto;
}

.site-logo {
  display: block;
  width: clamp(4.25rem, 7vw, 5.5rem);
}

.site-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--muted);
  font-size: clamp(0.875rem, 0.7rem + 0.466667vw, 1rem);
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #000000;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.28em;
}

.article-shell {
  width: min(calc(100% - 2.5rem), 74rem);
  margin: 0 auto;
  padding: clamp(9rem, 20vw, 12rem) 0 8rem;
}

.article-hero {
  width: min(100%, 64rem);
  margin: 0 auto clamp(4.5rem, 12vw, 7rem);
  text-align: center;
}

.article-title-block h1 {
  max-width: 14ch;
  margin: 0 auto;
  color: var(--ink);
  font-family: var(--title-font);
  font-size: clamp(3.4rem, 10.666667vw, 7.5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.92;
  text-wrap: balance;
}

.article-dek {
  max-width: 34rem;
  margin: 1.75rem auto 0;
  color: var(--muted);
  font-family: var(--text-font);
  font-size: clamp(1.45rem, 3.466667vw, 1.95rem);
  line-height: 1.3;
}

.article {
  width: min(100%, 45rem);
  margin: 0 auto;
  color: var(--ink);
  font-family: var(--text-font);
  font-size: clamp(1.25rem, 2.266667vw, 1.4rem);
  line-height: 1.68;
}

.article h2 {
  margin: 5rem 0 1.5rem;
  color: var(--ink);
  font-size: clamp(2.25rem, 5.6vw, 3.45rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.article h3 {
  margin: 3.25rem 0 0.9rem;
  color: var(--ink);
  font-size: clamp(1.55rem, 3.466667vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
}

.article p {
  margin: 0 0 1.4rem;
}

.article strong {
  color: #000000;
}

.article figure {
  margin-top: 3.5rem;
  margin-right: 0;
  margin-bottom: 3.5rem;
  margin-left: 0;
}

.wide-figure {
  width: 100%;
}

.figure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.figure-frame {
  padding: clamp(0.5rem, 2vw, 1.25rem);
  background: var(--paper);
  border: 1px solid var(--line);
}

figcaption {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-family: var(--text-font);
  font-size: 1.08rem;
  line-height: 1.45;
}

.figure-number {
  font-family: var(--title-font);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.figure-fullsize {
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  margin: 2.25rem 0 2.75rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.article table {
  width: 100%;
  min-width: 38rem;
  border-collapse: collapse;
  font-family: var(--text-font);
  font-size: 1.08rem;
  line-height: 1.35;
}

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

.article th {
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.article tbody tr:last-child td {
  border-bottom: 0;
}

.end-note {
  margin: 4rem 0 5rem;
  padding: clamp(1.5rem, 5.333333vw, 2rem);
  background: #f7f7f7;
  border: 1px solid var(--line);
  font-family: var(--text-font);
  font-size: 1.12rem;
  line-height: 1.6;
}

.end-note p {
  margin: 0;
}

.end-note a {
  color: var(--ink);
  font-weight: 600;
}

.blog-footer {
  display: flex;
  justify-content: space-between;
  width: min(calc(100% - 2.5rem), 74rem);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
}

@media (max-width: 510px) {
  .site-header {
    display: none;
  }

  .article-shell,
  .blog-footer {
    width: min(calc(100% - 2rem), 74rem);
  }

  .article-shell {
    padding-top: 3rem;
  }

  .article-title-block h1 {
    font-size: clamp(3.1rem, 20vw, 5rem);
  }

  .figure-frame--diagram {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .figure-frame--diagram img {
    width: 52rem;
    max-width: none;
  }

  figcaption {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .blog-footer {
    display: grid;
    gap: 0.65rem;
  }
}

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