/* ─────────────────────────────────────────────────────────────
   Torah Atlas — the static chapter pages (/chapters/…), written by
   scripts/build-pages.ts. Not part of the app bundle: the build copies
   this file next to the pages under a content-hashed name.
   Same Beor Panecha design as the app: night-sky navy, sun gold,
   Larken headings, Instrument Sans text, Frank Ruhl Libre for Hebrew.
   ───────────────────────────────────────────────────────────── */

:root {
  --ink-0: #04071a;
  --ink-1: #070b24;
  --ink-2: #0b1236;
  --ink-3: #111a44;
  --gold: #f9a908;
  --gold-hi: #f7cf0b;
  --parchment: #e2e6fa;
  --text: #eef0fa;
  --text-2: rgba(226, 230, 250, 0.78);
  --text-3: rgba(226, 230, 250, 0.58);
  --text-4: rgba(226, 230, 250, 0.38);
  --line: rgba(249, 169, 8, 0.2);
  --line-2: rgba(249, 169, 8, 0.34);
  --line-3: rgba(249, 169, 8, 0.55);
  --panel: rgba(7, 11, 36, 0.86);
  --panel-edge: rgba(226, 230, 250, 0.12);
  --c-identified: #efdfb2;
  --c-probable: #d4ae63;
  --c-traditional: #c78f5c;
  --c-disputed: #97b2cf;
  --c-unknown: #9a9084;
  --font-display: 'larken', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-he: 'Frank Ruhl Libre', 'SBL Hebrew', 'Times New Roman', serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --pad: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  --measure: 720px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink-0); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 50% -180px, rgba(44, 63, 134, 0.45), transparent 70%),
    radial-gradient(900px 500px at 100% 0, rgba(249, 169, 8, 0.05), transparent 70%),
    var(--ink-0);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-decoration-color: rgba(247, 207, 11, 0.4); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.he { font-family: var(--font-he); font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; unicode-bidi: isolate; }
.muted { color: var(--text-3); }
.small { font-size: 14px; line-height: 1.55; }
.dot { color: var(--text-4); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 14px; border-radius: 999px; background: var(--gold); color: #0b0f2a; font-weight: 600; text-decoration: none; }
.skip:focus { left: var(--pad); }

/* ─── Buttons: Beor Panecha pills ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.btn--gold {
  color: #0b0f2a;
  background: linear-gradient(135deg, #f7cf0b, #f9a908);
  box-shadow: 0 8px 28px -8px rgba(249, 169, 8, 0.55);
  transition: box-shadow 0.45s var(--ease);
}
.btn--gold:hover { color: #0b0f2a; box-shadow: 0 0 0 4px rgba(249, 169, 8, 0.14), 0 0 34px 4px rgba(249, 169, 8, 0.45); }
.btn--big { min-height: 54px; padding: 14px 30px; font-size: 17px; }
.btn--small { min-height: 38px; padding: 8px 16px; font-size: 14px; }

/* ─── Top bar ─── */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-top: env(safe-area-inset-top);
  background: rgba(4, 7, 26, 0.82);
  border-bottom: 1px solid var(--panel-edge);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.bar__in { display: flex; align-items: center; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 12px var(--pad); }
.bar__mark { flex: none; display: grid; place-items: center; border-radius: 50%; transition: box-shadow 0.45s var(--ease); }
.bar__mark:hover { box-shadow: 0 0 0 4px rgba(249, 169, 8, 0.14), 0 0 24px 2px rgba(249, 169, 8, 0.4); }
.bar__name { margin: 0; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.bar__name a { font-family: var(--font-display); font-size: 22px; line-height: 1.1; letter-spacing: -0.01em; color: var(--text); text-decoration: none; white-space: nowrap; }
.bar__name a:hover { color: var(--gold-hi); }
.bar__name span { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: var(--text-3); white-space: nowrap; }
.bar__nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.bar__link { font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.bar__link:hover { color: var(--gold-hi); }

/* ─── Page ─── */
.page { max-width: calc(var(--measure) + 2 * 40px); margin: 0 auto; padding: 28px var(--pad) 40px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 13px; color: var(--text-3); }
.crumbs li + li::before { content: '›'; margin: 0 9px; color: var(--text-4); }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--gold-hi); }

.hero { margin: 34px 0 26px; }
.kicker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 18px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); }
.kicker__num { flex-basis: 100%; font-size: 10.5px; letter-spacing: 0.22em; color: var(--text-3); }
.kicker__he { margin-left: 8px; font-size: 15px; color: rgba(249, 169, 8, 0.7); }
.hero__he { margin: 0 0 6px; font-family: var(--font-he); font-size: 26px; font-weight: 500; line-height: 1.2; color: var(--gold-hi); opacity: 0.9; text-align: left; }
.hero h1 { font-family: var(--font-display); font-size: clamp(42px, 7.4vw, 72px); line-height: 1.02; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; }
.hero__sub { margin: 12px 0 0; font-family: var(--font-display); font-style: italic; font-size: clamp(19px, 2.6vw, 23px); line-height: 1.35; color: var(--text-2); }
.hero__lede { margin: 18px 0 0; font-size: 18px; color: var(--text-2); text-wrap: pretty; }
.date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; margin: 16px 0 0; font-size: 14px; font-weight: 500; letter-spacing: 0.02em; color: var(--text-2); }
.date__bce { color: var(--parchment); font-weight: 600; }
.date__trad { font-style: italic; color: var(--text-3); }
.date__he { font-size: 17px; color: var(--gold-hi); opacity: 0.85; }
.date.is-undated { font-style: italic; color: var(--text-3); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.badge, .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 13px;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-2);
  text-decoration: none;
}
.badge { color: var(--text); border-color: var(--line-2); }
.chip:hover { border-color: var(--line-3); color: #fff; }
.chip__he { font-size: 14px; color: var(--gold-hi); opacity: 0.85; }
.parsha { display: flex; flex-wrap: wrap; gap: 8px; }
.parsha li { padding: 4px 13px; border: 1px solid var(--panel-edge); border-radius: 999px; font-size: 14px; color: var(--text-2); }
.parsha .muted { font-size: 12.5px; }
.parsha__he { margin-left: 7px; font-size: 16px; color: var(--gold-hi); opacity: 0.85; }
.parsha + p { margin-top: 12px; }

/* certainty glyphs: filled for located, ringed for uncertain */
.glyph { flex: none; display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px -2px var(--c); }
.glyph--identified { --c: var(--c-identified); }
.glyph--probable { --c: var(--c-probable); }
.glyph--traditional { --c: var(--c-traditional); transform: rotate(45deg); border-radius: 2px; width: 10px; height: 10px; }
.glyph--disputed { --c: var(--c-disputed); background: transparent; border: 2px solid var(--c); }
.glyph--unknown { --c: var(--c-unknown); background: transparent; border: 2px dashed var(--c); box-shadow: none; }

.open { margin: 0 0 22px; }
.open--end { margin: 40px 0 0; text-align: center; }
/* a dedication under the title; when there is none, a quiet "Dedicate this chapter" at the end */
.dedication { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 1.45; color: rgba(247, 207, 11, 0.88); }
.dedication__glyph { flex: none; display: grid; place-items: center; height: 1.45em; color: var(--gold); }
.dedication__he { display: block; font-family: var(--font-he); font-style: normal; font-size: 17px; text-align: left; opacity: 0.9; }
.dedication__by { color: rgba(226, 230, 250, 0.58); }
.dedicate { margin: 26px 0 0; text-align: center; }
.dedicate a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(226, 230, 250, 0.42); text-decoration: none; }
.dedicate a svg { color: #a8740a; }
.dedicate a:hover { color: rgba(226, 230, 250, 0.8); }
.dedicate a:hover span { text-decoration: underline; }
.open .btn { white-space: normal; text-align: center; }

.shot { margin: 0 0 34px; }
.shot a { display: block; overflow: hidden; border-radius: 20px; border: 1px solid var(--panel-edge); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75); background: var(--ink-2); transition: border-color 0.3s, box-shadow 0.45s var(--ease); }
.shot a:hover { border-color: var(--line-3); box-shadow: 0 0 0 4px rgba(249, 169, 8, 0.1), 0 24px 60px -18px rgba(0, 0, 0, 0.75); }
.shot img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.shot figcaption { margin-top: 10px; font-size: 13px; font-style: italic; color: var(--text-3); }

/* the pasuk */
.pasuk { margin: 0 0 30px; padding: 4px 0 4px 22px; border-left: 1px solid var(--line-3); }
.pasuk__he { margin: 0 0 10px; font-family: var(--font-he); font-size: 25px; line-height: 1.55; color: var(--gold-hi); text-align: right; }
.pasuk blockquote { margin: 0; }
.pasuk blockquote p { margin: 0; font-family: var(--font-display); font-style: italic; font-size: clamp(20px, 2.8vw, 24px); line-height: 1.4; color: var(--parchment); }
.pasuk figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.pasuk cite { font-style: normal; }
.pasuk__cite-he { font-size: 15px; font-weight: 400; color: var(--gold-hi); opacity: 0.85; }

.summary { font-size: 19px; line-height: 1.66; color: var(--text); text-wrap: pretty; }
.summary::first-letter { float: left; margin: 6px 10px 0 0; font-family: var(--font-display); font-size: 62px; line-height: 0.82; color: var(--gold-hi); }

/* ─── Blocks ─── */
.block { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.block p { color: var(--text-2); text-wrap: pretty; }
.block p:last-child { margin-bottom: 0; }
.block--quiet p { font-size: 15.5px; }
.block--tradition > p:first-of-type { border-left: 1px solid var(--line-2); padding-left: 18px; }
.label { margin: 0 0 14px; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-hi); }
.label--small { margin-top: 22px; font-size: 11px; color: var(--text-3); }

.places { display: grid; gap: 14px; margin-top: 18px; }
.places__item { display: flex; gap: 12px; align-items: baseline; }
.places__item .glyph { position: relative; top: 1px; }
.places__name { font-weight: 600; color: var(--text); }
.places__he { margin-left: 8px; font-size: 17px; color: rgba(249, 169, 8, 0.8); }
.places__modern { color: var(--text-2); }
.places__cert { display: block; font-size: 13px; color: var(--text-3); }
.places__geo { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--text-4); }
.places__blurb { display: block; margin-top: 2px; font-size: 15px; color: var(--text-2); }

.proposals { display: grid; gap: 14px; }
.proposal { display: flex; gap: 12px; align-items: baseline; }
.proposal__mark { flex: none; position: relative; top: 1px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--text-3); }
.proposal__mark--text { border-color: var(--c-identified); }
.proposal__mark--tradition { border-color: var(--c-traditional); border-radius: 2px; transform: rotate(45deg); }
.proposal__mark--scholarly { border-color: var(--c-disputed); }
.proposal__mark--popular { border-color: var(--c-unknown); border-style: dashed; }
.proposal strong { font-weight: 600; }
.proposal__basis { display: block; font-size: 13px; color: var(--text-3); }
.proposal__note { display: block; margin-top: 2px; font-size: 15px; color: var(--text-2); }

.legs { display: grid; gap: 14px; }
.leg { display: flex; gap: 12px; align-items: flex-start; }
.leg__swatch { flex: none; width: 22px; height: 0; margin-top: 12px; border-top: 3px solid var(--leg); border-radius: 2px; }
.leg__swatch.is-dashed { border-top-style: dashed; }
.leg.is-secondary { opacity: 0.8; }
.leg > div { flex: 1; min-width: 0; }
.leg__row { display: flex; gap: 12px; justify-content: space-between; margin: 0; }
.leg__name { font-family: var(--font-display); font-size: 18px; color: var(--text); }
.leg__km { flex: none; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gold-hi); }
.block .leg__sub { margin: 2px 0 0; font-size: 14px; color: var(--text-3); }
.legs + p { margin-top: 14px; }

.related__list { display: grid; gap: 10px; }
.related__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  background: rgba(11, 18, 54, 0.55);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s;
}
.related__item:hover { color: var(--text); border-color: var(--line-3); background: rgba(249, 169, 8, 0.06); }
.related__kind { flex: none; min-width: 78px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.related__title { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.25; }
.related__action { flex: none; font-size: 13px; font-weight: 600; color: var(--gold-hi); }

.ident { margin: 0; display: grid; gap: 18px; }
.ident__row { padding-left: 18px; border-left: 2px solid var(--c, var(--line-2)); }
.ident__row--text { --c: var(--c-identified); }
.ident__row--tradition { --c: var(--c-traditional); }
.ident__row--scholarship { --c: var(--c-disputed); }
.ident__row--uncertain { --c: var(--c-unknown); }
.ident dt { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.ident dd { margin: 4px 0 0; color: var(--text-2); }

.sources__group + .sources__group { margin-top: 24px; }
.sources h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 19px; color: var(--text); }
.sources ul { display: grid; gap: 10px; }
.sources li { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.sources li a { color: var(--text); text-decoration-color: rgba(247, 207, 11, 0.35); }
.sources li a:hover { color: var(--gold-hi); }
.sources__note { display: block; margin-top: 2px; font-size: 14px; color: var(--text-3); }
.sources__he { display: block; margin-top: 2px; font-size: 16px; line-height: 1.35; color: var(--gold-hi); opacity: 0.85; text-align: left; }
.sources .small { margin-top: 10px; }

/* prev / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.pager__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 20px;
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  background: rgba(7, 11, 36, 0.6);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s;
}
.pager__link:hover { color: var(--text); border-color: var(--line-3); background: rgba(249, 169, 8, 0.06); }
.pager__link small { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.pager__link span:not(.he) { font-family: var(--font-display); font-size: 20px; line-height: 1.2; }
.pager__link--next { text-align: right; align-items: flex-end; }
.pager__link.is-empty { visibility: hidden; }
.pager__he { font-size: 15px; color: rgba(249, 169, 8, 0.75); align-self: flex-start; }
.pager__link--next .pager__he { align-self: flex-end; }

/* ─── Chapter index ─── */
.hero--index h1 { font-size: clamp(40px, 6.6vw, 64px); }
.eras-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.eras-nav a { padding: 7px 14px; border: 1px solid var(--panel-edge); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none; }
.eras-nav a:hover { border-color: var(--line-3); color: #fff; }
.toc__era { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.toc__era h2 { font-family: var(--font-display); font-size: clamp(28px, 4.4vw, 38px); line-height: 1.1; color: var(--text); }
.toc__era-he { margin-left: 10px; font-size: 0.7em; color: rgba(249, 169, 8, 0.75); }
.toc__span { margin: 6px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); }
.toc__intro { color: var(--text-2); }
.toc { display: grid; gap: 2px; margin-top: 18px; }
.toc__item {
  display: grid;
  grid-template-columns: 14px 52px 1fr auto;
  align-items: baseline;
  gap: 4px 12px;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.25s;
}
.toc__item:hover { color: var(--text); background: rgba(249, 169, 8, 0.07); }
.toc__num { font-family: var(--font-display); font-size: 15px; color: var(--text-3); }
.toc__title { font-family: var(--font-display); font-size: 21px; line-height: 1.2; }
.toc__item:hover .toc__title { color: var(--gold-hi); }
.toc__he { margin-left: 9px; font-size: 16px; color: rgba(249, 169, 8, 0.75); }
.toc__sub { display: block; font-size: 14px; color: var(--text-3); }
.toc__meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; line-height: 1.45; color: var(--text-3); text-align: right; white-space: nowrap; }
.legend ul { display: grid; gap: 10px; }
.legend li { display: flex; gap: 12px; align-items: baseline; font-size: 15px; color: var(--text-2); }
.legend strong { color: var(--text); font-weight: 600; }

/* ─── Footer ─── */
.foot { margin-top: 30px; border-top: 1px solid var(--line); background: rgba(4, 7, 26, 0.6); }
.foot__in { max-width: calc(var(--measure) + 2 * 40px); margin: 0 auto; padding: 36px var(--pad) calc(36px + env(safe-area-inset-bottom)); text-align: center; color: var(--text-3); font-size: 14px; }
.foot__logo { display: inline-block; margin-bottom: 16px; }
.foot__logo img { width: 200px; height: auto; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.foot__links a { color: var(--text-2); text-decoration: none; }
.foot__links a:hover { color: var(--gold-hi); }
.foot__copy { margin: 18px 0 0; font-size: 12px; letter-spacing: 0.02em; color: var(--text-4); }

/* ─── Phones ─── */
@media (max-width: 759px) {
  body { font-size: 16.5px; }
  .bar__in { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .bar__mark img { width: 30px; height: 30px; }
  .bar__name a { font-size: 19px; }
  .bar__name span, .bar__link { display: none; }
  .bar__nav { gap: 10px; }
  .page { padding-top: 18px; }
  .hero { margin-top: 24px; }
  .hero__he { font-size: 23px; }
  .btn--big { width: 100%; }
  .shot a { border-radius: 16px; }
  .pasuk { padding-left: 16px; }
  .pasuk__he { font-size: 22px; }
  .summary { font-size: 18px; }
  .summary::first-letter { font-size: 56px; }
  .related__item { flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; }
  .related__kind { min-width: 0; flex-basis: 100%; }
  .parsha li { padding: 3px 11px; font-size: 13.5px; }
  .parsha .muted { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { order: -1; }
  .pager__link.is-empty { display: none; }
  .toc__item { grid-template-columns: 14px 1fr; padding: 12px 8px; }
  .toc__num { display: none; }
  .toc__meta { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 0 12px; white-space: normal; }
}
@media (max-width: 359px) {
  .bar__name { display: none; }
}

/* "All chapters": a small menu, era by era, each chapter with a 3D link */
.cm { position: relative; }
.cm__toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; padding: 8px 4px; border-radius: 8px; }
.cm__toggle::-webkit-details-marker { display: none; }
.cm__toggle:hover, .cm[open] .cm__toggle { color: var(--gold-hi); }
.cm__toggle svg { transition: transform 0.25s var(--ease); }
.cm[open] .cm__toggle svg { transform: rotate(180deg); }
.cm__panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 560px); overflow: auto; overscroll-behavior: contain; padding: 10px;
  border-radius: 18px; background: rgba(7, 11, 36, 0.97); border: 1px solid rgba(226, 230, 250, 0.12);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.cm__all { display: block; padding: 8px 10px 10px; font-size: 13px; font-weight: 600; color: var(--gold-hi); text-decoration: none; }
.cm__eras, .cm__eras ol { list-style: none; margin: 0; padding: 0; }
.cm__era + .cm__era { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(226, 230, 250, 0.08); }
.cm__era-name { display: block; padding: 8px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.cm__eras li li { display: flex; align-items: center; gap: 6px; }
.cm__ch { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 10px; font-size: 14px; color: var(--text-2); text-decoration: none; }
.cm__ch:hover { background: rgba(249, 169, 8, 0.08); color: var(--text); }
.cm__ch[aria-current] { color: var(--gold-hi); background: rgba(249, 169, 8, 0.1); }
.cm__num { flex: none; width: 3.2em; font-size: 10.5px; letter-spacing: 0.1em; color: var(--text-3); }
.cm__3d { flex: none; padding: 4px 8px; border: 1px solid rgba(249, 169, 8, 0.35); border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--gold-hi); text-decoration: none; }
.cm__3d:hover { background: rgba(249, 169, 8, 0.14); border-color: rgba(249, 169, 8, 0.7); }
[id^="ch-"] { scroll-margin-top: 90px; }
@media (max-width: 560px) { .cm__panel { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; } }
.cm__num { width: 4.4em; }
/* phones: the bar keeps the name and the menu; the big Open button is right below */
@media (max-width: 480px) { .bar__nav .btn--small { display: none; } }
.cm__panel { background: #070b24; }
