/* Dark Academia — antjanus.com redesign 024
   Library tones, old-style serifs, leather and brass, footnotes and marginalia. */

/* ---------- Tokens ---------- */
:root {
  /* primitives */
  --parchment-100: #f8f1e1;
  --parchment-200: #f1e7d2;
  --parchment-300: #e6d8bb;
  --parchment-400: #b9a27f;
  --walnut-950: #0f0a07;
  --walnut-900: #17110d;
  --walnut-850: #1d1510;
  --walnut-800: #241a13;
  --walnut-700: #3a2c20;
  --walnut-600: #4d3c2e;
  --sepia-500: #6b5645;
  --sepia-300: #b3a185;
  --cream-100: #f0e4cb;
  --cream-200: #dccfb4;
  --brass-300: #e2bf6e;
  --brass-400: #d6ad55;
  --brass-500: #b8903a;
  --brass-800: #74520c;
  --oxblood-300: #e39b8b;
  --oxblood-700: #7a2320;
  --oxblood-900: #4a1512;
  --bottle-300: #9cc2a7;
  --bottle-700: #2e4a3b;
  --bottle-900: #16241c;
  --inkblue-300: #a9c0dc;
  --inkblue-600: #364f6a;
  --leather-800: #5c1f19;
  --leather-900: #2b1a14;

  /* semantic — light ("Daylight": the reading room at noon) */
  --bg: var(--parchment-200);
  --bg-sunk: var(--parchment-300);
  --surface: var(--parchment-100);
  --text-strong: #2a1e16;
  --text: var(--walnut-600);
  --text-muted: var(--sepia-500);
  --rule: var(--parchment-400);
  --rule-soft: #d6c6a6;
  --accent-text: var(--brass-800);
  --accent-fill: var(--brass-500);
  --link: var(--oxblood-700);
  --link-hover: var(--oxblood-900);
  --green: var(--bottle-700);
  --pen: var(--inkblue-600);
  --leather: var(--leather-800);
  --on-leather: #f6e9cc;
  --band: var(--leather-900);
  --band-text: #f0e2c2;
  --band-muted: #cdb996;
  --band-brass: var(--brass-300);
  --blotter: #1d2a23;
  --blotter-text: #e8dec6;
  --blotter-rule: #34463b;
  --glow: rgba(255, 244, 214, 0);
  --shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 24px -14px rgba(60, 35, 15, .45);
  --focus: var(--oxblood-700);
  --grain-opacity: .35;

  /* type */
  --font-display: "IM Fell English", "EB Garamond", Georgia, serif;
  --font-sc: "IM Fell English SC", "EB Garamond", Georgia, serif;
  --font-body: "EB Garamond", Garamond, Georgia, serif;
  --font-hand: "Caveat", "Segoe Print", cursive;
  --font-mono: "Courier Prime", "Courier New", monospace;

  --measure: 38rem;
  --page: 76rem;
  --gutter: clamp(1rem, 3vw, 2rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--walnut-900);
    --bg-sunk: var(--walnut-950);
    --surface: var(--walnut-800);
    --text-strong: var(--cream-100);
    --text: var(--cream-200);
    --text-muted: var(--sepia-300);
    --rule: var(--walnut-700);
    --rule-soft: #2e2219;
    --accent-text: var(--brass-400);
    --accent-fill: var(--brass-400);
    --link: var(--brass-300);
    --link-hover: #f3d28a;
    --green: var(--bottle-300);
    --pen: var(--inkblue-300);
    --leather: #6b231d;
    --band: #120c09;
    --blotter: #0f1612;
    --blotter-rule: #24332a;
    --glow: rgba(214, 173, 85, .10);
    --shadow: 0 12px 28px -16px rgba(0, 0, 0, .8);
    --focus: var(--brass-300);
    --grain-opacity: .18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--walnut-900);
  --bg-sunk: var(--walnut-950);
  --surface: var(--walnut-800);
  --text-strong: var(--cream-100);
  --text: var(--cream-200);
  --text-muted: var(--sepia-300);
  --rule: var(--walnut-700);
  --rule-soft: #2e2219;
  --accent-text: var(--brass-400);
  --accent-fill: var(--brass-400);
  --link: var(--brass-300);
  --link-hover: #f3d28a;
  --green: var(--bottle-300);
  --pen: var(--inkblue-300);
  --leather: #6b231d;
  --band: #120c09;
  --blotter: #0f1612;
  --blotter-rule: #24332a;
  --glow: rgba(214, 173, 85, .10);
  --shadow: 0 12px 28px -16px rgba(0, 0, 0, .8);
  --focus: var(--brass-300);
  --grain-opacity: .18;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70rem 32rem at 50% -6rem, var(--glow), transparent 70%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-feature-settings: "liga", "kern";
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}
body::before {
  /* paper grain; pure SVG noise, no raster */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .15  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; } }
body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { color: var(--text-strong); font-weight: 400; margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--font-display); letter-spacing: -.005em; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.35rem; line-height: 1.25; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--font-mono); }
.sc { font-variant-caps: all-small-caps; letter-spacing: .08em; font-variant-numeric: lining-nums; }
.lining { font-variant-numeric: lining-nums tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--surface); color: var(--text-strong); padding: .6rem 1rem; border: 1px solid var(--rule); }
.skip:focus { top: 1rem; }

.page { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Masthead ---------- */
.masthead {
  background-color: var(--band);
  background-image:
    url("assets/leather-texture.jpg"),
    repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px),
    radial-gradient(120% 140% at 20% 0%, #3b2319 0%, transparent 60%);
  background-size: 600px auto, auto, auto;
  color: var(--band-text);
  border-bottom: 1px solid #000;
  box-shadow: 0 1px 0 var(--band-brass) inset, 0 -1px 0 rgba(0,0,0,.5) inset;
}
.masthead::after {
  content: ""; display: block; height: 5px;
  background:
    linear-gradient(var(--band-brass), var(--band-brass)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--band-brass), var(--band-brass)) 0 100% / 100% 1px no-repeat;
  opacity: .8;
}
.masthead-inner {
  max-width: var(--page); margin: 0 auto;
  padding: .85rem var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}
.wordmark { display: flex; align-items: center; gap: .8rem; color: var(--band-text); text-decoration: none; min-height: 44px; }
.wordmark:hover { color: #fff; }
.wordmark svg { width: 46px; height: 46px; flex: none; color: var(--band-brass); }
.wm-text { display: flex; flex-direction: column; line-height: 1.1; }
.wm-name { font-family: var(--font-sc); font-size: 1.4rem; letter-spacing: .04em; }
.wm-sub { font-style: italic; font-size: .9rem; color: var(--band-muted); }
.site-nav { margin-left: auto; }
.nav-list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: flex; align-items: baseline; gap: .35rem;
  min-height: 44px; padding: .55rem .7rem;
  color: var(--band-text); text-decoration: none; font-size: 1.1rem;
  border-bottom: 3px double transparent;
}
.nav-list .num { font-family: var(--font-sc); color: var(--band-brass); font-size: .95rem; }
.nav-list a:hover { color: #fff; border-bottom-color: rgba(226,191,110,.5); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--band-brass); color: #fff; }
.lamp {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; padding: .4rem .8rem;
  font: italic 1rem var(--font-body); color: var(--band-text);
  background: transparent; border: 1px solid rgba(226,191,110,.45); border-radius: 999px; cursor: pointer;
}
.lamp:hover { border-color: var(--band-brass); color: #fff; }
.lamp svg { width: 20px; height: 20px; color: var(--band-brass); }
.lamp .lamp-flame { transition: opacity .15s; }
:root[data-theme="light"] .lamp .lamp-flame { opacity: .25; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  .masthead-inner { flex-wrap: wrap; gap: .5rem 1rem; }
  .wm-sub { display: none; }
  .masthead-inner { column-gap: .5rem; }
  .wordmark { gap: .5rem; }
  .wm-name { font-size: 1.1rem; letter-spacing: .01em; }
  .wordmark svg { width: 36px; height: 36px; }
  .menu-toggle { padding: .4rem .6rem; }
  .lamp { order: 1; margin-left: auto; padding: .4rem .7rem; }
  .menu-toggle {
    order: 2;
    display: inline-flex; align-items: center; gap: .4rem;
    min-height: 44px; padding: .4rem .9rem;
    font: 1.05rem var(--font-sc); letter-spacing: .04em; color: var(--band-text);
    background: transparent; border: 1px solid rgba(226,191,110,.45); border-radius: 4px; cursor: pointer;
  }
  .lamp .lamp-label { display: none; }
  .site-nav { order: 3; flex-basis: 100%; margin: 0; }
  .js .site-nav:not(.is-open) { display: none; }
  .nav-list { flex-direction: column; border-top: 1px solid rgba(226,191,110,.3); padding-top: .4rem; }
  .nav-list a { border-bottom: 1px dotted rgba(226,191,110,.25); font-size: 1.2rem; }
  .nav-list a[aria-current="page"] { border-bottom: 1px solid var(--band-brass); }
}

/* ---------- Shared furniture ---------- */
.eyebrow { line-height: 1.5; font-family: var(--font-body); font-variant-caps: all-small-caps; letter-spacing: .14em; font-size: 1.15rem; color: var(--accent-text); margin: 0 0 .5rem; font-variant-numeric: lining-nums; }
.lede { font-size: 1.4rem; line-height: 1.5; color: var(--text); font-style: italic; max-width: 40rem; }
.fleuron { border: 0; text-align: center; margin: 3.5rem auto; color: var(--accent-fill); height: auto; overflow: visible; }
.fleuron::before { content: "❦"; font-size: 1.6rem; display: inline-block; padding: 0 1rem; background: var(--bg); position: relative; z-index: 1; }
.fleuron { background: linear-gradient(var(--rule), var(--rule)) 50% 55% / min(24rem, 70%) 1px no-repeat; }

.chapter { margin: 4.5rem 0; }
.chapter-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: .25rem 1.25rem;
  padding-bottom: 1rem; margin-bottom: 2rem;
  border-bottom: 3px double var(--rule);
}
.chapter-num { grid-row: span 2; font-family: var(--font-display); font-size: 4.2rem; line-height: .8; color: var(--accent-fill); }
.chapter-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.chapter-head .sub { grid-column: 2; margin: 0; font-style: italic; color: var(--text-muted); font-size: 1.2rem; }
.chapter-head .more { grid-column: 3; grid-row: 1 / span 2; align-self: end; white-space: nowrap; font-style: italic; }
@media (max-width: 600px) {
  .chapter-head { grid-template-columns: auto 1fr; }
  .chapter-num { font-size: 3rem; }
  .chapter-head .more { grid-column: 1 / -1; grid-row: auto; }
}

.plate {
  margin: 0; padding: .6rem; background: var(--surface);
  border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 4px;
  box-shadow: var(--shadow);
}
.plate img { width: 100%; filter: sepia(.3) contrast(1.02); }
.plate figcaption { font-style: italic; font-size: 1rem; color: var(--text-muted); padding: .6rem .2rem 0; line-height: 1.4; }
.plate figcaption b { font-style: normal; font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--accent-text); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .6rem 1.4rem;
  font: 600 1.1rem var(--font-body); letter-spacing: .02em; text-decoration: none;
  color: var(--on-leather);
  background-color: var(--leather);
  background-image: url("assets/leather-texture.jpg"), linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.18));
  background-size: 400px auto, auto;
  border: 1px solid #2a0d0a; border-radius: 3px;
  box-shadow: 0 0 0 1px var(--accent-fill) inset, 0 0 0 3px var(--leather) inset, 0 0 0 4px rgba(226,191,110,.55) inset, 0 6px 14px -8px rgba(0,0,0,.6);
  cursor: pointer; transition: transform .15s, filter .15s;
}
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn:active { transform: translateY(1px); filter: brightness(.95); }
.btn-quiet { font-size: 1.15rem; font-weight: 600; color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--accent-fill); text-decoration-thickness: 2px; text-underline-offset: .25em; padding: .6rem .2rem; display: inline-flex; min-height: 44px; align-items: center; }
.btn-faint { font-style: italic; color: var(--text-muted); text-decoration: none; padding: .6rem .2rem; display: inline-flex; min-height: 44px; align-items: center; }
.btn-faint:hover { color: var(--link); text-decoration: underline; }

.tags { display: flex; flex-wrap: wrap; gap: .3rem .9rem; list-style: none; padding: 0; margin: 0; font-style: italic; font-size: 1rem; color: var(--text-muted); }
.tags li::before { content: "§ "; font-style: normal; color: var(--accent-fill); }
.badge { display: inline-block; font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: 1rem; line-height: 1; padding: .2rem .5rem .3rem; border: 1px solid currentColor; border-radius: 2px; font-variant-numeric: lining-nums; }
.badge-new { color: var(--link); }
.badge-updated { color: var(--green); }

.date { font-variant-numeric: oldstyle-nums; }

/* ---------- Home: frontispiece ---------- */
.frontis {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem);
  align-items: center; padding: clamp(2.5rem, 6vw, 5rem) 0 1rem;
}
.frontis .portrait { margin: 0; }
.arch {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 50% 50% 4px 4px / 36% 36% 4px 4px;
  border: 2px solid var(--accent-fill);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--accent-fill), var(--shadow);
  background: linear-gradient(160deg, #4a3526, #1d140e);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; filter: sepia(.45) saturate(.8) contrast(1.05); }
.portrait figcaption { text-align: center; font-style: italic; color: var(--text-muted); margin-top: 1.1rem; font-size: 1.05rem; }
.portrait figcaption b { font-style: normal; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); font-weight: 500; }
.frontis h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; margin-bottom: 1.4rem; }
.frontis h1 em { color: var(--link); }
.frontis .lede { margin-bottom: 2rem; }
.folio-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 0 0 2.2rem; padding: 0; list-style: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.folio-stats li { padding: .9rem 1.6rem .8rem 0; margin-right: 1.6rem; border-right: 1px solid var(--rule); }
.folio-stats li:last-child { border-right: 0; margin-right: 0; }
.folio-stats strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--text-strong); }
.folio-stats span { font-style: italic; color: var(--text-muted); font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
@media (max-width: 820px) {
  .frontis { grid-template-columns: 1fr; }
  .frontis .portrait { max-width: 20rem; margin: 0 auto; }
  .folio-stats li { padding-right: 1rem; margin-right: 1rem; }
  .folio-stats strong { font-size: 2rem; }
}

/* reading desk (featured) */
.desk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.desk-item { display: flex; flex-direction: column; gap: .9rem; text-decoration: none; color: inherit; }
.desk-item .plate img { aspect-ratio: 16 / 10; object-fit: cover; }
.desk-item h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.65rem; color: var(--text-strong); }
.desk-item:hover h3 { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.desk-item p { margin: 0; }
.desk-item .kicker { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); font-size: 1.05rem; }
@media (max-width: 900px) { .desk { grid-template-columns: 1fr; } .desk-item { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; } .desk-item h3 { font-size: 1.4rem; } }
@media (max-width: 480px) { .desk-item { grid-template-columns: 1fr; } }

/* card catalogue */
.catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.index-card {
  position: relative; height: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; column-gap: 1rem; row-gap: .5rem; align-content: start;
  padding: 1.1rem 1.3rem 2.6rem;
  color: var(--text); text-decoration: none;
  background-color: var(--surface);
  background-image:
    linear-gradient(transparent 3.05rem, var(--link) 3.05rem, var(--link) calc(3.05rem + 1px), transparent calc(3.05rem + 1px)),
    repeating-linear-gradient(transparent 0 1.85rem, var(--rule-soft) 1.85rem calc(1.85rem + 1px));
  background-position: 0 0, 0 3.35rem;
  border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.index-card::after { /* punch hole for the catalogue rod */
  content: ""; position: absolute; bottom: .8rem; left: 50%; width: 1.1rem; height: 1.1rem; margin-left: -.55rem;
  border-radius: 50%; background: var(--bg-sunk); box-shadow: inset 0 2px 3px rgba(0,0,0,.35);
}
.index-card:hover { transform: translateY(-3px) rotate(-.4deg); }
.index-card:hover h3 { color: var(--link); }
.callno { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-mono); font-size: .95rem; color: var(--text-muted); min-height: 1.9rem; font-variant-numeric: lining-nums; }
.index-card h3 { font-size: 1.35rem; margin-top: .35rem; }
.index-card p { margin: 0; line-height: 1.85rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.index-card .callno, .index-card p, .index-card .tags, .index-card h3 { grid-column: 1 / -1; }
.index-card .thumb + h3 { grid-column: 1; grid-row: 2; }
.index-card .thumb { grid-column: 2; grid-row: 2; align-self: start; width: 6rem; margin: .5rem .2rem .2rem 0; padding: .25rem; background: #fff8e8; box-shadow: 0 2px 6px rgba(0,0,0,.25); transform: rotate(2deg); }
.index-card .thumb img { aspect-ratio: 1; object-fit: cover; filter: sepia(.4); }
.index-card .tags { align-self: end; padding-top: .5rem; font-size: .98rem; }

/* table of contents with leaders */
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc-list > li { padding: 1rem 0; border-bottom: 1px solid var(--rule-soft); counter-increment: toc; }
.toc-line { display: flex; align-items: baseline; gap: .6rem; }
.toc-line::before { content: counter(toc, upper-roman) "."; font-family: var(--font-sc); color: var(--accent-text); min-width: 2.6rem; font-size: 1.05rem; }
.toc-line a { font-size: 1.35rem; color: var(--text-strong); text-decoration: none; font-weight: 500; }
.toc-line a:hover { color: var(--link); text-decoration: underline; }
.toc-line .leader { flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-.3em); min-width: 1.5rem; }
.toc-line .date { color: var(--text-muted); white-space: nowrap; font-style: italic; }
.toc-desc { margin: .25rem 0 0 3.2rem; color: var(--text-muted); font-style: italic; max-width: 44rem; }
@media (max-width: 600px) {
  .toc-line { flex-wrap: wrap; }
  .toc-line::before { min-width: 2rem; }
  .toc-line a { flex: 1 1 calc(100% - 3rem); }
  .toc-line .leader { display: none; }
  .toc-line .date { margin-left: 2.6rem; }
  .toc-desc { margin-left: 2.6rem; }
}

/* bookshelf of spines */
.shelf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
.shelf {
  display: flex; align-items: flex-end; gap: .45rem; padding: 1.5rem 1.25rem 0;
  list-style: none; margin: 0;
  border-bottom: 1.1rem solid #3b2618;
  background: linear-gradient(180deg, transparent 0 60%, rgba(0,0,0,.08));
  box-shadow: 0 14px 18px -12px rgba(0,0,0,.6);
  position: relative;
}
.shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.1rem; height: 3px; background: #6a4a30; }
.spine { flex: 1 1 0; }
.spine a {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  height: var(--h, 19rem); padding: 1rem 0 .9rem;
  color: #f4e4bf; text-decoration: none;
  background-color: var(--c, #5c1f19);
  background-image:
    url("assets/leather-texture.jpg"),
    linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.1) 18%, rgba(255,255,255,0) 40%, rgba(0,0,0,.35)),
    linear-gradient(transparent 1.7rem, var(--brass-400) 1.7rem 1.85rem, transparent 1.85rem 2.15rem, var(--brass-400) 2.15rem 2.25rem, transparent 2.25rem),
    linear-gradient(0deg, transparent 1.7rem, var(--brass-400) 1.7rem 1.85rem, transparent 1.85rem);
  background-blend-mode: overlay, normal, normal, normal;
  background-size: 300px auto, auto, auto, auto;
  border-radius: 3px 3px 0 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
  transition: transform .2s ease;
}
.spine a:hover { transform: translateY(-.8rem); color: #fff; }
.spine .roman { font-family: var(--font-sc); font-size: 1.1rem; color: var(--brass-300); margin-top: 1.7rem; }
.spine .title { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; text-align: center; max-height: 12.5rem; }
.spine .kind { font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: 1rem; color: #e8cf98; }
.shelf-list { list-style: none; padding: 0; margin: 0; counter-reset: sh; }
.shelf-list li { padding: .9rem 0; border-bottom: 1px solid var(--rule-soft); }
.shelf-list h3 { font-size: 1.3rem; }
.shelf-list h3 .roman { font-family: var(--font-sc); color: var(--accent-text); margin-right: .4rem; font-weight: 400; }
.shelf-list p { margin: .2rem 0 0; }
.shelf-list .tech { font-style: italic; color: var(--text-muted); font-size: 1.02rem; }
@media (max-width: 900px) { .shelf-wrap { grid-template-columns: 1fr; } .spine .title { font-size: 1.15rem; } .spine a { height: calc(var(--h, 19rem) - 3rem); } }

/* correspondence row */
.letters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.letter { padding: 1.6rem 1.6rem 1.4rem; background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.letter h3 { font-family: var(--font-sc); font-weight: 400; font-size: 1.5rem; margin-bottom: .8rem; letter-spacing: .02em; }
.letter ul { list-style: none; padding: 0; margin: 0; }
.letter li { border-bottom: 1px dotted var(--rule); }
.letter li a { display: flex; justify-content: space-between; gap: 1rem; min-height: 44px; align-items: center; text-decoration: none; color: var(--text-strong); }
.letter li a:hover { color: var(--link); }
.letter li small { font-size: 1rem; font-style: italic; color: var(--text-muted); }
.letter.sealed {
  background: var(--bottle-900); color: #e6ddc5; border-color: #0b140f; position: relative;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 2px, transparent 2px 5px);
}
.letter.sealed h3 { color: #f3e6c6; }
.letter.sealed p { font-size: 1.2rem; font-style: italic; }
.seal { position: absolute; right: 1.2rem; top: -1.3rem; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #b0392f, #6d1612 70%); box-shadow: 0 3px 6px rgba(0,0,0,.5), inset 0 0 0 4px rgba(0,0,0,.15); display: grid; place-items: center; color: #f0c7b8; font-family: var(--font-sc); font-size: 1.15rem; }
@media (max-width: 900px) { .letters { grid-template-columns: 1fr; } }

/* ---------- Page headers ---------- */
.title-page { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; }
.title-page h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 1; margin-bottom: 1rem; }
.title-page .plate img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 820px) { .title-page { grid-template-columns: 1fr; } }

/* ---------- Writing page ---------- */
.marked { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.marked-col { position: relative; padding: 1.6rem 1.6rem 1rem; background: var(--surface); border: 1px solid var(--rule); }
.marked-col::before { /* ribbon bookmark */
  content: ""; position: absolute; top: -.6rem; right: 1.6rem; width: 1.3rem; height: 4rem;
  background: var(--ribbon, var(--oxblood-700));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.marked-col.popular { --ribbon: var(--bottle-700); }
.marked-col h2 { font-size: 1.9rem; }
.marked-col > p { font-style: italic; color: var(--text-muted); }
.marked-col ol { margin: 0; padding-left: 1.4rem; }
.marked-col li { padding: .45rem 0; }
.marked-col li a { font-size: 1.25rem; font-weight: 500; }
@media (max-width: 760px) { .marked { grid-template-columns: 1fr; } }

.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 2rem 1.75rem; list-style: none; padding: 0; margin: 0; }
.banner-card a { display: flex; flex-direction: column; gap: .6rem; text-decoration: none; color: inherit; }
.banner-card .plate img { aspect-ratio: 2 / 1; object-fit: cover; }
.banner-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin-top: .4rem; }
.banner-card a:hover h3 { color: var(--link); text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.banner-card p { margin: 0; }
.banner-card .date { color: var(--text-muted); font-style: italic; }

.series-box { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem; padding: 2rem; background: var(--bottle-900); color: #e3dac2; border: 1px solid #0b140f; outline: 1px solid var(--accent-fill); outline-offset: -8px; }
.series-box h3 { font-family: var(--font-display); color: #f5e8c8; font-weight: 400; font-size: 2.2rem; }
.series-box a { color: var(--brass-300); }
.series-box ol { margin: 0; padding: 0; list-style: none; }
.series-box li { display: flex; gap: 1rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px dotted rgba(226,191,110,.3); }
.series-box li .roman { font-family: var(--font-sc); color: var(--brass-300); min-width: 2rem; }
.series-box li.forthcoming { color: #b9b19c; font-style: italic; }
@media (max-width: 760px) { .series-box { grid-template-columns: 1fr; padding: 1.4rem; } }

.subject-index { columns: 3 14rem; column-gap: 2.5rem; column-rule: 1px solid var(--rule-soft); }
.subject-index .letter-group { break-inside: avoid; margin-bottom: 1.2rem; }
.subject-index h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--accent-text); border-bottom: 1px solid var(--rule-soft); margin-bottom: .3rem; }
.subject-index ul { list-style: none; padding: 0; margin: 0; }
.subject-index li { display: flex; gap: .4rem; align-items: baseline; }
.subject-index li .leader { flex: 1; border-bottom: 1px dotted var(--rule); }
.subject-index li a { text-decoration: none; color: var(--text-strong); padding: .2rem 0; }
.subject-index li a:hover { color: var(--link); text-decoration: underline; }
.subject-index li .count { color: var(--text-muted); }

/* ---------- AI page ---------- */
.notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  padding: 1.3rem 1.6rem; margin: 2rem 0 0;
  background: var(--surface); border: 1px solid var(--rule); border-left: 6px solid var(--link);
}
.notice p { margin: 0; font-size: 1.25rem; font-style: italic; color: var(--text-strong); }
.bibliography { list-style: none; margin: 0; padding: 0; counter-reset: bib; }
.bibliography > li { counter-increment: bib; display: grid; grid-template-columns: 3rem minmax(0, 1fr) 9rem; gap: 1.25rem; padding: 1.4rem 0; border-bottom: 1px solid var(--rule-soft); }
.bibliography > li::before { content: "[" counter(bib) "]"; font-family: var(--font-sc); color: var(--accent-text); font-size: 1.15rem; padding-top: .1rem; font-variant-numeric: lining-nums; }
.bibliography .cite { margin: 0; }
.bibliography .cite a { font-style: italic; font-size: 1.3rem; font-weight: 500; }
.bibliography .author { font-variant-caps: small-caps; letter-spacing: .03em; color: var(--text-strong); }
.bibliography .abstract { margin: .35rem 0 .5rem; }
.bibliography .plate { padding: .3rem; outline-offset: 2px; }
.bibliography .plate img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 700px) {
  .bibliography > li { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .bibliography > li > div, .bibliography .plate { grid-column: 2; }
  .bibliography .plate { max-width: 14rem; }
}

.volumes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.volume a, .volume .binding { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: #f2e4c2; }
.cover {
  position: relative; aspect-ratio: 2 / 3; padding: 1rem .9rem;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  background-color: var(--c, #5c1f19);
  background-image: url("assets/leather-texture.jpg"), linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.05) 8%, rgba(255,255,255,.06) 50%, rgba(0,0,0,.2));
  background-blend-mode: overlay, normal;
  background-size: 400px auto, auto;
  border-radius: 2px 6px 6px 2px;
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.12), inset 0 0 0 7px rgba(226,191,110,.6), 0 14px 24px -12px rgba(0,0,0,.7);
  transition: transform .2s ease;
}
.volume a:hover .cover { transform: translateY(-4px) rotate(-1deg); }
.cover .part { font-family: var(--font-sc); font-size: 1rem; color: var(--brass-300); letter-spacing: .08em; }
.cover .inset { width: 78%; aspect-ratio: 1; border: 2px solid var(--brass-400); padding: 3px; background: #1a0f0b; }
.cover .inset img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.35); }
.cover .inset.blank { display: grid; place-items: center; color: var(--brass-400); font-size: 2.4rem; }
.cover .vtitle { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; color: #f7e8c4; }
.volume .caption { padding-top: .8rem; color: var(--text); font-size: 1.02rem; line-height: 1.45; }
.volume .caption strong { color: var(--text-strong); font-weight: 600; display: block; }
.volume .caption em { color: var(--text-muted); }
.volume.forthcoming .cover { filter: grayscale(.6) brightness(.8); }
@media (max-width: 1000px) { .volumes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .volumes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } .cover .vtitle { font-size: 1.1rem; } }
.original-work { margin-top: 2rem; padding: 1rem 1.3rem; border: 1px dashed var(--accent-fill); font-style: italic; }
.original-work b { font-style: normal; font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--accent-text); }

/* ---------- Projects ---------- */
.exhibit { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2.5rem; align-items: center; padding: 2rem; background: var(--surface); border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 5px; }
.exhibit h3 { font-family: var(--font-display); font-weight: 400; font-size: 2.3rem; margin-bottom: .6rem; }
.exhibit .plate img { aspect-ratio: 16 / 10; object-fit: cover; }
.figures { display: flex; gap: 0; margin: 1.3rem 0 1.5rem; padding: 0; list-style: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.figures li { flex: 1; padding: .7rem 0; text-align: center; border-right: 1px solid var(--rule); }
.figures li:last-child { border-right: 0; }
.figures strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1; color: var(--text-strong); }
.figures span { font-style: italic; color: var(--text-muted); font-size: 1rem; }
@media (max-width: 820px) { .exhibit { grid-template-columns: 1fr; padding: 1.3rem; } }

.catalogue-entries { list-style: none; padding: 0; margin: 0; }
.entry { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--rule-soft); align-items: center; }
.entry:nth-child(even) .plate { order: 2; }
.entry .plate img { aspect-ratio: 16 / 10; object-fit: cover; background: #111; }
.entry h3 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
.entry h3 a { color: var(--text-strong); text-decoration: none; }
.entry h3 a:hover { color: var(--link); text-decoration: underline; }
.entry .accession { font-family: var(--font-mono); font-size: .95rem; color: var(--text-muted); font-variant-numeric: lining-nums; }
.entry .meta { font-style: italic; color: var(--text-muted); }
@media (max-width: 760px) { .entry { grid-template-columns: 1fr; gap: 1rem; } .entry:nth-child(even) .plate { order: 0; } }

.register { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.register caption { text-align: left; font-style: italic; color: var(--text-muted); padding-bottom: .6rem; }
.register th { text-align: left; font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); border-bottom: 3px double var(--rule); padding: .5rem .8rem .5rem 0; font-size: 1.1rem; }
.register td { padding: .8rem .8rem .8rem 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.register td:first-child { font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.register td.num { text-align: right; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.register td.tech { font-style: italic; color: var(--text-muted); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
@media (max-width: 700px) {
  .register thead { display: none; }
  .register tr { display: block; border-bottom: 1px solid var(--rule-soft); padding: .8rem 0; }
  .register td { display: block; border: 0; padding: .1rem 0; white-space: normal !important; text-align: left !important; }
}

.jump { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--rule); padding: .4rem 0; margin-top: 1.5rem; }
.jump ul { display: flex; gap: .2rem 1.2rem; list-style: none; padding: 0; margin: 0; overflow-x: auto; white-space: nowrap; }
.jump span { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--text-muted); }
.jump a { display: inline-flex; align-items: center; min-height: 44px; font-style: italic; }

.side-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.75rem; list-style: none; padding: 0; margin: 0; }
.side-grid li { display: flex; flex-direction: column; gap: .5rem; }
.side-grid .plate img { aspect-ratio: 4 / 3; object-fit: cover; background: #0e0e0e; }
.side-grid .plate.noimg { aspect-ratio: auto; }
.side-grid .noimg-fill { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bg-sunk); color: var(--accent-fill); font-family: var(--font-display); font-size: 3rem; }
.side-grid h3 a { color: var(--text-strong); text-decoration: none; }
.side-grid h3 a:hover { color: var(--link); text-decoration: underline; }
.side-grid p { margin: 0; font-size: 1.08rem; }
.side-grid .tech { font-style: italic; color: var(--text-muted); font-size: 1.02rem; }

/* ---------- About ---------- */
.vita-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; }
.oval { aspect-ratio: 4 / 5; border-radius: 50%; overflow: hidden; border: 2px solid var(--accent-fill); box-shadow: 0 0 0 7px var(--bg), 0 0 0 8px var(--accent-fill), var(--shadow); background: #2a2018; }
.oval img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.4) contrast(1.05); }
.vita-head h1 { font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1; margin-bottom: .8rem; }
@media (max-width: 820px) { .vita-head { grid-template-columns: 1fr; } .vita-head figure { max-width: 16rem; margin: 0 auto; } }

.ledger-bar { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 1.5rem 0; border: 1px solid var(--rule); }
.ledger-bar li { flex: 1 1 8.5rem; padding: .7rem .9rem; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); background: var(--surface); }
.ledger-bar li b { display: block; color: var(--text-strong); font-weight: 600; }
.ledger-bar li span { font-style: italic; color: var(--text-muted); font-size: 1rem; font-variant-numeric: lining-nums; }
.ledger-bar li:first-child { background: var(--bottle-900); }
.ledger-bar li:first-child b { color: #f3e6c6; }
.ledger-bar li:first-child span { color: #c9bfa6; }

details.history > summary {
  display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none;
  min-height: 48px; padding: .5rem 1.2rem; border: 1px solid var(--accent-fill); border-radius: 3px;
  font-weight: 600; color: var(--text-strong);
}
details.history > summary::-webkit-details-marker { display: none; }
details.history > summary::before { content: "▸"; color: var(--accent-fill); transition: transform .15s; }
details.history[open] > summary::before { transform: rotate(90deg); }
details.history[open] > summary .closed-label { display: none; }
details.history:not([open]) > summary .open-label { display: none; }
.phases { list-style: none; padding: 0; margin: 2rem 0 0; border-left: 3px double var(--accent-fill); }
.phases > li { position: relative; padding: 0 0 2rem 2rem; }
.phases > li::before { content: ""; position: absolute; left: -.62rem; top: .5rem; width: .9rem; height: .9rem; background: var(--bg); border: 2px solid var(--accent-fill); transform: rotate(45deg); }
.phases h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }
.phases .period { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); font-variant-numeric: lining-nums; font-size: 1.1rem; }
.phases ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.phases ul li { margin: .3rem 0; }
.phases blockquote { margin: .6rem 0 0 0; padding-left: 1rem; border-left: 1px solid var(--rule); font-style: italic; }

.epigraphs {
  padding: clamp(2rem, 5vw, 3.5rem); color: #e6dcc3;
  background-color: var(--bottle-900);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(214,173,85,.12), transparent 60%), repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 3px);
  border: 1px solid #0b140f; outline: 1px solid var(--brass-500); outline-offset: -10px;
}
.epigraphs h2 { color: #f5e8c8; font-size: 2.4rem; text-align: center; }
.epigraphs ol { list-style: none; margin: 2rem auto 1rem; padding: 0; max-width: 46rem; counter-reset: ep; }
.epigraphs li { counter-increment: ep; text-align: center; font-style: italic; font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.35; padding: 1rem 0; color: #f0e5c9; }
.epigraphs li::before { content: counter(ep, upper-roman); display: block; font-style: normal; font-family: var(--font-sc); font-size: 1.05rem; color: var(--brass-300); margin-bottom: .2rem; }
.epigraphs li + li { border-top: 1px solid rgba(226,191,110,.2); }
.epigraphs .more { text-align: center; margin: 0; }
.epigraphs a { color: var(--brass-300); }

.beyond { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem; align-items: center; }
.beyond dl { margin: 0; }
.beyond dt { font-family: var(--font-display); font-size: 1.7rem; color: var(--text-strong); margin-top: 1rem; }
.beyond dd { margin: .2rem 0 0; }
@media (max-width: 820px) { .beyond { grid-template-columns: 1fr; } }

.syllabus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
.course { padding: 1.5rem 1.6rem; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--c, var(--link)); }
.course h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; }
.course h3 .roman { font-family: var(--font-sc); color: var(--accent-text); font-size: 1.1rem; margin-right: .4rem; }
.course > p { font-style: italic; color: var(--text-muted); margin: .4rem 0 .8rem; }
.course ul { list-style: none; margin: 0; padding: 0; }
.course li { padding: .35rem 0; border-bottom: 1px dotted var(--rule); }
.course li::before { content: "— "; color: var(--accent-fill); }
@media (max-width: 760px) { .syllabus { grid-template-columns: 1fr; } }

.works { list-style: none; padding: 0; margin: 0; columns: 2 20rem; column-gap: 3rem; }
.works li { break-inside: avoid; padding: .6rem 0 .6rem 1.8rem; text-indent: -1.8rem; border-bottom: 1px solid var(--rule-soft); }
.works li::before { content: "❧ "; color: var(--accent-fill); }

.closer { text-align: center; max-width: 40rem; margin: 0 auto; }
.closer p { font-size: 1.4rem; font-style: italic; color: var(--text-strong); }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 40; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--oxblood-700), var(--brass-400)); }
.progress-num { position: fixed; top: .5rem; right: .8rem; z-index: 40; font-family: var(--font-mono); font-size: .9rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--rule); padding: .1rem .45rem; opacity: 0; transition: opacity .2s; }
.progress-num.is-visible { opacity: 1; }

.art-head { max-width: 58rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; text-align: center; }
.crumbs { font-variant-caps: all-small-caps; letter-spacing: .12em; font-size: 1.15rem; }
.crumbs a { color: var(--accent-text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.art-head h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); line-height: 1.02; margin: .8rem 0 1rem; }
.art-head .lede { margin: 0 auto 1.3rem; }
.art-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.2rem; color: var(--text-muted); font-style: italic; }
.art-meta .sep { color: var(--accent-fill); font-style: normal; }
.art-head .tags { justify-content: center; margin-top: .8rem; }
.art-plate { max-width: 60rem; margin: 1rem auto 3rem; }
.art-plate img { aspect-ratio: 21 / 9; object-fit: cover; }

.art-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; max-width: 76rem; margin: 0 auto; }
.contents { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow: auto; padding-right: .5rem; }
.contents h2 { font-family: var(--font-sc); font-size: 1.25rem; color: var(--accent-text); letter-spacing: .06em; border-bottom: 3px double var(--rule); padding-bottom: .4rem; margin-bottom: .5rem; }
.contents ol { list-style: none; margin: 0; padding: 0; counter-reset: ct; }
.contents li { counter-increment: ct; }
.contents a { display: flex; gap: .5rem; padding: .45rem 0 .45rem .6rem; border-left: 2px solid transparent; color: var(--text); text-decoration: none; line-height: 1.3; font-size: 1.05rem; }
.contents a::before { content: counter(ct, upper-roman) "."; font-family: var(--font-sc); color: var(--text-muted); min-width: 2.1rem; font-size: .95rem; }
.contents a:hover { color: var(--link); }
.contents a.is-active { border-left-color: var(--link); color: var(--text-strong); font-weight: 600; }
.contents-mobile { display: none; }

.prose { font-size: 1.25rem; line-height: 1.68; max-width: var(--measure); color: var(--text); padding-right: 0; }
.prose > * { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.9rem, 3.5vw, 2.4rem); margin: 3rem 0 1rem; scroll-margin-top: 1.5rem; clear: right; }
.prose h2::before { content: attr(data-num); display: block; font-family: var(--font-sc); font-size: 1.05rem; color: var(--accent-text); letter-spacing: .1em; margin-bottom: .2rem; }
.prose p { hyphens: auto; }
.prose ol, .prose ul { padding-left: 1.6rem; }
.prose li { margin: .3rem 0; }
.prose li::marker { color: var(--accent-text); font-variant-numeric: oldstyle-nums; }
.prose code { font-size: .88em; background: var(--bg-sunk); padding: .05em .3em; border-radius: 2px; color: var(--text-strong); font-variant-numeric: lining-nums; }
.prose .dropcap::first-letter { float: left; font-family: var(--font-display); font-size: 4.9rem; line-height: .8; padding: .35rem .6rem 0 0; color: var(--link); }
.prose blockquote.note { margin: 1.6rem 0; padding: .2rem 0 .2rem 1.4rem; border-left: 3px double var(--accent-fill); font-style: italic; color: var(--text-strong); }
.prose blockquote.note strong { font-style: normal; font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--accent-text); }

.addendum {
  position: relative; margin: 0 0 2.5rem; padding: 1.2rem 1.4rem 1.1rem;
  background: #efe3c0; color: #3a2a1b; font-size: 1.1rem; line-height: 1.55;
  border: 1px solid #cdb888; box-shadow: 2px 4px 10px -4px rgba(0,0,0,.35);
  transform: rotate(-.6deg);
}
.addendum::before { content: ""; position: absolute; top: -.55rem; left: 50%; width: 1rem; height: 1rem; margin-left: -.5rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e0bd6a, #7a5712); box-shadow: 0 2px 3px rgba(0,0,0,.4); }
.addendum b.label { display: block; font-family: var(--font-sc); font-weight: 400; font-size: 1.1rem; letter-spacing: .06em; color: #6f2019; margin-bottom: .2rem; }
.addendum a { color: #6f2019; }
.addendum code { background: rgba(0,0,0,.07); color: #2a1e16; }

/* sidenotes — Tufte-style, in the right margin on wide screens */
.sn-ref { font-size: .7em; vertical-align: super; line-height: 0; color: var(--link); font-variant-numeric: lining-nums; font-weight: 700; padding: 0 .1em; text-decoration: none; }
.sidenote {
  display: block; font-size: 1.12rem; line-height: 1.5; font-style: italic;
  color: var(--text-muted);
  margin: 1rem 0 1.4rem; padding: .7rem 0 .7rem 1rem;
  border-left: 2px solid var(--accent-fill);
}
.sidenote .sn-num { font-style: normal; color: var(--link); font-weight: 700; margin-right: .25rem; font-variant-numeric: lining-nums; }
.sidenote b { font-style: normal; font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--accent-text); font-weight: 500; }

.pencil {
  display: block; position: relative;
  margin: 1.4rem 0 1.8rem; padding: .6rem 1rem .6rem 1.2rem;
  font-family: var(--font-hand); font-size: 1.55rem; line-height: 1.25; color: var(--pen);
  transform: rotate(-1.2deg);
  border-left: 2px solid transparent;
  background: linear-gradient(var(--pen), var(--pen)) 0 .4rem / 2px calc(100% - .8rem) no-repeat;
}
.pencil b { font-weight: 700; display: block; font-size: 1.35rem; }

@media (min-width: 1240px) {
  .prose { max-width: calc(var(--measure) + 18rem); padding-right: 18rem; }
  .sidenote, .pencil {
    float: right; clear: right; width: 15.5rem;
    margin: .3rem -18rem 1.2rem 0; padding: 0 0 0 .9rem;
  }
  .pencil { margin-right: -18.5rem; padding-left: 1rem; font-size: 1.4rem; transform: rotate(-2deg); }
  .prose pre, .prose .code-block { clear: right; }
}

.code-block { margin: 2rem 0; background: var(--blotter); color: var(--blotter-text); border: 1px solid #0a0f0c; outline: 1px solid var(--accent-fill); outline-offset: 3px; box-shadow: var(--shadow); max-width: var(--measure); }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem .5rem .35rem 1rem; border-bottom: 1px solid var(--blotter-rule); font-family: var(--font-sc); font-size: 1.02rem; letter-spacing: .05em; color: #d9c79d; }
.code-bar .lang { font-family: var(--font-mono); font-size: .9rem; color: #bfb392; letter-spacing: 0; }
.copy-btn { min-height: 40px; min-width: 44px; padding: .3rem .8rem; background: transparent; color: #eadcb8; border: 1px solid #5d6f60; border-radius: 3px; font: italic 1rem var(--font-body); cursor: pointer; }
.copy-btn:hover { border-color: var(--brass-400); color: #fff; }
.copy-btn.is-success { border-color: var(--bottle-300); color: var(--bottle-300); }
.code-block pre { margin: 0; padding: 1rem 1.1rem 1.2rem; overflow-x: auto; font-size: .95rem; line-height: 1.55; tab-size: 2; }
.code-block pre code { background: none; padding: 0; color: inherit; font-size: inherit; font-variant-numeric: lining-nums; }
@media (min-width: 1240px) { .prose .code-block { max-width: none; margin-right: -4rem; } }
.token.comment { color: #9aa893; font-style: italic; }
.token.keyword, .token.module, .token.control-flow { color: #e4b76a; }
.token.string, .token.template-string, .token.template-punctuation { color: #b9d39a; }
.token.function { color: #f0d8a8; }
.token.class-name, .token.builtin, .token.tag { color: #e79a86; }
.token.punctuation, .token.operator { color: #bdb296; }
.token.boolean, .token.number { color: #d7a3c4; }
.token.attr-name, .token.property { color: #a9c7d8; }

.art-end { max-width: 58rem; margin: 3rem auto 0; }
.filed { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.25rem; padding: 1.2rem 0; border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); }
.filed .label { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: 1.2rem 0; }
.share-row .label { font-style: italic; color: var(--text-muted); margin-right: .4rem; }
.pill-btn { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem 1rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--text-strong); text-decoration: none; font: 1.05rem var(--font-body); cursor: pointer; }
.pill-btn:hover { border-color: var(--link); color: var(--link); }

.slip {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  margin: 2.5rem 0; padding: 2rem;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(transparent 0 1.9rem, var(--rule-soft) 1.9rem calc(1.9rem + 1px));
  border: 1px solid var(--rule); border-top: 6px solid var(--link);
}
.slip h2 { font-size: 2rem; }
.slip p { margin: .4rem 0 0; }
@media (max-width: 760px) { .slip { grid-template-columns: 1fr; padding: 1.4rem; } }
.nl-form { display: flex; flex-direction: column; gap: .7rem; }
.nl-form label { font-style: italic; color: var(--text-muted); }
.nl-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.nl-row input[type=email] { flex: 1 1 12rem; min-height: 48px; padding: .5rem .9rem; font: 1.1rem var(--font-body); color: var(--text-strong); background: var(--bg); border: 1px solid var(--rule); border-bottom: 2px solid var(--text-muted); border-radius: 2px; }
.nl-row input[type=email]::placeholder { color: var(--text-muted); font-style: italic; }
.nl-status { min-height: 1.5em; margin: 0; font-style: italic; }
.nl-status.is-success { color: var(--green); }
.nl-status.is-error { color: var(--link); }
.gdpr { display: flex; gap: .6rem; align-items: flex-start; font-size: 1.02rem; }
.gdpr input { width: 1.2rem; height: 1.2rem; margin-top: .3rem; accent-color: var(--leather); }

.see-also { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.see-also a { display: block; height: 100%; padding: 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--rule); text-decoration: none; color: var(--text); }
.see-also a:hover { border-color: var(--link); }
.see-also a:hover h3 { color: var(--link); }
.see-also .kicker { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); font-size: 1.02rem; }
.see-also h3 { margin: .3rem 0; }
.see-also p { margin: 0; font-size: 1.08rem; }
@media (max-width: 860px) { .see-also { grid-template-columns: 1fr; } }

@media (max-width: 1100px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); max-width: var(--measure); }
  .contents { display: none; }
  .contents-mobile { display: block; margin-bottom: 2rem; border: 1px solid var(--rule); background: var(--surface); }
  .contents-mobile summary { min-height: 48px; display: flex; align-items: center; padding: .5rem 1rem; cursor: pointer; font-family: var(--font-sc); font-size: 1.15rem; color: var(--accent-text); letter-spacing: .06em; }
  .contents-mobile ol { margin: 0; padding: 0 1rem 1rem 2.6rem; list-style: upper-roman; }
  .contents-mobile li { padding: .3rem 0; }
  .contents-mobile li::marker { font-family: var(--font-sc); color: var(--text-muted); }
}

/* ---------- Patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); background: var(--surface); }
.three-ways > div { padding: 1.4rem 1.5rem; border-right: 1px solid var(--rule-soft); }
.three-ways > div:last-child { border-right: 0; }
.three-ways h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; }
.three-ways h3 span { font-family: var(--font-sc); color: var(--accent-text); font-size: 1.05rem; margin-right: .35rem; }
.three-ways p { margin: .4rem 0 0; }
.three-ways-foot { margin: 1.2rem auto 0; max-width: 50rem; text-align: center; font-style: italic; color: var(--text-strong); font-size: 1.2rem; }
@media (max-width: 800px) { .three-ways { grid-template-columns: 1fr; } .three-ways > div { border-right: 0; border-bottom: 1px solid var(--rule-soft); } }

.drawer-controls { display: grid; gap: 1rem; padding: 1.4rem; background: var(--bg-sunk); border: 1px solid var(--rule); margin-bottom: 2rem; }
.search-field { display: flex; flex-direction: column; gap: .3rem; }
.search-field label { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); }
.search-field input { min-height: 50px; padding: .5rem 1rem; font: 1.15rem var(--font-body); color: var(--text-strong); background: var(--surface); border: 1px solid var(--rule); border-bottom: 2px solid var(--text-muted); border-radius: 2px; width: 100%; }
.search-field input::placeholder { color: var(--text-muted); font-style: italic; }
.drawer-labels { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0; }
.drawer-labels legend { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); margin-bottom: .4rem; padding: 0; }
.drawer-labels button {
  min-height: 44px; padding: .3rem 1rem;
  font: 1.08rem var(--font-body); color: var(--text-strong); cursor: pointer;
  background: linear-gradient(180deg, #f3e2b0, #caa65a); color: #2b1d0c;
  border: 1px solid #7a5a1a; border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 3px rgba(0,0,0,.2);
}
.drawer-labels button[aria-pressed="true"] { background: var(--leather); color: var(--on-leather); border-color: #2a0d0a; box-shadow: inset 0 0 0 2px var(--brass-400); font-weight: 600; }
.drawer-labels button[aria-pressed="true"]::before { content: "✓ "; }
.results-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; }
.results-row output { font-style: italic; color: var(--text-strong); font-size: 1.15rem; }
.results-row .clear { background: none; border: 0; color: var(--link); text-decoration: underline; font: italic 1.08rem var(--font-body); cursor: pointer; min-height: 44px; padding: 0 .4rem; }
.results-row label { display: inline-flex; gap: .5rem; align-items: center; font-style: italic; color: var(--text-muted); }
.results-row select { min-height: 44px; padding: .3rem .6rem; font: 1.05rem var(--font-body); background: var(--surface); color: var(--text-strong); border: 1px solid var(--rule); border-radius: 2px; }

.specimens { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.specimen { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.specimen[hidden] { display: none; }
.tray { position: relative; display: grid; place-items: center; height: 9.5rem; background: var(--bg-sunk); border-bottom: 1px solid var(--rule); color: var(--accent-fill); overflow: hidden; }
.tray::after { content: attr(data-no); position: absolute; top: .5rem; left: .7rem; font-family: var(--font-mono); font-size: .9rem; color: var(--text-muted); }
.tray svg { width: 60%; height: 70%; }
.specimen .body { padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.specimen .meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; font-size: 1rem; }
.specimen .cat { font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--accent-text); font-size: 1.05rem; }
.specimen .added { font-style: italic; color: var(--text-muted); }
.specimen h2 { font-family: var(--font-body); font-weight: 600; font-size: 1.3rem; line-height: 1.25; }
.specimen h2 a { color: var(--text-strong); text-decoration: none; }
.specimen h2 a::after { content: ""; position: absolute; inset: 0; }
.specimen:hover { border-color: var(--link); }
.specimen:hover h2 a { color: var(--link); text-decoration: underline; }
.specimen:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.specimen h2 a:focus-visible { outline: none; }
.specimen p { margin: 0; font-size: 1.08rem; line-height: 1.5; }
.specimen .tags { margin-top: auto; padding-top: .5rem; font-size: .98rem; }
.empty-drawer { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--rule); }
.empty-drawer h2 { font-size: 2rem; }

/* pattern detail */
.back { display: inline-flex; align-items: center; min-height: 44px; font-style: italic; margin-top: 2rem; }
.pd-head { max-width: 64rem; padding: 1.5rem 0 1rem; }
.pd-head h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: .4rem 0 1rem; line-height: 1; }
.pd-dates { font-style: italic; color: var(--text-muted); margin: 0 0 1rem; }
.reach { margin: 1.5rem 0; padding: 1.2rem 1.4rem; border: 1px solid var(--rule); background: var(--surface); }
.reach h2 { font-family: var(--font-body); font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: 1.15rem; color: var(--accent-text); }
.reach ul { columns: 2 16rem; margin: .5rem 0 0; padding-left: 1.3rem; }
.reach li { break-inside: avoid; padding: .2rem 0; }

.panes { margin: 2rem 0 4rem; border: 1px solid var(--rule); background: var(--surface); box-shadow: var(--shadow); }
.pane-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: stretch; border-bottom: 3px double var(--rule); background: var(--bg-sunk); }
.pane-tabs { display: flex; overflow-x: auto; }
.pane-tabs button { min-height: 50px; padding: .4rem 1.1rem; background: transparent; border: 0; border-right: 1px solid var(--rule-soft); font: 1.1rem var(--font-body); color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.pane-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text-strong); font-weight: 600; box-shadow: inset 0 3px 0 var(--link); }
.pane-tabs button:hover { color: var(--link); }
.pane-actions { display: flex; gap: .5rem; align-items: center; padding: .35rem .6rem; }
.pane-actions button { min-height: 44px; padding: .3rem .9rem; font: italic 1.02rem var(--font-body); background: var(--surface); color: var(--text-strong); border: 1px solid var(--rule); border-radius: 3px; cursor: pointer; }
.pane-actions button:hover { border-color: var(--link); color: var(--link); }
.pane-actions button[hidden] { display: none; }
.pane { padding: clamp(1rem, 3vw, 2rem); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; padding: 1.1rem; background: var(--blotter); color: var(--blotter-text); overflow-x: auto; font-size: .95rem; line-height: 1.55; max-height: 34rem; }
.pane .pane-note { margin: 0 0 1rem; font-style: italic; }
.pane .pane-note code { font-size: .9em; background: var(--bg-sunk); padding: 0 .25em; }
.prompt-text { max-width: 44rem; font-size: 1.15rem; }
.prompt-text code { font-size: .9em; background: var(--bg-sunk); padding: 0 .25em; }

/* the live specimen: hairline stat strip, themed with the library tokens */
.stage { --ground: var(--bg); --hs-surface: var(--surface); --hs-border: var(--rule); --hs-ink: var(--text-strong); --hs-dim: var(--text-muted); --hs-accent: var(--link); padding: 1.5rem; background: var(--bg); border: 1px solid var(--rule-soft); container-type: inline-size; }
.stage .hss-caption { font-style: italic; color: var(--hs-dim); margin: 0 0 .7rem; font-size: 1.08rem; }
.hss-strip { display: grid; gap: 1px; background: var(--hs-border); border: 1px solid var(--hs-border); border-radius: 6px; overflow: hidden; grid-template-columns: 1fr; margin: 0 0 1.8rem; padding: 0; list-style: none; }
@container (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 42rem) { .hss-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hss-strip.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 56rem) { .hss-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hss-tile { background: var(--hs-surface); padding: .9rem 1rem; min-width: 0; }
.hss-label { display: block; font-family: var(--font-mono); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--hs-dim); overflow-wrap: anywhere; }
.hss-figure { display: block; font-size: 1.8rem; font-weight: 700; line-height: 1.15; color: var(--hs-ink); font-variant-numeric: lining-nums tabular-nums; }
.hss-figure.missing { color: var(--hs-dim); font-weight: 400; }
.hss-sub { display: block; font-size: 1rem; font-style: italic; color: var(--hs-dim); }
button.hss-tile { font: inherit; text-align: left; border: 0; cursor: pointer; color: inherit; min-height: 44px; }
button.hss-tile:hover { background: color-mix(in srgb, var(--hs-accent) 7%, var(--hs-surface)); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--hs-accent) 14%, var(--hs-surface)); box-shadow: inset 0 -3px 0 var(--hs-accent); }
button.hss-tile:focus-visible { outline-offset: -4px; }
.hss-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hs-border); }
.hss-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--hs-border); }
.hss-list li[hidden] { display: none; }
.hss-list .st { font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--hs-dim); white-space: nowrap; }
.hss-status { font-style: italic; margin: .8rem 0 0; }

/* ---------- Footer ---------- */
.colophon { margin-top: 6rem; background: var(--band); color: var(--band-text); }
.colophon::before {
  content: ""; display: block; height: 3.5rem;
  background-color: #2c3b4f;
  background-image:
    url("assets/marbled-endpaper.jpg"),
    radial-gradient(ellipse 3rem 1.2rem at 20% 40%, #a8452f 40%, transparent 42%),
    radial-gradient(ellipse 4rem 1.4rem at 60% 70%, #c9a24a 35%, transparent 38%),
    radial-gradient(ellipse 2.5rem 1rem at 85% 30%, #6e2a24 40%, transparent 43%),
    repeating-radial-gradient(circle at 30% 120%, #364f6a 0 6px, #1f2d3e 6px 11px, #8d6a2f 11px 13px, #364f6a 13px 20px);
  background-size: cover, 11rem 3.5rem, 13rem 3.5rem, 9rem 3.5rem, auto;
  border-bottom: 2px solid var(--brass-500);
}
.colophon-inner { max-width: var(--page); margin: 0 auto; padding: 3rem var(--gutter) 2rem; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.5fr); gap: 2.5rem; }
.colophon h2 { font-family: var(--font-sc); font-size: 1.3rem; color: var(--band-brass); letter-spacing: .06em; margin-bottom: .6rem; }
.colophon p { color: var(--band-muted); font-size: 1.08rem; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li a { display: inline-flex; min-height: 40px; align-items: center; color: var(--band-text); text-decoration: none; }
.colophon li a:hover { color: #fff; text-decoration: underline; }
.colophon .wordmark { margin-bottom: 1rem; }
.colophon .nl-row input[type=email] { background: #1d130e; color: var(--band-text); border-color: #5b4632; border-bottom-color: var(--band-brass); }
.colophon .nl-row input[type=email]::placeholder { color: #b8a484; }
.colophon .nl-status.is-success { color: var(--bottle-300); }
.colophon :focus-visible { outline-color: var(--brass-300); }
.colophon-base { max-width: var(--page); margin: 0 auto; padding: 1.2rem var(--gutter) 2rem; border-top: 1px solid #4a3627; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; color: var(--band-muted); font-size: 1rem; font-style: italic; }
@media (max-width: 900px) { .colophon-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .colophon-inner { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .index-card:hover, .spine a:hover, .volume a:hover .cover { transform: none; }
}

.colophon .nl-form label { color: var(--band-muted); }

/* UI pattern library article */
.prose .prose-fig { margin: 2rem 0; }
.prose .prose-fig img { height: auto; display: block; }
.prose blockquote.note p + p { margin-top: .8rem; }
.prose .live-pattern a.btn { white-space: normal; text-decoration: none; height: auto; }
.prose p code { overflow-wrap: anywhere; }
