/* be_rs.css — shared styles for the Robot Series webbooks (poem pages, contents pages, cover pages).
   Book look (accent color, background tile) comes from CSS variables that each page sets for the book it is
   in at publish time; be_rs_nav.js re-applies them from be_rs_order.js, so a poem moved to another book
   takes that book's look without its page being regenerated. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --rs-accent: #A9C3F0;
  --rs-tile: none;
  --glass-bg: rgba(6, 7, 10, 0.80);
  --glass-border: rgba(255, 255, 255, 0.10);
  --ink: #F0EDE8;
  --ink-mid: rgba(240, 237, 232, 0.76);
  --ink-soft: rgba(240, 237, 232, 0.50);
}
html, body { width: 100%; min-height: 100vh; }
body { font-family: 'Outfit', sans-serif; font-weight: 300; overflow-x: hidden; background: #0B0D11; color: var(--ink); }

.art-bg { position: fixed; inset: 0; z-index: 0; background-color: #1A1D23; background-image: var(--rs-tile);
  background-size: clamp(160px, 12.5vw, 320px); background-repeat: repeat; }
.art-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); }

.page { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 4rem); gap: 2.25rem; max-width: 1100px; margin: 0 auto; }
.glass { background: var(--glass-bg); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--glass-border); border-radius: 18px; box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.05) inset; }

/* header */
header { display: flex; flex-direction: column; gap: 0; padding: 1rem 1.75rem; animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.header-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; }
.site-name { font-family: 'Cormorant Garamond', serif; font-size: 1.45rem; font-weight: 600; color: var(--ink); letter-spacing: 0.02em; text-decoration: none; }
.site-name .site-a { color: #CBD7EA; display: inline-block; transform: skewX(-8deg); }
.site-name .site-round { color: var(--rs-accent); font-style: italic; }
.hint { font-size: 0.72rem; font-style: italic; color: var(--ink-soft); letter-spacing: 0.04em; }
.back-link { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rs-accent);
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: color 0.2s; white-space: nowrap; }
.back-link:hover { color: var(--ink); }
.book-line { font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Trebuchet MS', sans-serif; font-style: italic; font-size: 0.85rem; color: var(--rs-accent); }

/* icon navigation: prev · contents · next */
.rs-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem; padding-top: 0.6rem; margin-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08); min-height: 2.6rem; }
footer .rs-nav { border-top: none; margin-top: 0; padding-top: 0; }
.rs-nav a { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--rs-accent); text-decoration: none;
  font-size: 0.72rem; letter-spacing: 0.05em; padding: 0.2rem; border-radius: 8px; transition: color 0.2s, transform 0.2s; }
.rs-nav a:hover { color: var(--ink); transform: scale(1.06); }
.rs-nav a svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rs-nav .rs-prev { justify-self: start; }
.rs-nav .rs-home { justify-self: center; }
.rs-nav .rs-next { justify-self: end; }
.rs-nav .lbl { opacity: 0.75; }

/* poem */
/* left margin: a fixed 3rem at every screen width (Bill, 2026-11-07, replacing a wide screen-scaled margin) */
.poem-panel { padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.5rem, 7vw, 4.5rem); padding-left: 3rem;
  max-width: 680px; width: 100%; justify-self: start; align-self: start;
  animation: fadeUp 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
/* centered poems (e.g. the machine party always won) get no extra left margin: even padding both sides
   (Bill, 2026-11-07) */
.poem-panel.centered { padding-left: clamp(1.5rem, 7vw, 4.5rem); max-width: 680px; }
/* standard (Bill, 2026-11-15): a centered poem gets a centered footer */
.poem-panel.centered .poem-meta { text-align: center; }
.poem-title { font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Trebuchet MS', sans-serif; font-style: italic; font-weight: normal;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem); color: var(--rs-accent); letter-spacing: 0.04em; margin-bottom: 1.8rem; line-height: 1.25; }
.poem-title .tl { display: block; white-space: pre-wrap; }
.poem-body { font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Trebuchet MS', sans-serif; font-size: clamp(0.92rem, 1.8vw, 1.04rem);
  color: var(--ink-mid); line-height: 1.35; }
/* the site's established poem-line spacing (.pl, procedure_poem_line_spacing): a wrapped line sits tighter
   (line-height 1.35) than the space between poem lines (0.5em), and wrapped text is NOT indented — it continues
   under the line's first word. Spaces stay as typed (pre-wrap). (.l = older generated pages) */
.poem-body .pl, .poem-body .l { display: block; white-space: pre-wrap; margin-bottom: 0.5em; }
/* stanza break = the stanza gap the other poem pages actually show (Bill, 2026-11-07: "match the other pages"):
   1.8em between a stanza's last line and the next stanza. There it is .pl:last-child 1.8em + p 1.4em, but those two
   margins collapse to the larger one (1.8em). Here: last line's 0.5em + 1.3em = 1.8em. Each further blank line in a
   row (a deliberate wider pause in the Word file) adds one line's height. --gs scales gaps in smaller-size stanzas. */
.poem-body .gap { display: block; height: calc(1.3em * var(--gs, 1)); }
.poem-body .gap + .gap { height: calc(1.3em * var(--gs, 1)); }
.poem-body em { font-style: italic; }
.poem-body strong { font-weight: bold; color: var(--ink); }
.poem-meta { margin-top: 4.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.10); font-size: 0.75rem;
  color: var(--ink-soft); letter-spacing: 0.05em; line-height: 1.8; }
.poem-meta em { font-style: italic; color: var(--rs-accent); }
.poem-meta em.ed { color: inherit; }
.poem-meta .place { font-size: 8pt; }   /* place / date lines ("Thomaston  Maine  September 15") — Bill, 2026-11-13 */
.poem-meta .note { font-style: italic; opacity: 0.85; margin-top: 0.5rem; white-space: pre-wrap; }
/* "previously published in <book>" (2026-11-12): the book title in the accent, linked to the poem's page there */
.poem-meta .pub-in { margin-top: 0.5rem; }
.poem-meta a.pub { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.22); padding-bottom: 1px; }
.poem-meta a.pub:hover { border-bottom-color: var(--rs-accent); }

/* contents page */
.toc-panel { padding: clamp(1.75rem, 5vw, 3rem) clamp(1.5rem, 6vw, 3.5rem); max-width: 760px; width: 100%; justify-self: center; align-self: start;
  animation: fadeUp 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
.toc-head { display: grid; grid-template-columns: 130px 1fr; gap: 1.5rem; align-items: start; }
.toc-head img { width: 100%; height: auto; display: block; border-radius: 4px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); }
.eyebrow { font-size: 0.64rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.book-title { font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Trebuchet MS', sans-serif; font-style: italic; font-weight: normal;
  font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--rs-accent); letter-spacing: 0.03em; margin-top: 0.35rem; line-height: 1.15; }
.book-sub { font-size: 0.85rem; color: var(--ink-mid); letter-spacing: 0.06em; margin-top: 0.25rem; }
.book-author { font-size: 0.92rem; color: var(--ink); margin-top: 0.75rem; }
.dedication { font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Trebuchet MS', sans-serif; font-style: italic; font-size: 0.88rem;
  color: var(--ink-mid); line-height: 1.6; margin-top: 1rem; }
.toc-divider { border: none; border-top: 1px solid rgba(255, 255, 255, 0.10); margin: 1.75rem 0 1.25rem; }
.toc-list { list-style: none; }
.toc-list li { display: flex; align-items: baseline; gap: 0.85rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.toc-list li:last-child { border-bottom: none; }
.toc-num { font-size: 0.72rem; color: var(--ink-soft); min-width: 1.6rem; text-align: right; flex-shrink: 0; letter-spacing: 0.06em; }
.toc-list a { font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Trebuchet MS', sans-serif; font-style: italic; font-size: 0.98rem;
  color: var(--ink-mid); text-decoration: none; transition: color 0.2s; }
.toc-list a:hover { color: var(--rs-accent); }
.toc-note { font-size: 0.74rem; color: var(--ink-soft); font-style: italic; margin-top: 1.25rem; }

/* cover page */
.cover-panel { padding: clamp(1.25rem, 3.5vw, 2rem); max-width: 440px; width: 100%; justify-self: center; align-self: start;
  animation: fadeUp 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
.cover-img { width: 100%; height: auto; display: block; border-radius: 4px; cursor: zoom-in; }
.cover-cap { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-family: 'Century Gothic', CenturyGothic, AppleGothic, 'Trebuchet MS', sans-serif; }
.cover-cap .t { font-style: italic; font-size: 1.35rem; color: var(--rs-accent); letter-spacing: 0.03em; }
.cover-cap .s { font-size: 0.78rem; color: var(--ink-mid); letter-spacing: 0.08em; margin-top: 0.15rem; }
.cover-cap .a { font-size: 0.85rem; color: var(--ink); margin-top: 0.6rem; }
.cover-cap .c { font-size: 0.7rem; color: var(--ink-soft); margin-top: 0.9rem; letter-spacing: 0.05em; line-height: 1.7; }
.zoom-hint { font-size: 0.68rem; color: var(--ink-soft); font-style: italic; margin-top: 0.5rem; text-align: center; }

/* footer */
/* more white space below the footer's last line (Bill, 2026-11-07: 1.75rem, was 0.9rem) */
footer { padding: 0.9rem 1.75rem 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; animation: fadeUp 0.6s 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem;
  padding-top: 0.55rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-copy { font-size: 0.7rem; color: var(--ink-soft); letter-spacing: 0.06em; }
.footer-copy:last-child { text-align: right; }
.footer-copy a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(240, 237, 232, 0.25); }
.footer-copy a.art { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 600; font-size: 1rem; color: var(--rs-accent); border-bottom-color: currentColor; }
.footer-copy a:hover { color: var(--ink); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .page { padding: 1.25rem; gap: 1.5rem; }
  .poem-panel { padding: 1.75rem 1.4rem 1.75rem 3rem; }   /* same 3rem left margin as wide screens */
  .poem-panel.centered { padding-left: 1.4rem; }
  .toc-head { grid-template-columns: 90px 1fr; gap: 1rem; }
  .rs-nav .lbl { display: none; }
}
