/* Tokentale — storybook reading room. Cream paper, sepia ink, one forest accent. */
:root {
  --paper: #f4eedf;
  --paper-2: #efe7d3;
  --paper-3: #e7dcc2;
  --leaf: #fbf8ef;
  --ink: #3b2f24;
  --ink-2: #5d4d3d;
  --ink-3: #8a7862;
  --rule: rgba(59, 47, 36, .18);
  --rule-2: rgba(59, 47, 36, .09);
  --forest: #3f5a43;
  --forest-2: #557259;
  --forest-wash: rgba(63, 90, 67, .1);
  --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --sans: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --shadow: 0 1px 0 rgba(59,47,36,.06), 0 18px 40px -22px rgba(59,47,36,.35);
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--sans); overflow-x: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .23 0 0 0 0 .18 0 0 0 0 .14 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; }
a { color: var(--forest); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .86em; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; letter-spacing: -.005em; }
h2 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.06; }
h2 em { font-style: italic; color: var(--ink-3); font-weight: 400; }
h3 { font-size: 24px; line-height: 1.2; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 12px; }
.kicker { font: 600 11.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--forest); margin-bottom: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 14.5px/1 var(--sans); padding: 14px 22px; border-radius: 2px; cursor: pointer;
  text-decoration: none; border: 1px solid var(--ink); transition: transform .18s var(--ease), background-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--sm { padding: 10px 16px; font-size: 13.5px; }
.btn[disabled] { opacity: .5; cursor: progress; }
.copy { position: relative; overflow: hidden; }
.copy .copy__a, .copy .copy__b { display: inline-block; transition: transform .3s var(--ease), opacity .3s; }
.copy .copy__b { position: absolute; left: 0; right: 0; text-align: center; transform: translateY(120%); opacity: 0; }
.copy.is-done .copy__a { transform: translateY(-120%); opacity: 0; }
.copy.is-done .copy__b { transform: translateY(0); opacity: 1; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(244, 238, 223, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.nav__in { max-width: 1240px; margin: 0 auto; padding: 0 28px; height: 66px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand__mark { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.brand__mark .brand__line { stroke: var(--forest); stroke-width: 2; }
.brand__word { font: 600 25px/1 var(--serif); letter-spacing: .01em; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { font: 500 13.5px/1 var(--sans); color: var(--ink-2); text-decoration: none; position: relative; padding: 6px 0; }
.nav__links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--forest); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-here::after { transform: scaleX(1); }
.nav__end { display: flex; align-items: center; gap: 12px; flex: none; }
.nav__x { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; color: var(--ink); }
.nav__x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.nav__menu { display: none; width: 38px; height: 38px; border: 1px solid var(--rule); background: transparent; border-radius: 2px; cursor: pointer; padding: 0; position: relative; }
.nav__menu span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.nav__menu span:first-child { top: 15px; } .nav__menu span:last-child { top: 22px; }
.nav__menu[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- wallet (shared wallet.js) ---------- */
.wallet-slot { display: flex; }
.wb { position: relative; }
.wb-btn {
  font: 500 13.5px/1 var(--sans); background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  padding: 11px 16px; border-radius: 2px; cursor: pointer; white-space: nowrap; transition: background-color .2s, transform .15s;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
.wb-btn:hover { background: var(--forest); border-color: var(--forest); }
.wb-btn:active { transform: translateY(1px); }
.wb-btn.is-on { background: var(--leaf); color: var(--ink); border-color: var(--rule); font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.wb-btn.is-on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--forest); margin-right: 8px; vertical-align: 1px; }
.wb-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000; width: 270px; max-width: calc(100vw - 24px);
  background: var(--leaf); border: 1px solid var(--rule); box-shadow: var(--shadow); padding: 8px; border-radius: 3px;
  animation: menuIn .22s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.wb-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: 500 14px/1.2 var(--sans); color: var(--ink); padding: 10px 10px; border-radius: 2px; text-decoration: none;
}
.wb-item:hover { background: var(--paper-2); color: var(--ink); }
.wb-item img { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.wb-addr { font: 12px/1.45 ui-monospace, Menlo, monospace; color: var(--ink-2); word-break: break-all; padding: 8px 10px 4px; }
.wb-bal { font: 600 15px/1.3 var(--serif); padding: 2px 10px 10px; border-bottom: 1px solid var(--rule-2); margin-bottom: 4px; }
.wb-note { font-size: 12px; color: var(--ink-3); padding: 8px 10px 4px; line-height: 1.4; }

/* ---------- hero ---------- */
.hero { max-width: 1240px; margin: 0 auto; padding: 72px 28px 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; min-height: calc(100vh - 66px); }
.hero > * { min-width: 0; }
.hero__title { font-size: clamp(42px, 6vw, 82px); line-height: 1.0; font-weight: 500; letter-spacing: -.015em; }
.hero__title .w { display: inline-block; opacity: 0; transform: translateY(.45em); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.hero__title .w.is-in { opacity: 1; transform: none; }
.hero__title .w--accent { font-style: italic; color: var(--forest); }
.hero__sub { font: 400 21px/1.5 var(--serif); color: var(--ink-2); margin-top: 26px; max-width: 34em; }
.hero__cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
[data-rise] { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
[data-rise].is-in { opacity: 1; transform: none; }
.ca-chip { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; border: 1px solid var(--rule); background: var(--leaf); padding: 6px 6px 6px 12px; max-width: 100%; }
.ca-chip__lbl { font: 600 11px/1 var(--sans); letter-spacing: .12em; color: var(--forest); }
.ca-chip code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-chip .copy { font: 500 12.5px/1 var(--sans); border: 1px solid var(--rule); background: var(--paper); padding: 8px 10px; cursor: pointer; min-width: 64px; }

.hero__book { position: relative; }
.book { position: relative; aspect-ratio: 1.42; width: 100%; perspective: 1800px; display: grid; grid-template-columns: 1fr 1fr; filter: drop-shadow(0 30px 40px rgba(59, 47, 36, .22)); }
.book__page { position: relative; background: var(--leaf); padding: 9% 9% 8%; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.book__page--l { border-radius: 4px 0 0 4px; background: linear-gradient(90deg, var(--leaf) 80%, #f1ead8); transform-origin: right center; }
.book__page--r { border-radius: 0 4px 4px 0; background: linear-gradient(270deg, var(--leaf) 80%, #f1ead8); }
.book__page::after { content: ''; position: absolute; inset: 10px; border: 1px solid var(--rule-2); pointer-events: none; }
.book__spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(var(--rule), rgba(59,47,36,.3), var(--rule)); }
.book__ch { font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--forest); }
.book__name { font: 500 clamp(20px, 2.4vw, 30px)/1.1 var(--serif); margin-top: 12px; overflow-wrap: anywhere; }
.book__text { font: 400 clamp(13px, 1.25vw, 16.5px)/1.55 var(--serif); color: var(--ink-2); margin-top: 14px; }
.dropcap { float: left; font: 500 3.3em/.8 var(--serif); color: var(--forest); margin: .06em .08em 0 0; }
.book__foot { margin-top: auto; font: 500 11px/1.4 var(--sans); color: var(--ink-3); letter-spacing: .04em; }
.book__art { width: 100%; height: auto; flex: 1; min-height: 0; overflow: visible; }
.book__grid path { stroke: var(--rule-2); stroke-width: 1; fill: none; }
.book__chart { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.book__path { fill: none; stroke: var(--forest); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1 7; opacity: 0; transition: opacity 1.2s var(--ease); }
.book__path.is-on { opacity: 1; }
.book__flag { opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.book__flag.is-on { opacity: 1; transform: none; }
.book__flag path { fill: none; stroke: var(--forest); stroke-width: 1.4; stroke-linejoin: round; }
.book__flag circle { fill: var(--leaf); stroke: var(--ink); stroke-width: 1.4; }
.book__flag text { font: 500 11px var(--sans); fill: var(--ink-2); }
.book__tree path, .book__house path { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.book__cap { font: italic 400 13px/1.3 var(--serif); color: var(--ink-3); text-align: center; margin-top: 6px; }
.book__cover {
  position: absolute; left: 50%; top: 0; width: 50%; height: 100%; transform-origin: left center; background: var(--forest);
  border-radius: 0 4px 4px 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; color: #e9e2cd;
  backface-visibility: hidden; transform: rotateY(0deg); transition: transform 1.6s cubic-bezier(.6, .05, .25, 1);
  box-shadow: inset 8px 0 18px rgba(0,0,0,.25);
}
.book__cover::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(233, 226, 205, .45); }
.book__cover span { font: 500 clamp(26px, 3vw, 40px)/1 var(--serif); letter-spacing: .04em; }
.book__cover em { font: italic 400 15px/1 var(--serif); opacity: .8; }
.book.is-open .book__cover { transform: rotateY(-178deg); }
.hero__note { font: italic 400 15px/1.4 var(--serif); color: var(--ink-3); text-align: center; margin-top: 22px; }

/* ---------- tally strip ---------- */
.tally { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.tally__in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tally__cell { padding: 26px 28px; border-left: 1px solid var(--rule); min-width: 0; }
.tally__cell:first-child { border-left: 0; }
.tally__n { display: block; font: 500 34px/1 var(--serif); font-variant-numeric: tabular-nums; transition: color .6s; overflow-wrap: anywhere; }
.tally__n.flash { color: var(--forest); }
.tally__l { display: block; font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.35; }

/* ---------- chapters ---------- */
.chapter { max-width: 1240px; margin: 0 auto; padding: 110px 28px 40px; }
.chapter__head { display: grid; grid-template-columns: 110px minmax(0, 1fr) 120px; gap: 24px; align-items: start; border-top: 1px solid var(--ink); padding-top: 26px; margin-bottom: 48px; }
.chapter__num { font: 400 86px/.8 var(--serif); color: var(--forest); font-style: italic; }
.margin-art { width: 110px; height: 110px; justify-self: end; fill: none; stroke: var(--ink-3); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.draw { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 2.2s var(--ease); }
.is-in .draw, .draw.is-in { stroke-dashoffset: 0; }
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

.state { font-size: 14px; color: var(--ink-2); margin-top: 16px; padding: 12px 14px; border-left: 2px solid var(--forest); background: var(--forest-wash); }
.state.is-err { border-left-color: #8a3b2e; background: rgba(138, 59, 46, .08); }
.state button { margin-left: 10px; font: 500 13px var(--sans); background: none; border: 0; border-bottom: 1px solid currentColor; color: var(--ink); cursor: pointer; padding: 0; }

/* lookup */
.lookup { border: 1px solid var(--rule); background: var(--leaf); padding: 22px; box-shadow: var(--shadow); }
.lookup__lbl, .you__form label { display: block; font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.lookup__row { display: flex; gap: 10px; }
.lookup__in {
  flex: 1; min-width: 0; font: 400 18px/1.2 var(--serif); color: var(--ink); background: var(--paper); border: 1px solid var(--rule);
  padding: 13px 14px; border-radius: 2px; transition: border-color .2s, box-shadow .25s;
}
.lookup__in::placeholder { color: var(--ink-3); font-style: italic; }
.lookup__in:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-wash); }
.lookup__err { color: #8a3b2e; font-size: 14px; margin-top: 10px; }

/* shelves */
.shelves { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; margin-top: 40px; }
.shelf { min-width: 0; }
.shelf__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.shelf__head p { color: var(--ink-3); font-size: 14px; }
.spines { list-style: none; margin: 0; padding: 0 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; border-bottom: 6px solid var(--paper-3); padding-bottom: 12px; }
.spine { min-width: 0; }
.spine button {
  width: 100%; height: 100%; text-align: left; cursor: pointer; background: var(--leaf); border: 1px solid var(--rule); border-left: 4px solid var(--c, var(--forest));
  padding: 12px 12px 12px 12px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px; align-items: center; font-family: var(--sans); color: var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.spine button:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.spine button:active { transform: translateY(0); }
.spine img, .spine .mono { width: 30px; height: 30px; border-radius: 50%; grid-row: span 2; object-fit: cover; background: var(--paper-3); }
.spine .mono { display: grid; place-items: center; font: 600 14px var(--serif); color: var(--ink-2); }
.spine__sym { font: 600 17px/1.1 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spine__meta { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spine__chg { font-variant-numeric: tabular-nums; }
.spine__chg.up { color: var(--forest); } .spine__chg.dn { color: #8a3b2e; }
.spine--ghost { height: 64px; background: linear-gradient(100deg, var(--paper-2) 30%, var(--leaf) 50%, var(--paper-2) 70%); background-size: 250% 100%; animation: shim 1.6s linear infinite; border: 1px solid var(--rule-2); }
@keyframes shim { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.shelf__empty { padding: 22px; border: 1px dashed var(--rule); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; color: var(--ink-2); font: 400 17px/1.45 var(--serif); }

/* biography */
.bio { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
.bio__plate { position: sticky; top: 90px; min-width: 0; }
.plate { background: var(--leaf); border: 1px solid var(--rule); padding: 24px; box-shadow: var(--shadow); }
.plate__img, .plate__mono { width: 96px; height: 96px; border-radius: 50%; display: block; margin-bottom: 18px; object-fit: cover; border: 1px solid var(--rule); }
.plate__mono { display: grid; place-items: center; font: 500 44px var(--serif); color: var(--forest); background: var(--paper-2); }
.plate__facts { margin: 0; display: grid; gap: 0; }
.plate__facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.plate__facts dt { font-size: 12.5px; color: var(--ink-3); letter-spacing: .03em; }
.plate__facts dd { margin: 0; font: 600 16px/1.2 var(--serif); text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.plate__mint { margin-top: 14px; font-size: 12px; color: var(--ink-3); }
.plate__mint span { display: block; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; font-size: 10.5px; margin-bottom: 4px; }
.plate__mint code { word-break: break-all; color: var(--ink-2); }
.plate__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.plate__links a { font: 500 12.5px/1 var(--sans); border: 1px solid var(--rule); padding: 7px 10px; text-decoration: none; color: var(--ink-2); }
.plate__links a:hover { background: var(--ink); color: var(--paper); }
.bio__pages { display: grid; gap: 28px; min-width: 0; }
.page { background: var(--leaf); border: 1px solid var(--rule); padding: 34px 40px 36px; position: relative; min-width: 0; opacity: 0; transform: translateY(16px); animation: pageIn .9s var(--ease) forwards; }
.page:nth-child(2) { animation-delay: .1s; } .page:nth-child(3) { animation-delay: .2s; } .page:nth-child(4) { animation-delay: .3s; } .page:nth-child(5) { animation-delay: .4s; } .page:nth-child(6) { animation-delay: .5s; }
@keyframes pageIn { to { opacity: 1; transform: none; } }
.page--ghost { opacity: 1; transform: none; animation: none; }
.page .page__ch { font: 600 10.5px/1 var(--sans); max-width: none; letter-spacing: .2em; text-transform: uppercase; color: var(--forest); }
.page h3 { font-size: 30px; margin: 10px 0 14px; }
.page p { font: 400 19.5px/1.62 var(--serif); color: var(--ink); max-width: 38em; }
.page p + p { margin-top: 12px; clear: left; }
.page h3 + p::first-letter { float: left; font: 500 3.4em/.78 var(--serif); color: var(--forest); margin: .08em .1em 0 0; }
.page .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-2); font-size: 13px; color: var(--ink-3); }
.page .facts b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.page__folio { position: absolute; right: 22px; bottom: 14px; font: italic 13px var(--serif); color: var(--ink-3); }
.shim { height: 14px; margin: 12px 0; background: linear-gradient(100deg, var(--paper-2) 30%, var(--paper) 50%, var(--paper-2) 70%); background-size: 250% 100%; animation: shim 1.6s linear infinite; }
.shim--h { height: 28px; width: 50%; } .shim--s { width: 60%; }
.places { margin-top: 16px; display: grid; gap: 0; }
.places div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; padding: 8px 0; border-bottom: 1px dotted var(--rule); font-size: 14px; }
.places span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.places span { font-variant-numeric: tabular-nums; }

/* arc */
.arc { background: var(--leaf); border: 1px solid var(--rule); padding: 22px 26px 26px; box-shadow: var(--shadow); }
.arc__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { position: relative; display: inline-flex; border: 1px solid var(--rule); background: var(--paper); padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; font: 500 13px/1 var(--sans); background: none; border: 0; padding: 10px 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: color .25s; }
.tabs button[aria-selected="true"] { color: var(--paper); }
.tabs__ink { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; background: var(--ink); transition: transform .4s var(--ease), width .4s var(--ease); }
.arc__body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; }
.arc__fig { margin: 0; min-width: 0; }
.arc__chart { position: relative; height: 380px; border-bottom: 1px solid var(--rule); }
.arc__chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.arc__shim { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(251,248,239,.9) 50%, transparent 70%); background-size: 250% 100%; animation: shim 1.6s linear infinite; pointer-events: none; }
.ax path, .ax line { stroke: var(--rule-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ax text { font: 400 11px var(--sans); fill: var(--ink-3); }
.arc__line { fill: none; stroke: var(--ink); stroke-width: 1.7; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.arc__area { fill: var(--forest-wash); opacity: 0; transition: opacity 1.2s .6s; }
.arc__area.is-on { opacity: 1; }
.arc__axes { position: absolute; inset: 0; pointer-events: none; }
.arc__lbl { position: absolute; font: 400 11px/1 var(--sans); color: var(--ink-3); white-space: nowrap; background: var(--leaf); padding: 2px 4px 2px 0; }
.arc__flag { position: absolute; transform: translate(-50%, -100%); pointer-events: none; opacity: 0; transition: opacity .5s; }
.arc__flag.is-on { opacity: 1; }
.arc__flag i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--leaf); border: 1.4px solid var(--forest); font: 600 11px/1 var(--sans); font-style: normal; color: var(--forest); }
.arc__flag::after { content: ''; display: block; width: 1px; height: 12px; background: var(--forest); margin: 0 auto; }
.arc__dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); pointer-events: none; }
.arc__xline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); pointer-events: none; }
.arc__tip { position: absolute; top: 8px; background: var(--ink); color: var(--paper); font: 500 12px/1.4 var(--sans); padding: 8px 10px; pointer-events: none; white-space: nowrap; z-index: 2; }
.arc__cap { font: italic 14px/1.45 var(--serif); color: var(--ink-3); margin-top: 34px; }
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; align-content: start; min-width: 0; }
.episodes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule-2); opacity: 0; transform: translateX(10px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.episodes li.is-in { opacity: 1; transform: none; }
.episodes i { font: 600 11px/22px var(--sans); font-style: normal; width: 22px; height: 22px; text-align: center; border-radius: 50%; border: 1.4px solid var(--forest); color: var(--forest); }
.episodes b { display: block; font: 600 17px/1.2 var(--serif); }
.episodes span { font-size: 13px; color: var(--ink-3); }

/* cast */
.cast { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: "sum ring" "list list" "act act"; gap: 28px; }
.cast__sum { grid-area: sum; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.meter { padding: 20px 18px 20px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.meter__n { display: block; font: 500 44px/1 var(--serif); font-variant-numeric: tabular-nums; }
.meter__l { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.cast__ring { grid-area: ring; }
.cast__ring svg { width: 100%; height: auto; }
.cast__ring circle { fill: none; }
.ring-seg { transition: stroke-dashoffset 1.4s var(--ease); }
.ring-txt { font: 500 26px var(--serif); fill: var(--ink); }
.ring-sub { font: 400 11px var(--sans); fill: var(--ink-3); }
.cast__list { grid-area: list; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; counter-reset: cast; }
.cast__list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule-2); min-width: 0; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.cast__list li.is-in { opacity: 1; transform: none; }
.cast__rank { font: italic 500 20px/1 var(--serif); color: var(--ink-3); }
.cast__who { min-width: 0; }
.cast__who b { display: block; font: 600 16.5px/1.2 var(--serif); }
.cast__who code { display: block; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast__who a { color: inherit; text-decoration: none; }
.cast__who a:hover code { color: var(--forest); }
.cast__pct { text-align: right; font: 600 16px/1 var(--serif); font-variant-numeric: tabular-nums; }
.cast__bar { grid-column: 2 / 4; height: 3px; background: var(--paper-3); position: relative; overflow: hidden; }
.cast__bar span { position: absolute; inset: 0; background: var(--ink-2); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }
.cast__bar span.pool { background: var(--ink-3); }
.cast__bar span.you { background: var(--forest); }
.tag { display: inline-block; font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; border: 1px solid var(--rule); color: var(--ink-3); margin-left: 6px; vertical-align: 2px; }
.tag--you { border-color: var(--forest); color: var(--forest); }
.cast__act { grid-area: act; }

/* your chapter */
.you { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.you__form { min-width: 0; }
.you__hint { font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.you__out { background: var(--leaf); border: 1px solid var(--rule); padding: 30px 32px; min-height: 200px; min-width: 0; box-shadow: var(--shadow); }
.you__empty { font: italic 400 18px/1.5 var(--serif); color: var(--ink-3); }
.you__out h3 { font-size: 28px; margin-bottom: 10px; }
.you__out p { font: 400 19px/1.55 var(--serif); }
.you__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 18px; border-top: 1px solid var(--rule-2); }
.you__grid div { padding: 14px 10px 4px 0; min-width: 0; }
.you__grid b { display: block; font: 500 26px/1.1 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.you__grid span { font-size: 12.5px; color: var(--ink-3); }

/* keepsake */
.keep { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.keep__frame { background: var(--paper-3); padding: 16px; border: 1px solid var(--rule); min-width: 0; transform: rotate(-.6deg); transition: transform .6s var(--ease); }
.keep__frame:hover { transform: rotate(0deg); }
.keep__frame canvas { width: 100%; height: auto; display: block; box-shadow: var(--shadow); }
.keep__side { min-width: 0; }
.keep__side > p { font: 400 19px/1.55 var(--serif); color: var(--ink-2); }
.keep__opt { display: flex; gap: 10px; align-items: center; margin-top: 18px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.keep__opt input { accent-color: var(--forest); width: 16px; height: 16px; }
.keep__btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* how (pinned) */
.how { max-width: 1240px; margin: 0 auto; padding: 120px 28px 40px; }
.how__head { max-width: 760px; margin-bottom: 30px; }
.how__pin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; }
.how__stage { position: sticky; top: 110px; height: min(70vh, 520px); display: grid; place-items: center; background: var(--leaf); border: 1px solid var(--rule); min-width: 0; }
.how__stage svg { width: 82%; height: auto; max-height: 92%; }
.hs { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translateY(14px) scale(.97); transform-origin: 210px 210px; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.hs--1 circle, .hs--2 path:last-child { stroke: var(--forest); }
.hs--2 path:first-child { stroke: var(--forest); stroke-width: 3; }
.hs--0 path { stroke: var(--ink-3); stroke-width: 6; }
.hs.is-on { opacity: 1; transform: none; }
.how__steps { list-style: none; margin: 0; padding: 10vh 0 20vh; display: grid; gap: 34vh; min-width: 0; }
.step { opacity: .28; transition: opacity .6s var(--ease); }
.step.is-on { opacity: 1; }
.step__n { font: italic 500 54px/1 var(--serif); color: var(--forest); }
.step h3 { font-size: 32px; margin: 8px 0 12px; }
.step p { font: 400 19.5px/1.6 var(--serif); color: var(--ink-2); }

/* sources */
.sources { background: var(--ink); color: #e9e2cd; margin-top: 80px; }
.sources__in { max-width: 1000px; margin: 0 auto; padding: 100px 28px; }
.sources h2 { color: #f4eedf; }
.sources .kicker { color: #a9bea9; }
.biblio { margin: 34px 0 0; padding: 0 0 0 1.4em; font: 400 19px/1.6 var(--serif); }
.biblio li { padding: 12px 0; border-bottom: 1px solid rgba(233, 226, 205, .16); }
.biblio__k { font-style: italic; color: #f4eedf; }

/* faq */
.faq__in { max-width: 1000px; margin: 0 auto; padding: 110px 28px 90px; }
.faq__head { margin-bottom: 30px; }
.faq__list details { border-top: 1px solid var(--rule); }
.faq__list details:last-child { border-bottom: 1px solid var(--rule); }
.faq__list summary { list-style: none; cursor: pointer; font: 500 23px/1.3 var(--serif); padding: 20px 40px 20px 0; position: relative; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease); }
.faq__list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__list details p { font: 400 18.5px/1.6 var(--serif); color: var(--ink-2); padding: 0 0 22px; max-width: 46em; }

/* footer */
.foot { border-top: 1px solid var(--ink); background: var(--paper-2); }
.foot__in { max-width: 1240px; margin: 0 auto; padding: 56px 28px 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 30px 60px; }
.foot__brand p { color: var(--ink-3); margin-top: 10px; font-size: 14px; max-width: 26em; }
.foot__honest h2 { font-size: 22px; margin-bottom: 10px; }
.foot__honest p { font: 400 16.5px/1.6 var(--serif); color: var(--ink-2); }
.foot__coin { display: flex; gap: 10px; flex-wrap: wrap; }
.foot__coin a, .foot__coin button { font: 500 13px/1 var(--sans); border: 1px solid var(--rule); background: var(--leaf); padding: 10px 14px; color: var(--ink); text-decoration: none; cursor: pointer; }
.foot__end { grid-column: 1 / -1; font: italic 14px var(--serif); color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: 18px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; font-size: 14px; z-index: 900; max-width: calc(100vw - 32px); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 40px; padding-top: 48px; }
  .arc__body { grid-template-columns: minmax(0, 1fr); }
  .bio { grid-template-columns: minmax(0, 1fr); }
  .bio__plate { position: static; }
  .shelves { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .nav__links { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px 20px 16px; display: none; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--rule-2); }
  .nav__menu { display: block; }
  .nav__in { gap: 12px; }
  .nav__end { margin-left: auto; }
  .how__pin { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .how__stage { top: 76px; height: 240px; z-index: 2; }
  .how__steps { gap: 18vh; padding: 4vh 0 10vh; }
  .cast { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sum" "ring" "list" "act"; }
  .cast__ring { max-width: 240px; }
  .cast__list { grid-template-columns: minmax(0, 1fr); }
  .you, .keep { grid-template-columns: minmax(0, 1fr); }
  .tally__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tally__cell:nth-child(3) { border-left: 0; }
  .tally__cell { border-top: 1px solid var(--rule); }
  .foot__in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .nav__in { padding: 0 14px; }
  .brand__word { font-size: 22px; }
  .brand__mark { width: 26px; height: 26px; }
  .wb-btn { padding: 10px 12px; font-size: 12.5px; max-width: 140px; }
  .hero { padding: 36px 16px 40px; }
  .hero__sub { font-size: 18.5px; }
  .chapter, .how { padding-left: 16px; padding-right: 16px; padding-top: 80px; }
  .chapter__head { grid-template-columns: 54px minmax(0, 1fr); gap: 14px; }
  .chapter__num { font-size: 54px; }
  .margin-art { display: none; }
  .lookup { padding: 16px; }
  .lookup__row { flex-direction: column; }
  .lookup__in { font-size: 16px; }
  .page { padding: 26px 20px 30px; }
  .page p { font-size: 18px; }
  .arc { padding: 16px 14px 18px; }
  .arc__chart { height: 260px; }
  .tally__cell { padding: 18px 16px; }
  .tally__n { font-size: 26px; }
  .meter__n { font-size: 34px; }
  .you__out { padding: 22px 18px; }
  .you__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .faq__in, .sources__in { padding-left: 16px; padding-right: 16px; }
  .foot__in { padding-left: 16px; padding-right: 16px; }
  .book { aspect-ratio: .92; }
  .book__text { font-size: 13px; }
  .book__page { padding: 8% 7%; }
  .book__tree, .book__house { display: none; }
  .spines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal], [data-rise], .hero__title .w, .page, .episodes li, .cast__list li { opacity: 1 !important; transform: none !important; }
  .draw { stroke-dashoffset: 0 !important; }
}

/* ================= plain-language pass ================= */
.hero__tech { font: 400 13.5px/1.5 var(--sans); color: var(--ink-3); margin-top: 12px; max-width: 40em; }
abbr[title] { text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; cursor: help; }
.three { border-top: 1px solid var(--rule); background: var(--leaf); }
.three__in { max-width: 1240px; margin: 0 auto; padding: 46px 28px 40px; }
.three__title { margin: 0 0 22px; }
.three__title .kicker { margin: 0; display: block; }
.three__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.three__step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; padding: 4px 28px 4px 0; border-right: 1px solid var(--rule); margin-right: 28px; min-width: 0; }
.three__step:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.three__ico { grid-row: 1 / span 2; width: 56px; height: 56px; fill: none; stroke: var(--forest); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.three__n { font: italic 500 24px/1 var(--serif); color: var(--forest); }
.three__step p { margin: 6px 0 0; font: 400 19px/1.4 var(--serif); color: var(--ink-2); }
.three__step b { color: var(--ink); font-weight: 600; }
.three__safe { margin: 28px 0 0; padding-top: 16px; border-top: 1px dashed var(--rule); font: italic 400 16px/1.45 var(--serif); color: var(--forest); }
.plain { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between; margin: -22px 0 32px; padding: 16px 20px; background: var(--leaf); border: 1px solid var(--rule); border-left: 3px solid var(--forest); border-radius: 3px; }
.plain__what { margin: 0; font: 400 17px/1.45 var(--serif); color: var(--ink-2); flex: 1 1 360px; min-width: 0; }
.plain__what b { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--forest); margin-right: 6px; }
.verdict { margin: 0 0 28px; padding: 14px 18px; background: var(--forest-wash); border-radius: 3px; font: 400 18px/1.45 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.verdict b { font-weight: 600; color: var(--forest); }
.you__out .verdict { margin: 18px 0 0; }
.words { max-width: 1240px; margin: 0 auto; padding: 110px 28px 20px; }
.words__in > h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 30px; }
.words__list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 1px solid var(--ink); }
.words__list > div { padding: 16px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.words__list dt { font: 600 19px/1.3 var(--serif); color: var(--ink); }
.words__list dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
@media (max-width: 900px) {
  .three__list { grid-template-columns: 1fr; gap: 18px; }
  .three__step { border-right: 0; margin-right: 0; padding: 0 0 18px; border-bottom: 1px solid var(--rule-2); }
  .three__step:last-child { border-bottom: 0; padding-bottom: 0; }
  .words__list { grid-template-columns: 1fr; }
  .plain { margin-top: -18px; }
}
@media (max-width: 560px) {
  .three__in { padding: 34px 18px 30px; }
  .three__step { grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; }
  .three__ico { width: 44px; height: 44px; }
  .three__step p { font-size: 17px; }
  .plain { padding: 14px; }
  .plain .btn { width: 100%; justify-content: center; }
  .words { padding: 76px 18px 10px; }
}
