/* ============================================================================
   farzulla.org — reading layer
   Sits on top of the shared system.css tokens. The chrome stays in the
   Dissensus screen language (Inter + IBM Plex Mono + burgundy rule); the essay
   body switches to a serif reading face, because this site is for reading at
   length and the lab site is not. Same brand, different job.
   ============================================================================ */

:root {
  --font-read: "Newsreader", Georgia, "Times New Roman", serif;
  --read-measure: 63ch;
}

/* ---- scaffolding ---------------------------------------------------------- */
.wrap { max-width: 74ch; margin-inline: auto; padding-inline: var(--sp-6); }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--surface);
  color: var(--text); padding: var(--sp-3) var(--sp-4); z-index: 10;
}
.skip:focus { left: var(--sp-4); top: var(--sp-4); }

header.site { border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); z-index: 5; }
header .bar { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-4); padding-block: var(--sp-4); }
.mark { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text); }
.mark:hover { color: var(--accent); }
header nav { display: flex; align-items: baseline; gap: var(--sp-4); }
header nav a { font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: 0.06em; color: var(--text-dim); }
header nav a:hover { color: var(--accent); }
#theme { background: none; border: 0; color: var(--text-dim); cursor: pointer;
  font-size: 0.95rem; line-height: 1; padding: 0; }
#theme:hover { color: var(--accent); }

.kicker { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: var(--sp-3); }

/* ---- home ----------------------------------------------------------------- */
.hero { padding-block: var(--sp-24) var(--sp-16); }
.hero h1 { font-size: var(--fs-h1); margin-bottom: var(--sp-6); text-wrap: balance; }
.hero .lede { font-family: var(--font-read); font-size: 1.14rem; line-height: 1.62;
  color: var(--text-dim); max-width: var(--read-measure); }

.listing { padding-block: var(--sp-8) var(--sp-24); border-top: 1px solid var(--line); }
.cards { list-style: none; display: grid; gap: var(--sp-4); margin-top: var(--sp-6); }
a.card { display: block; padding: var(--sp-6); border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
a.card h2 { font-size: 1.32rem; color: var(--text); margin-bottom: var(--sp-3);
  text-wrap: balance; }
a.card p { font-family: var(--font-read); font-size: 1rem; line-height: 1.58; }
a.card .kicker { margin-bottom: var(--sp-2); }

/* ---- essay ---------------------------------------------------------------- */
.essay { padding-block: var(--sp-16) var(--sp-24); }
.essay h1 { font-size: var(--fs-h1); margin-bottom: var(--sp-6); text-wrap: balance; }
.standfirst { font-family: var(--font-read); font-size: 1.2rem; line-height: 1.55;
  color: var(--text-dim); max-width: var(--read-measure); }
/* --accent is already mode-correct: bright burgundy on dark, true burgundy on
   light. Keying off [data-theme="dark"] would miss the default state, where the
   attribute is absent because nothing has been stored yet. */
.rule { width: 4rem; height: 2px; background: var(--accent);
  margin-block: var(--sp-8) var(--sp-8); }

.prose { font-family: var(--font-read); font-size: 1.13rem; line-height: 1.72; }
.prose p { max-width: var(--read-measure); margin-bottom: var(--sp-6); color: var(--text-dim); }
.prose h2 { font-family: var(--font-sans); font-size: 1.42rem; color: var(--text);
  margin-block: var(--sp-12) var(--sp-4); max-width: var(--read-measure); text-wrap: balance; }
.prose h3 { font-family: var(--font-sans); font-size: 1.12rem; color: var(--text);
  margin-block: var(--sp-8) var(--sp-3); }
.prose strong { color: var(--text); font-weight: 500; }
.prose em { font-style: italic; }
.prose ul, .prose ol { max-width: var(--read-measure); margin-bottom: var(--sp-6);
  padding-left: var(--sp-6); color: var(--text-dim); }
.prose li { margin-bottom: var(--sp-3); }
.prose li::marker { color: var(--accent); }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: var(--sp-6);
  margin-block: var(--sp-8); max-width: var(--read-measure); color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--sp-12);
  max-width: var(--read-measure); }
.prose code { font-family: var(--font-mono); font-size: 0.86em; color: var(--text);
  background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 3px; }
.prose a { border-bottom: 1px solid var(--accent-dim); }
.prose a:hover { border-bottom-color: currentColor; }

.ps { margin-top: var(--sp-16); padding: var(--sp-6); border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); max-width: var(--read-measure); }
.ps p:last-child { font-size: var(--fs-sm); margin: 0; }

.backlink { margin-top: var(--sp-12); font-family: var(--font-mono);
  font-size: var(--fs-mono); letter-spacing: 0.06em; }

/* ---- about ---------------------------------------------------------------- */
.page { padding-block: var(--sp-16) var(--sp-24); }
.page h1 { margin-bottom: var(--sp-8); }
.page .prose { font-size: 1.08rem; }

/* ---- footer --------------------------------------------------------------- */
footer.site { border-top: 1px solid var(--line); padding-block: var(--sp-8); }
.fine { font-size: var(--fs-sm); color: var(--text-dim); max-width: var(--read-measure); }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 34rem) {
  .wrap { padding-inline: var(--sp-4); }
  .hero { padding-block: var(--sp-12) var(--sp-8); }
  .prose { font-size: 1.06rem; }
  header nav { gap: var(--sp-3); }
}

@media print {
  header.site, footer.site, .backlink, #theme { display: none; }
  .prose { font-size: 11pt; }
}
