/* ═══════════════════════════════════════════
   TOKENS — celestial cartography / constellation
═══════════════════════════════════════════ */
:root {
  --void: #04050a;
  --bg: #070912;
  --bg2: #0c0f1a;
  --bg3: #121627;
  --bg4: #1a2036;
  --rim: #232b45;
  --rim2: #303a5c;
  --text: #e8ecf7;
  --sub: #6b7494;
  --faint: #3a4264;
  --gold: #f0c14b;
  --gk: rgb(240 193 75 / 10%);
  --cyan: #5ce1e6;
  --cyk: rgb(92 225 230 / 10%);
  --magenta: #e85ca0;
  --mk: rgb(232 92 160 / 10%);
  --lime: #9fe65c;
  --lk: rgb(159 230 92 / 10%);
  --violet: #a78bfa;
  --vk: rgb(167 139 250 / 10%);
  --sky: #6fb8f0;
  --sk: rgb(111 184 240 / 10%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Bitter, Georgia, serif;
  font-size: clamp(15px, 1.95vw, 17.5px);
  line-height: 1.9;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════
   HERO — starfield + word2vec parallelogram
═══════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  padding: clamp(52px, 8vw, 92px) clamp(24px, 5vw, 68px) 0;
  border-bottom: 1px solid var(--rim2);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 55% at 78% 40%,
      rgb(240 193 75 / 10%) 0%,
      transparent 65%),
    radial-gradient(ellipse 45% 40% at 12% 75%,
      rgb(167 139 250 / 7%) 0%,
      transparent 60%);
}

/* starfield dots */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    radial-gradient(1.2px 1.2px at 15% 25%,
      rgb(232 236 247 / 50%) 99%,
      transparent),
    radial-gradient(1px 1px at 35% 65%,
      rgb(232 236 247 / 35%) 99%,
      transparent),
    radial-gradient(1.4px 1.4px at 65% 15%,
      rgb(232 236 247 / 45%) 99%,
      transparent),
    radial-gradient(1px 1px at 85% 55%,
      rgb(232 236 247 / 30%) 99%,
      transparent),
    radial-gradient(1.2px 1.2px at 50% 85%,
      rgb(232 236 247 / 40%) 99%,
      transparent),
    radial-gradient(1px 1px at 22% 92%,
      rgb(232 236 247 / 30%) 99%,
      transparent),
    radial-gradient(1.3px 1.3px at 92% 28%,
      rgb(232 236 247 / 40%) 99%,
      transparent);
  background-size: 600px 600px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 3%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  min-width: 0;
}

@media(width <=700px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    display: none;
  }
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Overpass Mono", monospace;
  font-size: clamp(9px, 1.3vw, 10.5px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: clamp(16px, 2.5vw, 24px);
}

.hero-kicker::before {
  content: "✦";
}

.hero h1 {
  font-family: Outfit, sans-serif;
  font-size: clamp(2.4rem, 7.5vw, 5.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}

.hero h1 .it {
  font-family: Bitter, serif;
  font-style: italic;
  font-weight: 300;
  color: rgb(232 236 247 / 25%);
  font-size: 0.5em;
  display: block;
  margin-bottom: 8px;
}

.hero h1 .glow {
  background: linear-gradient(90deg, #f0c14b 0%, #e85ca0 55%, #a78bfa 100%);
  background-size: 200% auto;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-byline {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(11px, 1.6vw, 13px);
  color: var(--sub);
  line-height: 1.85;
  max-width: 560px;
  margin-top: clamp(16px, 2.5vw, 24px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: clamp(18px, 3vw, 26px);
}

.htag {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8.5px, 1.2vw, 10px);
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid;
  background: transparent;
  white-space: nowrap;
}

.htag.g {
  color: var(--gold);
  border-color: rgb(240 193 75 / 30%);
}

.htag.cy {
  color: var(--cyan);
  border-color: rgb(92 225 230 / 30%);
}

.htag.m {
  color: var(--magenta);
  border-color: rgb(232 92 160 / 30%);
}

.htag.l {
  color: var(--lime);
  border-color: rgb(159 230 92 / 30%);
}

.htag.v {
  color: var(--violet);
  border-color: rgb(167 139 250 / 30%);
}

.htag.s {
  color: var(--sky);
  border-color: rgb(111 184 240 / 30%);
}

.hero-art {
  flex-shrink: 0;
}

/* Footer strip — orbit markers */
.hero-strip {
  display: flex;
  border-top: 1px solid var(--rim2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: clamp(28px, 5vw, 46px);
}

.hf-cell {
  flex: 1;
  min-width: clamp(95px, 16vw, 150px);
  padding: clamp(13px, 2.3vw, 18px) clamp(12px, 2vw, 18px);
  border-right: 1px solid var(--rim);
  text-align: center;
}

.hf-cell:last-child {
  border-right: none;
}

.hf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 0 auto 8px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.hf-label {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8px, 1.2vw, 9.5px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sub);
}

/* ═══════════════════════════════════════════
   TOC
═══════════════════════════════════════════ */
.toc-outer {
  max-width: 1080px;
  margin: clamp(32px, 5vw, 52px) auto;
  padding: 0 clamp(24px, 5vw, 68px);
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1px;
  background: var(--rim);
  border: 1px solid var(--rim2);
  border-radius: 10px;
  overflow: hidden;
}

.toc-cell a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(11px, 1.8vw, 14px) clamp(13px, 2.2vw, 17px);
  background: var(--bg2);
  font-family: "Overpass Mono", monospace;
  font-size: clamp(11px, 1.5vw, 12.5px);
  color: var(--sub);
  text-decoration: none;
  transition:
    background 0.14s,
    color 0.14s;
  line-height: 1.4;
}

.toc-cell a:hover {
  background: var(--bg3);
  color: var(--gold);
}

.toc-star {
  color: var(--gold);
  font-size: 0.85em;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

/* ═══════════════════════════════════════════
   CONTENT
═══════════════════════════════════════════ */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 68px) clamp(32px, 5vw, 52px);
}

/* ═══════════════════════════════════════════
   CHAPTER
═══════════════════════════════════════════ */
.ch {
  margin-bottom: clamp(60px, 8.5vw, 105px);
}

.ch:last-child {
  margin-bottom: 0;
}

.ch-head {
  position: relative;
  padding-top: clamp(32px, 5.5vw, 52px);
  border-top: 1px solid var(--rim2);
  margin-bottom: clamp(24px, 3.5vw, 36px);
}

.ch-head::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(60px, 10vw, 110px);
  height: 2px;
  background: var(--gold);
}

.ch-top {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2.5vw, 22px);
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ch-num {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4.8vw, 3.2rem);
  color: var(--gold);
  opacity: 0.2;
  line-height: 1;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.ch-badge {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8.5px, 1.2vw, 10px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid;
  align-self: center;
  flex-shrink: 0;
}

.ch-badge.g {
  color: var(--gold);
  border-color: rgb(240 193 75 / 30%);
  background: var(--gk);
}

.ch-badge.cy {
  color: var(--cyan);
  border-color: rgb(92 225 230 / 30%);
  background: var(--cyk);
}

.ch-badge.m {
  color: var(--magenta);
  border-color: rgb(232 92 160 / 30%);
  background: var(--mk);
}

.ch-badge.l {
  color: var(--lime);
  border-color: rgb(159 230 92 / 30%);
  background: var(--lk);
}

.ch-badge.v {
  color: var(--violet);
  border-color: rgb(167 139 250 / 30%);
  background: var(--vk);
}

.ch-badge.s {
  color: var(--sky);
  border-color: rgb(111 184 240 / 30%);
  background: var(--sk);
}

.ch h2 {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3.8vw, 2.15rem);
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ch-sub {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(10px, 1.4vw, 11.5px);
  color: var(--sub);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.sub {
  margin: clamp(26px, 4vw, 44px) 0;
}

.sh {
  font-family: Outfit, sans-serif;
  font-weight: 600;
  font-size: clamp(10.5px, 1.5vw, 12px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: clamp(12px, 2vw, 16px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sh::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rim2);
}

.sh.g {
  color: var(--gold);
}

.sh.cy {
  color: var(--cyan);
}

.sh.m {
  color: var(--magenta);
}

.sh.l {
  color: var(--lime);
}

.sh.v {
  color: var(--violet);
}

.sh.s {
  color: var(--sky);
}

p {
  margin-bottom: clamp(12px, 1.8vw, 16px);
}

/* ═══════════════════════════════════════════
   EQUATION BOXES
═══════════════════════════════════════════ */
.eq {
  margin: clamp(20px, 3.5vw, 32px) 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rim2);
  min-width: 0;
}

.eq-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: clamp(8px, 1.4vw, 11px) clamp(14px, 2.5vw, 20px);
  border-bottom: 1px solid var(--rim);
  background: var(--bg3);
}

.eq-name {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8.5px, 1.2vw, 10px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sub);
}

.eq-tag {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(7.5px, 1.1vw, 8.5px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.eq-body {
  background: var(--bg2);
  padding: clamp(18px, 3vw, 26px) clamp(16px, 3.5vw, 32px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

.eq-note {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(9.5px, 1.3vw, 11px);
  color: var(--sub);
  margin-top: 10px;
  line-height: 1.65;
  font-style: italic;
  padding-top: 10px;
  border-top: 1px solid var(--rim);
}

.eq.g .eq-top {
  border-bottom-color: rgb(240 193 75 / 20%);
}

.eq.g .eq-body {
  border-left: 3px solid var(--gold);
}

.eq.g .eq-tag {
  background: var(--gk);
  color: var(--gold);
}

.eq.cy .eq-top {
  border-bottom-color: rgb(92 225 230 / 20%);
}

.eq.cy .eq-body {
  border-left: 3px solid var(--cyan);
}

.eq.cy .eq-tag {
  background: var(--cyk);
  color: var(--cyan);
}

.eq.m .eq-top {
  border-bottom-color: rgb(232 92 160 / 20%);
}

.eq.m .eq-body {
  border-left: 3px solid var(--magenta);
}

.eq.m .eq-tag {
  background: var(--mk);
  color: var(--magenta);
}

.eq.l .eq-top {
  border-bottom-color: rgb(159 230 92 / 20%);
}

.eq.l .eq-body {
  border-left: 3px solid var(--lime);
}

.eq.l .eq-tag {
  background: var(--lk);
  color: var(--lime);
}

.eq.v .eq-top {
  border-bottom-color: rgb(167 139 250 / 20%);
}

.eq.v .eq-body {
  border-left: 3px solid var(--violet);
}

.eq.v .eq-tag {
  background: var(--vk);
  color: var(--violet);
}

.eq.s .eq-top {
  border-bottom-color: rgb(111 184 240 / 20%);
}

.eq.s .eq-body {
  border-left: 3px solid var(--sky);
}

.eq.s .eq-tag {
  background: var(--sk);
  color: var(--sky);
}

/* ═══════════════════════════════════════════
   THEOREM
═══════════════════════════════════════════ */
.thm {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--rim2);
  border-radius: 8px;
  padding: clamp(22px, 3.5vw, 34px) clamp(20px, 4vw, 36px);
  margin: clamp(22px, 3.5vw, 36px) 0;
  min-width: 0;
}

.thm::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--magenta), transparent);
}

.thm-badge {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8.5px, 1.2vw, 10px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.thm-badge::before {
  content: "✦";
}

.thm p {
  font-size: clamp(14px, 1.9vw, 16px);
  line-height: 1.85;
  margin-bottom: 0;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════════
   LENS callout
═══════════════════════════════════════════ */
.lens {
  display: flex;
  gap: clamp(14px, 2.5vw, 20px);
  background: var(--bg2);
  border: 1px solid var(--rim2);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 26px);
  margin: clamp(18px, 3vw, 28px) 0;
  align-items: flex-start;
  min-width: 0;
}

.lens-mark {
  font-family: Outfit, sans-serif;
  font-weight: 800;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  line-height: 1;
  flex-shrink: 0;
  padding-top: 3px;
}

.lens-content .lens-title {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: clamp(9px, 1.3vw, 10.5px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.lens-content p {
  font-size: clamp(13.5px, 1.8vw, 15px);
  line-height: 1.78;
  margin-bottom: 0;
}

.lens.g {
  border-left: 3px solid var(--gold);
}

.lens.g .lens-mark,
.lens.g .lens-title {
  color: var(--gold);
}

.lens.cy {
  border-left: 3px solid var(--cyan);
}

.lens.cy .lens-mark,
.lens.cy .lens-title {
  color: var(--cyan);
}

.lens.m {
  border-left: 3px solid var(--magenta);
}

.lens.m .lens-mark,
.lens.m .lens-title {
  color: var(--magenta);
}

.lens.l {
  border-left: 3px solid var(--lime);
}

.lens.l .lens-mark,
.lens.l .lens-title {
  color: var(--lime);
}

.lens.v {
  border-left: 3px solid var(--violet);
}

.lens.v .lens-mark,
.lens.v .lens-title {
  color: var(--violet);
}

.lens.s {
  border-left: 3px solid var(--sky);
}

.lens.s .lens-mark,
.lens.s .lens-title {
  color: var(--sky);
}

/* ═══════════════════════════════════════════
   DERIVATION
═══════════════════════════════════════════ */
.drv {
  border: 1px solid var(--rim2);
  border-radius: 8px;
  overflow: hidden;
  margin: clamp(20px, 3.5vw, 32px) 0;
}

.drv-hdr {
  background: var(--bg3);
  padding: clamp(9px, 1.5vw, 12px) clamp(14px, 3vw, 22px);
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8.5px, 1.2vw, 10px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sub);
  border-bottom: 1px solid var(--rim);
}

.drv-row {
  background: var(--bg2);
  padding: clamp(14px, 2.5vw, 20px) clamp(14px, 3vw, 26px);
  border-bottom: 1px solid var(--rim);
  display: grid;
  grid-template-columns: clamp(28px, 4vw, 38px) 1fr;
  gap: clamp(10px, 2vw, 18px);
  align-items: start;
  min-width: 0;
}

.drv-row>div {
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.drv-row:last-child {
  border-bottom: none;
}

.dn {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(10px, 1.4vw, 12px);
  font-weight: 600;
  padding-top: 3px;
}

.dn.g {
  color: var(--gold);
}

.dn.cy {
  color: var(--cyan);
}

.dn.m {
  color: var(--magenta);
}

.dn.l {
  color: var(--lime);
}

.dn.v {
  color: var(--violet);
}

.dn.s {
  color: var(--sky);
}

.dnote {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(10px, 1.4vw, 11.5px);
  color: var(--sub);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════
   FIGURES
═══════════════════════════════════════════ */
.fig {
  margin: clamp(24px, 4vw, 42px) 0;
}

.fig-box {
  background: var(--bg2);
  border: 1px solid var(--rim2);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 26px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fig-cap {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(10px, 1.4vw, 11.5px);
  color: var(--sub);
  margin-top: clamp(10px, 1.8vw, 14px);
  font-style: italic;
}

/* ═══════════════════════════════════════════
   TABLES
═══════════════════════════════════════════ */
.t-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: clamp(18px, 3vw, 28px) 0;
  border-radius: 8px;
  border: 1px solid var(--rim2);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(12.5px, 1.7vw, 14px);
  min-width: 420px;
}

thead {
  background: var(--bg4);
}

thead th {
  padding: clamp(10px, 1.8vw, 13px) clamp(10px, 2vw, 16px);
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8px, 1.2vw, 9.5px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sub);
  text-align: left;
  border-bottom: 1px solid var(--rim2);
}

tbody tr {
  border-bottom: 1px solid var(--rim);
}

tbody tr:hover {
  background: var(--bg3);
}

tbody td {
  padding: clamp(10px, 1.8vw, 13px) clamp(10px, 2vw, 16px);
  vertical-align: top;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════
   TWO-COL
═══════════════════════════════════════════ */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2.5vw, 20px);
  margin: clamp(16px, 3vw, 26px) 0;
}

@media (width <=620px) {
  .two {
    grid-template-columns: 1fr;
  }
}

.tcol {
  background: var(--bg2);
  border: 1px solid var(--rim2);
  border-radius: 8px;
  padding: clamp(16px, 2.5vw, 24px);
  min-width: 0;
}

.tcol h4 {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: clamp(9.5px, 1.4vw, 11px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: clamp(10px, 1.8vw, 14px);
}

.tcol p {
  font-size: clamp(13px, 1.7vw, 14.5px);
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════
   MODEL CARDS
═══════════════════════════════════════════ */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(10px, 2vw, 16px);
  margin: clamp(18px, 3vw, 28px) 0;
}

.model-card {
  background: var(--bg2);
  border: 1px solid var(--rim2);
  border-radius: 8px;
  padding: clamp(16px, 2.5vw, 22px);
  border-top: 3px solid;
}

.model-name {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(9px, 1.4vw, 11px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: clamp(8px, 1.5vw, 12px);
}

.model-formula {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(10px, 1.5vw, 12px);
  background: var(--bg3);
  padding: 8px 12px;
  border-radius: 6px;
  margin: 6px 0;
  overflow-x: auto;
  color: var(--text);
}

.model-card p {
  font-size: clamp(12px, 1.6vw, 13.5px);
  line-height: 1.62;
  color: var(--sub);
  margin-bottom: 0;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════
   FEATURE LIST
═══════════════════════════════════════════ */
.fl {
  list-style: none;
  margin: clamp(10px, 2vw, 14px) 0;
}

.fl li {
  padding: clamp(9px, 1.6vw, 12px) 0 clamp(9px, 1.6vw, 12px) clamp(22px, 3.5vw, 30px);
  border-bottom: 1px solid var(--rim);
  position: relative;
  font-size: clamp(14px, 1.9vw, 15.5px);
  line-height: 1.72;
}

.fl li:last-child {
  border-bottom: none;
}

.fl li::before {
  content: "✦";
  position: absolute;
  left: 0;
  font-size: 0.65em;
  top: clamp(14px, 2.3vw, 17px);
}

.fl.g li::before {
  color: var(--gold);
}

.fl.cy li::before {
  color: var(--cyan);
}

.fl.m li::before {
  color: var(--magenta);
}

.fl.l li::before {
  color: var(--lime);
}

.fl.v li::before {
  color: var(--violet);
}

.fl.s li::before {
  color: var(--sky);
}

/* ═══════════════════════════════════════════
   CODE
═══════════════════════════════════════════ */
.cb {
  background: var(--void);
  border: 1px solid var(--rim);
  border-radius: 8px;
  overflow: hidden;
  margin: clamp(16px, 3vw, 26px) 0;
}

.cb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px clamp(14px, 2.5vw, 20px);
  background: var(--bg3);
  border-bottom: 1px solid var(--rim);
}

.cb-dots {
  display: flex;
  gap: 5px;
}

.cb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.cb-lang {
  font-family: "Overpass Mono", monospace;
  font-size: clamp(8.5px, 1.2vw, 9.5px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sub);
}

.cb-body {
  padding: clamp(16px, 3vw, 26px) clamp(16px, 3.5vw, 28px);
  font-family: "Overpass Mono", monospace;
  font-size: clamp(11px, 1.6vw, 13px);
  line-height: 2.1;
  color: rgb(232 236 247 / 45%);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.kw {
  color: var(--violet);
}

.fn {
  color: var(--cyan);
}

.var {
  color: var(--lime);
}

.num {
  color: var(--gold);
}

.cmt {
  color: rgb(232 236 247 / 18%);
  font-style: italic;
}

.str {
  color: var(--magenta);
}

/* ═══════════════════════════════════════════
   INLINE
═══════════════════════════════════════════ */
code {
  font-family: "Overpass Mono", monospace;
  font-size: 0.84em;
  background: var(--bg3);
  border: 1px solid var(--rim2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--gold);
}

.hg {
  color: var(--gold);
  font-weight: 600;
}

.hcy {
  color: var(--cyan);
  font-weight: 600;
}

.hm {
  color: var(--magenta);
  font-weight: 600;
}

.hl {
  color: var(--lime);
  font-weight: 600;
}

.hv {
  color: var(--violet);
  font-weight: 600;
}

.hs2 {
  color: var(--sky);
  font-weight: 600;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--rim2);
  border-radius: 3px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — mobile / narrow viewport
═══════════════════════════════════════════ */

@media(width <=768px) {
  .ch-sub {
    display: none;
  }

  .eq-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-strip {
    scrollbar-width: none;
  }

  .hero-strip::-webkit-scrollbar {
    display: none;
  }
}

@media(width <=480px) {
  /* hero */
  .hero {
    padding-left: clamp(16px, 5vw, 24px);
    padding-right: clamp(16px, 5vw, 24px);
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-byline {
    font-size: clamp(9.5px, 3vw, 11.5px);
  }

  /* page content */
  .page {
    padding-left: clamp(16px, 5vw, 24px);
    padding-right: clamp(16px, 5vw, 24px);
  }

  .toc-outer {
    padding-left: clamp(16px, 5vw, 24px);
    padding-right: clamp(16px, 5vw, 24px);
  }

  /* chapter headers */
  .ch-head::before {
    width: 40px;
  }

  .ch h2 {
    font-size: clamp(1.25rem, 7vw, 1.7rem);
  }

  /* equation boxes */
  .eq-body {
    padding-left: clamp(12px, 4vw, 20px);
    padding-right: clamp(12px, 4vw, 20px);
  }

  /* derivation rows */
  .drv-row {
    grid-template-columns: 24px 1fr;
    gap: 8px;
    padding-left: clamp(12px, 4vw, 18px);
    padding-right: clamp(12px, 4vw, 18px);
  }

  /* lens callout: stack vertically */
  .lens {
    flex-direction: column;
    gap: 10px;
  }

  /* theorem */
  .thm {
    padding-left: clamp(14px, 4vw, 22px);
    padding-right: clamp(14px, 4vw, 22px);
  }

  /* TOC grid: single column */
  .toc-grid {
    grid-template-columns: 1fr;
  }

  /* model cards: single column */
  .model-grid {
    grid-template-columns: 1fr;
  }

  /* figures */
  .fig-box {
    padding: clamp(10px, 3vw, 16px);
  }

  /* hero strip */
  .hf-label {
    font-size: clamp(7px, 2.5vw, 9px);
  }
}