/* ------------------------------------------------------------------
   data-path-9 — the deep-water library
   palette pulled from dp9.jpg: slate #586888, steel #7e98ad,
   ink #0f0f16. one accent: lamplight brass #d9a45b.
   motion law: transform + opacity only. expo out or nothing.
------------------------------------------------------------------- */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --ink: #0b0e13;          /* page floor — bottom of the photo */
  --deep: #10141c;         /* raised floor */
  --shelf: #151a23;        /* surface */
  --shelf-edge: rgba(126, 152, 173, .10);
  --water: #586888;        /* the slate water */
  --steel: #7e98ad;        /* secondary text */
  --mist: #a9bccb;         /* body text */
  --memorial-body: #9db2c3; /* memorial prose — steel lifted a half-step so it reads */
  --bone: #e9edef;         /* headings */
  --lamp: #d9a45b;         /* the one accent — lamplight */
  --lamp-dim: rgba(217, 164, 91, .14);

  --breathing: #82b88a;
  --quiet: #7e98ad;
  --orphaned: #cfa45f;
  --archived: #8a9099;
  --moved: #6fa8bd;
  --vanished: #c96350;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.87, 0, 0.13, 1);
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 62ch;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--ink);
  color: var(--mist);
  font-family: var(--serif);
  font-size: clamp(1rem, .96rem + .3vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--lamp); color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: var(--lamp); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -999px; top: .5rem; z-index: 100;
  background: var(--lamp); color: var(--ink);
  font-family: var(--mono); font-size: .8rem; padding: .5rem 1rem;
}
.skip-link:focus { left: .5rem; }

/* ---------- type scale ---------- */
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--steel);
}
h1, h2, h3 { color: var(--bone); font-weight: 380; letter-spacing: -0.025em; }

/* ---------- fixed header ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .8rem var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transform: translateY(-100%);
  transition: transform .5s var(--ease-out);
}
.topbar.on { transform: translateY(0); border-bottom-color: var(--shelf-edge); }
.topbar .mark {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .14em;
  color: var(--bone); text-decoration: none;
}
.topbar .mark:hover { text-decoration: none; color: var(--lamp); }
.topbar nav { display: flex; gap: 1.4rem; margin-left: auto; }
.topbar nav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel);
}
.topbar nav a:hover { color: var(--bone); text-decoration: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%;
  transform: scale(1.06);
  animation: hero-settle 2.6s var(--ease-out) both;
}
@keyframes hero-settle { to { transform: scale(1); } }
.hero-media::after {
  /* scrim: keep the photo's own brightness up top, sink the bottom into ink */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,14,19,.30) 0%, rgba(11,14,19,.18) 34%, rgba(11,14,19,.78) 74%, var(--ink) 100%),
    radial-gradient(120% 90% at 78% 8%, transparent 40%, rgba(11,14,19,.42) 100%);
}
.hero-inner {
  width: min(1200px, 100%); margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 7vh, 5.5rem);
}
.hero h1 {
  font-size: clamp(3.2rem, 11.5vw, 9.5rem);
  line-height: .96; letter-spacing: -0.035em; font-weight: 340;
  margin: 1.2rem 0 0;
  max-width: 12ch;
}
.hero h1 em {
  font-style: italic; font-weight: 300; color: var(--lamp);
  letter-spacing: -0.02em;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: block; transform: translateY(110%);
  animation: line-up 1.1s var(--ease-out) both;
}
.hero h1 .line:nth-child(2) > span { animation-delay: .18s; }
@keyframes line-up { to { transform: translateY(0); } }
.hero-sub {
  max-width: 46ch; margin-top: 1.6rem; color: var(--mist);
  opacity: 0; animation: fade-up .9s var(--ease-out) .55s both;
}
.hero-sub strong { color: var(--bone); font-weight: 500; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem;
  opacity: 0; animation: fade-up .9s var(--ease-out) .75s both;
}
.btn {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .85rem 1.5rem;
  border: 1px solid rgba(126,152,173,.35); color: var(--bone);
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out), transform .3s var(--ease-out);
}
.btn:hover { text-decoration: none; border-color: var(--lamp); background: var(--lamp-dim); transform: translateY(-1px); }
.btn.solid { background: var(--lamp); border-color: var(--lamp); color: var(--ink); font-weight: 500; }
.btn.solid:hover { background: #e4b571; }
.hero-foot {
  margin-top: 3rem; display: flex; gap: 2rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--steel);
  opacity: 0; animation: fade-up .9s var(--ease-out) .9s both;
}

/* ---------- shared section chrome ---------- */
.section { width: min(1200px, 100%); margin: 0 auto; padding: clamp(4.5rem, 11vh, 8.5rem) var(--gutter) 0; }
.section-head { margin-bottom: clamp(2.2rem, 5vh, 3.6rem); max-width: 56ch; }
.section-head h2 {
  font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05;
  margin-top: .9rem;
}
.section-head h2 em { font-style: italic; font-weight: 320; color: var(--water); }
.section-head p { margin-top: 1.1rem; color: var(--steel); max-width: var(--measure); }
.section-head p strong { color: var(--mist); font-weight: 500; }

/* reveal on scroll */
/* hidden only while unrevealed, and only when JS is alive and motion is welcome —
   :not(.in) keeps this rule weaker than .reveal.in once the observer fires */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal:not(.in) { opacity: 0; transform: translateY(26px); }
}
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img, .hero h1 .line > span, .hero-sub, .hero-actions, .hero-foot { animation: none; opacity: 1; transform: none; }
}

/* ---------- thesis ---------- */
.thesis-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.thesis-lede {
  font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.42;
  color: var(--bone); font-weight: 340; letter-spacing: -0.015em;
}
.thesis-lede em { font-style: italic; color: var(--lamp); }
.thesis-side { border-left: 1px solid var(--shelf-edge); padding-left: clamp(1.2rem, 3vw, 2rem); }
.thesis-side p { font-size: .95rem; color: var(--steel); }
.thesis-side p + p { margin-top: 1rem; }
.thesis-side .pull {
  font-style: italic; color: var(--mist); font-size: 1.05rem;
  margin-top: 1.4rem;
}

/* ---------- ledger ---------- */
.ledger {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--shelf-edge); margin-top: clamp(3rem, 8vh, 5rem);
}
.ledger .cell { padding: clamp(1.4rem, 3vw, 2.4rem) clamp(.6rem, 2vw, 1.6rem); }
.ledger .cell + .cell { border-left: 1px solid var(--shelf-edge); }
.ledger .num {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.4rem); color: var(--bone);
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
}
.ledger .num.lamp { color: var(--lamp); }
.ledger .lbl {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--steel); margin-top: .5rem;
}

/* ---------- the three fires ---------- */
.fires { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem); counter-reset: fire; }
.fire {
  position: relative; background: var(--shelf);
  border: 1px solid var(--shelf-edge);
  padding: clamp(1.6rem, 3vw, 2.4rem);
}
.fire:nth-child(2) { transform: translateY(clamp(1rem, 3vw, 2.4rem)); }
.fire:nth-child(3) { transform: translateY(clamp(2rem, 6vw, 4.8rem)); }
.fire h3 { font-size: 1.35rem; margin: .9rem 0 .7rem; }
.fire p { font-size: .93rem; color: var(--steel); }
.fire .ex {
  margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--shelf-edge);
  font-family: var(--mono); font-size: .72rem; color: var(--steel); line-height: 1.7;
}
.fire .ex b { color: var(--lamp); font-weight: 500; }
.fires-spacer { height: clamp(2rem, 6vw, 4.8rem); }

/* ---------- status legend ---------- */
.legend { border-block: 1px solid var(--shelf-edge); }
.legend-row {
  display: grid; grid-template-columns: 11rem 1fr 1fr; gap: 1.5rem;
  padding: 1.1rem 0; border-top: 1px solid var(--shelf-edge); align-items: baseline;
}
.legend-row:first-child { border-top: none; }
.s-dot {
  display: inline-block; width: .5rem; height: .5rem; border-radius: 50%;
  margin-right: .55rem; vertical-align: .05em;
}
.s-word { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; }
.legend-row .def { color: var(--mist); font-size: .95rem; }
.legend-row .test { font-family: var(--mono); font-size: .72rem; color: var(--steel); }
.dot-breathing { background: var(--breathing); animation: breathe 3.2s ease-in-out infinite; }
.dot-quiet     { background: var(--quiet); }
.dot-orphaned  { background: var(--orphaned); }
.dot-archived  { background: var(--archived); }
.dot-moved     { background: var(--moved); }
.dot-vanished  { background: var(--vanished); animation: ember 3.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(130,184,138,.0);} 50% { opacity: .55; box-shadow: 0 0 10px 1px rgba(130,184,138,.35);} }
@keyframes ember { 0%,100% { opacity: .9; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .dot-breathing, .dot-vanished { animation: none; } }

/* ---------- filter bar ---------- */
.filterbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .8rem var(--gutter);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-block: 1px solid var(--shelf-edge);
  width: min(1200px, 100%); margin: 0 auto;
}
.filterbar .flabel { font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--steel); margin-right: .6rem; }
.chip {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  background: none; border: 1px solid transparent; color: var(--steel);
  padding: .38rem .8rem; cursor: pointer; border-radius: 999px;
  transition: color .25s var(--ease-out), border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.chip:hover { color: var(--bone); border-color: var(--shelf-edge); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--bone); border-color: var(--bone); }
.chip .s-dot { margin-right: .4rem; }
.chip .count { opacity: .55; margin-left: .3rem; }
.filterbar .shelfnav { margin-left: auto; display: flex; gap: 1rem; overflow-x: auto; }
.filterbar .shelfnav a {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel); white-space: nowrap;
}
.filterbar .shelfnav a:hover { color: var(--lamp); text-decoration: none; }

/* ---------- shelves ---------- */
.shelf { padding-top: clamp(3.5rem, 9vh, 6.5rem); }
.shelf-head { display: flex; align-items: baseline; gap: 1.4rem; border-bottom: 1px solid var(--shelf-edge); padding-bottom: 1rem; margin-bottom: .4rem; }
.shelf-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.shelf-head .range { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; color: var(--steel); margin-left: auto; text-transform: uppercase; }
.entry {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  gap: .4rem 1.6rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--shelf-edge);
  position: relative;
}
.entry .spine {
  font-family: var(--mono); font-size: .72rem; color: var(--water);
  padding-top: .5rem; letter-spacing: .08em;
}
.entry h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem); letter-spacing: -0.015em;
  line-height: 1.15;
}
.entry h3 a { color: var(--bone); }
.entry h3 a:hover { color: var(--lamp); text-decoration: none; }
.entry .oneliner { color: var(--mist); margin-top: .3rem; font-size: .98rem; }
.entry .why {
  color: var(--steel); font-size: .88rem; font-style: italic;
  margin-top: .45rem; max-width: 58ch;
}
.entry .why::before { content: "kept because "; font-family: var(--mono); font-style: normal; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--water); margin-right: .5rem; }
.entry .meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: .45rem;
  font-family: var(--mono); font-size: .7rem; color: var(--steel);
  text-align: right; padding-top: .35rem; min-width: 9.5rem;
}
.status-chip { white-space: nowrap; }
.status-chip .s-word { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.meta .stars, .meta .pushed { color: var(--steel); font-variant-numeric: tabular-nums; }
.meta .movednote { color: var(--moved); }
.meta .dead {
  color: var(--vanished); text-decoration: line-through;
  text-decoration-color: rgba(201,99,80,.6);
}
.meta .successor { color: var(--breathing); }
.entry.was404 h3 a { color: var(--steel); }
.entry.was404 h3 a:hover { color: var(--mist); cursor: default; }

/* memorial entry (books3) is pulled out of the grid — see memorial */

/* ---------- memorial ---------- */
.memorial {
  margin-top: clamp(4.5rem, 11vh, 8rem);
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(90% 70% at 50% 115%, rgba(201,99,80,.30), transparent 62%),
    radial-gradient(140% 100% at 50% 0%, #0d1016, var(--ink) 70%);
  border-block: 1px solid rgba(201,99,80,.16);
  padding: clamp(4.5rem, 12vh, 8.5rem) var(--gutter);
}
.memorial-inner { width: min(760px, 100%); margin: 0 auto; text-align: center; }
.memorial .eyebrow { color: var(--vanished); }
.memorial h2 {
  font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.08; font-weight: 320;
  margin-top: 1.4rem; letter-spacing: -0.03em;
}
.memorial h2 em { font-style: italic; color: var(--bone); }
.memorial .story { margin: 2rem auto 0; max-width: 58ch; text-align: left; color: var(--memorial-body); }
.memorial .story p + p { margin-top: 1rem; }
.memorial .story strong { color: var(--mist); font-weight: 500; }
.memorial .filings {
  margin: 2.4rem auto 0; padding-top: 1.6rem;
  border-top: 1px solid rgba(201,99,80,.2);
  font-family: var(--mono); font-size: .72rem; line-height: 2.1;
  color: var(--memorial-body); letter-spacing: .04em;
}
.memorial .filings .fl { color: var(--vanished); letter-spacing: .18em; text-transform: uppercase; font-size: .64rem; display: block; margin-bottom: .4rem; }
.memorial .close-line {
  margin-top: 2.6rem; font-style: italic; font-size: 1.15rem; color: var(--mist);
}
.memorial::after {
  /* the ember — a banked coal at the foot of the memorial */
  content: ""; position: absolute; left: 50%; bottom: -7rem; z-index: -1;
  width: 34rem; height: 18rem; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(224,112,88,.38), transparent 70%);
  animation: ember-glow 6s ease-in-out infinite;
}
@keyframes ember-glow { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .memorial::after { animation: none; } }

/* ---------- agents ---------- */
.agents-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.agents-copy p { color: var(--steel); margin-top: 1rem; max-width: 52ch; }
.agents-copy p strong { color: var(--mist); font-weight: 500; }
.dpx-sample {
  background: var(--deep); border: 1px solid var(--shelf-edge);
  padding: 1.6rem; font-family: var(--mono); font-size: .74rem;
  line-height: 1.9; color: var(--steel); overflow-x: auto;
  white-space: pre;
}
.dpx-sample .k { color: var(--water); }
.dpx-sample .v { color: var(--mist); }
.dpx-sample .hot { color: var(--lamp); }
.agent-links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.agent-links .btn { font-size: .68rem; }

/* ---------- footer ---------- */
footer { margin-top: clamp(5rem, 12vh, 9rem); position: relative; }
.footer-strip {
  height: 30vh; min-height: 200px;
  background: url("../dp9-1600.jpg") center 30% / cover no-repeat;
  position: relative;
}
.footer-strip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink), rgba(11,14,19,.55) 45%, rgba(11,14,19,.72)); }
.colophon {
  position: relative; width: min(1200px, 100%); margin: 0 auto;
  padding: 3rem var(--gutter) 4rem;
  display: flex; flex-wrap: wrap; gap: 2rem; align-items: baseline;
}
.colophon .who { font-size: .92rem; color: var(--steel); max-width: 44ch; }
.colophon .who b { color: var(--mist); font-weight: 500; }
.colophon .fin { margin-left: auto; text-align: right; font-family: var(--mono); font-size: .68rem; color: var(--steel); line-height: 2; letter-spacing: .08em; }
.colophon .fin a { color: var(--lamp); }

/* ---------- hidden by filter ---------- */
.entry.hidebyfilter, .shelf.hidebyfilter { display: none; }
#nohits {
  display: none; padding: 3rem 0; font-family: var(--mono); font-size: .8rem;
  color: var(--steel); letter-spacing: .06em;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .thesis-grid, .agents-grid { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .ledger .cell:nth-child(3) { border-left: none; }
  .ledger .cell:nth-child(n+3) { border-top: 1px solid var(--shelf-edge); }
  .fires { grid-template-columns: 1fr; }
  .fire:nth-child(2), .fire:nth-child(3) { transform: none; }
  .fires-spacer { height: 0; }
  .legend-row { grid-template-columns: 8.5rem 1fr; }
  .legend-row .test { grid-column: 2; }
  .filterbar .shelfnav { display: none; }
}
@media (max-width: 640px) {
  .entry { grid-template-columns: 1fr; }
  .entry .spine { padding-top: 0; }
  .entry .meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: .4rem 1.2rem; text-align: left; min-width: 0; }
  .hero-foot { gap: 1rem; }
}


/* ---- the ledger of copies (fork wing) ---- */
.copy-ledger {
  border: 1px solid var(--shelf-edge);
  background: var(--shelf);
  border-radius: 4px;
  margin: 1.8rem 0 1rem;
}
.copy-ledger summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: baseline; gap: 1.1rem; flex-wrap: wrap;
  padding: 1.1rem 1.4rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mist);
}
.copy-ledger summary::-webkit-details-marker { display: none; }
/* author display on children can defeat the UA's closed-details hiding —
   hide the body explicitly so closed means closed (boxes, paint, tab order) */
.copy-ledger:not([open]) .copy-rows,
.copy-ledger:not([open]) .ledger-note { display: none; }
.copy-ledger summary:hover { color: var(--bone); }
.copy-ledger summary .range { margin-left: auto; }
.copy-ledger summary .chev { color: var(--lamp); transition: transform .25s var(--ease-out); }
.copy-ledger[open] summary .chev { transform: rotate(90deg); }
.copy-ledger .ledger-note {
  padding: 0 1.4rem 1.1rem; max-width: var(--measure);
  color: var(--steel); font-size: .86rem;
}
.copy-ledger .ledger-note a { color: var(--lamp); text-decoration: none; }
.copy-ledger .ledger-note a:hover { text-decoration: underline; }
.copy-ledger .ledger-note code { font-family: var(--mono); font-size: .8em; }
.copy-rows { padding: 0 1rem .6rem; }
.copy-row {
  display: grid; grid-template-columns: .9rem minmax(0, 1fr) auto auto;
  gap: .3rem 1.1rem; align-items: baseline;
  padding: .52rem 0; border-bottom: 1px solid var(--shelf-edge);
  font-family: var(--mono); font-size: .72rem;
}
.copy-row:last-child { border-bottom: 0; }
.copy-row .s-dot { width: .42rem; height: .42rem; justify-self: center; }
.copy-row .cname {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-row .cname a { color: var(--bone); text-decoration: none; }
.copy-row .cname a:hover { color: var(--lamp); }
.copy-row .cdesc { color: var(--steel); }
.copy-row .cstars { color: var(--steel); text-align: right; min-width: 4.2rem; }
.copy-row .cheld { text-align: right; }
.copy-row .cheld a { color: var(--lamp); text-decoration: none; }
.copy-row .cheld a:hover { text-decoration: underline; }
/* ---- shelf folds: each shelf collapses under its head ---- */
.shelf-fold { margin-top: .4rem; }
.shelf-fold > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: baseline; gap: 1.1rem;
  padding: .85rem .2rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--steel);
}
.shelf-fold > summary::-webkit-details-marker { display: none; }
.shelf-fold > summary:hover { color: var(--bone); }
.shelf-fold > summary .chev { color: var(--lamp); transition: transform .25s var(--ease-out); }
.shelf-fold[open] > summary .chev { transform: rotate(90deg); }
.shelf-fold > summary .range { margin-left: auto; }
/* author display on children defeats the UA's closed-details hiding —
   hide the body explicitly so closed means closed (boxes, paint, tab order) */
.shelf-fold:not([open]) .entry,
.shelf-fold:not([open]) .copy-ledger { display: none; }

/* ---- ledger groups: one dropdown per shelf category ---- */
.copy-groups { padding: 0 1.4rem 1.2rem; }
.copy-cat {
  border: 1px solid var(--shelf-edge);
  background: var(--deep);
  border-radius: 4px;
  margin-top: .7rem;
}
.copy-cat:first-child { margin-top: 0; }
.copy-cat > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding: .8rem 1rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mist);
}
.copy-cat > summary::-webkit-details-marker { display: none; }
.copy-cat > summary:hover { color: var(--bone); }
.copy-cat > summary .chev { color: var(--lamp); transition: transform .25s var(--ease-out); }
.copy-cat[open] > summary .chev { transform: rotate(90deg); }
.copy-cat > summary .range { margin-left: auto; }
.copy-cat > summary .catrisk { color: var(--orphaned); }
.copy-cat:not([open]) .copy-rows { display: none; }

@media (max-width: 640px) {
  .copy-row { grid-template-columns: .9rem minmax(0, 1fr) auto; }
  .copy-row .cstars { display: none; }
}
