/* Editorial Design, for /worlds/lord-of-the-rings/ and /red-book/ (style: editorial).

   Tolkien's world reaches us as a book, with appendices, maps and the Red
   Book itself, so this is a fine-press edition of it, read at night: a warm
   black stock, the type in bone, and a second ink, vermilion, for the
   rubrics. Two-colour books printed their initials, chapter numerals and
   running heads in red; here that red is also the Red Book's own. The
   chapter heads are set in EB Garamond, the Red Book's book face, so the
   pair share one font file; reading text stays Inter and labels stay
   JetBrains Mono.

   The signature: the page is laid out as a book's chapters, each section
   numbered in red Roman capitals hung in the margin, and the books and
   films are set as a contents page, each with its chapter numeral and a
   dotted leader running to its date where the folio would stand. Drop caps
   open the chapters, pull quotes hang their marks in the margin, and the
   Road opens as a fold-out map: seven panels creased like an accordion
   fold, which unfold when the section is opened.

   The card's two risks, answered: nothing is ruled. No hairline runs under
   a heading or between columns; every section is whole leaves of a lighter
   stock with space between them. And the serif stays upright: italics are
   left only where the Red Book already had them.

   One file for the pair, in three parts: the inks, the stock and the face;
   the world page; and the Red Book, which keeps its vellum title plate and
   its study, and takes the same chapter heads, numerals, leaves and rubric,
   with its road set as the book's contents (each waypoint's name leading
   to the page it stands for, set where the folio goes). The spec:
   docs/superpowers/specs/2026-10-11-page-styles-design.md, section 9.

   Everything here is scoped to :root[data-style="editorial"], so this file
   does nothing on a page that is not wearing it. Material rules use
   :where() for that scope, so they weigh what the rule they restyle weighs
   and each page's own hover, focus and open states still win. */

/* ── 1. shared: the inks, the stock, the face ───────────────────────────── */
:root[data-style="editorial"] {
  --ed-night: #0e0c0b;              /* the page: warm black stock */
  --ed-leaf: #1a1614;               /* a leaf of it, a shade up, solid */
  --ed-leaf-hi: #221d1a;
  --ed-edge: rgba(239, 230, 211, .07);
  --ed-bone: #efe6d3;
  --ed-rubric: #e46a4c;             /* vermilion: 5.5:1 on a leaf */
  --ed-rubric-paper: #8a2716;       /* the same ink laid on vellum */
  --ed-gold: #d9b45f;               /* the Ring's, and the world's */
  --ed-face: "EB Garamond", Georgia, serif;
  --ed-drop: 0 30px 44px -36px #000;

  --bg: var(--ed-night);
  --bg-2: #15120f;
  --ink: var(--ed-bone);
  --ink-dim: #c2b8a6;
  --mute: #9d9486;
  --line: #2b2521;

  /* the world page's shared components read these (base.css) */
  --s-surface: var(--ed-leaf);
  --s-surface-hi: var(--ed-leaf-hi);
  --s-edge: var(--ed-edge);
  --s-bw: 1px;
  --s-r: 0px;
  --s-r-sm: 0px;
  --s-shadow: var(--ed-drop);
  --s-shadow-hi: 0 36px 50px -34px #000;
  --s-lift: -2px;
  --s-display: var(--ed-face);
  --s-display-w: 500;
  --s-display-ls: -0.012em;
  /* candlelight gold for the keyboard ring, on both pages */
  --s-focus: #edc66f;

  /* the bars: the same black stock, squared, with no glass */
  --s-bar: rgba(12, 10, 9, .97);
  --s-bar-edge: rgba(239, 230, 211, .1);
  --s-bar-r: 3px;
  --s-bar-blur: none;
  --s-bar-shadow: 0 22px 40px -26px rgba(0, 0, 0, .85);

  /* a little tooth in the paper, no circuit field, no HUD lattice; the
     light that follows the pointer stays, as a candle carried over the page */
  --s-grain: 0.035;
  --s-vignette: 0.8;
  --s-field: 0;
  --hud-grid: transparent;
  --hud-scan: transparent;
  --hud-sweep: transparent;
  --hud-lit: transparent;
  --hud-halo: rgba(255, 196, 128, .045);
  scrollbar-color: #3b332d var(--ed-night);
}
/* Increase Contrast: a darker stock and brighter inks, each at least as far
   from the ground as the site's own boost puts its own */
@media (prefers-contrast: more) {
  :root[data-style="editorial"] {
    --ed-night: #070605; --ed-leaf: #15110f; --ed-leaf-hi: #1d1815; --ed-bone: #f7f1e6;
    --ed-edge: rgba(239, 230, 211, .3);
    --ink-dim: #d8cfbf; --mute: #b6ad9f; --line: #4a413a;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root[data-style="editorial"] { --s-bar: #0c0a09; }
}
:root[data-style="editorial"] ::selection { background: var(--ed-rubric); color: #140c09; }

/* ── 2. the world page: the edition ─────────────────────────────────────── */

/* No page-wide accent: every card and tile sets its own --a. Only the tab
   bar, outside every item, takes the world's gold. */
:root[data-style="editorial"] .tabbar { --s-accent: var(--ed-gold); }

/* The night outside the window: the same sky, and the beacon range drawn as
   an engraving, in outline, the way Tolkien drew mountains on his maps. The
   beacons still catch one after another. The whole sky is capped at .36. */
:root[data-style="editorial"] .lotr-sky {
  background: radial-gradient(80% 60% at 50% 0%, #1c1815 0%, #0e0c0b 50%, #070605 100%);
}
:root[data-style="editorial"] :is(.lb-far, .lb-near) {
  stroke: var(--ed-bone); stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
:root[data-style="editorial"] .lb-far { fill: none; stroke-opacity: .28; }
:root[data-style="editorial"] .lb-near { fill: #0b0908; stroke-opacity: .45; }

/* ── the title page ──
   The name of the work as large as the measure allows, in Garamond, with
   its initial in red. */
:root[data-style="editorial"] .fan-title {
  font-family: var(--ed-face); font-weight: 500; font-size: clamp(3rem, 7.4vw, 6rem);
  line-height: .98; letter-spacing: var(--s-display-ls); text-transform: none;
  color: var(--ed-bone); text-wrap: balance;
}
:root[data-style="editorial"] .fan-title::first-letter { color: var(--ed-rubric); }
:root[data-style="editorial"] .fan-kicker { color: var(--ink-dim); }

/* Drop caps: a chapter's opening lines, and the West-gate's, begin with an
   initial three lines deep, cut in Garamond and printed in the rubric. The
   browser sinks it to the third baseline where it can; elsewhere it is
   floated to about the same depth. */
:root[data-style="editorial"] :is(.fan-lede, .fan-art-by + p)::first-letter {
  font-family: var(--ed-face); font-weight: 500; color: var(--ed-rubric);
  -webkit-initial-letter: 3; initial-letter: 3; margin-right: .16em;
}
@supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
  :root[data-style="editorial"] :is(.fan-lede, .fan-art-by + p)::first-letter {
    float: left; font-size: 5.4em; line-height: .8; margin: .05em .1em 0 0;
  }
}
:root[data-style="editorial"] .fan-lede { max-width: 62ch; text-wrap: pretty; }

/* the links and the door to the Red Book: squared, in the book's inks; the
   door is a bookplate pasted inside the cover, in the same red as the Red
   Book's own world button. A bookplate is printed on a paler leaf than the
   pages and framed twice in the second ink, a rule and a hairline inside
   it, with the owner's name set in the book face; that frame is what tells
   it from a plain bordered box at a glance. */
:where(:root[data-style="editorial"]) .fan-link { border-color: rgba(239, 230, 211, .42); }
:where(:root[data-style="editorial"]) .fan-iface {
  --ed-plate: #2a2420;
  padding: 0.95rem 1rem 0.95rem 1.35rem;
  background: var(--ed-plate);
  border: 2px solid var(--ed-rubric);
  box-shadow: inset 0 0 0 4px var(--ed-plate), inset 0 0 0 5px color-mix(in srgb, var(--ed-rubric) 70%, transparent), var(--ed-drop);
}
:where(:root[data-style="editorial"]) .fan-iface-k { color: color-mix(in srgb, var(--ed-rubric) 70%, #fff); }
:root[data-style="editorial"] .fan-iface b {
  font-family: var(--ed-face); font-weight: 500; font-size: 1.42rem; line-height: 1.1; letter-spacing: 0; color: var(--ed-bone);
}
:where(:root[data-style="editorial"]) .fan-iface-a { border-radius: 0; color: var(--ed-rubric); border-color: color-mix(in srgb, var(--ed-rubric) 50%, transparent); }
@media (hover: hover) {
  :where(:root[data-style="editorial"]) .fan-iface:hover { --ed-plate: #312a25; border-color: var(--ed-rubric); background: var(--ed-plate); }
}

/* ── chapters ──
   Every section is a chapter: its name in Garamond, its number in red Roman
   capitals. On a wide page the numeral hangs in the left margin, outside
   the measure, as a book sets it; narrower, it leads the line. The note
   stays in its own mono under the name. Nothing is ruled after it. */
:root[data-style="editorial"] #fanBody { counter-reset: ed-ch; }
:root[data-style="editorial"] #fanBody > .fan-sec { counter-increment: ed-ch; }
:where(:root[data-style="editorial"]) .subsec--fan { color: var(--ed-bone); }
:root[data-style="editorial"] .subsec--fan {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline; column-gap: .55em; row-gap: .55rem;
  font-family: var(--ed-face); font-weight: 500; font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.06; letter-spacing: var(--s-display-ls); text-transform: none; text-wrap: balance;
}
:root[data-style="editorial"] .subsec--fan::before {
  content: counter(ed-ch, upper-roman); grid-column: 1; grid-row: 1;
  font-size: .62em; letter-spacing: .04em; color: var(--ed-rubric);
}
:root[data-style="editorial"] .subsec--fan::after { content: none; }
:root[data-style="editorial"] .subsec--fan .subsec-yr {
  grid-column: -2; grid-row: 2; font-family: var(--mono); font-size: 0.7rem;
  font-weight: 400; line-height: 1.5; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute);
}
/* hung: the heading reaches back into the margin by the numeral's own
   column, so the name still starts on the measure and the numeral sits on
   its baseline */
@media (min-width: 1100px) {
  :root[data-style="editorial"] .subsec--fan { grid-template-columns: 4.4rem minmax(0, 1fr); column-gap: 1.2rem; margin-left: -5.6rem; }
  :root[data-style="editorial"] .subsec--fan::before { justify-self: end; }
}
/* the folded chapters keep their count and arrow beside the name */
:root[data-style="editorial"] .fan-fold-sum { align-items: baseline; }
:root[data-style="editorial"] .fan-fold-sum:focus-visible .subsec--fan { filter: none; }
@media (hover: hover) {
  :root[data-style="editorial"] .fan-fold-sum:hover .subsec--fan { filter: none; }
}
:root[data-style="editorial"] #fanBody > .fan-sec { margin-bottom: clamp(3.4rem, 6vw, 4.8rem); }

/* the pages of the book: leaves of a lighter stock, square, unruled, with a
   long soft shadow under each, and every word on them at 4.5:1 or better */
:where(:root[data-style="editorial"]) :is(.fan-land, .fan-intro-when, .fp-bar, .fp-out, .lotr-doors) {
  background: var(--ed-leaf); border-radius: 0; box-shadow: var(--ed-drop);
}
:where(:root[data-style="editorial"]) :is(.fan-land, .fp-bar) { border-color: var(--ed-edge); }
:where(:root[data-style="editorial"]) :is(.fan-intro-when, .fp-out) { border-left: 0; padding: 1.3rem 1.5rem; }
:where(:root[data-style="editorial"]) .fan-intro-when { max-width: 52rem; }
@media (hover: hover) {
  :where(:root[data-style="editorial"]) :is(.fan-card, .fan-land, .fan-linkcard):hover { background: var(--ed-leaf-hi); }
}

/* A tag reads as the running head at the top of a page: small capitals in
   the item's own colour, no pill. An item's colour (a tag, a subtitle, a
   tile's caption, its Play and Listen) is lifted a quarter toward white to
   hold its contrast on the leaf; :where keeps hover and playing winning. */
:where(:root[data-style="editorial"]) .fan-tag { border: 0; padding: 0; letter-spacing: 0.2em; }
:root[data-style="editorial"] :is(.fan-tiletext i, .fan-card .fan-sub, .fan-land-sub) { color: color-mix(in srgb, var(--a) 75%, #fff); opacity: 1; }
:where(:root[data-style="editorial"]) :is(.fan-tag, .fan-visit, .fan-hear) { color: color-mix(in srgb, var(--a) 75%, #fff); }
/* the site's floor for small print is 0.66rem; the labels this page
   inherited under it are raised to it */
:root[data-style="editorial"] :is(.fan-tag, .fan-sub, .fan-meta, .fan-tiletext i, .fan-visit, .fan-hear, .fan-land-sub, .fan-land-count, .fan-linkhost, .fan-ride i, .fan-when-k, .fan-fold-n, .fp-tally, .fp-out span) { font-size: 0.66rem; }
/* the foot line of a card sits in the outer corner, where a folio goes */
:root[data-style="editorial"] .fan-card > .fan-meta { justify-self: end; text-align: right; }

/* titles in the book face */
:root[data-style="editorial"] .fan-card :is(h2, h3, h4, h5) { font-family: var(--ed-face); font-weight: 600; font-size: 1.42rem; line-height: 1.12; letter-spacing: 0; }
:root[data-style="editorial"] :is(.fan-tiletext b, .fan-linkhead b, .fan-land-head h3) { font-family: var(--ed-face); font-weight: 600; font-size: 1.14rem; letter-spacing: 0; line-height: 1.18; }
:root[data-style="editorial"] .fan-tiles--compact .fan-tiletext b { font-size: 1.04rem; }
:root[data-style="editorial"] .fan-land-head h3 { font-size: 1.5rem; }
/* a work's name is larger now, so its dates may drop under it */
:root[data-style="editorial"] .fan-land-head { flex-wrap: wrap; row-gap: .3rem; }
:root[data-style="editorial"] .wsib-h b { font-family: var(--ed-face); font-weight: 500; font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: 0; }

/* print has no glowing dots: a swatch is a square of the item's ink, and
   each of the Rings of Power is drawn as a ring */
:where(:root[data-style="editorial"]) .fan-swatch { border-radius: 0; box-shadow: none; }
:root[data-style="editorial"] #rings .fan-swatch {
  width: 15px; height: 15px; margin-top: 4px; border-radius: 50%;
  background: none; border: 3px solid var(--a);
}

/* ── the signature: the books and films as chapters with folios ─────────
   "On the page and screen" is the book's table of contents: one leaf, each
   work numbered in red Roman capitals in the margin, its title in Garamond,
   and a dotted leader running from the title to its date, set at the right
   end of the line where the folio stands. The blurb and the in-world dates
   sit under the title as the contents' notes. */
:root[data-style="editorial"] #published .fan-time {
  counter-reset: ed-toc; max-width: 62rem;
  padding: clamp(1rem, 2.6vw, 2rem) clamp(1.1rem, 3vw, 2.6rem) clamp(1rem, 2.6vw, 1.8rem) clamp(.6rem, 2vw, 1.6rem);
  background: var(--ed-leaf); box-shadow: var(--ed-drop);
}
:root[data-style="editorial"] #published .fan-time::before { content: none; }
:root[data-style="editorial"] #published .fan-tick {
  counter-increment: ed-toc; display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto;
  column-gap: 1rem; row-gap: .3rem; align-items: baseline; padding: .85rem 0;
}
:root[data-style="editorial"] #published .fan-tick::before {
  content: counter(ed-toc, upper-roman); position: static; grid-column: 1; grid-row: 1; justify-self: end;
  width: auto; height: auto; border-radius: 0; background: none; box-shadow: none;
  font-family: var(--ed-face); font-weight: 500; font-size: 1.2rem; color: var(--ed-rubric);
}
:root[data-style="editorial"] #published .fan-what { display: contents; }
:root[data-style="editorial"] #published .fan-what b {
  grid-column: 2; grid-row: 1; display: flex; align-items: baseline; gap: .7rem;
  font-family: var(--ed-face); font-weight: 500; font-size: 1.5rem; line-height: 1.15;
}
:root[data-style="editorial"] #published .fan-what b::after,
:root[data-style="editorial"] .rb-n::after {
  content: ""; flex: 1 1 2rem; min-width: 1.2rem; transform: translateY(-.28em);
  border-bottom: 2px dotted color-mix(in srgb, var(--ed-bone) 34%, transparent);
}
:root[data-style="editorial"] #published .fan-when {
  grid-column: 3; grid-row: 1; min-width: 0; padding: 0; text-align: right; color: var(--ink-dim);
}
:root[data-style="editorial"] #published :is(.fan-what em, .fan-tickmeta) { grid-column: 2 / -1; max-width: 42rem; }
/* On a phone a title wraps, so the folio takes a line of its own under it,
   right-aligned, with the leader running in front of it instead. The Red
   Book's road does the same. */
@media (max-width: 640px) {
  :root[data-style="editorial"] #published .fan-tick { grid-template-columns: 2rem minmax(0, 1fr); column-gap: .7rem; }
  :root[data-style="editorial"] #published .fan-what b { font-size: 1.32rem; }
  :root[data-style="editorial"] #published .fan-when { grid-column: 2; grid-row: 2; }
}
@media (max-width: 640px) {
  :root[data-style="editorial"] :is(#published .fan-what b, .rb-n)::after { content: none; }
  :root[data-style="editorial"] :is(#published .fan-when, .rb-real) { display: flex; align-items: baseline; gap: .6rem; }
  :root[data-style="editorial"] :is(#published .fan-when, .rb-real)::before {
    content: ""; flex: 1 1 1.5rem; transform: translateY(-.28em);
    border-bottom: 2px dotted color-mix(in srgb, var(--ed-bone) 34%, transparent);
  }
}

/* "Everything in it" lists the same works the same way: each list numbered
   in the rubric, the leaders it already had running to each year */
:root[data-style="editorial"] .fan-rides { counter-reset: ed-ride; }
:root[data-style="editorial"] .fan-ride { counter-increment: ed-ride; }
:root[data-style="editorial"] .fan-ride::before {
  content: counter(ed-ride, upper-roman); flex: 0 0 2.3rem; padding-right: .6rem; text-align: right;
  font-family: var(--ed-face); font-size: 1.08em; color: var(--ed-rubric);
}
:root[data-style="editorial"] .fan-ride i { color: var(--ink-dim); }
:where(:root[data-style="editorial"]) .fan-ride::after { border-bottom: 2px dotted color-mix(in srgb, var(--ed-bone) 30%, transparent); }
/* the land's colour bar becomes a short red rule over the list, and the
   count at the foot loses its line */
:root[data-style="editorial"] .fan-land-bar { right: auto; left: 1.15rem; width: 2.4rem; height: 3px; background: var(--ed-rubric); opacity: 1; }
:where(:root[data-style="editorial"]) .fan-land-count { border-top-color: transparent; }

/* ── the Road, as the fold-out map ──
   Opened, the Road lies across the page as one long sheet folded in seven
   panels, the route dashed across their heads and each stop a red point on
   it. The panels are shaded as an accordion fold is, alternately toward
   and away from the light, so the creases fall between stops and never
   across a word. On a narrower page the sheet folds the other way and the
   stops run down it. */
:root[data-style="editorial"] #places .fan-time {
  padding: 1rem 1.2rem 1rem 2.6rem; background: var(--ed-leaf); box-shadow: var(--ed-drop);
}
:root[data-style="editorial"] #places .fan-time::before {
  left: 1.25rem; top: 1.6rem; bottom: 1.6rem; width: 0; background: none; opacity: 1;
  border-left: 2px dashed color-mix(in srgb, var(--ed-rubric) 70%, transparent);
}
:root[data-style="editorial"] #places .fan-tick::before {
  left: -1.6rem; width: 10px; height: 10px; background: var(--ed-rubric); box-shadow: 0 0 0 3px var(--ed-leaf);
}
:root[data-style="editorial"] #places .fan-tick:nth-child(odd) { background: linear-gradient(180deg, rgba(255, 244, 226, .028), rgba(0, 0, 0, .1)); }
:root[data-style="editorial"] #places .fan-when { color: color-mix(in srgb, var(--ed-rubric) 70%, #fff); text-transform: uppercase; letter-spacing: .14em; }
:root[data-style="editorial"] #places .fan-what b { font-family: var(--ed-face); font-weight: 600; font-size: 1.22rem; }
@media (min-width: 1100px) {
  :root[data-style="editorial"] #places .fan-time {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0; perspective: 1600px;
  }
  :root[data-style="editorial"] #places .fan-time::before {
    left: 1.2rem; right: 1.2rem; top: 2.3rem; bottom: auto; width: auto; z-index: 1;
    border-left: 0; border-top: 2px dashed color-mix(in srgb, var(--ed-rubric) 70%, transparent);
  }
  :root[data-style="editorial"] #places .fan-tick {
    flex-direction: column; flex-wrap: nowrap; gap: .45rem; padding: 3.5rem 1.1rem 1.6rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, .16), rgba(255, 244, 226, .03));
  }
  :root[data-style="editorial"] #places .fan-tick:nth-child(odd) { background: linear-gradient(90deg, rgba(255, 244, 226, .045), rgba(0, 0, 0, .12)); }
  :root[data-style="editorial"] #places .fan-tick::before { left: 1.1rem; top: calc(2.3rem - 4px); z-index: 2; }
  :root[data-style="editorial"] #places .fan-when { min-width: 0; }
}
/* opening the section unfolds the sheet, panel after panel. Transform and
   opacity only; without motion the map is simply open. */
@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
  :root[data-style="editorial"] #places .fan-fold[open] .fan-tick {
    transform-origin: 0 50%; animation: ed-unfold .75s var(--ease) both;
    animation-delay: calc(var(--ed-n, 0) * 80ms);
  }
  :root[data-style="editorial"] #places .fan-tick:nth-child(2) { --ed-n: 1; }
  :root[data-style="editorial"] #places .fan-tick:nth-child(3) { --ed-n: 2; }
  :root[data-style="editorial"] #places .fan-tick:nth-child(4) { --ed-n: 3; }
  :root[data-style="editorial"] #places .fan-tick:nth-child(5) { --ed-n: 4; }
  :root[data-style="editorial"] #places .fan-tick:nth-child(6) { --ed-n: 5; }
  :root[data-style="editorial"] #places .fan-tick:nth-child(7) { --ed-n: 6; }
}
@keyframes ed-unfold { from { opacity: 0; transform: rotateY(-80deg); } to { opacity: 1; transform: none; } }

/* ── pull quotes ──
   Each line is a leaf with its opening mark hung in the margin in red; the
   first is set large across the page, the way a pull quote leads. The
   coloured spine goes. */
:where(:root[data-style="editorial"]) .fan-quote {
  position: relative; padding: 1.5rem 1.5rem 1.4rem 3.2rem;
  border-left: 0; border-radius: 0; background: var(--ed-leaf); box-shadow: var(--ed-drop);
}
@media (hover: hover) {
  :where(:root[data-style="editorial"]) .fan-quote:hover { background: var(--ed-leaf-hi); box-shadow: var(--s-shadow-hi); }
}
:root[data-style="editorial"] :is(.fan-quote, .ring-note blockquote)::before {
  content: "\201C"; position: absolute; left: .8rem; top: .5rem;
  font: 500 3.6rem/1 var(--ed-face); color: var(--ed-rubric);
}
:root[data-style="editorial"] .fan-quote blockquote { font-family: var(--ed-face); font-size: 1.36rem; line-height: 1.3; letter-spacing: 0; }
:root[data-style="editorial"] .fan-quotes > .fan-quote:first-child { grid-column: 1 / -1; padding: 2rem 2rem 1.8rem 4.4rem; }
:root[data-style="editorial"] .fan-quotes > .fan-quote:first-child::before { font-size: 5.4rem; left: 1rem; top: .7rem; }
:root[data-style="editorial"] .fan-quotes > .fan-quote:first-child blockquote { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.16; max-width: 32ch; }

/* the West-gate's line and the inscription are the page's other two pull
   quotes; the Doors of Durin hang as a plate */
:root[data-style="editorial"] .fan-art-body q {
  display: block; font-family: var(--ed-face); font-style: normal; font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -0.01em; text-indent: -.4em;
}
:root[data-style="editorial"] .fan-art-body q::before,
:root[data-style="editorial"] .fan-art-body q::after { color: var(--ed-rubric); }
:root[data-style="editorial"] .fan-art--lotr .lotr-doors { padding: 1.4rem 1.4rem 0; }
:root[data-style="editorial"] .fan-art--lotr .lotr-doors figcaption { font-size: 0.66rem; }
:root[data-style="editorial"] .ring-note :is(h2, h3, h4, h5) {
  font-family: var(--ed-face); font-weight: 500; font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.06; letter-spacing: var(--s-display-ls); text-transform: none; color: var(--ed-bone); margin-bottom: 1rem;
}
:root[data-style="editorial"] .ring-note blockquote {
  position: relative; margin-top: 1.2rem; padding: .3rem 0 .3rem 3rem; border-left: 0;
  font-family: var(--ed-face); font-style: normal; font-size: 1.42rem; line-height: 1.34;
}
:root[data-style="editorial"] .ring-note blockquote::before { left: 0; top: -.3rem; }

/* the rest, squared */
:where(:root[data-style="editorial"]) :is(.fan-iface, .fan-tally, .fp-go, .fan-tileshot, .fan-peek) { border-radius: 0; }
:where(:root[data-style="editorial"]) .fp-out { background: var(--ed-leaf-hi); }
/* the Ring's heading in the chapter voice, a step below a chapter, with no
   numeral: it is a passage inside the front matter, not a chapter */
:root[data-style="editorial"] .fp-head :is(h2, h3) {
  font-family: var(--ed-face); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.08; letter-spacing: var(--s-display-ls); text-transform: none; text-wrap: balance;
  color: var(--ed-bone);
}
/* the hotbar's slot numbers, too faint on the leaf, lifted to read */
:where(:root[data-style="editorial"]) .fp-slot u { color: rgba(239, 230, 211, .62); }

/* ── 3. the Red Book ──────────────────────────────────────────────────────
   It keeps its study, its firelight and its vellum title plate, and the
   Ring still drains the warmth out of all of it. The leaves and the rubric
   are tokens set on the book, so putting the Ring on re-tints them with
   everything else, which is how the Red Book already works. */
:root[data-style="editorial"] .rb { --ed-leaf: #1b1612; --ed-leaf-hi: #241d17; --ed-edge: rgba(239, 230, 211, .08); }
:root[data-style="editorial"] .rb.is-worn {
  --ed-leaf: #10161c; --ed-leaf-hi: #172029; --ed-edge: rgba(207, 224, 238, .1);
  --ed-rubric: #9fc3e0; --ed-rubric-paper: #2b4760;
}

/* the header: the same black stock as the world's bars, squared */
:where(:root[data-style="editorial"]) .rb-top { background: rgba(12, 10, 8, .97); backdrop-filter: none; }
:where(:root[data-style="editorial"]) :is(.rb-exit, .rb-oath-btn, .rb-end-btn, .rb-done a) { border-radius: 2px; }
/* on the solid bar the header's buttons need an edge that reads as one:
   the book's gold, at 3:1 or better against the bar */
:where(:root[data-style="editorial"]) :is(.rb-exit, .rb-oath-btn) { border-color: color-mix(in srgb, var(--gold) 58%, transparent); }

/* the title plate: still vellum, with its initial, its half-title and the
   verse printed in the rubric, and the verse no longer ruled */
:root[data-style="editorial"] .rb-title::first-letter { color: var(--ed-rubric-paper); }
:root[data-style="editorial"] :is(.rb-kicker, .rb-oath-line) { color: var(--ed-rubric-paper); }
:root[data-style="editorial"] .rb-oath-line { border-color: transparent; font-size: clamp(1rem, 2.4vw, 1.18rem); }
/* the particulars' labels were printed too faint to read on the vellum;
   they take the book's second ink instead */
:root[data-style="editorial"] .rb-plate-meta dt { color: color-mix(in srgb, var(--ink-2) 75%, var(--ink)); }

/* chapter heads, as on the world page: Garamond, numbered in red */
:root[data-style="editorial"] .rb-main { counter-reset: ed-ch; }
:root[data-style="editorial"] .rb-h {
  counter-increment: ed-ch; position: relative; align-items: baseline;
  font-family: var(--ed-face); font-weight: 500; font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.06; letter-spacing: var(--s-display-ls); color: var(--cream);
}
:root[data-style="editorial"] .rb-h--sm { font-size: clamp(1.5rem, 2.8vw, 2rem); }
:root[data-style="editorial"] .rb-h::before { content: counter(ed-ch, upper-roman); order: -1; font-size: .62em; letter-spacing: .04em; color: var(--ed-rubric); }
:root[data-style="editorial"] .rb-h span { flex-basis: 100%; font-size: 0.98rem; letter-spacing: 0.01em; }
:root[data-style="editorial"] .rb-think { align-self: center; }
/* the road's head hangs its numeral in the margin, as the world page does,
   once the margin beside the book is wide enough to hold it */
@media (min-width: 1300px) {
  :root[data-style="editorial"] .rb-road > .rb-h { margin-left: -5rem; }
  :root[data-style="editorial"] .rb-road > .rb-h::before { flex: 0 0 4.4rem; text-align: right; }
  :root[data-style="editorial"] .rb-road > .rb-h span { margin-left: 5rem; }
}

/* the leaves: the waypoints, the two panels and the seeing-stones */
:where(:root[data-style="editorial"]) :is(.rb-station, .rb-panel, .rb-stone) {
  border-radius: 0; border-color: var(--ed-edge); background: var(--ed-leaf); box-shadow: var(--ed-drop);
}
:where(:root[data-style="editorial"]) .rb-stone { background: var(--ed-leaf-hi); box-shadow: none; }
/* the waypoints and the stones are links, so each leaf is framed with a
   bone rule strong enough (3:1) to say so; this book's own waypoint is
   framed in the rubric */
:where(:root[data-style="editorial"]) :is(.rb-station, .rb-stone) { border-color: color-mix(in srgb, var(--cream) 44%, transparent); }
:where(:root[data-style="editorial"]) .rb-station--own { background: var(--ed-leaf-hi); border-color: color-mix(in srgb, var(--ed-rubric) 88%, transparent); }
:where(:root[data-style="editorial"]) .rb-station:focus-visible { background: var(--ed-leaf-hi); }
@media (hover: hover) {
  :where(:root[data-style="editorial"]) .rb-station:hover { background: var(--ed-leaf-hi); }
}

/* The road is the book's contents. Each waypoint: its league as the
   running head, its name leading by dots to the page it stands for, set at
   the right end of the line in small capitals where a folio goes, and the
   note under them. */
:root[data-style="editorial"] .rb-body { grid-template-columns: minmax(0, 1fr) auto; column-gap: .7rem; }
:root[data-style="editorial"] :is(.rb-k, .rb-f) { grid-column: 1 / -1; }
/* each league's own colour, lifted a quarter toward white to hold its
   contrast on the leaf (the Hours keep the green they set for themselves) */
:where(:root[data-style="editorial"]) .rb-k { color: color-mix(in srgb, var(--c, var(--gold)) 75%, #fff); }
:root[data-style="editorial"] .rb-n { grid-column: 1; grid-row: 2; display: flex; align-items: baseline; gap: .7rem; align-self: baseline; }
:root[data-style="editorial"] .rb-real {
  grid-column: 2; grid-row: 2; align-self: baseline; max-width: 13rem; text-align: right;
  font-style: normal; font-variant-caps: all-small-caps; font-size: 1.02rem; letter-spacing: .05em; color: var(--dim);
}
@media (max-width: 640px) {
  :root[data-style="editorial"] .rb-n { grid-column: 1 / -1; }
  :root[data-style="editorial"] .rb-real { grid-column: 1 / -1; grid-row: 3; max-width: none; }
  :root[data-style="editorial"] .rb-f { grid-row: 4; }
}

/* the Fellowship's numerals, rubricated and set in the margin of their
   list, without the coins round them; the ninth, unwritten, stays faint */
:root[data-style="editorial"] .rb-fellow li { align-items: baseline; }
:root[data-style="editorial"] .rb-f-n {
  width: 2.3rem; height: auto; place-items: start end; border: 0; border-radius: 0; background: none;
  font-family: var(--ed-face); font-weight: 500; font-size: 1.32rem; line-height: 1.1; color: var(--ed-rubric);
}
:root[data-style="editorial"] .rb-fellow-last .rb-f-n { color: var(--mute); }

/* the last button is printed in the rubric */
:where(:root[data-style="editorial"]) .rb-end-btn { color: var(--ed-rubric); border-color: var(--ed-rubric); background: transparent; }
@media (hover: hover) {
  :where(:root[data-style="editorial"]) .rb-end-btn:hover { background: var(--ed-rubric); color: #140c09; }
}

/* The world button: interface-world.css sets its own purple on the button,
   so the rubric is set on it here, and it is squared like a bookplate. */
:root[data-style="editorial"] .rb .iw { --iw-a: #e46a4c; border-radius: 2px; }
:root[data-style="editorial"] .rb .iw-k { opacity: 1; }
:where(:root[data-style="editorial"] .rb) .iw { border-color: color-mix(in srgb, var(--iw-a) 82%, transparent); }
:root[data-style="editorial"] .rb.is-worn .iw { --iw-a: #9fc3e0; }

/* every ring on the book is the candle's gold, 2px, clear of its leaf */
:root[data-style="editorial"] .rb :is(.rb-station, .rb-stone, .rb-end-btn, .rb-exit, .rb-oath-btn, .rb-done a, .iw):focus-visible {
  outline: 2px solid var(--s-focus); outline-offset: 3px;
}
