/*
Theme Name: Lice of Doom
Theme URI: https://theliceofdoom.com
Description: A custom theme for a fiction and poetry site. Bold typographic entry pages, a silent reading room, one colour per title. Preserves poem spacing exactly. Built for privacy: no author archives, no user API, no external requests beyond optional web fonts.
Version: 2.5.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lice-of-doom
Tags: blog, one-column, custom-colors, editor-style, full-width-template
*/

/* ============================================================
   1. TOKENS
   Light palette on bare :root. Dark redefines tokens only,
   guarded so an explicit light choice always wins.
   ============================================================ */

:root {
  --paper:      #F8F8F8;
  --paper-2:    #EFEFEF;
  --paper-3:    #E4E4E4;
  --ink:        #16181F;
  --ink-soft:   #565B67;
  --ink-faint:  #8A8F99;
  --rule:       #D8DADE;
  --accent:     #7B2D26;
  --accent-2:   #A8564D;

  /* one colour per title, after Barbara Martin's Black Sparrow covers */
  --c-madder:   #7B2D26;
  --c-ochre:    #8A6516;
  --c-ultra:    #2C3F84;
  --c-moss:     #40563A;
  --c-plum:     #5C2E52;
  --c-slate:    #21545E;

  --font-display: "Bodoni Moda", Didot, "Times New Roman", serif;
  --font-read:    "Spectral", Georgia, "Times New Roman", serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --rail: 13rem;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #131519;
    --paper-2:    #191C22;
    --paper-3:    #21242C;
    --ink:        #E5E6E9;
    --ink-soft:   #969BA6;
    --ink-faint:  #6B707B;
    --rule:       #2A2E36;
    --accent:     #C4564A;
    --accent-2:   #8E3B33;

    --c-madder:   #C4564A;
    --c-ochre:    #C9992F;
    --c-ultra:    #7189D8;
    --c-moss:     #8BA872;
    --c-plum:     #B274A6;
    --c-slate:    #5FA6B2;
  }
}

:root[data-theme="dark"] {
  --paper:      #131519;
  --paper-2:    #191C22;
  --paper-3:    #21242C;
  --ink:        #E5E6E9;
  --ink-soft:   #969BA6;
  --ink-faint:  #6B707B;
  --rule:       #2A2E36;
  --accent:     #C4564A;
  --accent-2:   #8E3B33;

  --c-madder:   #C4564A;
  --c-ochre:    #C9992F;
  --c-ultra:    #7189D8;
  --c-moss:     #8BA872;
  --c-plum:     #B274A6;
  --c-slate:    #5FA6B2;
}

/* ============================================================
   2. SELF-HOSTED FONTS
   Active only when LOD_SELF_HOST_FONTS is enabled in
   functions.php and the files are present in assets/fonts/.
   Falls back silently to the stacks above.
   ============================================================ */

.lod-self-hosted-fonts {
  /* marker class; @font-face rules live in assets/fonts/fonts.css */
}

/* ============================================================
   3. BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-read);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

img, svg, video { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   4. SHELL + RAIL
   ============================================================ */

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  border-right: 1px solid var(--rule);
  padding: 2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}

.mark {
  font-family: var(--font-display);
  font-size: 1.68rem;
  line-height: 0.92;
  letter-spacing: -0.015em;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.mark small {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav { display: flex; flex-direction: column; gap: 0.1rem; counter-reset: lodnav; }
.nav ul { list-style: none; margin: 0; padding: 0; display: contents; }
.nav a::before {
  counter-increment: lodnav;
  content: counter(lodnav, lower-roman);
  display: inline-block;
  min-width: 2.5em;
  color: var(--ink-faint);
}
.nav .current-menu-item > a::before,
.nav a[aria-current="page"]::before { color: var(--accent); }
.nav li { display: block; }
.nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.6rem 0;
  display: block;
  border-top: 1px solid var(--rule);
  transition: color 0.18s ease;
}
.nav li:last-child a { border-bottom: 1px solid var(--rule); }
.nav a:hover { color: var(--ink); }
.nav .current-menu-item > a,
.nav a[aria-current="page"] { color: var(--accent); }

.rail-foot {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.9;
}

.reg { width: 22px; height: 22px; opacity: 0.55; display: block; margin-bottom: 0.9rem; }
.reg line, .reg circle { stroke: var(--accent); stroke-width: 1; fill: none; }

.site-main { min-width: 0; }

.pad { padding: 4.5rem clamp(1.5rem, 5vw, 4.5rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.6rem;
}

/* ============================================================
   5. FRONT PAGE
   ============================================================ */

.hero { padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3rem); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.4rem, 12.5vw, 11rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.hero h1 .thin { font-weight: 300; }

.hero-sub {
  margin: 2.6rem 0 0;
  max-width: 30rem;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 300;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.front-piece {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding: clamp(1.5rem, 5vw, 4.5rem);
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: start;
}
.front-piece h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 1.2rem;
  text-wrap: balance;
}
.front-piece h2 a { text-decoration: none; }
.front-piece h2 a:hover { color: var(--accent); }
.front-piece p { margin: 0 0 1.1rem; color: var(--ink-soft); font-weight: 300; }

.pull {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--accent);
}

.link {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-2);
  padding-bottom: 2px;
}
.link:hover { color: var(--ink); border-color: var(--ink); }

/* ============================================================
   6. THE RUNNING PAGE — every piece in full, newest first
   ============================================================ */

.stream {
  padding: 0 clamp(1.5rem, 5vw, 4.5rem) 6rem;
}
.stream-inner { max-width: var(--measure); margin: 0 auto; }

.piece {
  --accent: var(--piece);
  --accent-2: var(--piece);
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--rule);
}
.piece:first-child { border-top: 0; padding-top: clamp(2rem, 4vw, 3rem); }

.piece-head { margin-bottom: 2.2rem; }
.piece-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}
.piece-head h2 a { text-decoration: none; }
.piece-head h2 a:hover { color: var(--piece); }

.piece-preview { margin-top: -0.6rem; }
.piece-preview > p {
  margin: 0 0 0.6em;
  font-size: 1.04rem;
  line-height: 1.7;
  font-weight: 300;
  color: var(--ink-soft);
}
.piece-preview .wp-block-verse.is-preview {
  margin: 0;
  font-size: 1.04rem;
  color: var(--ink-soft);
}

.piece { padding: clamp(2.2rem, 4.5vw, 3.2rem) 0; }
.piece-head { margin-bottom: 1.3rem; }
.piece-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }

.piece-links {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.piece-links a { color: var(--piece); text-decoration: none; border-bottom: 1px solid transparent; }
.piece-links a:hover { border-color: var(--piece); }
.piece-links a:hover { color: var(--piece); }
.piece-links .share-btn { padding: 0; border: 0; font-size: inherit; letter-spacing: inherit; color: var(--ink-faint); }
.piece-links .share-btn:hover { color: var(--piece); }

.stream-empty { padding: 3rem 0; }

/* ---- legacy shelf styles kept for archives/search ---- */

.reel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--ink);
}
.reel-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.94;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
}

.filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filters a {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  padding: 0.42rem 0.85rem;
}
.filters a:hover { color: var(--ink); border-color: var(--ink-soft); }
.filters a.is-on { border-color: var(--ink); color: var(--paper); background: var(--ink); }

.entries { display: flex; flex-direction: column; margin-top: 3rem; }

.entry {
  --piece: var(--accent);
  display: grid;
  grid-template-columns: 2.1rem 6.6rem minmax(0, 1fr);
  gap: clamp(0.9rem, 2.6vw, 2.2rem);
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: stretch;
}
.entry:hover h3 a { color: var(--piece); }

.spine {
  background: var(--piece);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0;
  min-height: 5.5rem;
  transition: transform 0.22s ease;
  transform-origin: bottom center;
}
.entry:hover .spine { transform: scaleY(1.05); }
.spine span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #F2F2F0;
  white-space: nowrap;
}

.entry .idx {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.9;
  font-variant-numeric: tabular-nums;
}
.entry .idx b { display: block; color: var(--piece); font-weight: 500; }

.entry h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
  text-wrap: balance;
}
.entry h3 a { text-decoration: none; transition: color 0.18s ease; }

.entry p { margin: 0; color: var(--ink-soft); font-weight: 300; max-width: 40rem; font-size: 1.02rem; }

.flag {
  display: inline-block;
  margin-top: 0.8rem;
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--piece);
  border: 1px solid currentColor;
  padding: 0.16rem 0.5rem;
}

.entry.feature { grid-template-columns: 4.5rem minmax(0, 1fr); padding-top: 0; align-items: start; }
.entry.feature .spine { min-height: 11rem; }
.entry.feature .spine span { font-size: 0.62rem; letter-spacing: 0.3em; }
.entry.feature h3 { font-size: clamp(2.2rem, 6.4vw, 4.5rem); letter-spacing: -0.03em; }
.entry.feature .idx { margin-bottom: 1rem; }
.entry.feature p { font-size: 1.15rem; max-width: 34rem; }

.pagination {
  display: flex;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pagination .page-numbers {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink-soft);
}
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ============================================================
   7. THE READING ROOM
   ============================================================ */

.reading { padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4.5rem) 7rem; }
.reading-inner { max-width: var(--measure); margin: 0 auto; }

.piece-head { margin-bottom: 3.2rem; }
.piece-band { height: 7px; width: 4.5rem; background: var(--accent); margin-bottom: 1.5rem; }
.piece-head .eyebrow { margin-bottom: 1.1rem; }
.piece-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.piece-head .byline {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.piece-head .byline .adv { color: var(--accent); }

/* --- prose --- */

.entry-content > p {
  margin: 0 0 1.5rem;
  font-size: 1.09rem;
  line-height: 1.78;
  font-weight: 300;
}
.is-prose .entry-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 3.9em;
  line-height: 0.78;
  padding: 0.06em 0.1em 0 0;
  color: var(--accent);
  font-weight: 500;
}

.entry-content h2, .entry-content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 2.4rem 0 0.9rem;
  text-wrap: balance;
}
.entry-content h2 { font-size: 1.7rem; }
.entry-content h3 { font-size: 1.35rem; }

.entry-content a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.entry-content blockquote {
  margin: 2rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--ink);
}

.entry-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.6rem 0;
}

.entry-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-top: 0.5rem;
}

/* --- THE POEM ---
   core/verse saves as <pre class="wp-block-verse">, which preserves
   every space and line break. wpautop never touches it. We restyle
   it off monospace and give each line a hanging indent, so a line
   that wraps at the screen edge can never be mistaken for a line
   the poet broke on purpose. --- */

.wp-block-verse {
  font-family: var(--font-read);
  font-size: 1.06rem;
  line-height: 1.78;
  font-weight: 300;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow-x: auto;
  margin: 0 0 1.8rem;
  padding: 0;
  background: none;
  color: var(--ink);
}
.wp-block-verse .verse-line {
  display: block;
  padding-left: 1.7em;
  text-indent: -1.7em;
}
.wp-block-verse .verse-line:empty::after { content: "\00a0"; }

/* The signature, where an author's name would normally go. */
.signature {
  margin: 3.2rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: right;
  text-wrap: balance;
}

/* ---- the share row ---- */

.share {
  margin-top: 2.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
}
.share-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.85rem;
}
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.share-btn {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--rule);
  padding: 0.42rem 0.8rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.share-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.share-btn[data-copied="true"] {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}

.piece-foot {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: space-between;
}
.piece-foot a { color: var(--accent); text-decoration: none; }
.piece-foot a:hover { color: var(--ink); }

/* ============================================================
   8. PAGES (advisory, author, generic)
   ============================================================ */

.page-narrow { max-width: 46rem; }
.page-narrow h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.028em;
  margin: 0 0 1.8rem;
  text-wrap: balance;
}
.page-narrow .entry-content > p { max-width: 34rem; }
.page-narrow .entry-content > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.62;
  color: var(--ink);
}

.page-narrow .entry-content ul {
  list-style: none;
  padding: 0;
  margin: 2.6rem 0;
  max-width: 36rem;
}
.page-narrow .entry-content ul li {
  padding: 0.95rem 0;
  border-top: 1px solid var(--rule);
  font-weight: 300;
}
.page-narrow .entry-content ul li:last-child { border-bottom: 1px solid var(--rule); }
.page-narrow .entry-content ul li strong { display: block; font-weight: 600; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   8b. VORD WOMIT — a histogram of words
   Bars sit on a baseline. Height = words in the group, capped;
   past the cap a bar widens into further columns instead.
   ============================================================ */

.womit-sum {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 2.6rem;
}

.womit-chart {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 1rem;
  margin-top: 1rem;
}
.womit-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  width: max-content;
  min-width: 100%;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ink);
}
.womit-bar {
  --line: 1.3em;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: none;
}
.womit-stack {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.55rem;
  columns: var(--cols);
  column-gap: 1.2rem;
  column-fill: auto;
  height: calc(var(--rows) * var(--line) + 0.7rem + 0.5em);
  width: calc(var(--cols) * 8em + (var(--cols) - 1) * 1rem + 1.1rem);
  column-gap: 1rem;
  font-family: var(--font-read);
  font-size: 0.8rem;
  font-weight: 300;
  line-height: var(--line);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-bottom: 0;
}
.womit-stack li {
  break-inside: avoid;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.womit-axis {
  padding: 0.55rem 0.55rem 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  white-space: nowrap;
  border-top: 2px solid var(--ink);
  margin-top: -2px;
}
.womit-axis b { color: var(--accent); font-weight: 500; }

@media (max-width: 860px) {
  .womit-stack { font-size: 0.8rem; }
}

/* ============================================================
   9. 404 + FOOTER
   ============================================================ */

.site-footer {
  padding: 2.2rem clamp(1.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: space-between;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
a.lod-contact { cursor: pointer; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
a.lod-contact:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   10. RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    flex-direction: row;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
    padding: 1.1rem clamp(1.5rem, 5vw, 3rem);
  }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 0.9rem; }
  .nav ul { display: flex; flex-wrap: wrap; gap: 0.9rem; }
  .nav a { border: 0 !important; padding: 0.2rem 0; }
  .rail-foot { display: none; }
  .mark small { margin-top: 0.2rem; }
  .front-piece { grid-template-columns: minmax(0, 1fr); }
  .entry { grid-template-columns: 1.7rem minmax(0, 1fr); gap: 0.9rem; }
  .entry .spine { grid-row: 1 / span 2; min-height: 100%; }
  .entry .idx { line-height: 1.6; }
  .entry.feature { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .entry.feature .spine { grid-row: 1; }
  .pad { padding: 2.8rem clamp(1.2rem, 5vw, 3rem); }
}

/* ============================================================
   11. PRINT — poems should print correctly too
   ============================================================ */

@media print {
  .rail, .site-footer, .piece-foot, .filters { display: none; }
  .shell { display: block; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .wp-block-verse { color: #000; }
  .reading { padding: 0; }
}
