/* ═══════════════════════════════════════════════════════════════
   XTY — the reading hub at /xty/read/

   A table of contents in a notebook, not a corporate nav. Sits on top
   of landing.css and start.css; only the chapter furniture lives here.
   ═══════════════════════════════════════════════════════════════ */

/* ── The way back, on every page ───────────────────────────────
   No dead ends: the app is always one tap away, and where that tap
   lands depends on whether this person already has a book. */
.read-bar{
  position:sticky;top:0;z-index:20;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 18px;
  background:rgba(255,254,248,.94);backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(62,51,44,.1);
}
.read-bar .home{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:inherit}
.read-bar .home img{width:auto;height:26px;display:block}
.read-bar a.enter{
  padding:8px 14px;border-radius:999px;text-decoration:none;white-space:nowrap;
  background:var(--xty-green,#2f7a4a);color:#fff;font-size:13px;font-weight:800;
}

/* ── The mascot ────────────────────────────────────────────────
   One picture per page, no more. The pack's own rule: a book that looks
   used, not a sticker wall. */
.read-mascot{display:block;width:112px;height:auto;margin:0 0 6px -6px}
.read-seal{display:block;width:126px;height:auto;margin:34px auto 0}

/* ── Contents ──────────────────────────────────────────────────*/
.read-wrap{width:min(100% - 32px,760px);margin:0 auto;padding:48px 0 90px}
.read-lede{margin:14px 0 0;color:#62574F;font-size:17px;line-height:1.75}

.toc{display:grid;gap:12px;margin-top:36px;list-style:none;padding:0}
.toc a{
  display:grid;grid-template-columns:52px 1fr auto;gap:16px;align-items:center;
  padding:20px;border:1px solid rgba(62,51,44,.12);border-radius:18px;
  background:#FFFEF8;text-decoration:none;color:inherit;
  transition:transform .18s ease,border-color .18s ease;
}
.toc a:hover{transform:translateY(-2px);border-color:var(--xty-green,#55B56A)}
.toc .no{
  font:800 13px/1 var(--sans,inherit);letter-spacing:.1em;color:#8b9384;
  display:grid;place-items:center;width:44px;height:44px;border-radius:12px;
  background:rgba(90,120,95,.09);
}
.toc b{display:block;font-size:19px;margin-bottom:3px}
.toc span{color:#6d7566;font-size:14px;line-height:1.6}
.toc .go{color:#8b9384;font-size:18px}

/* ── Chapter ───────────────────────────────────────────────────*/
.chapter{width:min(100% - 32px,720px);margin:0 auto;padding:40px 0 24px}
.chapter-no{
  display:inline-block;padding:5px 12px;border-radius:999px;
  background:rgba(90,120,95,.1);color:#4a6b52;
  font:800 12px/1 var(--sans,inherit);letter-spacing:.1em;
}
.chapter h1{
  margin:16px 0 0;font-size:clamp(30px,5.2vw,46px);line-height:1.16;
  letter-spacing:-.025em;font-weight:800;text-wrap:balance;
}
.chapter .lede{margin:16px 0 0;color:#4f5a4e;font-size:clamp(17px,2vw,20px);line-height:1.65}
.chapter h2{
  margin:44px 0 0;font-size:clamp(21px,2.6vw,27px);line-height:1.3;
  letter-spacing:-.015em;font-weight:800;
}
.chapter p{margin:14px 0 0;color:#5b6459;font-size:16px;line-height:1.85}
.chapter ul{margin:14px 0 0;padding-left:22px;color:#5b6459;font-size:16px;line-height:1.85}
.chapter li+li{margin-top:6px}
.chapter figure{margin:28px 0 0}

/* A claim with a name on it. Anything without one does not get this box. */
.cite{
  margin:22px 0 0;padding:20px 22px;border-radius:16px;
  background:#FBF8EE;border:1px solid rgba(62,51,44,.1);
}
.cite b{display:block;font-size:16px;line-height:1.5;color:#3f4a41}
.cite p{margin:8px 0 0;font-size:14.5px;line-height:1.75}
.cite cite{
  display:block;margin-top:10px;color:#8b9384;font-size:12.5px;font-style:normal;line-height:1.6;
}
.cite.claim{background:#FDF6EC;border-color:rgba(190,140,60,.24)}
.cite.claim cite{color:#96794a}

/* ── Chapter feet ──────────────────────────────────────────────*/
.chapter-nav{
  width:min(100% - 32px,720px);margin:56px auto 0;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-top:26px;border-top:1px solid rgba(62,51,44,.12);
}
.chapter-nav a{
  display:inline-flex;align-items:center;gap:7px;padding:11px 15px;
  border:1px solid rgba(62,51,44,.13);border-radius:999px;background:#FFFEF8;
  color:inherit;text-decoration:none;font-size:14px;font-weight:700;
}
.chapter-nav a:hover{border-color:var(--xty-green,#55B56A)}
.chapter-nav .spacer{flex:1}
.read-foot{
  width:min(100% - 32px,720px);margin:26px auto 0;padding-bottom:80px;
  text-align:center;color:#8b9384;font-size:13.5px;
}
.read-foot a{color:#4a6b52;font-weight:700}

@media(max-width:620px){
  .read-wrap{padding:32px 0 70px}
  .toc a{grid-template-columns:44px 1fr;padding:16px}
  .toc .go{display:none}
  .chapter-nav{flex-wrap:wrap}
  .chapter-nav a{flex:1 1 46%;justify-content:center}
  .chapter-nav .spacer{display:none}
}
