/* Slop Atlas - stylesheet
   ------------------------------------------------------------------
   Design rules this file follows:
   - No webfonts. Body/UI use the system sans stack, labels/meta/terms use the
     system monospace stack. Zero font requests keeps LCP and CLS clean and
     avoids the "Inter default" look entirely.
   - One accent colour, locked for the whole site. No gradients used as
     decoration; the only gradient in the file is the scanline texture, which
     is a 3px static motif, not a background wash.
   - Cards are flat: a hairline rule, a label, a title. No boxes inside boxes,
     no shadows for decoration, no rounded panels.
   - Everything below works from a token block, so dark mode is a re-declaration
     rather than a second stylesheet.
   */

:root {
  --ink: #14140f;
  --ink-soft: #3d3c35;
  --ink-muted: #6a6960;
  --paper: #fdfdfb;
  --paper-sunk: #f4f3ee;
  --rule: #dcdbd3;
  --rule-strong: #b9b8ae;
  --accent: #a52f0a;
  --accent-ink: #ffffff;
  --accent-quiet: #f0e2db;
  --focus: #0b5cd5;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --measure: 68ch;
  --wrap: 74rem;
  --pad: clamp(1rem, 4vw, 2.25rem);
  --gap: clamp(1.5rem, 4vw, 3rem);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.225rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.6rem, 3vw, 2rem);
  --step-4: clamp(2.05rem, 5vw, 3.3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f1ec;
    --ink-soft: #cfcec6;
    --ink-muted: #9d9c93;
    --paper: #14140f;
    --paper-sunk: #1d1d17;
    --rule: #34342c;
    --rule-strong: #4d4d43;
    --accent: #ff8a5c;
    --accent-ink: #2a0e02;
    --accent-quiet: #3a1c10;
    --focus: #7fb0ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

.skip-link:focus {
  left: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  font-weight: 800;
}

h2 {
  font-size: var(--step-3);
  font-weight: 750;
  margin-top: 2.4em;
}

h3 {
  font-size: var(--step-1);
  font-weight: 700;
  margin-top: 2em;
}

h4 {
  font-size: var(--step-0);
  font-weight: 700;
  margin-top: 1.6em;
}

p {
  margin: 0 0 1.1em;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.4rem 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--paper-sunk);
  padding: 0.12em 0.36em;
  border-radius: 3px;
}

/* ------------------------------------------------------------- chrome --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  padding: 0.4rem 0;
}

.brand-mark {
  font-weight: 700;
  font-size: 1.02rem;
  text-transform: uppercase;
  /* the "noise" half of the identity: the wordmark is set in mono and the
     letters carry a faint offset, while the descriptor beside it is clean */
  text-shadow: 1px 0 0 color-mix(in srgb, var(--accent) 34%, transparent);
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 400;
}

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  min-height: 44px;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  content: "";
}

.nav-toggle-bar::before {
  transform: translateY(-5px);
}

.nav-toggle-bar::after {
  transform: translateY(3px);
}

.primary-nav {
  display: none;
  width: 100%;
  padding-bottom: 0.75rem;
}

.primary-nav.is-open {
  display: block;
}

.nav-link {
  display: block;
  padding: 0.7rem 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--rule);
}

.nav-link.is-active {
  color: var(--accent);
  font-weight: 650;
}

.nav-search {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.nav-search-input,
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  min-height: 44px;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    width: auto;
    margin-left: auto;
    padding-bottom: 0;
  }
  .nav-link {
    border-bottom: 0;
    padding: 0.4rem 0;
    font-size: 0.92rem;
  }
  .nav-search {
    margin-top: 0;
    width: 12rem;
  }
  .nav-search-input {
    min-height: 38px;
    padding: 0.35rem 0.6rem;
  }
}

/* ------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--rule-strong);
  margin-top: 4rem;
  background: var(--paper-sunk);
  padding-block: 2.75rem 2rem;
}

.footer-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 780px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1.4fr;
  }
}

.footer-wordmark {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.footer-wordmark span {
  font-weight: 400;
  text-transform: none;
  color: var(--ink-muted);
}

.footer-note,
.footer-legal {
  color: var(--ink-muted);
  font-size: 0.9rem;
  max-width: 42ch;
}

.footer-legal {
  font-size: 0.82rem;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
  font-weight: 600;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-meta p {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-copy {
  font-size: 0.82rem;
}

/* ------------------------------------------------------------ shared --- */

.site-main {
  display: block;
}

.eyebrow,
.hero-eyebrow,
.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin: 0 0 0.7rem;
}

.hero-eyebrow span {
  color: var(--accent);
}

.section {
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
}

.section-head {
  margin-bottom: 1.6rem;
}

.section-head h2 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.section-sub {
  color: var(--ink-muted);
  max-width: var(--measure);
  margin: 0;
}

.prose {
  max-width: var(--measure);
}

.prose--lead {
  font-size: var(--step-1);
  line-height: 1.6;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 0.72rem 1.1rem;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  min-height: 44px;
  line-height: 1.4;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--paper-sunk);
  color: var(--ink);
}

.link-arrow::after {
  content: " \2192";
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip--static {
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.hero-inner {
  max-width: 54rem;
}

.hero-title {
  font-size: clamp(2.3rem, 7vw, 4rem);
  letter-spacing: -0.035em;
  margin-bottom: 0.5em;
}

.hero-sub {
  font-size: clamp(1.075rem, 2.4vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* the only gradient in the stylesheet: a 3px scanline motif standing in for
   "noise", set against the clean type of the hero */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--accent) 0 6px,
    transparent 6px 13px,
    var(--rule-strong) 13px 15px,
    transparent 15px 27px
  );
  opacity: 0.85;
}

/* -------------------------------------------------------------- cards --- */

.card-grid {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid,
  .card-grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }
}

.card {
  border-top: 2px solid var(--ink);
  padding-top: 0.85rem;
}

.card-title {
  font-size: var(--step-1);
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.card-title a {
  color: var(--ink);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.card-desc {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0 0 0.5rem;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ------------------------------------------------------- home blocks --- */

.example-list,
.question-list,
.featured-list,
.term-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.example-list li {
  border-top: 1px solid var(--rule);
  padding: 1rem 0;
}

.example-list li h3 {
  margin: 0 0 0.3rem;
  font-size: var(--step-1);
}

.example-list li p {
  margin: 0;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.example-list--plain li {
  border-top: 1px solid var(--rule);
  padding: 0.6rem 0;
  color: var(--ink-soft);
}

.question-list li {
  border-bottom: 1px solid var(--rule);
}

.question-list li a {
  display: block;
  padding: 0.8rem 0;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-1);
}

.question-list li a::after {
  content: " \2192";
  color: var(--accent);
}

.question-list li a:hover {
  color: var(--accent);
}

.term-list li {
  border-bottom: 1px solid var(--rule);
}

.term-list a {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.8rem 0;
  text-decoration: none;
  color: var(--ink);
}

@media (min-width: 720px) {
  .term-list a {
    grid-template-columns: 12rem 1fr;
    align-items: baseline;
    gap: 1.5rem;
  }
}

.term-list .term {
  font-family: var(--font-mono);
  font-weight: 650;
  color: var(--accent);
}

.term-list .term-def {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.term-list a:hover .term-def {
  color: var(--ink);
}

.featured-list li {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
}

.featured-list a {
  font-weight: 650;
  font-size: var(--step-1);
  color: var(--ink);
  text-decoration: none;
}

.featured-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.featured-list p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  max-width: var(--measure);
}

/* ---------------------------------------------------- article / terms --- */

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding-block: 1rem;
  color: var(--ink-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--rule-strong);
}

.breadcrumbs a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.article-layout {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 3rem;
}

@media (min-width: 1080px) {
  .article-layout {
    grid-template-columns: minmax(0, 46rem) 17rem;
    justify-content: space-between;
  }
}

.article-main {
  min-width: 0;
}

.article-header h1 {
  margin-bottom: 0.5rem;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.byline a {
  color: var(--ink-soft);
}

.answer-box {
  border-left: 4px solid var(--accent);
  background: var(--accent-quiet);
  padding: 1rem 1.15rem;
  margin: 0 0 1.75rem;
}

@media (prefers-color-scheme: dark) {
  .answer-box {
    background: var(--paper-sunk);
  }
}

.answer-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.answer-text {
  font-size: var(--step-1);
  line-height: 1.55;
  margin: 0;
  font-weight: 500;
}

.author-box {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.author-avatar {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.author-name {
  margin: 0 0 0.2rem;
  font-weight: 650;
}

.author-name a {
  color: var(--ink);
  text-decoration: none;
}

.author-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.author-bio,
.author-dates {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
  max-width: 52ch;
}

.author-dates {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.article-body {
  max-width: var(--measure);
}

.article-body h2 {
  padding-top: 0.2rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--rule);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  min-width: 30rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--paper-sunk);
  color: var(--ink-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

blockquote {
  margin: 0 0 1.5rem;
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 3px solid var(--rule-strong);
  color: var(--ink-soft);
}

blockquote p:last-child {
  margin-bottom: 0;
}

.takeaways {
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--ink);
  padding: 1.1rem 1.25rem;
  margin: 2.5rem 0;
  background: var(--paper-sunk);
}

.takeaways-heading {
  margin: 0 0 0.6rem;
  font-size: var(--step-1);
}

.takeaways ul {
  margin: 0;
  padding-left: 1.1rem;
}

.takeaways li {
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
}

.takeaways li:last-child {
  margin-bottom: 0;
}

.sources {
  margin: 2.5rem 0;
  border-top: 1px solid var(--rule-strong);
  padding-top: 1.25rem;
}

.sources h2 {
  font-size: var(--step-2);
  margin-top: 0;
}

.sources-note {
  font-size: 0.88rem;
  color: var(--ink-muted);
  max-width: var(--measure);
}

.sources-list {
  font-size: 0.9rem;
  padding-left: 1.4rem;
  color: var(--ink-soft);
}

.sources-list li {
  margin-bottom: 0.5rem;
}

.src-pub {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.faq {
  margin: 2.5rem 0;
}

.faq h2 {
  font-size: var(--step-2);
}

.faq-item {
  border-top: 1px solid var(--rule);
  padding: 0.35rem 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.7rem 0;
  font-size: var(--step-1);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-item summary::marker {
  color: var(--accent);
}

.faq-item[open] summary {
  color: var(--accent);
}

.faq-answer {
  max-width: var(--measure);
  color: var(--ink-soft);
}

.faq-answer p {
  margin-top: 0;
}

.related,
.glossary-links {
  margin: 2.5rem 0;
}

.related h2,
.glossary-links h2 {
  font-size: var(--step-2);
}

.share {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin: 2rem 0;
}

.share-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.share-list a {
  font-size: 0.9rem;
}

.article-rail {
  min-width: 0;
}

@media (min-width: 1080px) {
  .article-rail {
    position: sticky;
    top: 5rem;
    align-self: start;
    font-size: 0.9rem;
  }
}

.toc {
  border-top: 2px solid var(--ink);
  padding-top: 0.85rem;
  margin-bottom: 2rem;
}

.toc:empty {
  display: none;
}

.toc-heading {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin: 0 0 0.6rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-muted);
}

.toc li {
  margin-bottom: 0.4rem;
}

.toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ------------------------------------------------------------- pages --- */

.page-head {
  padding-block: 1.5rem clamp(1.5rem, 4vw, 2.5rem);
}

.page-head h1 {
  max-width: 34ch;
}

.page-updated,
.term-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.term-header h1 {
  margin-bottom: 0.6rem;
}

.term-definition {
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: var(--measure);
  color: var(--ink-soft);
}

.term-section {
  margin: 2rem 0;
}

.term-section h2 {
  font-size: var(--step-2);
}

.gloss-letter {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .gloss-letter {
    grid-template-columns: 3rem 1fr;
  }
}

.gloss-letter h2 {
  font-family: var(--font-mono);
  font-size: var(--step-2);
  margin: 0;
  color: var(--accent);
}

.gloss-letter ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gloss-letter li {
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--rule);
}

.gloss-letter li a {
  font-weight: 650;
  font-family: var(--font-mono);
  color: var(--ink);
  text-decoration: none;
}

.gloss-letter li a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.gloss-letter li span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.author-facts {
  border-left: 3px solid var(--rule-strong);
  padding-left: 1rem;
  margin-top: 2rem;
  max-width: var(--measure);
}

.author-facts h2 {
  font-size: var(--step-1);
  margin-top: 0;
}

/* -------------------------------------------------------------- figures --- */

.figure {
  margin: 2rem 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 0.75rem;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-muted);
  padding: 0.7rem 0.25rem 0.15rem;
  border-top: 1px solid var(--rule);
  margin-top: 0.75rem;
}

/* -------------------------------------------------- newsletter / ads --- */

.newsletter {
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--accent);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin: 2.5rem 0;
  max-width: 44rem;
}

.newsletter h2 {
  margin-top: 0;
  font-size: var(--step-2);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.newsletter-input {
  flex: 1 1 14rem;
  min-width: 0;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  min-height: 44px;
}

.newsletter-privacy {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 1rem 0 0;
}

.ad-slot {
  margin: 2rem 0;
  border: 1px dashed var(--rule-strong);
  min-height: 0;
}

.ad-slot-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin: 0;
  padding: 0.35rem 0.5rem;
}

.ad-slot-body {
  padding: 0.5rem;
}

.affiliate-card {
  border: 1px solid var(--rule-strong);
  padding: 1rem 1.15rem;
  margin: 2rem 0;
}

.affiliate-disclosure {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------- search --- */

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0;
  max-width: 36rem;
}

.search-status {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-results li {
  border-top: 1px solid var(--rule);
  padding: 1rem 0;
}

.search-results .result-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.search-results a {
  font-size: var(--step-1);
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}

.search-results a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.search-results p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  max-width: var(--measure);
}

.search-results mark {
  background: var(--accent-quiet);
  color: var(--ink);
  padding: 0 0.15em;
}

/* --------------------------------------------------------------- 404 --- */

.page-head--404 h1 {
  font-family: var(--font-mono);
}

/* keep long code tokens and URLs from forcing a horizontal scrollbar */
.article-body code,
.sources-list {
  word-break: break-word;
}
