/* ╔═══════════════════════════════════════════════════════════════════╗
   ║  THE BENCH — lore spread                                          ║
   ╠═══════════════════════════════════════════════════════════════════╣
   ║  ★ WHY THIS PAGE EXISTS ★                                         ║
   ║    On JanitorAI both verses had to fit inside a note-paper asset  ║
   ║    with a hard ceiling. The old CSS said it plainly:              ║
   ║                                                                   ║
   ║      "Budget is roughly 900 characters of body text at this size. ║
   ║       overflow-y is auto ON PURPOSE: if you paste more lore than  ║
   ║       fits you get a thin scrollbar rather than silently losing   ║
   ║       the end."                                                   ║
   ║                                                                   ║
   ║    And on phones the sheet had to switch to object-fit:fill and   ║
   ║    stretch the paper texture to survive. All of that is gone.     ║
   ║    Both verses are now full sections on a page of their own, and  ║
   ║    the paper is a decorative motif rather than a container that   ║
   ║    text has to be cut to fit.                                     ║
   ║                                                                   ║
   ║  ★ url() IS ALLOWED HERE ★                                        ║
   ║    JanitorAI stripped url() from bio CSS, which is the only       ║
   ║    reason every texture in the old build was an <img> element     ║
   ║    stretched with object-fit (an <img> cannot tile). The paper     ║
   ║    sheets below are real background-images. If you ever port      ║
   ║    something back to JAI, that is the first thing that breaks.    ║
   ╚═══════════════════════════════════════════════════════════════════╝ */

/* ══════════════ VERSE HEADER ══════════════ */
.verse { padding: 70px 0 30px; position: relative; }
.verse + .verse { border-top: 1px solid var(--line); }

.lore-hero {
  display: grid; grid-template-columns: 330px 1fr;
  gap: 52px; align-items: start; margin-bottom: 54px;
}

/* the pinned print — same measured geometry as the old build:
   paper window sits at left 21.9%, top 12%, 56.2% x 67.7% of the asset */
.lore-print { position: relative; width: 100%; transform: rotate(-1.6deg); }
.lore-print-frame { width: 100%; display: block; position: relative; z-index: 3; }
.lore-print-win {
  position: absolute; left: 21.9%; top: 12%; width: 56.2%; height: 67.7%;
  overflow: hidden; z-index: 1; background: var(--inset);
}
.lore-print-win img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.06) saturate(0.95) brightness(0.95); }
.lore-print-cap {
  position: absolute; left: 6%; right: 6%; bottom: 4.5%; z-index: 4;
  text-align: center; font-family: var(--hand);
  font-size: 1.35rem; color: #3a2c26;
}
.lore-tape {
  position: absolute; top: -16px; left: 50%; width: 42%;
  transform: translateX(-50%) rotate(-3deg);
  z-index: 5; pointer-events: none; opacity: 0.92;
}
/* the sheets stacked underneath, so the bench reads as a pile.
   Insets match the asset's real paper bbox (4% top, 14% sides). */
.lore-print::before, .lore-print::after {
  content: ""; position: absolute; inset: 4% 14%;
  background: #cfc3ae; z-index: 0;
  box-shadow: 0 8px 18px rgba(0,0,0,0.55);
  transition: transform 0.4s ease;
}
.lore-print::before { transform: rotate(-3.4deg) translate(-10px, 7px); }
.lore-print::after  { transform: rotate(2.6deg) translate(10px, 12px); filter: brightness(0.84); }
.lore-print:hover::before { transform: rotate(-5.5deg) translate(-16px, 9px); }
.lore-print:hover::after  { transform: rotate(4.5deg) translate(16px, 15px); }

.verse-eyebrow {
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 5px; text-transform: uppercase;
  color: var(--amber); margin-bottom: 12px;
}
.verse h2 {
  font-family: var(--slab); font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--text); margin: 0 0 16px; line-height: 1;
  text-shadow: 0 0 26px rgba(255,45,45,0.3);
}
.verse-lede { font-size: 1.02rem; color: #cbb8b4; line-height: 1.8; }
.verse-lede b { color: var(--text); font-weight: 400; }

/* ══════════════ FACT STRIP ══════════════ */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); margin-top: 30px;
}
.facts div { background: var(--panel); padding: 14px 16px; }
.facts .label {
  font-family: var(--mono); font-size: 0.55rem;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
.facts .value { font-family: var(--slab); font-size: 1.3rem; color: var(--red); line-height: 1.1; }
.facts .value small { display: block; font-family: var(--mono); font-size: 0.58rem; color: var(--muted); letter-spacing: 2px; margin-top: 4px; }

/* ══════════════ SECTIONS ══════════════ */
.lore-sec { margin: 0 0 48px; }
.lore-sec > h3 {
  font-family: var(--slab); font-size: 1.15rem;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--text); margin: 0 0 6px;
}
.lore-sec > h3::before { content: "▸ "; color: var(--red); }
.lore-sec > .sub {
  font-family: var(--mono); font-size: 0.58rem;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); padding-bottom: 14px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.lore-sec p { color: #cbb8b4; max-width: 78ch; }
.lore-sec p b { color: var(--text); font-weight: 400; }
.lore-sec em { color: var(--amber); font-style: normal; }

/* ══════════════ CARD GRIDS ══════════════ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  padding: 18px 20px;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: 0.25s ease;
}
.card:hover { border-color: var(--red); box-shadow: 0 0 24px rgba(255,45,45,0.16); transform: translateY(-3px); }
.card h4 {
  font-family: var(--slab); font-size: 0.98rem;
  letter-spacing: 1px; color: var(--text); margin: 0 0 3px;
}
.card .tag {
  display: block; font-family: var(--mono); font-size: 0.55rem;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--amber); margin-bottom: 10px;
}
.card p { font-size: 0.85rem; margin: 0; color: #b7a3a0; line-height: 1.65; }
/* a card that is a whole faction gets a heavier left edge in its colour */
.card.accent { border-left: 3px solid var(--red); }
.card.accent-a { border-left: 3px solid var(--amber); }
.card.accent-c { border-left: 3px solid #6f8fb0; }

/* ══════════════ THE RANK LADDER ══════════════ */
.ladder { border: 1px solid var(--line); background: var(--panel); overflow-x: auto; }
.ladder table { width: 100%; border-collapse: collapse; min-width: 520px; }
.ladder th, .ladder td {
  text-align: left; padding: 9px 16px;
  border-bottom: 1px solid rgba(46,24,28,0.7);
  font-size: 0.8rem;
}
.ladder th {
  font-family: var(--mono); font-size: 0.55rem;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); background: var(--inset);
  border-bottom: 1px solid var(--line);
}
.ladder td:first-child { font-family: var(--slab); color: var(--text); letter-spacing: 1px; width: 1%; white-space: nowrap; }
.ladder td:nth-child(2) { color: #b7a3a0; }
.ladder td:last-child { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; text-align: right; white-space: nowrap; }
.ladder tr:last-child td { border-bottom: none; }
.ladder tr.tier-s td:first-child { color: var(--red); }
.ladder tr.tier-s { background: rgba(255,45,45,0.05); }
.ladder tr.tier-top td:first-child { color: var(--amber); }
.ladder tr.tier-top { background: rgba(224,134,60,0.06); }

/* ══════════════ THE PAPER SHEET ══════════════
   A real CSS background-image, which JanitorAI would have stripped.
   background-size: 100% 100% deliberately stretches the paper to the
   text rather than the other way round — the text is the master here,
   which is the whole point of this page. */
.sheet {
  position: relative;
  background-image: url("https://ella.janitorai.com/media-approved/YLhlLyDKr71sbu9jisC1P.webp");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 8% 12%;
  margin: 34px auto;
  max-width: 560px;
  transform: rotate(-0.7deg);
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.6));
  transition: transform 0.4s ease, filter 0.4s ease;
}
.sheet:nth-of-type(even) { transform: rotate(0.8deg); }
.sheet:hover { transform: rotate(0deg) scale(1.015); filter: drop-shadow(0 0 30px rgba(255,116,66,0.25)); }
.sheet h4 { font-family: var(--hand); font-size: 1.7rem; color: #241a15; margin: 0 0 8px; line-height: 1.1; }
.sheet p { font-family: var(--hand); font-size: 1.08rem; line-height: 1.45; color: var(--ink); margin: 0 0 8px; max-width: none; }
.sheet p:last-child { margin-bottom: 0; }
/* ⚠ INK, NOT PAPER.
   .sheet sits inside .lore-sec, and .lore-sec paints <b> in --text
   (near-white) because everything else on this page is on a dark
   background. On cream paper that is invisible — the gate-site names
   vanished completely and the paragraphs just looked oddly indented.
   Anything that can appear inside a sheet needs an ink colour here. */
.sheet p b, .sheet h4 b, .sheet strong { color: #1a120e; font-weight: 700; }
.sheet em { color: #6b3a24; font-style: italic; }

.sheet .meta {
  font-family: var(--mono); font-size: 0.58rem;
  letter-spacing: 2px; text-transform: uppercase; color: #6b544a;
}
.sheet.alt { background-image: url("https://ella.janitorai.com/media-approved/Lynyu3jx4VrGbqkWaZP_7.webp"); }

/* ══════════════ TIMELINE ══════════════ */
.timeline { position: relative; padding-left: 30px; margin-top: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--red), rgba(255,45,45,0.12));
}
.timeline li { list-style: none; position: relative; padding: 0 0 22px; }
.timeline li::before {
  content: ""; position: absolute; left: -28px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--void); border: 2px solid var(--red);
  box-shadow: 0 0 10px rgba(255,45,45,0.6);
}
.timeline li.major::before { background: var(--red); box-shadow: 0 0 16px rgba(255,45,45,0.9); }
.timeline .year {
  font-family: var(--slab); font-size: 0.95rem;
  color: var(--amber); letter-spacing: 2px; display: block; margin-bottom: 2px;
}
.timeline .what { color: #b7a3a0; font-size: 0.88rem; line-height: 1.6; }

/* ══════════════ VERSE JUMP NAV ══════════════ */
.verse-jump { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 26px 0 0; }
.verse-jump a {
  padding: 9px 22px; border: 1px solid var(--line);
  color: var(--muted); text-decoration: none;
  font-family: var(--mono); font-weight: 700; font-size: 0.7rem;
  letter-spacing: 3px; text-transform: uppercase;
  transition: 0.25s ease;
}
.verse-jump a:hover { color: var(--red); border-color: var(--red); box-shadow: 0 0 14px rgba(255,45,45,0.3); }

/* ---- the link back to the prints from a verse ---- */
.verse-cta { text-align: center; padding: 10px 0 26px; }

/* ══════════════ MOBILE ══════════════ */
@media screen and (max-width: 900px) {
  .lore-hero { grid-template-columns: 1fr; gap: 30px; }
  .lore-print { max-width: 300px; margin: 0 auto; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .verse { padding-top: 46px; }
}
@media screen and (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .sheet { padding: 10% 11%; transform: none; }
  .sheet:nth-of-type(even) { transform: none; }
  .lore-sec > h3 { font-size: 1rem; }
}
