/* tokens.css */
/* Design tokens: the Lord's own colours.
   mēghaśyāma, the blue-black of a rain cloud; pītāmbara, the gold of His silk; the kaustubha's
   red; tulasī green; lotus pink. Light is pearl-ivory, dawn on the milk ocean; dark is a deep
   indigo night lit by a lamp. Every colour on the site is one of these names. */
:root {
  --bg: #fbf7ef;
  --bg-2: #f4eee2;
  --milk: #eef2f3;
  --surface: #fffdf8;
  --surface-2: #f8f2e6;
  --surface-3: #f2ead9;
  --ink: #191c2e;
  --ink-2: #474a62;
  --ink-3: #7a788a;
  --line: rgba(31, 42, 77, 0.14);
  --line-2: rgba(31, 42, 77, 0.07);

  --megha: #1f2a4d;            /* rain-cloud blue-black: verse type in script, the brand tile */
  --megha-2: #34477c;
  --megha-soft: rgba(31, 42, 77, 0.07);
  --gold: #9c6c08;             /* pītāmbara, dark enough for text */
  --gold-2: #d3a136;           /* pītāmbara, bright: rules, rings, ornaments */
  --gold-3: #f0cf7e;
  --gold-soft: rgba(211, 161, 54, 0.17);
  --halo: rgba(211, 161, 54, 0.17);   /* the glow behind a verse in recite */
  --ruby: #a3192d;             /* the kaustubha: links, the accent */
  --ruby-2: #c22c42;
  --ruby-soft: rgba(163, 25, 45, 0.08);
  --tulasi: #2c6a44;
  --tulasi-soft: rgba(44, 106, 68, 0.1);
  --lotus: #c1567a;
  --lotus-2: #e69ab2;
  --lotus-soft: rgba(214, 104, 140, 0.13);

  --accent: var(--ruby);
  --accent-2: var(--ruby-2);
  --accent-ink: #fffaf0;
  --btn: #a3192d;              /* a filled button: the kaustubha, deep in both themes */
  --btn-2: #c22c42;
  --btn-ink: #fff8f0;
  --on-megha: #fbf3df;
  --glass: rgba(251, 247, 239, 0.86);
  --scrim: rgba(25, 28, 46, 0.4);

  --shadow: 0 1px 2px rgba(31, 42, 77, 0.05), 0 12px 32px rgba(31, 42, 77, 0.07);
  --shadow-lg: 0 2px 6px rgba(31, 42, 77, 0.07), 0 28px 70px rgba(31, 42, 77, 0.13);
  --glow: 0 0 0 1px rgba(211, 161, 54, 0.35), 0 18px 50px rgba(211, 161, 54, 0.18);

  --font-latin: "VS Sans", "Noto Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-deva: "VS Devanagari", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", sans-serif;
  --font-tamil: "VS Tamil", "Noto Sans Tamil", "Nirmala UI", "Tamil Sangam MN", "Latha", sans-serif;
  --font-telugu: "VS Telugu", "Noto Sans Telugu", "Nirmala UI", "Gautami", "Kohinoor Telugu", sans-serif;
  --font-kannada: "VS Kannada", "Noto Sans Kannada", "Nirmala UI", "Tunga", "Kohinoor Kannada", sans-serif;
  --font-malayalam: "VS Malayalam", "Noto Sans Malayalam", "Nirmala UI", "Kartika", "Malayalam Sangam MN", sans-serif;

  --scale: 1;                  /* the reader's text size, set by the A− A+ pair */
  --maxw: 76rem;
  --readw: 50rem;
  --radius: 22px;
  --radius-sm: 13px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --head-h: 3.9rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090b20;
    --bg-2: #0e1130;
    --milk: #111536;
    --surface: #131737;
    --surface-2: #191e45;
    --surface-3: #20264f;
    --ink: #f4ebd7;
    --ink-2: #cbc2ab;
    --ink-3: #8f8ba3;
    --line: rgba(240, 207, 126, 0.15);
    --line-2: rgba(240, 207, 126, 0.07);
    --megha: #cfd6ff;
    --megha-2: #a9b5f5;
    --megha-soft: rgba(169, 181, 245, 0.08);
    --gold: #f0c35e;
    --gold-2: #f2c96b;
    --gold-3: #f7dc9c;
    --gold-soft: rgba(240, 195, 94, 0.15);
    --halo: rgba(240, 195, 94, 0.06);
    --ruby: #ff8592;
    --ruby-2: #ffa3ad;
    --ruby-soft: rgba(255, 133, 146, 0.11);
    --tulasi: #86cc9f;
    --tulasi-soft: rgba(134, 204, 159, 0.1);
    --lotus: #f19ab4;
    --lotus-2: #f7bdcf;
    --lotus-soft: rgba(241, 154, 180, 0.1);
    --accent-ink: #1a0b10;
    --on-megha: #fbf3df;
    --glass: rgba(9, 11, 32, 0.84);
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.32), 0 12px 32px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.36), 0 28px 70px rgba(0, 0, 0, 0.5);
    --glow: 0 0 0 1px rgba(240, 195, 94, 0.3), 0 18px 60px rgba(240, 195, 94, 0.12);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090b20;
  --bg-2: #0e1130;
  --milk: #111536;
  --surface: #131737;
  --surface-2: #191e45;
  --surface-3: #20264f;
  --ink: #f4ebd7;
  --ink-2: #cbc2ab;
  --ink-3: #8f8ba3;
  --line: rgba(240, 207, 126, 0.15);
  --line-2: rgba(240, 207, 126, 0.07);
  --megha: #cfd6ff;
  --megha-2: #a9b5f5;
  --megha-soft: rgba(169, 181, 245, 0.08);
  --gold: #f0c35e;
  --gold-2: #f2c96b;
  --gold-3: #f7dc9c;
  --gold-soft: rgba(240, 195, 94, 0.15);
  --halo: rgba(240, 195, 94, 0.06);
  --ruby: #ff8592;
  --ruby-2: #ffa3ad;
  --ruby-soft: rgba(255, 133, 146, 0.11);
  --tulasi: #86cc9f;
  --tulasi-soft: rgba(134, 204, 159, 0.1);
  --lotus: #f19ab4;
  --lotus-2: #f7bdcf;
  --lotus-soft: rgba(241, 154, 180, 0.1);
  --accent-ink: #1a0b10;
  --on-megha: #fbf3df;
  --glass: rgba(9, 11, 32, 0.84);
  --scrim: rgba(0, 0, 0, 0.55);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.32), 0 12px 32px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.36), 0 28px 70px rgba(0, 0, 0, 0.5);
  --glow: 0 0 0 1px rgba(240, 195, 94, 0.3), 0 18px 60px rgba(240, 195, 94, 0.12);
  color-scheme: dark;
}

/* fonts.css */
/* Self-hosted variable fonts, copied from @fontsource-variable by the build into /fonts/.
   One sans-serif family throughout (Noto Sans and its Indic companions), chosen for readability.
   Family names are private ("VS ...") so a locally installed font of the same name never wins,
   and each face names only its own script's code points (unicode-range): a page read in
   Devanāgarī never downloads Malayalam, and a face is fetched only when its script is drawn. */
@font-face {
  font-family: "VS Sans"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "VS Sans"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "VS Sans"; font-style: italic; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-latin-wght-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "VS Sans"; font-style: italic; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-latin-ext-wght-italic.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "VS Devanagari"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-devanagari-devanagari-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}
@font-face {
  font-family: "VS Tamil"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-tamil-tamil-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0964-0965,U+0B82-0BFA,U+200C-200D,U+20B9,U+25CC;
}
@font-face {
  font-family: "VS Telugu"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-telugu-telugu-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0951-0952,U+0964-0965,U+0C00-0C7F,U+1CDA,U+1CF2,U+200C-200D,U+25CC;
}
@font-face {
  font-family: "VS Kannada"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-kannada-kannada-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0951-0952,U+0964-0965,U+0C80-0CF3,U+1CD0,U+1CD2-1CD3,U+1CDA,U+1CF2,U+1CF4,U+200C-200D,U+20B9,U+25CC,U+A830-A835;
}
@font-face {
  font-family: "VS Malayalam"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/noto-sans-malayalam-malayalam-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0307,U+0323,U+0951-0952,U+0964-0965,U+0D00-0D7F,U+1CDA,U+1CF2,U+200C-200D,U+20B9,U+25CC,U+A830-A832;
}

/* base.css */
/* ---------------------------------------------------------------- ground */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 4.5rem); }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 88% -8%, var(--gold-soft), transparent 62%),
    radial-gradient(900px 460px at -8% 4%, var(--lotus-soft), transparent 58%),
    linear-gradient(180deg, transparent 0, transparent 60%, var(--milk) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 1.0625rem;
  line-height: 1.66;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; outline: none; min-width: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 600; margin: 0; }
p { margin: 0 0 0.9em; }
button, input, select { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
img { height: auto; }
::selection { background: var(--gold-soft); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 80; }
.skip:focus { left: 1rem; top: 1rem; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Script classes: every run of Indic text goes through one of these. A .nat is Devanāgarī
   until the reader chooses another script (the page is built in Devanāgarī). */
.nat { font-family: var(--font-deva); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.s-deva { font-family: var(--font-deva); }
.s-tamil { font-family: var(--font-tamil); }
.s-telugu { font-family: var(--font-telugu); }
.s-kannada { font-family: var(--font-kannada); }
.s-malayalam { font-family: var(--font-malayalam); }
.s-roman { font-family: var(--font-latin); }

/* A pair is the line in the reader's script (.nat) and its stored Roman (.rom). Without
   JavaScript the page shows Devanāgarī and Roman; with it, the reader's choice. */
html:not(.js) .js-only { display: none !important; }
html.js .js-hide { display: none !important; }
html[data-script="roman"] .nat { display: none; }
html[data-script]:not([data-script="deva"]):not([data-script="roman"]):not(.sx-ready) .nat { visibility: hidden; }
html.hide-rom:not([data-script="roman"]) .rom { display: none; }

.muted { color: var(--ink-3); }
.fine { color: var(--ink-3); font-size: .9rem; }
.dot { color: var(--ink-3); margin: 0 .45em; }
.eyebrow {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 .7rem; font-weight: 600;
}
.lede { font-size: 1.16rem; color: var(--ink-2); line-height: 1.55; max-width: 44rem; }
.num { font-variant-numeric: lining-nums tabular-nums; }

/* ---------------------------------------------------------------- header */
/* The glass is a layer behind the header, never the header itself: an element with a
   backdrop-filter (or a filter or transform) becomes the containing block of its fixed
   children. The phone's tab bar is a separate element at the foot of <body> for that reason. */
.site-head { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line-2); }
.site-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--glass);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.head-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); min-height: var(--head-h);
  display: flex; align-items: center; gap: 1.25rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.bm-tile { fill: #1f2a4d; }
.bm-ring { fill: none; stroke: #e6b44c; stroke-width: 2.6; }
.bm-ring.thin { stroke-width: 1.4; opacity: .7; }
.bm-spokes { stroke: #e6b44c; stroke-width: 1.6; stroke-linecap: round; opacity: .85; }
.bm-flame { fill: #f0cf7e; }
.bm-hub { fill: #d6394f; }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name { font-size: 1.18rem; font-weight: 600; letter-spacing: .005em; white-space: nowrap; }
.brand-native { font-size: .82rem; color: var(--ink-3); white-space: nowrap; margin-top: .12rem; }
.site-nav { display: flex; gap: .15rem; margin-left: auto; }
.site-nav a {
  text-decoration: none; color: var(--ink-2); padding: .38rem .8rem; border-radius: 999px; font-size: 1.04rem;
}
.site-nav a:hover { background: var(--line-2); color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); background: var(--gold-soft); }
.head-tools { display: flex; align-items: center; gap: .45rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; text-decoration: none; padding: 0;
}
.icon-btn:hover { color: var(--ink); border-color: var(--gold-2); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.sm { width: auto; height: 34px; padding: 0 .75rem; font-size: .95rem; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: block; }
  :root:not([data-theme="light"]) .theme-moon { display: none; }
}

/* The script picker: a disclosure in the header; a choice redraws every pair on the page. */
.script-pick { position: relative; }
.script-pick > summary {
  list-style: none; display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 .85rem 0 .7rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2);
  font-size: .98rem; white-space: nowrap;
}
.script-pick > summary::-webkit-details-marker { display: none; }
.script-pick > summary:hover, .script-pick[open] > summary { border-color: var(--gold-2); color: var(--ink); }
.sp-glyph {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: #1f2a4d; color: #f6e2ae; font-size: .95rem; line-height: 1;
}
.sp-caret { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sp-menu {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 40; min-width: 14.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: .4rem; display: grid; gap: .1rem;
}
.sp-head { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding: .35rem .65rem .25rem; margin: 0; font-weight: 600; }
.sp-opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; width: 100%;
  border: 0; background: transparent; border-radius: 9px; padding: .45rem .65rem; cursor: pointer; text-align: left;
}
.sp-opt:hover { background: var(--line-2); }
.sp-opt[aria-pressed="true"] { background: var(--gold-soft); }
.sp-native { font-size: 1.08rem; color: var(--megha); }
.sp-latin { font-size: .9rem; color: var(--ink-3); }

/* ---------------------------------------------------------------- tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .head-tools { margin-left: auto; }
  .brand-native { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; justify-content: space-around;
    background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line); padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .05rem; text-decoration: none;
    color: var(--ink-3); font-size: .74rem; padding: .25rem 0; border-radius: 12px; min-width: 0;
  }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current] { color: var(--gold); }
  .tabbar a[aria-current] svg { stroke: var(--gold); }
  body { padding-bottom: calc(3.7rem + env(safe-area-inset-bottom)); }
  .sp-label { display: none; }
  .script-pick > summary { padding: 0 .55rem 0 .4rem; }
}
@media (max-width: 420px) {
  .head-inner { gap: .6rem; }
  .brand-name { font-size: 1.12rem; }
  .brand-mark { width: 34px; height: 34px; }
}
@media (max-width: 350px) {
  .brand-name { font-size: 1rem; }
}

/* ---------------------------------------------------------------- footer */
.site-foot { margin-top: 5rem; padding: 2.6rem var(--gutter) 2.8rem; text-align: center; color: var(--ink-3); position: relative; }
.site-foot::before {
  content: ""; position: absolute; top: 0; left: 50%; width: min(36rem, 80%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}
.foot-mantra { margin: 0 0 .25rem; font-size: 1.35rem; color: var(--megha); line-height: 1.5; }
.foot-mantra .rom { display: block; font-size: 1rem; font-style: italic; color: var(--ink-3); }
html[data-script="roman"] .foot-mantra .rom { font-size: 1.2rem; color: var(--megha); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.1rem; margin: 1.1rem 0 .6rem; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.foot-small { font-size: .92rem; margin: 0; }

/* ---------------------------------------------------------------- shared pieces */
.page { max-width: var(--maxw); margin: 0 auto; padding: 2.6rem var(--gutter) 0; }
.page.narrow { max-width: calc(var(--readw) + 2 * var(--gutter)); }
.page-head { margin-bottom: 2.2rem; }
.page-head.center { text-align: center; }
.page-head.center .lede { margin-left: auto; margin-right: auto; }
.page-title { font-size: clamp(2.3rem, 5.4vw, 3.6rem); font-weight: 600; letter-spacing: -.012em; margin-bottom: .55rem; line-height: 1.05; }
.page-native { display: block; font-size: clamp(1.3rem, 3vw, 1.8rem); color: var(--gold); font-weight: 500; line-height: 1.5; margin-bottom: .3rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 1.95rem); margin: 3rem 0 1.1rem; }
.crumbs { display: flex; gap: .5rem; align-items: center; font-size: .95rem; color: var(--ink-3); margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head.center .crumbs { justify-content: center; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: var(--btn); color: var(--btn-ink); border: 1px solid transparent;
  padding: .62rem 1.3rem; border-radius: 999px; cursor: pointer; text-decoration: none; font-size: 1.06rem; font-weight: 600;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--btn-2); color: var(--btn-ink); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: linear-gradient(180deg, #e8bd57, #c8921f); color: #23180a; box-shadow: 0 8px 22px rgba(200, 146, 31, .28); }
.btn.gold:hover { background: linear-gradient(180deg, #f0ca6b, #d29d2a); color: #23180a; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold-2); color: var(--ink); }
.btn.sm { padding: .38rem 1rem; font-size: .96rem; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 1.1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .95rem; line-height: 1.4;
}
a.chip:hover { border-color: var(--gold-2); color: var(--ink); }

.ornament { display: block; margin: 2.6rem auto; width: min(26rem, 76%); height: auto; opacity: .9; }
.ornament.sm { width: min(14rem, 50%); margin: 1.6rem auto; }
.rule-dots { display: flex; justify-content: center; gap: .55rem; margin: 2.4rem 0; }
.rule-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); opacity: .6; }
.rule-dots i:nth-child(2) { background: var(--ruby); opacity: .7; width: 8px; height: 8px; margin-top: -1px; }

.search-input {
  width: 100%; padding: .85rem 1.15rem .85rem 2.9rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 1.12rem; outline: none; box-shadow: var(--shadow);
}
.search-input:focus { border-color: var(--gold-2); box-shadow: 0 0 0 4px var(--gold-soft); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 1.05rem; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }

/* Gentle reveal: only where motion is welcome, and only once the script has run. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
  html.js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Tracking breaks Indic conjuncts and vowel signs: never letter-space Indic text. */
.eyebrow .nat, .sp-head .nat, [class*="s-"].eyebrow { letter-spacing: 0; text-transform: none; }

/* The one plain line on the names pages about the edition's numbering. */
.count-note { font-size: 0.98rem; color: var(--ink-3); line-height: 1.55; max-width: 40rem; margin: 0.9rem auto 0; }

/* reader.css */
/* ---------------------------------------------------------------- the reader */
.reader { max-width: calc(var(--readw) + 2 * var(--gutter)); margin: 0 auto; padding: 2.4rem var(--gutter) 0; }
.reader-head { text-align: center; margin-bottom: 1.4rem; }
.reader-head .crumbs { justify-content: center; }
.reader-head .page-title { margin-bottom: .35rem; }
.reader-sub { font-size: 1.22rem; color: var(--ink-2); margin: 0 0 .4rem; }
.reader-span { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .2rem .7rem; color: var(--megha); font-size: 1.3rem; margin: .5rem 0 0; }
.reader-span .arrow { color: var(--gold-2); font-family: var(--font-latin); }
.reader-span .rom { display: block; font-size: .95rem; font-style: italic; color: var(--ink-3); }
html[data-script="roman"] .reader-span .rom { font-size: 1.2rem; color: var(--megha); font-style: italic; }
.reader-span > span { display: flex; flex-direction: column; align-items: center; }

/* The bar of reading choices stays in reach while the verses scroll. */
.reader-bar {
  position: sticky; top: calc(var(--head-h) + .45rem); z-index: 20; display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; flex-wrap: wrap; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px; padding: .32rem .4rem; margin: 1.3rem 0 1.1rem; box-shadow: var(--shadow);
}
.toggles { display: flex; flex-wrap: wrap; gap: .2rem; }
.toggle {
  border: 1px solid transparent; background: transparent; color: var(--ink-3); border-radius: 999px; padding: .3rem .85rem;
  cursor: pointer; font-size: .97rem; display: inline-flex; align-items: center; gap: .4rem;
}
.toggle::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .6; }
.toggle[aria-pressed="true"] { background: var(--megha-soft); color: var(--ink); border-color: var(--line); }
.toggle[aria-pressed="true"]::before { background: var(--gold-2); border-color: var(--gold-2); opacity: 1; }
.toggle:hover { color: var(--ink); }
.bar-right { display: flex; gap: .3rem; align-items: center; }
.bar-right .btn { white-space: nowrap; }
@media (max-width: 640px) {
  /* On a phone the bar would cover a third of the screen while it scrolls: it stays put. */
  .reader-bar { position: static; border-radius: var(--radius-sm); padding: .3rem; }
  .toggle { padding: .26rem .6rem; font-size: .9rem; }
  .bar-right { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line-2); padding-top: .3rem; }
}

/* The verse numbers of the page, to jump within it. */
.vstrip { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; align-items: center; margin: 0 0 2rem; }
.vs-label { color: var(--ink-3); font-style: italic; font-size: .95rem; margin: 0 .35rem 0 .7rem; }
.vs-label:first-child { margin-left: 0; }
.vs {
  min-width: 2.15rem; height: 2.15rem; display: inline-grid; place-items: center; padding: 0 .45rem; border-radius: 999px;
  font-size: .9rem; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); background: var(--surface);
  font-variant-numeric: lining-nums tabular-nums;
}
.vs:hover { border-color: var(--gold-2); color: var(--accent); }
.vs.has { box-shadow: inset 0 -2px 0 var(--gold-2); }

/* A run of the text (Invocation, Dhyānam...) on a page that holds more than one. */
.part { margin-top: 2.6rem; }
.part:first-of-type { margin-top: 0; }
.part-head { text-align: center; margin: 0 0 1.4rem; }
.part-head .ornament { margin: 0 auto .9rem; width: min(15rem, 56%); }
.part-title { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; }
.part-count { margin: .25rem 0 0; color: var(--ink-3); font-size: 1rem; }
.part-mark { display: flex; align-items: center; justify-content: center; gap: .8rem; color: var(--gold-2); margin-bottom: .7rem; }
.part-mark::before, .part-mark::after { content: ""; height: 1px; width: 4.5rem; background: linear-gradient(90deg, transparent, var(--gold-2)); }
.part-mark::after { transform: scaleX(-1); }
.part-mark i { width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--gold-2); }

.verses { display: grid; gap: 1.25rem; }

/* ---------------------------------------------------------------- a verse */
.verse {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem clamp(1rem, 4vw, 2.4rem) 1.4rem; box-shadow: var(--shadow); scroll-margin-top: calc(var(--head-h) + 5rem);
}
.verse::before {
  content: ""; position: absolute; left: 50%; top: -1px; width: 38%; height: 2px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent); opacity: .8;
}
.verse:target { box-shadow: var(--glow); border-color: var(--gold-2); }
.verse.prose { background: var(--surface-2); }
.v-top { display: flex; align-items: center; gap: .7rem; margin-bottom: .85rem; flex-wrap: wrap; }
.v-num {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; text-decoration: none; flex: none;
  border: 1.5px solid var(--gold-2); color: var(--gold); font-weight: 700; font-size: 1rem; font-variant-numeric: lining-nums;
  background: radial-gradient(circle at 32% 28%, var(--surface), var(--surface-3));
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.v-num:hover { color: var(--accent); }
.v-label { color: var(--ink-2); font-size: 1rem; }
.v-range { margin-left: auto; font-size: .9rem; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .7rem; font-variant-numeric: lining-nums; white-space: nowrap; }
.v-recite { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--ink-3); border: 1px solid transparent; }
.v-range + .v-recite { margin-left: 0; }
.v-label + .v-recite { margin-left: auto; }
.v-recite:hover { color: var(--gold); border-color: var(--line); }
.v-recite svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.v-speaker { text-align: center; margin: 0 0 .6rem; color: var(--tulasi); font-size: 1.12rem; line-height: 1.4; }
.v-speaker .sp-line { display: block; }
.v-speaker .nat { display: block; }
.v-speaker .rom { display: block; font-style: italic; font-size: .95rem; color: var(--ink-3); }
html[data-script="roman"] .v-speaker .rom { color: var(--tulasi); font-size: 1.12rem; }
.v-who { font-size: .9rem; color: var(--ink-3); text-decoration: none; border-bottom: 1px dotted var(--line); }
.v-who:hover { color: var(--accent); }

.v-text { text-align: center; padding: .2rem 0 .3rem; }
.vl { margin: 0 0 .55rem; overflow-wrap: anywhere; }
.vl:last-child { margin-bottom: 0; }
.vl .nat {
  display: block; color: var(--megha); font-size: calc(clamp(1.42rem, 1.02rem + 1.45vw, 1.95rem) * var(--scale)); line-height: 1.72; font-weight: 450;
}
.vl .nat.s-tamil { font-size: calc(clamp(1.3rem, .98rem + 1.2vw, 1.75rem) * var(--scale)); }
.vl .rom { display: block; font-style: italic; color: var(--ink-2); font-size: calc(1.14rem * var(--scale)); line-height: 1.5; }
html[data-script="roman"] .vl .rom { color: var(--megha); font-size: calc(clamp(1.32rem, 1.05rem + 1vw, 1.7rem) * var(--scale)); line-height: 1.6; }
.dm { color: var(--gold-2); white-space: nowrap; margin-left: .2em; font-style: normal; }
.rom .dm { opacity: .8; font-size: .9em; }
.prose .vl .nat { font-size: calc(clamp(1.22rem, 1rem + .9vw, 1.5rem) * var(--scale)); }

/* The names of a śloka, each a chip: its number and the name; open, its gloss and sense. */
.names { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1.3rem 0 .2rem; padding: 1.2rem 0 0; border-top: 1px dashed var(--line); }
.names > li { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.names > li:has(> .nm[open]) { flex-basis: 100%; }
.nm { max-width: 100%; }
.nm > summary, .nm-static {
  list-style: none; display: inline-flex; align-items: center; gap: .55rem; padding: .3rem .95rem .3rem .3rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; text-align: left; max-width: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.nm-static { cursor: default; }
.nm > summary::-webkit-details-marker { display: none; }
.nm > summary:hover { border-color: var(--gold-2); }
.nm[open] > summary { background: var(--gold-soft); border-color: var(--gold-2); }
.nm-n {
  flex: none; min-width: 2.05rem; height: 2.05rem; padding: 0 .3rem; border-radius: 999px; display: grid; place-items: center;
  background: #1f2a4d; color: #f6e2ae; font-size: .82rem; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; font-family: var(--font-latin);
}
.nm-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nm-name .nat { font-size: calc(1.16rem * var(--scale)); color: var(--megha); line-height: 1.45; overflow-wrap: anywhere; }
.nm-name .rom { font-size: .88rem; font-style: italic; color: var(--ink-3); overflow-wrap: anywhere; }
html[data-script="roman"] .nm-name .rom { font-size: calc(1.08rem * var(--scale)); color: var(--megha); }
.nm-body {
  margin: .55rem 0 .35rem; padding: .85rem 1.15rem .8rem; background: var(--surface-2); border: 1px solid var(--line-2);
  border-left: 3px solid var(--gold-2); border-radius: var(--radius-sm); text-align: left; width: 100%; max-width: 40rem;
}
.nm-g { font-size: 1.14rem; font-weight: 600; color: var(--ink); margin: 0 0 .25rem; }
.nm-sense { color: var(--ink-2); font-size: 1.05rem; line-height: 1.6; margin: 0 0 .45rem; }
.nm-avali { margin: 0; color: var(--ink-3); font-size: .98rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.nm-avali .nat { color: var(--lotus); font-size: 1.04rem; }
.nm-avali .rom { font-style: italic; }
.nm-avali::before { content: "Nāmāvaḻi"; font-family: var(--font-latin); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.nm-who { margin: .4rem 0 0; font-size: .95rem; color: var(--ink-3); }
.nm-who a { color: var(--tulasi); }

/* Word chips: the particles of a śloka of names, every word of any other verse. */
.words { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin: 1.1rem 0 .2rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.names + .words { border-top: 0; padding-top: 0; margin-top: .6rem; }
.w { display: inline-flex; flex-direction: column; align-items: flex-start; padding: .36rem .75rem .42rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); max-width: 100%; text-align: left; }
.w-s { display: flex; flex-direction: column; }
.w .nat { font-size: calc(1.08rem * var(--scale)); color: var(--megha); line-height: 1.45; }
.w .rom { font-style: italic; color: var(--ink-3); font-size: .86rem; line-height: 1.3; overflow-wrap: anywhere; }
html[data-script="roman"] .w .rom { color: var(--ink); font-size: 1rem; }
.w-g { font-size: .93rem; color: var(--ink-2); line-height: 1.3; }
.names + .words .w { padding: .25rem .6rem .3rem; }

.v-sense { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line-2); }
.v-meaning { font-size: calc(1.17rem * var(--scale)); line-height: 1.7; margin: 0 0 .5rem; color: var(--ink); }
.v-meaning::before { content: "\201C"; color: var(--gold-2); font-size: 2.2em; line-height: 0; vertical-align: -.42em; margin-right: .12em; font-weight: 700; }
.v-bhavam { margin-top: .4rem; }
.v-bhavam summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 1rem; list-style: none; display: inline-flex; align-items: center; gap: .4rem; }
.v-bhavam summary::-webkit-details-marker { display: none; }
.v-bhavam summary::before { content: "\2741"; color: var(--gold-2); transition: transform .25s ease; }
.v-bhavam[open] summary::before { transform: rotate(45deg); }
.v-bhavam p { margin: .5rem 0 .2rem; color: var(--ink-2); line-height: 1.7; font-size: calc(1.08rem * var(--scale)); border-left: 2px solid var(--gold-soft); padding-left: 1rem; font-style: italic; }
.v-people { margin: 1rem 0 0; font-size: .95rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.v-people a { text-decoration: none; color: var(--tulasi); border: 1px solid var(--tulasi-soft); background: var(--tulasi-soft); border-radius: 999px; padding: .05rem .65rem; }
.v-people a:hover { border-color: var(--tulasi); }

html.hide-names .names, html.hide-names .words { display: none; }
html.hide-meaning .v-sense { display: none; }

/* The page before and the page after. */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin: 2.6rem 0 0; }
.pg-card {
  display: flex; flex-direction: column; gap: .1rem; min-width: 0; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.3rem;
  box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease;
}
.pg-card:hover { border-color: var(--gold-2); color: var(--ink); transform: translateY(-2px); }
.pg-card.next { grid-column: 2; align-items: flex-end; text-align: right; }
.pg-dir { font-size: .88rem; font-weight: 600; color: var(--gold); }
.pg-title { font-size: 1.22rem; font-weight: 600; overflow-wrap: anywhere; }
.pg-meta { font-size: .92rem; color: var(--ink-3); }
@media (max-width: 560px) {
  .pager { grid-template-columns: 1fr; }
  .pg-card.next { grid-column: auto; order: -1; }
}
.source-note { text-align: center; color: var(--ink-3); font-size: .92rem; margin-top: 2.4rem; }

@media (max-width: 560px) {
  .verse { padding: 1rem 1rem 1.15rem; }
  .v-range { margin-left: 0; }
  .v-top { gap: .5rem; }
  .names { gap: .4rem; }
  .nm > summary, .nm-static { padding-right: .75rem; }
}

/* ---------------------------------------------------------------- contents (/read/) */
.toc-group { margin-top: 3rem; }
.toc-group:first-of-type { margin-top: 0; }
.toc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .55rem; margin-bottom: 1.2rem; }
.toc-head h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
.toc-head p { margin: 0; color: var(--ink-3); }
.toc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.toc-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem 1.25rem;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.toc-card::after { content: ""; position: absolute; right: -50px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.toc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gold-2); color: var(--ink); }
.toc-kicker { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.toc-title { font-size: 1.45rem; font-weight: 600; line-height: 1.2; margin: .2rem 0 .3rem; }
.toc-first { color: var(--megha); font-size: 1.12rem; line-height: 1.55; margin: .2rem 0 .1rem; }
.toc-first .rom { display: block; font-size: .92rem; font-style: italic; color: var(--ink-3); }
html[data-script="roman"] .toc-first .rom { font-size: 1.05rem; color: var(--megha); }
.toc-meta { margin: .5rem 0 0; color: var(--ink-3); font-size: .95rem; font-variant-numeric: lining-nums; }
.toc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 1rem; }
.toc-page { padding: 1.05rem 1.15rem 1.05rem; }
.toc-page .toc-top { display: flex; align-items: center; gap: .7rem; }
.toc-page .pnum {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-variant-numeric: lining-nums;
  background: #1f2a4d; color: #f6e2ae; box-shadow: 0 0 0 3px var(--gold-soft);
}
.toc-page .toc-title { font-size: 1.2rem; margin: 0; }
.toc-page .toc-range { color: var(--ink-3); font-size: .93rem; font-variant-numeric: lining-nums; }
.toc-ends { margin: .7rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .45rem; color: var(--megha); font-size: 1.05rem; line-height: 1.45; }
.toc-ends .arrow { color: var(--gold-2); }
.toc-ends .rom { font-size: .86rem; font-style: italic; color: var(--ink-3); }
.toc-ends > span { display: inline-flex; flex-direction: column; }
html[data-script="roman"] .toc-ends .rom { font-size: 1rem; color: var(--megha); }
@media (max-width: 700px) { .toc-pair { grid-template-columns: 1fr; } }

/* The 107 ślokas as a garland of beads. */
.beads-wrap { margin-top: 3rem; text-align: center; }
.beads { list-style: none; margin: 1.4rem auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 1.8rem; max-width: 62rem; }
/* Each page's nine ślokas are strung on one thread; the strands alternate pearl and coral. */
.strand { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.strand-label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; text-decoration: none; }
.strand-label:hover { color: var(--accent); }
.strand ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .28rem; position: relative; }
.strand ol::before {
  content: ""; position: absolute; left: -.7rem; right: -.7rem; top: 50%; height: 1.5px; z-index: -1;
  background: linear-gradient(90deg, transparent, var(--gold-2) 10%, var(--gold-2) 90%, transparent); opacity: .75;
}
.bead {
  position: relative; width: 2.35rem; height: 2.35rem; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  font-size: .78rem; font-weight: 600; font-variant-numeric: lining-nums; color: #1f2a4d; border: 1px solid rgba(31, 42, 77, .12);
  background: radial-gradient(circle at 33% 28%, #ffffff 0, #f6efe2 38%, #ddd0b6 100%);
  box-shadow: 0 2px 5px rgba(31, 42, 77, .16); transition: transform .15s ease, box-shadow .15s ease;
}
.strand.odd .bead { background: radial-gradient(circle at 33% 28%, #fff4f6 0, #f4c9d4 42%, #d78aa1 100%); color: #5a1e30; }
.bead:hover { transform: scale(1.18); box-shadow: 0 0 0 3px var(--gold-soft), 0 4px 10px rgba(31, 42, 77, .22); color: #a3192d; z-index: 1; }
.beads-key { color: var(--ink-3); font-size: .95rem; margin-top: 1.2rem; }
@media (max-width: 420px) { .bead { width: 2.02rem; height: 2.02rem; font-size: .7rem; } .strand ol { gap: .16rem; } }

/* home.css */
/* ---------------------------------------------------------------- home: the hero */
.hero { position: relative; padding: clamp(2.4rem, 7vw, 5rem) var(--gutter) 0; text-align: center; overflow: hidden; }
.hero::before {
  /* the dawn: a halo of gold and lotus above the title */
  content: ""; position: absolute; left: 50%; top: -14rem; width: 64rem; height: 34rem; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, var(--gold-soft), transparent 72%), radial-gradient(closest-side at 30% 60%, var(--lotus-soft), transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 54rem; margin: 0 auto; }
.hero-native { display: block; font-size: clamp(1.55rem, 4.2vw, 2.5rem); color: var(--gold); font-weight: 500; line-height: 1.5; margin: 0 0 .35rem; }
.hero-title { font-size: clamp(2.3rem, 6.6vw, 4.6rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 1.1rem; color: var(--ink); }
.hero-title em { font-style: italic; font-weight: 500; color: var(--megha-2); }
.hero-tagline { font-size: clamp(1.12rem, 2.2vw, 1.42rem); color: var(--ruby); font-style: italic; margin: 0 auto .9rem; max-width: 40rem; line-height: 1.4; }
.hero-lede { font-size: clamp(1.04rem, 1.6vw, 1.18rem); color: var(--ink-2); max-width: 40rem; margin: 0 auto; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin: 1.8rem 0 0; }
.hero-cta .btn { padding: .78rem 1.6rem; font-size: 1.1rem; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2.4rem; margin: 2.1rem 0 0; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat dt { order: 2; margin: 0; color: var(--ink-3); font-size: .86rem; letter-spacing: .12em; text-transform: uppercase; }
.stat dd { order: 1; margin: 0; font-size: 2rem; font-weight: 600; color: var(--ink); line-height: 1.1; font-variant-numeric: lining-nums; }

/* The illustration in a frame of four gilt corners. */
.hero-art { position: relative; max-width: 68rem; margin: clamp(2rem, 5vw, 3.4rem) auto 0; padding: 0; }
.hero-frame {
  position: relative; border-radius: calc(var(--radius) + 8px); overflow: hidden; background: var(--milk);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.hero-frame img { display: block; width: 100%; height: auto; }
.hero-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), inset 0 0 0 7px rgba(211, 161, 54, .18); pointer-events: none; }
.corner { position: absolute; width: clamp(48px, 8vw, 92px); height: auto; z-index: 2; pointer-events: none; }
.corner.tl { left: -10px; top: -10px; }
.corner.tr { right: -10px; top: -10px; transform: scaleX(-1); }
.corner.bl { left: -10px; bottom: -10px; transform: scaleY(-1); }
.corner.br { right: -10px; bottom: -10px; transform: scale(-1, -1); }
.hero-art figcaption { color: var(--ink-3); font-style: italic; font-size: .98rem; margin-top: .8rem; }

/* ---------------------------------------------------------------- the facts */
.facts { max-width: var(--maxw); margin: clamp(2.6rem, 6vw, 4rem) auto 0; padding: 0 var(--gutter); }
.facts dl {
  margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.fact { padding: 1.15rem 1.35rem 1.2rem; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0; }
.fact dt { font-size: .76rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: .3rem; }
.fact dd { margin: 0; color: var(--ink); line-height: 1.45; font-size: 1.08rem; }

/* ---------------------------------------------------------------- the introduction */
.essay { max-width: calc(42rem + 2 * var(--gutter)); margin: clamp(3rem, 7vw, 5rem) auto 0; padding: 0 var(--gutter); }
.essay-sec { margin: 0 0 1rem; scroll-margin-top: calc(var(--head-h) + 1rem); }
.essay-sec h2 { font-size: clamp(1.8rem, 4.2vw, 2.55rem); font-weight: 600; margin: 0 0 1rem; letter-spacing: -.01em; line-height: 1.12; }
.essay-sec h2 .n { display: block; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; font-weight: 600; }
.essay-sec p { font-size: 1.2rem; line-height: 1.75; color: var(--ink); }
.essay-sec > p:first-of-type::first-letter {
  float: left; font-size: 3.6em; line-height: .82; padding: .08em .12em 0 0; color: var(--ruby); font-weight: 600;
}
.essay-toc { max-width: calc(42rem + 2 * var(--gutter)); margin: clamp(3rem, 7vw, 4.5rem) auto 0; padding: 0 var(--gutter); }
.essay-toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem 1.6rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.essay-toc a { display: flex; align-items: baseline; gap: .7rem; padding: .35rem 0; color: var(--ink-2); text-decoration: none; font-size: 1.08rem; line-height: 1.35; border-bottom: 1px solid var(--line-2); }
.essay-toc a:hover { color: var(--accent); }
.essay-toc .n, .essay-sec h2 .n { font-variant-numeric: lining-nums; color: var(--gold); font-weight: 600; }
.essay-toc .n { min-width: 1.3rem; font-size: .95rem; }
@media (max-width: 640px) { .essay-toc ol { grid-template-columns: 1fr; } }
.essay-sec h2 .n { display: block; font-size: .95rem; letter-spacing: .1em; margin-bottom: .5rem; }
.essay-motif { display: block; width: 92px; height: auto; margin: 0 0 1.1rem; }
.essay-fig { margin: 0 calc(-1 * min(9rem, 8vw)) 2.2rem; text-align: center; }
.essay-fig img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--milk); }
@media (max-width: 900px) { .essay-fig { margin-left: 0; margin-right: 0; } }

.quote {
  margin: 1.8rem 0 2rem; padding: 1.5rem clamp(1rem, 4vw, 2rem) 1.3rem; text-align: center; position: relative;
  background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.quote::before, .quote::after {
  content: ""; position: absolute; left: 50%; width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg); background: var(--gold-2);
}
.quote::before { top: -5px; }
.quote::after { bottom: -5px; }
.quote .vl .nat { font-size: calc(clamp(1.3rem, 1rem + 1.1vw, 1.7rem) * var(--scale)); }
.quote cite { display: block; margin-top: .8rem; font-style: normal; font-size: .95rem; }
.quote cite a { color: var(--gold); text-decoration: none; }
.quote cite a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- the way in */
.doors-wrap { max-width: var(--maxw); margin: clamp(3.5rem, 8vw, 5.5rem) auto 0; padding: 0 var(--gutter); }
.doors-head { text-align: center; margin-bottom: 1.8rem; }
.doors-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 1100px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .doors { grid-template-columns: 1fr; } }
.door {
  position: relative; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem 1.35rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.door::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--ruby), var(--gold-2), var(--lotus)); }
.door::after { content: ""; position: absolute; right: -70px; top: -70px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); pointer-events: none; }
.door:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold-2); color: var(--ink); }
.door-art { height: 88px; display: flex; align-items: center; margin-bottom: .9rem; }
.door-art img { height: 88px; width: auto; max-width: 100%; }
.door-art.wide img { height: 88px; border-radius: 12px; }
.door-glyph { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #1f2a4d; color: #f6e2ae; box-shadow: 0 0 0 5px var(--gold-soft); }
.door-glyph svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.door-title { font-size: clamp(1.45rem, 2.2vw, 1.75rem); font-weight: 600; line-height: 1.15; }
.door-about { margin: .5rem 0 0; color: var(--ink-2); font-size: 1.06rem; line-height: 1.5; flex: 1; }
.door-go { margin-top: 1rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: .35rem; }
.door-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.door:hover .door-go svg { transform: translateX(4px); }

/* names.css */
/* ---------------------------------------------------------------- the thousand names */
.names-page { max-width: calc(60rem + 2 * var(--gutter)); }
.names-tools { display: grid; gap: 1rem; margin: 0 0 1.6rem; }
.names-tools .search-wrap { max-width: 36rem; margin: 0 auto; width: 100%; }
.search-note { text-align: center; color: var(--ink-3); font-size: .95rem; margin: 0; min-height: 1.5em; }
.pages-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin: 0 0 1.6rem; }
.names-pager .pages-nav { margin: 0; }
.pg {
  display: inline-grid; place-items: center; height: 2.2rem; padding: 0 .8rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none;
  font-size: .9rem; font-variant-numeric: lining-nums tabular-nums;
}
.pg:hover { border-color: var(--gold-2); color: var(--accent); }
.pg[aria-current] { background: var(--gold-soft); border-color: var(--gold-2); color: var(--ink); font-weight: 600; }

.nlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.nl {
  display: grid; grid-template-columns: 3.6rem minmax(0, 1.1fr) minmax(0, 1.25fr) auto; column-gap: 1.1rem; align-items: center;
  padding: .7rem 1.2rem .7rem .9rem; border-bottom: 1px solid var(--line-2); scroll-margin-top: calc(var(--head-h) + 1rem);
}
.nl:last-child { border-bottom: 0; }
.nl:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.nl:target { background: var(--gold-soft); }
.nl-n { text-align: right; color: var(--gold); font-weight: 700; font-size: 1rem; font-variant-numeric: lining-nums tabular-nums; }
.nl-name { display: flex; flex-direction: column; min-width: 0; }
.nl-name .nat { font-size: calc(1.32rem * var(--scale)); color: var(--megha); line-height: 1.45; overflow-wrap: anywhere; }
.nl-name .rom { font-style: italic; color: var(--ink-3); font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
html[data-script="roman"] .nl-name .rom { font-size: calc(1.2rem * var(--scale)); color: var(--megha); }
.nl-g { color: var(--ink-2); font-size: 1.04rem; line-height: 1.4; }
.nl-v { font-size: .9rem; color: var(--ink-3); text-decoration: none; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .65rem; font-variant-numeric: lining-nums; }
.nl-v:hover { color: var(--accent); border-color: var(--gold-2); }
.nl mark { background: var(--gold-soft); color: inherit; border-radius: 3px; }
@media (max-width: 640px) {
  .nl { grid-template-columns: 2.7rem minmax(0, 1fr) auto; column-gap: .7rem; padding: .65rem .8rem .7rem .5rem; align-items: start; }
  .nl-n { padding-top: .3rem; }
  .nl-g { grid-column: 2 / -1; font-size: .98rem; margin-top: .15rem; }
  .nl-v { grid-column: 3; grid-row: 1; margin-top: .3rem; }
}
.nlist-empty { text-align: center; color: var(--ink-3); padding: 2rem 1rem; font-style: italic; }

.names-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: 1rem; }
.names-pager { margin-top: 2rem; }

/* recite.css */
/* ---------------------------------------------------------------- recite */
/* A page of its own, calm and without the site's chrome: the verse, large, and the way on. */
body.recite-body { padding-bottom: 0; min-height: 100vh; min-height: 100dvh; }
.rc { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; isolation: isolate; }
.rc::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 50% 18%, var(--halo), transparent 70%), radial-gradient(700px 400px at 50% 100%, var(--megha-soft), transparent 70%);
}
.rc-top { display: flex; align-items: center; gap: .8rem; padding: .7rem var(--gutter); min-height: var(--head-h); }
.rc-top .brand-name { font-size: 1.1rem; }
.rc-where { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; margin-left: .4rem; padding-left: .9rem; border-left: 1px solid var(--line); }
.rc-sec { font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-pos { font-size: 1.02rem; color: var(--ink-2); white-space: nowrap; font-variant-numeric: lining-nums; }
.rc-tools { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 0 .85rem; height: 34px; cursor: pointer; color: var(--ink-2); font-size: .97rem; }
.seg button[aria-pressed="true"] { background: #1f2a4d; color: #f6e2ae; }

.rc-more { position: relative; }
.rc-more > summary { list-style: none; cursor: pointer; }
.rc-more > summary::-webkit-details-marker { display: none; }
.rc-panel {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 40; width: min(20rem, calc(100vw - 2rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: .9rem 1rem 1rem; display: grid; gap: .8rem;
}
.rc-field { display: grid; gap: .3rem; }
.rc-field > span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.rc-field select {
  width: 100%; padding: .45rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 1rem;
}
.rc-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.rc-row .toggle { border-color: var(--line); }
.rc-lbl { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-right: auto; }
.rc-from { margin: 1.1rem 0 0; font-size: .98rem; }
.rc-from a { color: var(--ink-3); text-decoration: none; border-bottom: 1px dotted var(--line); }
.rc-from a:hover { color: var(--accent); }

.rc-stage {
  flex: 1; display: grid; place-items: center; padding: clamp(1rem, 4vh, 3rem) var(--gutter); cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; min-height: 0;
}
.rc-card { max-width: 60rem; width: 100%; text-align: center; }
.rc-card.enter { animation: rc-in .55s cubic-bezier(.2, .7, .2, 1); }
@keyframes rc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rc-speaker { color: var(--tulasi); font-size: clamp(1.1rem, 2.4vw, 1.45rem); margin: 0 0 1.1rem; }
.rc-speaker .rom { display: block; font-size: .8em; font-style: italic; color: var(--ink-3); }
html[data-script="roman"] .rc-speaker .rom { color: var(--tulasi); font-size: 1em; }
.rc-lines .vl { margin-bottom: .9rem; }
.rc-lines .vl .nat { font-size: calc(clamp(1.65rem, 1rem + 3vw, 3.15rem) * var(--scale)); line-height: 1.62; }
.rc-lines .vl .nat.s-tamil { font-size: calc(clamp(1.5rem, .95rem + 2.6vw, 2.8rem) * var(--scale)); }
.rc-lines .vl .rom { font-size: calc(clamp(1.1rem, .95rem + .8vw, 1.5rem) * var(--scale)); margin-top: .2rem; }
html[data-script="roman"] .rc-lines .vl .rom { font-size: calc(clamp(1.5rem, 1rem + 2.2vw, 2.6rem) * var(--scale)); }
.rc-range { margin: 1.4rem 0 0; color: var(--ink-3); font-size: 1rem; font-variant-numeric: lining-nums; }
.rc-meaning { max-width: 42rem; margin: 1.6rem auto 0; color: var(--ink-2); font-size: calc(clamp(1.08rem, 1rem + .4vw, 1.3rem) * var(--scale)); line-height: 1.65; font-style: italic; }
.rc-meaning:empty { display: none; }

.rc-nm-n { display: inline-grid; place-items: center; min-width: 3.4rem; height: 3.4rem; padding: 0 .6rem; border-radius: 999px; background: #1f2a4d; color: #f6e2ae; font-weight: 700; font-size: 1.15rem; font-variant-numeric: lining-nums; box-shadow: 0 0 0 6px var(--gold-soft); margin-bottom: 1.4rem; }
.rc-name .nat { display: block; font-size: calc(clamp(2.4rem, 1.2rem + 6vw, 5.6rem) * var(--scale)); color: var(--megha); line-height: 1.35; }
.rc-name .rom { display: block; font-size: calc(clamp(1.2rem, 1rem + 1.2vw, 1.8rem) * var(--scale)); font-style: italic; color: var(--ink-2); }
html[data-script="roman"] .rc-name .rom { font-size: calc(clamp(2.2rem, 1.2rem + 5vw, 4.6rem) * var(--scale)); color: var(--megha); }
.rc-avali { margin: 1.2rem 0 0; color: var(--lotus); font-size: calc(clamp(1.15rem, 1rem + .9vw, 1.6rem) * var(--scale)); }
.rc-avali .rom { display: block; font-style: italic; color: var(--ink-3); font-size: .78em; }
html[data-script="roman"] .rc-avali .rom { color: var(--lotus); font-size: 1em; }
.rc-gloss { margin: 1.3rem auto 0; color: var(--ink-2); font-size: calc(clamp(1.1rem, 1rem + .5vw, 1.4rem) * var(--scale)); max-width: 36rem; font-style: italic; }
.rc-gloss:empty { display: none; }
html.rc-no-meaning .rc-meaning, html.rc-no-meaning .rc-gloss { display: none; }

.rc-foot { padding: .4rem var(--gutter) calc(1rem + env(safe-area-inset-bottom)); }
.rc-progress { position: relative; height: 4px; border-radius: 999px; background: var(--line-2); overflow: hidden; max-width: 60rem; margin: 0 auto; }
.rc-bar { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--gold-2), var(--ruby)); border-radius: inherit; transition: width .4s ease; }
.rc-tick { height: 2px; max-width: 60rem; margin: .3rem auto 0; border-radius: 999px; overflow: hidden; }
.rc-tick span { display: block; height: 100%; width: 0; background: var(--gold-2); opacity: .55; }
.rc-tick.run span { animation: rc-tick var(--dur, 5s) linear forwards; }
@keyframes rc-tick { from { width: 0; } to { width: 100%; } }
.rc-controls { display: flex; justify-content: center; align-items: center; gap: .8rem; margin: .8rem 0 .4rem; }
.rc-btn {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); padding: 0;
}
.rc-btn:hover { border-color: var(--gold-2); }
.rc-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rc-btn.play { width: 64px; height: 64px; background: linear-gradient(180deg, #e8bd57, #c8921f); color: #23180a; border-color: transparent; }
.rc-btn.play svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.rc-btn .i-pause { display: none; }
.rc.playing .rc-btn .i-play { display: none; }
.rc.playing .rc-btn .i-pause { display: block; }
.rc-count { text-align: center; color: var(--ink-3); font-size: .95rem; margin: 0; font-variant-numeric: lining-nums; }
.rc-count b { color: var(--gold); font-weight: 600; }
.rc-hint { text-align: center; color: var(--ink-3); font-size: .85rem; margin: .2rem 0 0; }
.rc-static { text-align: center; }
.rc-static .btn { margin-top: 1.4rem; }
@media (max-width: 640px) {
  .rc-top { gap: .5rem; flex-wrap: wrap; }
  .rc-top .brand-word { display: none; }
  .rc-where { margin-left: 0; padding-left: .6rem; }
  .seg button { padding: 0 .65rem; font-size: .92rem; }
  .rc-hint { display: none; }
}
@media (max-width: 380px) {
  .rc-where { display: none; }
}
:fullscreen .rc-top .brand { opacity: .5; }

/* pages.css */
/* ---------------------------------------------------------------- about */
.about-sec { margin: 0 0 2.4rem; }
.about-sec h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 .8rem; }
.about-sec p { font-size: 1.15rem; line-height: 1.75; }
.edition { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.4rem; margin: 0 0 2.4rem; }
.edition dt { font-size: .76rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: .7rem; }
.edition dt:first-child { margin-top: 0; }
.edition dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.source { background: var(--surface); border: 1px solid var(--line-2); border-left: 3px solid var(--gold-2); border-radius: var(--radius-sm); padding: .8rem 1.1rem; }
.source a { font-weight: 600; overflow-wrap: anywhere; }
.source p { margin: .25rem 0 0; color: var(--ink-2); font-size: 1.02rem; }

/* ---------------------------------------------------------------- people (the frame) */
/* The chart builder fills #people-chart (src/js/people.js, src/styles/people.css; docs/site.md). */
.people-page { max-width: var(--maxw); }
.clusters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin: 0 0 2rem; }
.cluster { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.cluster::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--gold-2), var(--lotus)); }
.cluster h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
.cluster p { margin: 0; color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; }
.people-chart { min-height: 4rem; margin: 0 0 2.4rem; }
.people-index { margin-top: 1rem; }
.pi-group { margin: 0 0 2rem; }
.pi-group h2 { font-size: 1.4rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; margin: 0 0 .9rem; }
.pi-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .7rem; }
.pi { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .75rem 1rem .8rem; scroll-margin-top: calc(var(--head-h) + 1rem); }
.pi:target { border-color: var(--gold-2); box-shadow: var(--glow); }
.pi-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.pi-name { font-weight: 600; font-size: 1.14rem; }
.pi-top .nat { color: var(--megha); font-size: 1.05rem; }
.pi-top .rom { display: none; }
.pi-role { margin: .2rem 0 0; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.pi-where { margin: .35rem 0 0; font-size: .9rem; color: var(--ink-3); }
.pi-where a { color: var(--ink-3); }

/* ---------------------------------------------------------------- not found */
.lost { text-align: center; padding-top: 4rem; }
.lost .page-native { font-size: clamp(2rem, 6vw, 3rem); }
.lost-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.6rem; }
