/* =========================================================================
   The Pingback — thepingback.com
   Publication of record for the epistemics of the agent era.
   Brand: commissioned Pingback mark + editorial register (Direction C).
   Type: Poppins (display/UI/label) + EB Garamond (reading serif).
   Palette: light editorial — warm paper ground, charcoal ink, gold = WARRANT ONLY.
   NO MONOSPACE, ANYWHERE, EVER.
   The semantic HTML is the source; this render is the human view.
   ========================================================================= */

:root {
  /* --- palette: Pingback system, light editorial expression --- */
  --canvas:      #F7F5F0;   /* Pingback #F4F4F4 warmed toward paper — the reading ground */
  --canvas-deep: #F1EEE6;   /* recessed panels (status block, archive rows on hover) */
  --ink:         #1A1A1A;   /* Pingback charcoal — primary text */
  --ink-soft:    #55524B;   /* secondary text, captions, labels */
  --ink-faint:   #8A8578;   /* tertiary — dates, meta, absence-of-warrant */
  --gold:        #AD851E;   /* WARRANT ONLY — the Direction-C seal. Never decorative. */
  --gold-deep:   #8F6D15;   /* gold text on light, for contrast (>=4.5:1) */
  --line:        rgba(26,26,26,0.11);  /* low-contrast structural hairline */
  --line-soft:   rgba(26,26,26,0.06);

  /* --- type --- */
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Poppins", system-ui, -apple-system, sans-serif;

  /* --- the reading measure (the single most important typographic decision) --- */
  --measure: 38rem;         /* ~66 characters at 19px — Bringhurst optimum */
  --measure-wide: 50rem;    /* header stack, status block */

  /* --- rhythm --- */
  --gutter: clamp(24px, 6vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* -------------------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------------------- */
.shell { flex: 1; width: 100%; }
.measure  { max-width: var(--measure);  margin-inline: auto; padding-inline: var(--gutter); }
.measure-wide { max-width: var(--measure-wide); margin-inline: auto; padding-inline: var(--gutter); }

/* -------------------------------------------------------------------------
   Site header — the institutional bar (present on every page)
   ------------------------------------------------------------------------- */
.site-head {
  border-bottom: 1px solid var(--line);
}
.site-head__inner {
  max-width: 64rem;
  margin-inline: auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { width: 34px; height: 34px; display: block; }
.brand__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.012em;
  line-height: 1;
}
.brand__name .the { font-weight: 400; color: var(--ink-soft); }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: clamp(16px, 3vw, 34px);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* -------------------------------------------------------------------------
   Kicker / beat label — Poppins small-caps, letterspaced. Gold ONLY on warrant.
   ------------------------------------------------------------------------- */
.kicker {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.kicker--warrant { color: var(--gold-deep); }

/* =========================================================================
   HOME / MASTHEAD
   ========================================================================= */
.masthead {
  padding-top: clamp(56px, 11vh, 130px);
  padding-bottom: clamp(40px, 7vh, 84px);
  text-align: center;
}
.masthead__mark { width: 64px; height: 64px; margin: 0 auto 26px; display: block; }
.masthead__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(34px, 7vw, 58px);
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.masthead__name .the { font-weight: 300; color: var(--ink-soft); letter-spacing: -0.02em; }
.masthead__standfirst {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.6vw, 23px);
  color: var(--ink-soft);
  margin-top: 22px;
  line-height: 1.45;
}
/* the one gold hairline permitted under the masthead (D2) */
.masthead__rule {
  width: 46px; height: 2px;
  background: var(--gold);
  margin: 34px auto 0;
  border-radius: 1px;
}

/* subscribe — Substack's native embed, centered, blends into the paper ground (D3) */
.subscribe-embed {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vh, 64px) 0 clamp(52px, 8vh, 88px);
  text-align: center;
}
.subscribe-embed iframe { max-width: 100%; }

/* archive / essays list — the depth signal, sparse list */
.recent {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vh, 64px) 0 clamp(52px, 8vh, 88px);
}
/* honest empty state — no fake entries (D3) */
.empty-state {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* =========================================================================
   PAGE HEAD — shared standfirst treatment for prose-style pages (essays, etc.)
   ========================================================================= */
.page-head {
  padding-top: clamp(44px, 8vh, 88px);
  padding-bottom: clamp(24px, 3vh, 36px);
}
.page-head__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(32px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.006em;
  max-width: 22ch;
}
.page-head__standfirst {
  font-family: var(--serif); font-style: italic; color: var(--ink-soft);
  font-size: clamp(19px, 2.4vw, 22px); margin-top: 20px; max-width: 44ch; line-height: 1.46;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 30px var(--gutter);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  text-align: center;
}
.site-foot__inner { max-width: 64rem; margin-inline: auto; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.site-foot a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.site-foot__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-faint); display: inline-block; }

/* =========================================================================
   Responsive — the measure adapts; the type system holds (D5)
   ========================================================================= */
@media (max-width: 640px) {
  body { font-size: 18px; }
  :root { --gutter: 22px; }
  /* nav: wrap to the row below the brand so nothing clips at 375px */
  .site-head__inner { flex-wrap: wrap; gap: 12px 20px; padding-block: 18px; }
  .site-nav { margin-left: 0; width: 100%; font-size: 14px; gap: 20px; flex-wrap: wrap; }
  /* centered standfirsts must never exceed the viewport measure */
  .featured__standfirst, .masthead__standfirst { max-width: 100%; }
  .featured__title, .essay__title, .masthead__name { max-width: 100%; }
  .epistemic__row { grid-template-columns: 1fr; gap: 3px; padding: 12px 18px; }
  .epistemic__key { font-size: 10px; }
  .prov__panel dl { grid-template-columns: 1fr; gap: 3px; }
  .prov__panel dt { padding-top: 8px; }
  .doclog__row { grid-template-columns: 1fr; gap: 2px; }
  .essay__body > p:first-of-type::first-letter { font-size: 3em; }
  .recent__head { flex-direction: column; gap: 6px; }
  .entry--pinned { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
