/* Shared styles for the writings pages: the same red, black and white bands,
   grotesque headings and typewriter text as the home page, set for long reading. */
:root {
  color-scheme: dark;
  --red: #8c1c1f;
  --red-deep: #741416;
  --black: #111010;
  --white: #f7f4f0;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Courier Prime", "Courier New", Courier, monospace;

  --step-0: 1.06rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --step-3: clamp(2.6rem, 1.6rem + 5vw, 5.5rem);
  --wrap: 72rem;
  --measure: 44rem;
}
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
}

.band { position: relative; overflow: hidden; background: var(--bg); color: var(--fg); }
.on-red   { --bg: var(--red);   --fg: var(--white); --soft: rgba(247,244,240,.72); --accent: var(--white); --line: rgba(247,244,240,.28); --hover: var(--red-deep); }
.on-black { --bg: var(--black); --fg: var(--white); --soft: rgba(247,244,240,.62); --accent: #d8473f; --line: rgba(247,244,240,.18); --hover: #1e1c1c; }
.on-white { --bg: var(--white); --fg: var(--black); --soft: rgba(17,16,16,.62);    --accent: var(--red);  --line: rgba(17,16,16,.16);    --hover: #ece6df; }

a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { color: var(--fg); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: clamp(3rem, 7vw, 5.5rem);
  position: relative;
  z-index: 1;
}
.label {
  font-family: var(--body);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }

/* Nav */
nav.band { border-bottom: 1px solid var(--line); }
nav .inner {
  padding-block: 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.mark { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase; color: var(--fg); text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1rem, 3vw, 2.2rem); flex-wrap: wrap; }
nav ul a { font-family: var(--body); font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); text-decoration: none; }
nav ul a:hover { color: var(--fg); }

/* Page head */
.page-head .label { text-decoration: none; }
.page-head .label:hover { text-decoration: underline; }
.page-head h1 { margin-top: 1rem; font-size: var(--step-3); font-weight: 900; line-height: .9; letter-spacing: -.035em; text-transform: uppercase; }
.page-head .dek { margin: 1.4rem 0 0; font-weight: 700; font-size: var(--step-1); color: var(--soft); }

/* Contents */
.toc { max-width: var(--measure); margin: 0 auto 3.5rem; padding-bottom: 2rem; border-bottom: 2px solid var(--accent); }
.toc ol { margin: 1rem 0 0; padding-left: 1.6rem; columns: 2 18rem; column-gap: 2.5rem; }
.toc li { break-inside: avoid; padding: .2rem 0; font-size: .95rem; line-height: 1.4; }
.toc a { color: var(--fg); text-decoration-color: var(--line); }
.toc a:hover { text-decoration-color: var(--accent); }

/* Long-form text */
.prose { max-width: var(--measure); margin: 0 auto; overflow-wrap: break-word; }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  margin: 3.5rem 0 1.4rem; padding-top: 1.6rem; border-top: 2px solid var(--accent);
  font-size: var(--step-2); font-weight: 800; line-height: 1.1; letter-spacing: -.015em;
  scroll-margin-top: 1.5rem;
}
.prose h2:first-child { margin-top: 0; }
.prose figure { margin: 2rem 0; text-align: center; }
.prose figure img { display: inline-block; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose ul, .prose ol { padding-left: 1.6rem; margin: 0 0 1.15em; }
.prose .label { margin: 0 0 .6rem; }
.prose .link-list { list-style: none; padding: 0; margin: 0 0 3rem; border-top: 1px solid var(--line); }
.prose .link-list li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.prose .link-list a { font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1.25; color: var(--fg); text-decoration-color: var(--accent); }
.prose .entries { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.prose .entries li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.prose .entries strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.25; }
.prose .entries span { display: block; margin-top: .3rem; font-size: .95rem; color: var(--soft); }
.table-wrap { overflow-x: auto; margin: 2rem 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: .6rem .8rem .6rem 0; vertical-align: top; }
.prose td p { margin: 0; }
.source { max-width: var(--measure); margin: 4rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--soft); }

/* More writings */
.more-writings .label { display: block; margin-bottom: 1.4rem; }
.collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.collections a { background: var(--bg); padding: 1.6rem 1.5rem; text-decoration: none; color: var(--fg); display: grid; gap: .5rem; }
.collections a:hover { background: var(--hover); }
.collections strong { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.15; text-transform: uppercase; letter-spacing: -.01em; }
.collections span { font-size: .95rem; color: var(--soft); line-height: 1.45; }

/* Footer */
footer .inner { padding-block: 2.5rem; display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; font-size: .88rem; color: var(--soft); }
footer a { color: var(--soft); }

@media (max-width: 760px) {
  .collections { grid-template-columns: minmax(0, 1fr); }
}
