/* ============================================================
   Reading Room — "Space Classics" design system (Nov 23, 2026)
   Ported from the Muse Space "Space Classics for the Reading
   Room" at Dmitri's order: cream / deep teal / rust, Spectral
   serif + IBM Plex Mono. Scoped to body.rr so the rest of the
   hub keeps its house-blue look. Loaded after home.css on
   Reading Room pages only. Texts and links are untouched.
   ============================================================ */
body.rr{
  --rr-bg:#f2efe8; --rr-raise:#fbf9f4; --rr-card:#fdfcf8;
  --rr-ink:#1c2422; --rr-soft:#47524d; --rr-faint:#6d7771;
  --rr-line:#d8d2c2; --rr-teal:#14524d; --rr-teal-deep:#0d2e2c;
  --rr-rust:#b34a1d; --rr-rust-soft:#f3e2d5;
  --rr-gold:#8a6414; --rr-gold-soft:#f0e6c8;
  --rr-red:#9c2b1e; --rr-red-soft:#f6ddd6;
  --rr-green:#2e6b34; --rr-green-soft:#ddebd8;
  --rr-hero-ink:#f4ead2;
  --rr-shadow:0 1px 2px rgba(20,30,28,.08),0 8px 24px rgba(20,30,28,.07);
  background:var(--rr-bg); color:var(--rr-ink);
  font-family:"Spectral",Georgia,"Times New Roman",serif;
}
body.rr .container{max-width:1060px}
body.rr a{color:var(--rr-rust)}
body.rr a:hover{color:var(--rr-teal)}
body.rr :focus-visible{outline:2px solid var(--rr-rust);outline-offset:2px}

/* --- Header chrome --- */
body.rr .ecosystem-bar{
  background:var(--rr-teal-deep); color:var(--rr-hero-ink);
  border-bottom:3px solid var(--rr-rust);
}
body.rr .brand-lockup{color:var(--rr-hero-ink);text-decoration:none}
body.rr .brand-badge{
  background:var(--rr-rust); color:var(--rr-hero-ink);
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  border-radius:8px;
}
body.rr .brand-title{font-family:"Spectral",Georgia,serif;color:var(--rr-hero-ink)}
body.rr .brand-sub{color:var(--rr-gold-soft)}
body.rr .ecosystem-nav a{
  color:var(--rr-hero-ink); opacity:.85; text-decoration:none;
  font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.82rem;
  letter-spacing:.04em; text-transform:uppercase;
}
body.rr .ecosystem-nav a:hover{opacity:1;color:#fff;text-decoration:underline}
body.rr .lang-switcher button{
  border:1px solid rgba(244,234,210,.45); color:var(--rr-hero-ink);
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  min-height:32px; border-radius:6px;
}
body.rr .lang-switcher button:hover{color:#fff;border-color:var(--rr-hero-ink)}
body.rr .lang-switcher button.active{
  background:var(--rr-rust); border-color:var(--rr-rust); color:var(--rr-hero-ink);
}

/* --- Hero (landing) --- */
body.rr .hero.rr-hero{
  background:
    linear-gradient(100deg, rgba(13,46,44,.93) 30%, rgba(13,46,44,.55) 65%, rgba(13,46,44,.25)),
    url("images/space-hero.webp") center 30%/cover no-repeat;
  color:var(--rr-hero-ink);
  border-bottom:4px solid var(--rr-rust);
}
body.rr .rr-hero .eyebrow{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  color:var(--rr-gold-soft); letter-spacing:.16em; text-transform:uppercase;
  font-size:.8rem;
}
body.rr .rr-hero h1{
  font-family:"Spectral",Georgia,serif; color:var(--rr-hero-ink);
  font-size:clamp(2.4rem,6vw,4rem); line-height:1.05; font-weight:700;
}
body.rr .rr-hero .lead{color:var(--rr-hero-ink);opacity:.92;font-size:1.15rem}
body.rr .rr-index-card{
  background:var(--rr-card); color:var(--rr-ink);
  border-radius:12px; box-shadow:var(--rr-shadow);
  border:1px solid var(--rr-line);
}
body.rr .rr-index-card a{color:var(--rr-ink)}
body.rr .rr-index-card a:hover{color:var(--rr-rust)}
body.rr .pill-yellow{
  background:var(--rr-gold-soft); color:var(--rr-gold);
  font-family:"IBM Plex Mono",ui-monospace,monospace;
}
body.rr .stage-banner img{border-radius:12px;box-shadow:var(--rr-shadow)}
body.rr .stage-caption{color:var(--rr-faint);font-family:"IBM Plex Mono",monospace;font-size:.8rem}

/* --- Buttons --- */
body.rr .btn{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:.85rem; letter-spacing:.05em; text-transform:uppercase;
  border-radius:10px; padding:.65rem 1.15rem; min-height:42px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--rr-teal); color:var(--rr-teal);
  background:var(--rr-card); text-decoration:none; cursor:pointer;
}
body.rr .btn:hover{border-color:var(--rr-rust);color:var(--rr-rust)}
body.rr .btn-primary{background:var(--rr-rust);border-color:var(--rr-rust);color:var(--rr-hero-ink)}
body.rr .btn-primary:hover{background:var(--rr-teal-deep);border-color:var(--rr-teal-deep);color:var(--rr-hero-ink)}
body.rr .btn-accent{background:var(--rr-gold-soft);border-color:var(--rr-gold);color:var(--rr-gold)}
body.rr .btn-accent:hover{background:var(--rr-gold);color:#fff}

/* --- Stat strip (landing) --- */
body.rr .rr-stats{
  display:grid; grid-template-columns:repeat(4,1fr); gap:.9rem;
  margin:1.4rem 0 .4rem;
}
body.rr .rr-stat{
  background:var(--rr-card); border:1px solid var(--rr-line);
  border-top:4px solid var(--rr-teal); border-radius:12px;
  box-shadow:var(--rr-shadow); padding:1rem 1.1rem; text-align:left;
}
body.rr .rr-stat b{
  display:block; font-family:"Spectral",Georgia,serif; font-weight:700;
  font-size:2rem; line-height:1; color:var(--rr-teal-deep);
}
body.rr .rr-stat span{
  font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.72rem;
  letter-spacing:.1em; text-transform:uppercase; color:var(--rr-faint);
}
@media(max-width:720px){ body.rr .rr-stats{grid-template-columns:repeat(2,1fr)} }

/* --- Sticky controls (landing) --- */
body.rr .rr-controls{
  position:sticky; top:0; z-index:40;
  background:var(--rr-raise); border:1px solid var(--rr-line);
  border-radius:12px; box-shadow:var(--rr-shadow);
  padding:.8rem 1rem; margin:1.2rem 0 1.6rem;
  display:flex; flex-direction:column; gap:.7rem;
}
body.rr .rr-search-slot span{display:flex;gap:.5rem;align-items:center;width:100%}
body.rr .rr-search-slot input[type="search"]{
  flex:1; min-height:42px; padding:.6rem .8rem;
  border:2px solid var(--rr-teal); border-radius:10px;
  font-family:"Spectral",Georgia,serif; font-size:1rem;
  background:var(--rr-card); color:var(--rr-ink);
}
body.rr .rr-search-slot button{
  min-height:42px; padding:.6rem 1.3rem; border:none; border-radius:10px;
  background:var(--rr-rust); color:var(--rr-hero-ink);
  font-family:"IBM Plex Mono",monospace; font-size:.9rem;
  letter-spacing:.05em; text-transform:uppercase; cursor:pointer;
}
body.rr .rr-chips{display:flex;flex-wrap:wrap;gap:.45rem}
body.rr .rr-chip{
  min-height:42px; padding:.45rem .95rem; border-radius:999px;
  border:1px solid var(--rr-line); background:var(--rr-card);
  color:var(--rr-soft); font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:.8rem; letter-spacing:.03em; cursor:pointer;
}
body.rr .rr-chip:hover{border-color:var(--rr-rust);color:var(--rr-rust)}
body.rr .rr-chip[aria-pressed="true"]{
  background:var(--rr-teal-deep); border-color:var(--rr-teal-deep);
  color:var(--rr-hero-ink);
}
body.rr .rr-sortrow{
  display:flex; flex-wrap:wrap; align-items:center; gap:.6rem;
  font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.82rem;
  color:var(--rr-faint);
}
body.rr .rr-sortrow select{
  min-height:42px; padding:.45rem .6rem; border:1px solid var(--rr-line);
  border-radius:10px; background:var(--rr-card); color:var(--rr-ink);
  font-family:"IBM Plex Mono",monospace; font-size:.85rem;
}
body.rr .rr-count{margin-left:auto;color:var(--rr-teal);font-weight:600}

/* Shelf filtering by chip (CSS side; search script still owns text search) */
body.rr[data-shelf="shelf-paul"] section.line-block:not(#shelf-paul),
body.rr[data-shelf="shelf-space"] section.line-block:not(#shelf-space),
body.rr[data-shelf="shelf-strange"] section.line-block:not(#shelf-strange),
body.rr[data-shelf="shelf-chekhov"] section.line-block:not(#shelf-chekhov),
body.rr[data-shelf="shelf-meditations"] section.line-block:not(#shelf-meditations),
body.rr[data-shelf="shelf-plato"] section.line-block:not(#shelf-plato){display:none}

/* --- Shelves & cards (landing) --- */
body.rr section.line-block{padding:1.6rem 0 .6rem}
body.rr .series{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  color:var(--rr-rust); letter-spacing:.14em; text-transform:uppercase;
  font-size:.8rem; margin:0 0 .3rem;
}
body.rr section.line-block h2{
  font-family:"Spectral",Georgia,serif; color:var(--rr-teal-deep);
  font-weight:700; border-bottom:3px solid var(--rr-gold-soft);
  padding-bottom:.4rem; margin:.2rem 0 1.1rem;
}
body.rr .line-intro{color:var(--rr-soft);max-width:46em}
body.rr .room-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:1.1rem;
}
@media(max-width:820px){ body.rr .room-grid{grid-template-columns:1fr} }
body.rr .room-card, body.rr .trio-item{
  background:var(--rr-card); border:1px solid var(--rr-line);
  border-radius:12px; box-shadow:var(--rr-shadow);
  padding:1.1rem 1.2rem 1.2rem; display:flex; flex-direction:column;
}
body.rr .room-card img, body.rr .trio-item img{
  width:100%; height:190px; object-fit:cover; object-position:top;
  border-radius:8px; border:1px solid var(--rr-line); background:var(--rr-raise);
}
body.rr .room-card h3, body.rr .trio-item h3{
  font-family:"Spectral",Georgia,serif; color:var(--rr-teal-deep);
  font-size:1.28rem; line-height:1.25; margin:.8rem 0 .35rem; font-weight:700;
}
body.rr .room-card p, body.rr .trio-item p{color:var(--rr-soft);margin:.3rem 0}
body.rr .room-card .btn, body.rr .trio-item .btn{margin-top:auto;align-self:flex-start}
body.rr .meta-note{color:var(--rr-faint);font-family:"IBM Plex Mono",monospace;font-size:.82rem}

/* --- Reader / chapter pages --- */
body.rr .reading-head{max-width:1060px;margin:0 auto;padding:2.2rem 1.2rem .4rem}
body.rr .reading-head .series{
  font-family:"IBM Plex Mono",ui-monospace,monospace; color:var(--rr-rust);
  letter-spacing:.14em; text-transform:uppercase; font-size:.8rem;
}
body.rr .reading-head h1{
  font-family:"Spectral",Georgia,serif; color:var(--rr-teal-deep);
  font-weight:700; line-height:1.1; margin:.3rem 0 .5rem;
}
body.rr .reading-head .lede{color:var(--rr-soft);font-size:1.12rem;max-width:44em}
body.rr main .reading{
  background:var(--rr-card); border:1px solid var(--rr-line);
  border-radius:12px; box-shadow:var(--rr-shadow);
  max-width:860px; margin:1.2rem auto 2.4rem; padding:2.4rem 2.6rem;
}
@media(max-width:720px){ body.rr main .reading{padding:1.4rem 1.1rem} }
body.rr .chapter-title{
  font-family:"Spectral",Georgia,serif; color:var(--rr-teal-deep);
  font-weight:700; border-bottom:3px solid var(--rr-gold-soft);
  padding-bottom:.5rem;
}
body.rr .chapter-subtitle{color:var(--rr-soft);font-style:italic}
body.rr .read-note{
  font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.82rem;
  color:var(--rr-faint); border-bottom:1px solid var(--rr-line);
  padding-bottom:.8rem;
}
body.rr .chapter-body{
  font-family:"Spectral",Georgia,serif; font-size:1.13rem; line-height:1.78;
  color:var(--rr-ink);
}
body.rr .chapter-body p{margin:0 0 1.05em}
body.rr .read-end{
  text-align:center; color:var(--rr-faint);
  font-family:"IBM Plex Mono",monospace; font-size:.85rem;
  border-top:1px solid var(--rr-line); padding-top:1.1rem; margin-top:2rem;
}
body.rr .buttons{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:center;margin:1.4rem 0}
body.rr .card-cover.small img, body.rr img.card-cover{
  border-radius:8px; border:1px solid var(--rr-line); box-shadow:var(--rr-shadow);
}

/* --- Footer --- */
body.rr .site-footer{
  background:var(--rr-teal-deep); color:var(--rr-hero-ink);
  border-top:4px solid var(--rr-rust); margin-top:2.4rem;
}
body.rr .site-footer a{color:var(--rr-gold-soft)}
body.rr .site-footer a:hover{color:#fff}

/* --- Dark mode (simple variant, as in the Space) --- */
@media (prefers-color-scheme: dark){
  body.rr{
    --rr-bg:#0b1514; --rr-raise:#101d1b; --rr-card:#13211d;
    --rr-ink:#e9e4d4; --rr-soft:#b3bcb0; --rr-faint:#8b968c;
    --rr-line:#2b3d38; --rr-teal:#7fc4b8; --rr-teal-deep:#0a2422;
    --rr-rust:#eda06f; --rr-rust-soft:#3a2417;
    --rr-gold:#d9b45c; --rr-gold-soft:#332a1c;
    --rr-shadow:0 1px 2px rgba(0,0,0,.35),0 8px 24px rgba(0,0,0,.3);
  }
  body.rr .room-card h3, body.rr .trio-item h3,
  body.rr section.line-block h2, body.rr .reading-head h1,
  body.rr .chapter-title, body.rr .rr-stat b{color:var(--rr-hero-ink)}
  body.rr .btn-primary{color:#0b1514}
  body.rr .rr-chip[aria-pressed="true"]{background:var(--rr-rust);border-color:var(--rr-rust);color:#0b1514}
}

/* ============================================================
   Book-facing hub pages — Space Classics rollout (Nov 23, 2026)
   Dmitri's order: all book-related properties in this style.
   Covers the Dracula edition guide and The World of Teraura
   (the hub's book pages that link this sheet alongside the
   Reading Room). Classes below exist only on those pages.
   ============================================================ */
body.rr .section-kicker{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  color:var(--rr-rust); letter-spacing:.14em; text-transform:uppercase;
  font-size:.8rem;
}
body.rr .section-header h2, body.rr .section h2{
  font-family:"Spectral",Georgia,serif; color:var(--rr-teal-deep); font-weight:700;
}

/* --- Dracula edition guide --- */
body.rr .guide-table{font-family:"Spectral",Georgia,serif}
body.rr .guide-table th, body.rr .guide-table td{border:1px solid var(--rr-line)}
body.rr .guide-table th{
  background:var(--rr-teal-deep); color:var(--rr-hero-ink);
  font-family:"Spectral",Georgia,serif; font-weight:700;
}
body.rr .guide-table tr:nth-child(even) td{background:var(--rr-raise)}
body.rr .guide-cta{
  background:var(--rr-card); border:2px solid var(--rr-rust);
  border-radius:12px; box-shadow:var(--rr-shadow);
}

/* --- The World of Teraura --- */
body.rr .map-wrap{
  border:2px solid var(--rr-teal-deep); border-radius:12px;
  box-shadow:var(--rr-shadow);
}
body.rr .map-head{background:var(--rr-teal-deep);color:var(--rr-hero-ink)}
body.rr .map-head strong{
  font-family:"IBM Plex Mono",ui-monospace,monospace; letter-spacing:.1em;
}
body.rr .map-head span{color:var(--rr-gold-soft)}
body.rr .map-tab{
  background:var(--rr-card); border:2px solid var(--rr-line);
  border-radius:12px; color:var(--rr-ink);
}
body.rr .map-tab strong{font-family:"Spectral",Georgia,serif;color:var(--rr-teal-deep)}
body.rr .map-tab span{color:var(--rr-faint)}
body.rr .map-tab:hover{border-color:var(--rr-rust)}
body.rr .map-tab.active{
  border-color:var(--rr-teal-deep); background:var(--rr-rust-soft);
  box-shadow:inset 0 0 0 1px var(--rr-teal-deep);
}
body.rr .world-panel{
  background:var(--rr-card); border:1px solid var(--rr-line);
  border-left:6px solid var(--rr-rust); border-radius:12px;
  box-shadow:var(--rr-shadow);
}
body.rr .world-panel .kicker{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  color:var(--rr-rust); letter-spacing:.12em;
}
body.rr .world-panel h2{font-family:"Spectral",Georgia,serif;color:var(--rr-teal-deep)}
body.rr .world-panel .tagline{color:var(--rr-ink)}
body.rr .world-panel ul{color:var(--rr-soft)}
body.rr .world-panel li strong{color:var(--rr-teal-deep)}
body.rr .journey-step{
  background:var(--rr-raise); border:1px solid var(--rr-line); border-radius:12px;
}
body.rr .journey-step strong{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  color:var(--rr-rust); letter-spacing:.06em;
}
body.rr .journey-step span{color:var(--rr-soft)}
body.rr .journey-arrow{color:var(--rr-rust)}
body.rr .person-card{
  background:var(--rr-card); border:1px solid var(--rr-line);
  border-radius:12px; box-shadow:var(--rr-shadow);
}
body.rr .person-card.highlight{border:2px solid var(--rr-rust)}
body.rr .person-initial{
  background:var(--rr-rust); color:var(--rr-hero-ink);
  font-family:"Spectral",Georgia,serif;
}
body.rr .person-card.marry .person-initial{background:var(--rr-teal-deep);color:var(--rr-gold-soft)}
body.rr .person-card h3{font-family:"Spectral",Georgia,serif;color:var(--rr-teal-deep)}
body.rr .person-card .role{
  font-family:"IBM Plex Mono",ui-monospace,monospace; color:var(--rr-rust);
}
body.rr .person-card p{color:var(--rr-soft)}
body.rr .start-door{
  background:var(--rr-card); border:2px solid var(--rr-teal);
  border-radius:12px; box-shadow:var(--rr-shadow);
}
body.rr .closing p{color:var(--rr-soft)}
