/* Australia42, The Book */

.page-book main { position: relative; z-index: 1; }
.book-view { max-width: 1180px; margin: 0 auto; padding: 172px 32px 60px; outline: none; }
.book-view.reader { max-width: 1240px; }

/* ---------------- volume bar ---------------- */
.bookbar {
  position: fixed;
  top: 84px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
  view-transition-name: bookbar;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s;
}
.bb-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background: rgba(8, 12, 20, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 32px rgba(2, 4, 9, 0.45);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  max-width: calc(100vw - 32px);
}
.bb-track { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.bb-track::-webkit-scrollbar { display: none; }
.bb-item {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: #7d8ba2;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s;
}
.bb-item:hover { color: #c3ccda; }
.bb-item.on { color: var(--star); }
.bb-label { position: relative; z-index: 1; display: flex; flex-direction: column; line-height: 1.15; }
.bb-label small { font-size: 10.5px; font-weight: 500; color: #5d6b82; letter-spacing: 0.01em; }
.bb-item.on .bb-label small { color: var(--aurora); }
.bb-end { font-size: 13px; color: #5d6b82; }
.bb-glow {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 22px rgba(127, 212, 201, 0.1);
}
.bb-sep { flex: none; width: 1px; height: 22px; background: rgba(255, 255, 255, 0.08); margin: 0 4px; }
.bb-find {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 13px 'Instrument Sans', sans-serif;
  color: #8a97ad;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 9px 12px 9px 13px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.bb-find:hover { color: var(--star); background: rgba(255, 255, 255, 0.08); }
.bb-find kbd { font: 500 11px 'Instrument Sans', sans-serif; color: #5d6b82; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; padding: 1px 5px; }
@media (max-width: 900px) {
  .bookbar { top: 76px; padding: 0 16px; }
  .bb-inner { width: 100%; }
  .bb-track { flex: 1; }
  .bb-find span, .bb-find kbd { display: none; }
  .bb-find { padding: 9px 11px; }
  .book-view { padding-top: 150px; padding-left: 20px; padding-right: 20px; }
}

/* quiet chrome while reading */
body.chrome-hidden .nav { transform: translateX(-50%) translateY(-150%); opacity: 0; }
body.chrome-hidden .bookbar { transform: translateY(-190%); opacity: 0; }
@media (max-width: 900px) { body.chrome-hidden .nav { transform: translateY(-150%); } }
.nav { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s; }

/* reading progress */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 40;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--aurora), var(--gold));
  box-shadow: 0 0 12px rgba(127, 212, 201, 0.5);
  width: auto;
}

/* the sky steps back while you read */
body.reading #stars { opacity: 0.45; transition: opacity 1.2s; }
body.reading .limb { opacity: 0.25; transition: opacity 1.2s; }

/* ---------------- shared bits ---------------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.section-cap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(147, 161, 184, 0.14);
}
.section-cap span:first-child { color: var(--aurora); }
.continue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 11px 18px;
  font-size: 14px;
  color: #b8c3d4;
  text-decoration: none;
  background: rgba(227, 201, 136, 0.07);
  border: 1px solid rgba(227, 201, 136, 0.28);
  border-radius: 999px;
  transition: background 0.25s, transform 0.3s;
}
.continue strong { font-weight: 500; color: var(--gold); }
.continue:hover { background: rgba(227, 201, 136, 0.13); transform: translateY(-1px); }

/* ---------------- title page ---------------- */
.titlepage { text-align: center; padding: 70px 0 90px; }
.tp-kicker { font-size: 14px; font-weight: 500; color: var(--aurora); animation: rise 0.9s both; }
.tp-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(72px, 13vw, 176px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 18px 0 26px;
  animation: rise 1.1s 0.08s both;
  text-shadow: 0 0 80px rgba(127, 212, 201, 0.12);
}
.tp-title em { font-style: italic; color: var(--gold); font-size: 0.42em; position: relative; top: -1.05em; margin-left: 4px; }
.tp-sub { font-family: 'Instrument Serif', Georgia, serif; font-size: clamp(22px, 2.6vw, 30px); color: #c9d2e0; animation: rise 1.1s 0.18s both; }
.tp-author { margin-top: 14px; font-size: 15px; color: var(--muted); animation: rise 1.1s 0.26s both; }
.titlepage .continue { animation: rise 1.1s 0.36s both; }

.vision { max-width: 760px; margin: 0 auto 110px; }
.vision p {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 21px;
  line-height: 1.72;
  color: #b9c4d4;
  margin-bottom: 22px;
  animation: rise 1s calc(0.4s + var(--i) * 0.06s) both;
}
.vision p:first-child::first-letter {
  font-family: 'Instrument Serif', Georgia, serif;
  float: left;
  font-size: 4.2em;
  line-height: 0.8;
  padding: 8px 12px 0 0;
  color: var(--star);
}
.vision-statement {
  font-family: 'Instrument Serif', Georgia, serif !important;
  font-size: clamp(30px, 3.4vw, 44px) !important;
  line-height: 1.22 !important;
  color: var(--star) !important;
  text-align: center;
  margin: 56px -60px 0 !important;
  padding: 44px 20px 0;
  border-top: 1px solid rgba(227, 201, 136, 0.25);
  text-wrap: balance;
  text-shadow: 0 0 40px rgba(227, 201, 136, 0.12);
}
@media (max-width: 900px) { .vision-statement { margin: 44px 0 0 !important; } .vision p { font-size: 19px; } }

.bookmap { margin-bottom: 100px; }
.bookmap-grid { display: grid; grid-template-columns: 0.8fr 1fr 1fr 1fr 0.8fr; gap: 14px; margin-top: 22px; }
@media (max-width: 1100px) { .bookmap-grid { grid-template-columns: 1fr 1fr; } .bm-card:first-child { grid-column: span 2; } }
@media (max-width: 600px) { .bookmap-grid { grid-template-columns: 1fr; } .bm-card:first-child { grid-column: auto; } }
.bm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 250px;
  padding: 24px 22px 20px;
  text-decoration: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 55%) rgba(2, 4, 8, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 24px 50px rgba(2, 4, 9, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.45s;
  animation: rise 0.9s calc(0.1s + var(--i) * 0.07s) both;
}
.bm-card:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 34px 70px rgba(2, 4, 9, 0.6), 0 0 50px rgba(127, 212, 201, 0.08); }
.bm-no { font-size: 12.5px; font-weight: 600; color: var(--aurora); }
.bm-title { font-family: 'Instrument Serif', Georgia, serif; font-size: 30px; line-height: 1.05; color: var(--star); }
.bm-desc { font-size: 14px; line-height: 1.55; color: #8e9bb0; flex: 1; }
.bm-meta { font-size: 12.5px; color: var(--dim); }
.bm-end { background: rgba(255, 255, 255, 0.02); box-shadow: none; }
.bm-end .bm-no { color: var(--dim); }
.bm-end .bm-title { font-size: 25px; color: #c9d2e0; }

.front-list { max-width: 760px; margin: 0 auto 40px; }
.begin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  color: #04070d;
  text-decoration: none;
  background: rgba(238, 242, 249, 0.94);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(238, 242, 249, 0.14);
  transition: transform 0.3s, box-shadow 0.3s;
}
.begin:hover { transform: translateY(-2px); box-shadow: 0 20px 50px rgba(238, 242, 249, 0.22); }

/* ---------------- contents lists ---------------- */
.toc-list ol { list-style: none; }
.toc-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 4px;
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 161, 184, 0.07);
  transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
  border-radius: 10px;
}
.toc-row:hover { padding-left: 14px; background: rgba(255, 255, 255, 0.025); }
.tr-no { flex: none; width: 26px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--hue, var(--dim)); opacity: 0.8; }
.tr-title { font-family: 'Newsreader', Georgia, serif; font-size: 19.5px; line-height: 1.35; color: #c9d2e0; transition: color 0.25s; }
.toc-row:hover .tr-title { color: var(--star); }
.tr-lead { flex: 1; min-width: 20px; border-bottom: 1px dotted rgba(147, 161, 184, 0.22); transform: translateY(-5px); }
.tr-time { flex: none; font-size: 12.5px; color: var(--dim); }

.vol-head { max-width: 780px; padding: 40px 0 50px; animation: rise 0.9s both; }
.vh-kicker { font-size: 14px; font-weight: 500; color: var(--aurora); }
.vh-title { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: clamp(52px, 7vw, 92px); line-height: 0.98; margin: 12px 0 22px; }
.vh-lede p { font-family: 'Newsreader', Georgia, serif; font-size: 21px; line-height: 1.65; color: #b9c4d4; margin-bottom: 14px; }
.vh-lede h3 { display: none; }
.vh-meta { margin-top: 10px; font-size: 13.5px; color: var(--dim); }
.vh-more { margin-top: 18px; border-top: 1px solid rgba(147, 161, 184, 0.12); border-bottom: 1px solid rgba(147, 161, 184, 0.12); }
.vh-more summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--star);
}
.vh-more summary::-webkit-details-marker { display: none; }
.vh-more summary::after { content: '+'; margin-left: auto; font-size: 20px; color: var(--dim); transition: transform 0.3s; }
.vh-more[open] summary::after { transform: rotate(45deg); }
.vh-more summary span { font-size: 13.5px; font-weight: 400; color: var(--dim); }
.vh-more .prose { padding: 4px 2px 26px; }

.vol-part { margin: 0 0 64px; animation: rise 0.9s 0.1s both; }
.vp-head { display: grid; grid-template-columns: 110px 1fr; column-gap: 20px; align-items: baseline; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid rgba(147, 161, 184, 0.14); }
.vp-no { grid-row: span 2; font-size: 13px; font-weight: 600; color: var(--hue); }
.vp-head h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 34px; line-height: 1.1; }
.vp-head p { grid-column: 2; margin-top: 6px; font-size: 15px; line-height: 1.55; color: #8e9bb0; max-width: 640px; }
@media (max-width: 700px) { .vp-head { grid-template-columns: 1fr; } .vp-no { grid-row: auto; margin-bottom: 4px; } .vp-head p { grid-column: 1; } }
.vol-head.is-ledger + .vol-part .tr-title, .is-ledger ~ .vol-part .tr-title { font-family: 'Instrument Sans', sans-serif; font-size: 17px; }

/* ---------------- policies index ---------------- */
.pol-tools {
  position: sticky;
  top: 150px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 0 -12px 40px;
  background: rgba(4, 7, 13, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
body.chrome-hidden .pol-tools { top: 16px; }
.pol-tools { transition: top 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.pol-search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 46px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  transition: border-color 0.25s, background 0.25s;
}
.pol-search:focus-within { border-color: rgba(127, 212, 201, 0.5); background: rgba(255, 255, 255, 0.07); color: var(--aurora); }
.pol-search input { flex: 1; background: none; border: none; outline: none; font: 400 15.5px 'Instrument Sans', sans-serif; color: var(--star); }
.pol-search input::placeholder { color: #5d6b82; }
.pol-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 13px 'Instrument Sans', sans-serif;
  color: #8a97ad;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip span { color: #5d6b82; margin-left: 3px; }
.chip:hover { color: var(--star); }
.chip.on { color: var(--star); border-color: color-mix(in srgb, var(--hue, #eef2f9) 55%, transparent); background: color-mix(in srgb, var(--hue, #eef2f9) 10%, transparent); }
@media (max-width: 900px) { .pol-tools { top: 138px; } .pol-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; } .chip { flex: none; } }
.pol-empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 16px; }

.pol-part { margin-bottom: 70px; }
.pol-part .vp-head { border-bottom: none; }
.pol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 10px; }
.pol-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  min-height: 218px;
  padding: 22px 22px 18px;
  text-decoration: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015) 55%) rgba(2, 4, 8, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 18px 40px rgba(2, 4, 9, 0.4);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s, box-shadow 0.45s;
}
.pol-card::after {
  content: '';
  position: absolute;
  inset: auto -30% -60% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hue) 22%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.pol-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--hue) 40%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 30px 60px rgba(2, 4, 9, 0.55); }
.pol-card:hover::after { opacity: 1; }
.pol-card[hidden] { display: none; }
.pol-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--hue);
  background: color-mix(in srgb, var(--hue) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--hue) 22%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--hue) 10%, transparent);
  margin-bottom: 8px;
}
.pol-icon svg { width: 24px; height: 24px; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--hue) 55%, transparent)); }
.pol-icon svg > * { stroke-dasharray: 1; stroke-dashoffset: 0; }
.pol-card:hover .pol-icon svg > * { animation: draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) both; }
.pol-card:hover .pol-icon svg > *:nth-child(2) { animation-delay: 0.08s; }
.pol-card:hover .pol-icon svg > *:nth-child(3) { animation-delay: 0.16s; }
.pol-card:hover .pol-icon svg > *:nth-child(n+4) { animation-delay: 0.24s; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.pol-title { font-family: 'Instrument Serif', Georgia, serif; font-size: 25px; line-height: 1.08; color: var(--star); }
.pol-blurb { font-size: 14px; line-height: 1.5; color: #8e9bb0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pol-meta { font-size: 12.5px; color: var(--dim); }
.pol-signoff {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 520px;
  margin: 10px auto 30px;
  padding: 18px 22px;
  text-decoration: none;
  border: 1px dashed rgba(227, 201, 136, 0.3);
  border-radius: 22px;
  transition: background 0.3s;
}
.pol-signoff:hover { background: rgba(227, 201, 136, 0.05); }
.pol-signoff .pol-icon { margin: 0; }
.pol-signoff strong { display: block; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 24px; color: var(--star); }
.pol-signoff em { font-style: normal; font-size: 14px; color: var(--muted); }

/* ---------------- reader ---------------- */
.rd { animation: rise 0.8s both; }
.rd-head { max-width: 860px; margin: 0 auto; padding: 30px 0 44px; text-align: center; }
.rd-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  border-radius: 24px;
  color: var(--hue);
  background: color-mix(in srgb, var(--hue) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--hue) 28%, transparent);
  box-shadow: 0 0 60px color-mix(in srgb, var(--hue) 16%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.rd-icon svg { width: 38px; height: 38px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--hue) 60%, transparent)); }
.rd-icon svg > * { stroke-dasharray: 1; animation: draw 1.4s 0.15s cubic-bezier(0.65, 0, 0.35, 1) both; }
.rd-kicker { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; font-size: 13.5px; font-weight: 500; color: var(--aurora); }
.rd-kicker span + span { color: var(--hue); }
.rd-kicker span + span::before { content: ''; display: inline-block; width: 18px; height: 1px; margin: 0 12px; vertical-align: middle; background: rgba(147, 161, 184, 0.35); }
.reader--book .rd-kicker span + span, .reader--ledger .rd-kicker span + span { color: var(--muted); }
.rd-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 74px);
  line-height: 1.02;
  margin: 16px 0 18px;
  text-wrap: balance;
}
.rd-strap { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 22px; line-height: 1.5; color: #b9c4d4; max-width: 680px; margin: 0 auto; }
.rd-meta { display: flex; justify-content: center; gap: 18px; margin-top: 20px; font-size: 13px; color: var(--dim); }

.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto 64px;
}
.gl-card {
  position: relative;
  padding: 22px 24px 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 60%) rgba(2, 4, 8, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 20px 44px rgba(2, 4, 9, 0.4);
  animation: rise 0.8s both;
}
.gl-card:nth-child(2) { animation-delay: 0.08s; }
.gl-card:nth-child(3) { animation-delay: 0.16s; }
.gl-card::before { content: ''; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--hue), transparent); opacity: 0.7; }
.gl-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--hue); margin-bottom: 10px; }
.gl-card p { font-family: 'Newsreader', Georgia, serif; font-size: 17px; line-height: 1.6; color: #c9d2e0; }

.rd-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 700px);
  justify-content: center;
  gap: 64px;
  align-items: start;
}
.rd-layout.no-toc { grid-template-columns: minmax(0, 700px); }
.rd-toc {
  position: sticky;
  top: 170px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 6px;
  transition: top 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.chrome-hidden .rd-toc { top: 40px; }
.rd-toc::-webkit-scrollbar { display: none; }
.toc-cap { font-size: 12px; font-weight: 600; color: var(--dim); margin-bottom: 10px; }
.rd-toc a {
  position: relative;
  font-size: 13.5px;
  line-height: 1.4;
  color: #6f7d94;
  text-decoration: none;
  padding: 6px 0 6px 14px;
  border-left: 1px solid rgba(147, 161, 184, 0.14);
  transition: color 0.25s, border-color 0.25s;
}
.rd-toc a:hover { color: #c3ccda; }
.rd-toc a.on { color: var(--star); border-left-color: var(--hue); }
.rd-toc a.on::before { content: ''; position: absolute; left: -3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 10px var(--hue); }
@media (max-width: 1080px) { .rd-layout { grid-template-columns: minmax(0, 700px); } .rd-toc { display: none; } }

/* the prose itself */
.prose { font-family: 'Newsreader', Georgia, serif; }
.prose p, .prose li { font-size: 19px; line-height: 1.78; color: #c3cddc; }
.prose p { margin-bottom: 20px; }
.prose p strong, .prose li strong { color: var(--star); font-weight: 500; }
.vision p strong { color: var(--star); font-weight: 500; }
.prose h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
  color: var(--star);
  margin: 56px 0 18px;
  scroll-margin-top: 170px;
  text-wrap: balance;
}
.prose h4 { font-family: 'Instrument Sans', sans-serif; font-size: 17px; font-weight: 600; color: var(--star); margin: 34px 0 12px; }
.prose h5 { font-family: 'Instrument Sans', sans-serif; font-size: 15px; font-weight: 600; color: var(--muted); margin: 26px 0 10px; }
.prose ul { margin: 0 0 22px 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--hue, var(--aurora)); }
.prose > h3:first-child { margin-top: 0; }
.dropcap::first-letter {
  font-family: 'Instrument Serif', Georgia, serif;
  float: left;
  font-size: 4.3em;
  line-height: 0.8;
  padding: 8px 12px 0 0;
  color: var(--star);
}
@media (max-width: 700px) { .prose p, .prose li { font-size: 18px; } .prose h3 { font-size: 27px; } }

/* tables, the Ledger especially */
.tbl-wrap {
  margin: 30px 0 36px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(2, 4, 8, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.tbl-wrap table { width: 100%; border-collapse: collapse; font-family: 'Instrument Sans', sans-serif; font-size: 14px; line-height: 1.5; }
.tbl-wrap th {
  position: sticky;
  top: 0;
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--aurora);
  padding: 14px 16px;
  background: rgba(12, 18, 30, 0.96);
  border-bottom: 1px solid rgba(127, 212, 201, 0.25);
}
.tbl-wrap td { padding: 13px 16px; color: #b9c4d4; vertical-align: top; border-bottom: 1px solid rgba(147, 161, 184, 0.08); font-variant-numeric: tabular-nums; }
.tbl-wrap tr:last-child td { border-bottom: none; }
.tbl-wrap tbody tr { transition: background 0.2s; }
.tbl-wrap tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.tbl-wrap td:first-child { color: var(--star); min-width: 220px; }
.reader--ledger .rd-layout { grid-template-columns: 230px minmax(0, 820px); }
.reader--ledger .rd-layout.no-toc { grid-template-columns: minmax(0, 1000px); }
@media (max-width: 1080px) { .reader--ledger .rd-layout { grid-template-columns: minmax(0, 1000px); } }
.reader--ledger .tbl-wrap { max-height: 78vh; }
.tbl-link {
  display: inline-block;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--aurora);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(127, 212, 201, 0.3);
  border-radius: 999px;
  transition: background 0.2s;
}
.tbl-link:hover { background: rgba(127, 212, 201, 0.1); }

/* sources */
.rd-sources { max-width: 700px; margin: 60px auto 0; border-top: 1px solid rgba(147, 161, 184, 0.16); border-bottom: 1px solid rgba(147, 161, 184, 0.16); }
.reader--ledger .rd-sources { max-width: 1000px; }
.rd-sources summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 18px 2px; font-size: 16px; font-weight: 500; color: var(--star); }
.rd-sources summary::-webkit-details-marker { display: none; }
.rd-sources summary::after { content: '+'; margin-left: auto; font-size: 20px; color: var(--dim); transition: transform 0.3s; }
.rd-sources[open] summary::after { transform: rotate(45deg); }
.rs-count { font-size: 12px; color: var(--dim); padding: 2px 9px; border: 1px solid rgba(147, 161, 184, 0.2); border-radius: 999px; }
.rd-sources ol { margin: 0 0 18px 22px; }
.rd-sources li { font-size: 14px; line-height: 1.6; color: #8e9bb0; margin-bottom: 10px; padding-left: 4px; }
.rd-sources li::marker { color: var(--dim); font-variant-numeric: tabular-nums; }
.rs-room { display: inline-block; margin: 4px 0 22px; font-size: 13.5px; color: var(--aurora); text-decoration: none; }

/* next and previous */
.rd-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 900px; margin: 70px auto 0; }
.flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  transition: background 0.3s, border-color 0.3s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.flow:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.18); transform: translateY(-3px); }
.flow em { font-style: normal; font-size: 12.5px; color: var(--dim); }
.flow span { font-family: 'Instrument Serif', Georgia, serif; font-size: 24px; line-height: 1.15; color: #d3dbe7; }
.flow-next { text-align: right; align-items: flex-end; }
@media (max-width: 700px) { .rd-flow { grid-template-columns: 1fr; } .flow-next { order: -1; } }

/* mobile contents */
.toc-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 22;
  font: 500 14px 'Instrument Sans', sans-serif;
  color: var(--star);
  padding: 12px 18px;
  background: rgba(10, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(2, 4, 9, 0.5);
}
@media (max-width: 1080px) { .toc-fab:not([hidden]) { display: block; } }
.toc-sheet { position: fixed; inset: 0; z-index: 35; background: rgba(2, 4, 8, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.toc-sheet.open { opacity: 1; pointer-events: auto; }
.ts-inner {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 12px;
  background: rgba(10, 15, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  transform: translateY(24px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.toc-sheet.open .ts-inner { transform: none; }
.ts-inner a { font-size: 16px; color: #b9c4d4; text-decoration: none; padding: 11px 8px; border-bottom: 1px solid rgba(147, 161, 184, 0.08); }
.ts-inner a.on { color: var(--star); }

/* ---------------- quick finder ---------------- */
.palette { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 16vh 16px 0; background: rgba(2, 4, 8, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.2s; }
.palette:not(.open) { pointer-events: none; }
.palette.open { opacity: 1; }
.palette-box {
  width: 100%;
  max-width: 620px;
  background: rgba(12, 17, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.palette.open .palette-box { transform: none; }
#palette-input { width: 100%; padding: 22px 24px; background: none; border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.08); outline: none; font: 400 19px 'Instrument Sans', sans-serif; color: var(--star); }
#palette-input::placeholder { color: #5d6b82; }
.palette-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.pr { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 16px; border-radius: 14px; text-decoration: none; }
.pr.on, .pr:hover { background: rgba(255, 255, 255, 0.07); }
.pr-title { font-family: 'Instrument Serif', Georgia, serif; font-size: 21px; color: var(--star); }
.pr-where { flex: none; font-size: 12.5px; color: var(--dim); text-align: right; }
.pr-none { padding: 22px 16px; color: var(--muted); }
.palette-foot { display: flex; justify-content: space-between; padding: 12px 20px; font-size: 12px; color: #5d6b82; border-top: 1px solid rgba(255, 255, 255, 0.06); }
@media (max-width: 600px) { .palette-foot { display: none; } .pr { flex-direction: column; gap: 2px; } .pr-where { text-align: left; } }

/* ---------------- view transitions inside the book ---------------- */
::view-transition-group(bb-glow),
::view-transition-group(pol-icon),
::view-transition-group(pol-title) { animation-duration: 560ms; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-old(pol-title), ::view-transition-new(pol-title) { height: 100%; object-fit: contain; }
::view-transition-group(bookbar), ::view-transition-group(site-nav) { animation: none; }
.glance:has(.gl-card:only-child) { max-width: 700px; }
.book-view { padding-top: 200px; }
@media (max-width: 900px) { .book-view { padding-top: 158px; } }
