/* ============================================================== */
/*  ARTICLE PAGE — shared base                                      */
/* ============================================================== */

.article-page {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif-body);
}

/* Article kicker / masthead */
.art-masthead {
  border-bottom: 1px solid var(--rule);
  padding: 28px 0 22px;
}
.art-masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.art-masthead-inner .vol {
  font-weight: 600;
  letter-spacing: 0.16em;
}
.art-masthead-inner .center {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: none;
}
.art-masthead-inner .right { text-align: right; }
.art-masthead-inner a:hover { color: var(--accent); }

/* Article hero */
.art-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.art-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 48px;
}

.art-series {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.art-series::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  opacity: 0.25;
}
.art-series .badge-h {
  background: var(--accent);
  color: var(--paper);
  padding: 3px 9px;
  letter-spacing: 0.16em;
}

.art-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variation-settings: "opsz" 60;
  max-width: 22ch;
  margin-bottom: 28px;
}
.art-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.art-dek {
  font-family: var(--serif-body);
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 48px;
  font-weight: 400;
}
.art-dek em { font-style: italic; }

/* Byline / kicker meta strip */
.art-byline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.art-byline-author {
  display: flex;
  align-items: center;
  gap: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.art-byline-author .author-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.art-byline-author .author-role {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.art-byline-stats {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.art-byline-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.art-byline-stats .stat .lbl { color: var(--ink-muted); font-size: 9px; letter-spacing: 0.16em; }
.art-byline-stats .stat .val { color: var(--ink); font-weight: 600; font-size: 12px; }
.art-byline-stats .stat .val .accent { color: var(--accent); }
.art-byline-actions {
  display: flex;
  gap: 8px;
}
.art-byline-actions button {
  padding: 9px 14px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.15s;
  cursor: pointer;
}
.art-byline-actions button:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--accent);
}
.art-byline-actions button.primary {
  background: var(--ink);
  color: var(--paper);
}
.art-byline-actions button.primary:hover { background: var(--accent); border-color: var(--accent); }

/* Series ladder — Pt 1 / 2 / 3 / 4 / 5 */
.art-ladder {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  align-items: start;
}
.art-ladder-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 6px;
}
.art-ladder-rungs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.rung {
  border: 1px solid var(--rule);
  padding: 14px 14px 16px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}
.rung:hover {
  background: var(--bg-alt);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--rule);
}
.rung .rung-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.rung .rung-title {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.rung.current {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--accent);
}
.rung.current .rung-num { color: var(--harness-accent); }
.rung.current .rung-title { color: var(--paper); }
.rung.current::after {
  content: "▾ you are here";
  position: absolute;
  top: -10px;
  right: 8px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  padding: 3px 6px;
  text-transform: uppercase;
}
.rung.read .rung-num::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================== */
/*  ARTICLE BODY                                                    */
/* ============================================================== */

.art-body-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 48px 100px;
}

/* SAFE variant — three columns: TOC | prose | margin-notes */
.art-grid-safe {
  display: grid;
  grid-template-columns: 200px minmax(0, 640px) 280px;
  gap: 64px;
  justify-content: center;
}

/* WILD variant — TOC | prose | live harness annotations  */
.art-grid-wild {
  display: grid;
  grid-template-columns: 220px minmax(0, 620px) 320px;
  gap: 56px;
  justify-content: center;
}

/* TOC (sticky) */
.art-toc {
  position: sticky;
  top: 80px;
  align-self: start;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  max-height: calc(100vh - 100px);
  overflow: auto;
}
.art-toc-head {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.art-toc ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; }
.art-toc li {
  counter-increment: toc;
  padding: 7px 0 7px 28px;
  position: relative;
  cursor: pointer;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.art-toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 4px;
  top: 7px;
  color: var(--ink-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.art-toc li:hover { color: var(--accent); }
.art-toc li.active {
  color: var(--ink);
  border-left-color: var(--accent);
  font-weight: 600;
}
.art-toc li.active::before { color: var(--accent); }
.art-toc li.read::after {
  content: "·";
  position: absolute;
  right: 0;
  top: 7px;
  color: var(--accent);
}

/* TOC progress bar at top */
.toc-progress {
  height: 2px;
  background: var(--bg-alt);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.toc-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* Prose */
.prose {
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 640px;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 64px 0 20px;
  scroll-margin-top: 80px;
}
.prose h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
.prose h2 .h-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}
.prose p { margin: 0 0 22px; color: var(--ink-soft); text-wrap: pretty; }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose p em { font-style: italic; }
.prose p a, .prose .fn-link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.15s;
}
.prose p a:hover, .prose .fn-link:hover {
  background: var(--accent);
  color: var(--paper);
  border-bottom-color: var(--accent);
}

/* Inline images and figures */
.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 36px 0;
  border-radius: 2px;
}
.prose figure {
  margin: 36px 0;
}
.prose figure img {
  margin: 0;
}
.prose figcaption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 10px;
}

/* Drop cap on first paragraph */
.prose .drop-cap::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 5.4em;
  line-height: 0.85;
  float: left;
  margin: 0.05em 0.08em 0 -0.04em;
  color: var(--accent);
  font-variation-settings: "opsz" 60;
}

/* Pull-quote */
.pull-quote {
  margin: 48px 0;
  padding: 28px 0 28px 28px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.3;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
  position: relative;
}
.pull-quote::before {
  content: "“";
  position: absolute;
  top: -10px;
  left: 12px;
  font-size: 80px;
  line-height: 1;
  color: var(--accent);
  font-family: var(--serif);
  opacity: 0.35;
  font-variation-settings: "opsz" 60;
}
.pull-quote .pq-attr {
  display: block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--ink-muted);
}
.pull-quote .pq-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pull-quote .pq-actions button {
  border: 1px solid var(--rule);
  padding: 6px 10px;
  font-style: normal;
  color: var(--ink-muted);
  cursor: pointer;
  background: transparent;
}
.pull-quote .pq-actions button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Footnote markers */
.fn-ref {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7em;
  vertical-align: super;
  color: var(--accent);
  border-bottom: none;
  padding: 0 2px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.12s;
}
.fn-ref:hover, .fn-ref.active {
  background: var(--accent);
  color: var(--paper);
}

/* ============================================================== */
/*  RIGHT MARGIN (footnotes / annotations)                          */
/* ============================================================== */

.art-margin {
  position: relative;
}

/* Footnote / annotation card */
.fn-card {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 14px 16px;
  margin-bottom: 18px;
  position: relative;
  transition: all 0.2s;
  box-shadow: 3px 3px 0 var(--rule);
  cursor: default;
}
.fn-card.active {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent);
  transform: translate(-1px, -1px);
}
.fn-card .fn-num {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--rule);
  width: 100%;
}
.fn-card .fn-num .who {
  float: right;
  color: var(--ink-muted);
  font-style: italic;
}
.fn-card em { font-style: italic; }
.fn-card .father { color: var(--accent); font-style: italic; }

/* WILD variant — live harness telemetry panel */
.harness-panel {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  background: var(--harness-bg);
  color: var(--harness-ink);
  border: 1px solid var(--rule);
  padding: 18px 18px 16px;
  box-shadow: 5px 5px 0 var(--accent);
  position: sticky;
  top: 80px;
  margin-bottom: 24px;
}
.harness-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--harness-accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--harness-dim);
}
.harness-panel-head .live::before {
  content: "●";
  color: var(--harness-accent);
  margin-right: 5px;
  animation: pulse 2s infinite;
}
.harness-panel .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 5px 0;
  align-items: baseline;
}
.harness-panel .row .lbl { color: var(--harness-dim); font-size: 10px; letter-spacing: 0.08em; }
.harness-panel .row .val { color: var(--harness-ink); font-weight: 500; }
.harness-panel .row .val .accent { color: var(--harness-accent); }
.harness-panel .bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}
.harness-panel .bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--harness-accent);
  width: var(--w, 0%);
  transition: width 0.2s;
}
.harness-panel .narrate {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--harness-dim);
  font-style: italic;
  color: var(--harness-ink);
  font-size: 11.5px;
  line-height: 1.55;
  min-height: 64px;
}
.harness-panel .narrate .father { color: var(--harness-accent); font-style: italic; }
.harness-panel .narrate .caret-h {
  display: inline-block;
  width: 6px; height: 12px;
  background: var(--harness-accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}

/* WILD: highlighted / active paragraph */
.prose.wild p {
  position: relative;
  transition: color 0.25s, background 0.25s;
}
.prose.wild p[data-active="true"] {
  color: var(--ink);
}
.prose.wild p[data-active="true"]::before {
  content: "";
  position: absolute;
  left: -22px; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  animation: pulse 2s infinite;
}

/* Ink meter */
.ink-meter {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 24px;
  padding: 14px;
  border: 1px dashed var(--rule);
  background: var(--bg-alt);
}
.ink-meter .meter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.ink-meter .meter-bar {
  height: 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.ink-meter .meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* End block */
.art-end {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 2px solid var(--rule);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}
.art-end .glyph {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  color: var(--accent);
  line-height: 1;
}
.art-end .end-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.art-end .end-text strong { color: var(--ink); }

/* Next-in-series + share */
.art-foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 48px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--rule);
  padding-top: 64px;
}
.art-foot-card {
  border: 1px solid var(--rule);
  padding: 32px;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--rule);
  cursor: pointer;
  transition: all 0.2s;
}
.art-foot-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--accent); }
.art-foot-card .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.art-foot-card .t {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 8px;
}
.art-foot-card .t em { font-style: italic; color: var(--accent); }
.art-foot-card .meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.art-foot-card.prev { background: var(--bg-alt); box-shadow: 6px 6px 0 var(--ink-muted); }

/* Cite-this floating dock */
.cite-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 10px 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 60;
  box-shadow: 4px 4px 0 var(--accent);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.cite-dock.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.cite-dock button {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 10px;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.cite-dock button:hover { background: var(--accent); border-color: var(--accent); }
.cite-dock .cite-q {
  max-width: 360px;
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================== */
/*  Variants — wild adjustments                                     */
/* ============================================================== */
.article-page.wild .art-hero { background: var(--paper); }
.article-page.wild .art-title em { background: var(--accent); color: var(--paper); padding: 0 8px; font-style: italic; }

/* ============================================================== */
/*  WILD v2 — Anchored marginalia, redactions, glosses, rules       */
/* ============================================================== */

/* The wild margin is now a flow column, not a sticky panel.
   Each note is positioned absolutely against the paragraph it annotates. */
.art-margin-flow {
  position: relative;
  min-height: 100%;
}

/* Tiny status strip pinned at top of margin (replaces the big panel) */
.harness-strip {
  position: sticky;
  top: 80px;
  z-index: 3;
  background: var(--harness-bg);
  color: var(--harness-ink);
  border: 1px solid var(--rule);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  box-shadow: 3px 3px 0 var(--accent);
}
.harness-strip .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 3px 0;
}
.harness-strip .row .lbl { color: var(--harness-dim); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.harness-strip .row .val { color: var(--harness-ink); }
.harness-strip .row .val .accent { color: var(--harness-accent); }
.harness-strip .father-pip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--harness-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--harness-accent);
}
.harness-strip .father-pip::before {
  content: "●";
  color: var(--harness-accent);
  animation: pulse 2s infinite;
}
.harness-strip .bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.harness-strip .bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--harness-accent);
  width: var(--w, 0%);
  transition: width 0.2s;
}

/* A floating margin note positioned absolutely (anchored to paragraph) */
.margin-anchor {
  position: absolute;
  left: 0;
  right: 0;
  transition: opacity 0.25s, transform 0.25s;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.margin-anchor.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Note style */
.m-note {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 14px;
  background: transparent;
}
.m-note .who {
  display: block;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.m-note .father { color: var(--accent); font-style: italic; }
.m-note em { font-style: italic; color: var(--ink); }
.m-note code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-alt);
  padding: 1px 4px;
  border: 1px solid var(--rule);
}

/* Gloss: lighter italic, very brief */
.m-gloss {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.4;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  font-variation-settings: "opsz" 36;
}

/* Redaction in prose */
.redaction {
  display: inline-block;
  background: var(--ink);
  color: var(--ink);
  padding: 2px 10px;
  font-family: var(--mono);
  font-size: 0.78em;
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  border: 1px solid var(--ink);
  user-select: none;
  vertical-align: 1px;
}
.redaction::before {
  content: "▮ " attr(data-label) " · click";
  color: var(--harness-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.92em;
  font-weight: 500;
}
.redaction:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.redaction:hover::before { color: var(--paper); }
.redaction.revealed {
  background: transparent;
  border: 1px dashed var(--accent);
  color: var(--ink);
  cursor: default;
  font-family: var(--serif-body);
  font-size: 1em;
  font-style: italic;
  padding: 0 6px;
  letter-spacing: normal;
  vertical-align: baseline;
}
.redaction.revealed::before { display: none; }
.redaction.revealed .reveal-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 6px;
  font-style: normal;
}

/* Hover gloss target — paragraphs in wild are cursor-targets */
.prose.wild p { cursor: text; }
.prose.wild p[data-hovered="true"]::after {
  content: "";
}

/* Commit-hash style footnote ref */
.fn-hash {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78em;
  vertical-align: 1px;
  padding: 1px 6px 1px 6px;
  margin: 0 2px;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  color: var(--ink);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.12s;
  border-bottom: 1px solid var(--rule);
}
.fn-hash::before {
  content: "ref·";
  color: var(--ink-muted);
  font-size: 0.86em;
  letter-spacing: 0.08em;
}
.fn-hash:hover, .fn-hash.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.fn-hash:hover::before, .fn-hash.active::before { color: var(--harness-accent); }

/* RULES.md strip */
.rules-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0 56px;
  margin-top: 80px;
  border-top: 1px solid var(--rule);
}
.rules-strip-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 48px;
}
.rules-strip-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--harness-accent);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--harness-dim);
}
.rules-strip-head .file {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-transform: none;
  font-weight: 600;
}
.rules-strip-head .obey {
  margin-left: auto;
  color: var(--harness-dim);
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.rule {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 24px 24px 22px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.02);
}
.rule .n {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--harness-accent);
  letter-spacing: -0.02em;
}
.rule .text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.35;
  color: var(--paper);
  font-variation-settings: "opsz" 36;
}
.rule .proof {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--harness-dim);
  text-transform: uppercase;
  padding-top: 14px;
  border-top: 1px dashed var(--harness-dim);
}
.rule .proof span { color: var(--harness-accent); }

@media (max-width: 1100px) {
  .rules-grid { grid-template-columns: 1fr; gap: 16px; }
  .margin-anchor { position: static; opacity: 1; transform: none; margin-bottom: 14px; }
  .harness-strip { position: static; }
}

/* Responsive */
@media (max-width: 1100px) {
  .art-grid-safe, .art-grid-wild { grid-template-columns: 1fr; gap: 32px; }
  .art-toc, .harness-panel { position: static; max-height: none; }
  .art-margin { display: none; }
  .art-byline { grid-template-columns: 1fr; gap: 16px; }
  .art-byline-stats { justify-content: flex-start; }
  .art-ladder { grid-template-columns: 1fr; }
  .art-ladder-rungs { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .rung { padding: 8px 6px; }
  .rung .rung-title { font-size: 11px; }
  .art-foot { grid-template-columns: 1fr; }
}

/* ============================================================== */
/*  Floating time-left orb (mobile only, shown via JS)              */
/* ============================================================== */
.time-orb {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--rule);
  box-shadow: 3px 3px 0 var(--rule);
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.15s;
  --p: 0;
  --circ: 157;
}
.time-orb.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.time-orb:active { transform: translate(1px, 1px) scale(0.97); box-shadow: 1px 1px 0 var(--rule); }
.time-orb-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
.time-orb-track {
  fill: none;
  stroke: var(--rule);
  stroke-width: 3;
  opacity: 0.22;
}
.time-orb-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: var(--circ);
  stroke-dashoffset: calc(var(--circ) * (1 - var(--p)));
  transition: stroke-dashoffset 0.18s linear;
}
.time-orb-text {
  position: relative;
  z-index: 1;
  text-align: center;
  letter-spacing: 0;
  line-height: 1;
  font-weight: 500;
  transition: opacity 0.25s;
}
.time-orb-avatar {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  display: none;
  z-index: 1;
  filter: saturate(0.96) contrast(1.02);
}

/* "fin" celebration state */
.time-orb.is-complete {
  border-color: var(--accent);
  box-shadow: 3px 3px 0 var(--accent);
  background: var(--paper);
}
.time-orb.is-complete .time-orb-fill {
  stroke: var(--accent);
  opacity: 1;
}
.time-orb.is-complete .time-orb-track { opacity: 0; }
.time-orb.is-complete .time-orb-text { display: none; }
.time-orb.is-complete .time-orb-avatar {
  display: block;
  animation: orb-breathe 2.6s ease-in-out infinite;
}
.time-orb.celebrate {
  animation: orb-celebrate 0.7s cubic-bezier(.2, 1.5, .35, 1) 1;
}
@keyframes orb-celebrate {
  0%   { transform: translateY(0) scale(1); box-shadow: 3px 3px 0 var(--accent); }
  35%  { transform: translateY(-4px) scale(1.18); box-shadow: 0 0 0 14px rgba(184, 52, 27, 0.18), 3px 3px 0 var(--accent); }
  70%  { transform: translateY(0) scale(0.96); box-shadow: 0 0 0 4px rgba(184, 52, 27, 0.10), 3px 3px 0 var(--accent); }
  100% { transform: translateY(0) scale(1); box-shadow: 3px 3px 0 var(--accent); }
}
@keyframes orb-breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.78; transform: scale(0.95); }
}

/* ============================================================== */
/*  PHONE — 640px and below                                         */
/* ============================================================== */
@media (max-width: 640px) {
  .time-orb { display: flex; }
  .art-masthead { padding: 10px 0 8px; }
  .art-masthead-inner {
    padding: 0 16px;
    grid-template-columns: 1fr auto;
    grid-template-areas: "left right";
    gap: 6px 12px;
    text-align: left;
    align-items: center;
  }
  .art-masthead-inner .left { grid-area: left; min-width: 0; }
  .art-masthead-inner .right { grid-area: right; text-align: right; gap: 8px !important; }
  .art-masthead-inner .center { display: none; }
  .art-masthead-inner a {
    display: inline-flex;
    align-items: center;
    padding: 10px 4px;
    margin: -10px -4px;
    min-height: 44px;
  }
  .art-masthead-inner #father-status { display: none; }

  .art-hero { padding: 40px 0 32px; }
  .art-hero-inner { padding: 0 16px; }
  .art-series { gap: 12px; margin-bottom: 20px; font-size: 10px; }
  .art-title { font-size: clamp(34px, 9vw, 56px); max-width: none; margin-bottom: 20px; }
  .art-dek { font-size: 17px; margin-bottom: 28px; }

  .art-byline { padding: 18px 0; }
  .art-byline-stats { gap: 16px 20px; }
  .art-byline-actions { flex-wrap: wrap; }
  .art-byline-actions button { padding: 12px 14px; min-height: 44px; }

  .art-ladder { margin-top: 24px; gap: 12px; }
  .art-ladder-rungs { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rung { padding: 10px 12px; }
  .rung .rung-title { font-size: 13px; }

  .art-body-wrap {
    padding: 32px 16px 56px;
  }
  .art-grid-safe, .art-grid-wild { gap: 24px; }

  .prose { font-size: 17px; line-height: 1.65; }
  .prose h2 {
    font-size: clamp(24px, 6.5vw, 30px);
    margin: 40px 0 14px;
  }
  .prose .drop-cap::first-letter { font-size: 4.2em; }
  .pull-quote {
    padding: 20px 0 20px 18px;
    font-size: 20px;
    margin: 32px 0;
  }
  .pull-quote::before { font-size: 56px; left: 6px; top: -6px; }

  .cite-dock {
    left: 8px;
    right: 8px;
    bottom: 12px;
    transform: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    box-shadow: 3px 3px 0 var(--accent);
  }
  .cite-dock.visible { transform: none; }
  .cite-dock .cite-q {
    max-width: 100%;
    white-space: normal;
    font-size: 12px;
    flex-basis: 100%;
  }
  .cite-dock button { flex: 1; min-height: 44px; padding: 10px; }

  .art-end {
    margin-top: 56px;
    padding-top: 32px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .art-foot {
    padding: 40px 16px 56px;
    gap: 16px;
  }
  .art-foot-card {
    padding: 20px;
    box-shadow: 4px 4px 0 var(--rule);
  }
  .art-foot-card .t { font-size: 22px; }

  .rules-strip { padding: 32px 0 36px; margin-top: 48px; }
  .rules-strip-inner { padding: 0 16px; }
  .rules-strip-head {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }
  .rules-strip-head .obey { margin-left: 0; }
  .rule { padding: 18px; gap: 10px; }
  .rule .text { font-size: 17px; }
  .rule .n { font-size: 24px; }
}
