/* Vedatom — the Glossary as a wheel (glossary3d.js). body.gl3-w = wheel view (the wheel is the page),
   body.gl3-l = list view (the cards). */
.gl3-wsec, .gl3-wsec *, .gl3-pop, .gl3-pop * { box-sizing: border-box; }
.gl3-wsec div { max-width: none; }
/* nav-menus.js caps (.gp-fit) anything poking past a phone screen; the wheel's parts hang off a zero-width pivot */
.gl3-wsec .gl3-stage, .gl3-wsec .gl3-ring, .gl3-wsec .gl3-mala, .gl3-wsec .gp-fit { max-width: none !important; }

/* ---------- the Wheel / List toggle (in the header) ---------- */
.gl3-view { display: none; }
body.gl3 .gl3-view { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid rgba(236,196,95,.3); background: rgba(12,16,26,.7); margin-top: 2px; }
.gl3-view button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  font: 800 11.5px/1 'Manrope', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,236,221,.65); transition: background .25s, color .25s; }
.gl3-view button:hover { color: #f2ecdd; }
.gl3-view button:focus-visible { outline: 2px solid #ecc45f; outline-offset: 2px; }
.gl3-view button[aria-pressed="true"] { background: #ecc45f; color: #171106; }

/* ---------- wheel view: the wheel is the page ---------- */
.gl3-wsec { display: none; }
body.gl3-w div.gl3-wsec.gl3-wsec { display: block; position: relative; padding: 6px 6vw 90px; margin-top: 0 !important;
  background: radial-gradient(ellipse 55% 60% at 50% 45%, rgba(48,64,84,.32), transparent 70%), #070a12; }
body.gl3-w [data-screen-label="Glossary Terms"] { display: none !important; }
body.gl3-w #top { padding-bottom: 26px !important; }
/* the letter row sits in the page, above the wheel, and chooses what the wheel holds */
body.gl3-w div.gl3-abc.gl3-abc { position: relative !important; top: auto !important; border: 0 !important; background: #070a12 !important; padding: 14px 0 0 !important; }
body.gl3-w .gl3-abc > div:not(.gl3-wsec) { padding: 0 5vw 6px; }
/* the wheel's slot follows the letter row; on phones the page pushes that sibling down for its fixed bar */
#glossary3d { margin-top: 0 !important; }
body.gl3-w .gl3-abc > div:not(.gl3-wsec) { flex-wrap: wrap !important; justify-content: center !important; overflow: visible !important; }

/* letters as beads on a thread (both views) */
body.gl3 .gl3-abc > div:not(.gl3-wsec) { position: relative; gap: clamp(3px, .6vw, 8px) !important; }
body.gl3 .gl3-abc > div:not(.gl3-wsec)::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(236,196,95,.45) 8%, rgba(236,196,95,.45) 92%, transparent); }
body.gl3 a.gloL { position: relative; border-radius: 50% !important; border-color: rgba(236,196,95,.4) !important;
  background: radial-gradient(circle at 35% 30%, rgba(60,50,30,.98), rgba(14,12,8,.98) 70%); box-shadow: 0 4px 10px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,236,190,.16);
  transition: transform .35s cubic-bezier(.22,.61,.36,1), background .3s, color .3s, box-shadow .3s !important; }
body.gl3 a.gloL:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,.5), 0 0 12px rgba(236,196,95,.3); }
.gl3-key { display: none !important; }
body.gl3-w .gl3-key { display: flex !important; width: 30px; height: 30px; align-items: center; justify-content: center; font-size: 14px; color: #ecc45f; text-decoration: none; border: 1px solid; margin-right: 6px; }
body.gl3 .gl3-abc span:not(.sc-interp) { position: relative; width: 8px !important; height: 8px !important; margin: 0 3px; align-self: center; border-radius: 50% !important; font-size: 0 !important;
  background: rgba(236,196,95,.22); border-color: transparent !important; }
body.gl3 a.gloL.gl3-on { background: radial-gradient(circle at 35% 30%, #fff3c9, #ecc45f 45%, #a87a22 85%); color: #171106 !important; border-color: #ecc45f !important;
  transform: translateY(-4px); box-shadow: 0 0 18px rgba(236,196,95,.6), 0 8px 16px rgba(0,0,0,.5); }

/* ---------- the wheel ---------- */
.gl3-mala { width: min(920px, 100%); margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.gl3-set { text-align: center; margin-top: 18px; }
.gl3-set b { display: block; font: 700 17px/1.2 'Cinzel', serif; letter-spacing: .16em; color: #f2ecdd; }
.gl3-set i { display: block; margin-top: 4px; font: italic 400 14px/1.2 'Cormorant Garamond', serif; color: rgba(242,236,221,.55); }
.gl3-stage { position: relative; width: 100%; height: 320px; perspective: 1400px; perspective-origin: 50% 0%; overflow: hidden; outline: none;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.gl3-mala.none .gl3-stage, .gl3-mala.none .gl3-hint { visibility: hidden; height: 60px; }
.gl3-stage.grab, .gl3-stage.grab .gl3-bead { cursor: grabbing; }
.gl3-stage:focus-visible .gl3-thread { border-color: #ecc45f; }
.gl3-ring { position: absolute; left: 50%; top: 110px; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(-8deg); }
.gl3-thread { position: absolute; width: calc(var(--R, 330px) * 2); height: calc(var(--R, 330px) * 2); left: calc(var(--R, 330px) * -1); top: calc(var(--R, 330px) * -1);
  border-radius: 50%; border: 1px solid rgba(236,196,95,.32); transform: rotateX(90deg); box-shadow: 0 0 24px rgba(236,196,95,.12), inset 0 0 24px rgba(236,196,95,.08); }
.gl3-bead { position: absolute; left: -32px; top: -32px; width: 64px; height: 64px; border-radius: 50%; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border: 1px solid rgba(236,196,95,.38);
  background: radial-gradient(circle at 35% 30%, rgba(60,50,30,.95), rgba(14,12,8,.96) 70%); box-shadow: 0 8px 20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,236,190,.18);
  transition: border-color .4s, box-shadow .4s, background .4s; }
.gl3-bead .dv { font-family: 'Tiro Devanagari Sanskrit', serif; font-size: var(--fs, 17px); line-height: 1.12; color: #ecc45f; text-align: center; max-width: 54px; overflow-wrap: anywhere; transition: transform .4s; pointer-events: none; }
.gl3-bead.lat .dv { font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.gl3-bead.front { border-color: #ecc45f; background: radial-gradient(circle at 35% 30%, #fff3c9, #ecc45f 45%, #a87a22 85%); box-shadow: 0 0 30px rgba(236,196,95,.6), 0 10px 24px rgba(0,0,0,.5); }
.gl3-bead.front .dv { color: #1b140a; transform: scale(1.12); }
.gl3-bead:focus-visible { outline: 2px solid #ecc45f; outline-offset: 3px; }
.gl3-hint { font: 800 10px/1 'Manrope', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: rgba(236,196,95,.55); margin-top: -24px; transition: opacity .6s; }
.gl3-mala.used .gl3-hint { opacity: 0; }
.gl3-cap { min-height: 110px; max-width: 600px; text-align: center; transition: opacity .25s ease; margin-top: 18px; }
.gl3-cap.fade { opacity: 0; }
.gl3-cap .t { all: unset; cursor: pointer; font: 500 34px/1.1 'Cormorant Garamond', serif; color: #f2ecdd; }
.gl3-cap .t span { font-family: 'Tiro Devanagari Sanskrit', serif; font-size: 21px; color: #ecc45f; margin-left: 8px; }
.gl3-cap .t:hover, .gl3-cap .t:focus-visible { color: #ecc45f; }
.gl3-cap .d { margin-top: 10px; font-size: 15px; line-height: 1.65; color: rgba(242,236,221,.66); text-wrap: balance; }

/* ---------- the term's card, popped up ---------- */
.gl3-pop { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 20px; perspective: 1400px;
  visibility: hidden; pointer-events: none; }
.gl3-pop.open { visibility: visible; pointer-events: auto; }
.gl3-pop .bg { position: absolute; inset: 0; background: rgba(7,10,18,.74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.gl3-pop.open .bg { opacity: 1; }
.gl3-pop .card { position: relative; width: min(540px, 100%); max-height: 88vh; overflow-y: auto; background: #fdf9ef; color: #241d12; border: 1px solid rgba(236,196,95,.35); border-radius: 18px;
  padding: 30px 32px 18px; box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 0 7px rgba(253,249,239,.06);
  opacity: 0; transform: translateY(26px) rotateX(14deg); transform-origin: 50% 100%; transition: opacity .35s ease, transform .5s cubic-bezier(.22,.61,.36,1); }
.gl3-pop.open .card { opacity: 1; transform: none; }
.gl3-pop .card.r { animation: gl3r .45s cubic-bezier(.22,.61,.36,1); }
.gl3-pop .card.l { animation: gl3l .45s cubic-bezier(.22,.61,.36,1); }
@keyframes gl3r { from { opacity: .2; transform: translateX(34px) rotateY(-12deg); } }
@keyframes gl3l { from { opacity: .2; transform: translateX(-34px) rotateY(12deg); } }
.gl3-pop .x { all: unset; cursor: pointer; position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(36,29,18,.18); background: #fff; color: #5a4526; font-size: 15px; }
.gl3-pop .x:focus-visible, .gl3-pop .nv button:focus-visible, .gl3-pop .es:focus-visible { outline: 2px solid #8c4527; outline-offset: 2px; }
.gl3-pop .lt { font: 800 10px/1 'Manrope', sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #8c4527; }
.gl3-pop .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 12px 44px 0 0; }
.gl3-pop .tm { font: 400 32px/1.15 'Marcellus', serif; color: #241d12; }
.gl3-pop .hd .dv { font: 400 24px/1.2 'Tiro Devanagari Sanskrit', serif; color: #a8791f; }
.gl3-pop .df { margin-top: 14px; font-size: 16px; line-height: 1.72; color: rgba(36,29,18,.76); }
.gl3-pop .es { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: #fffdf7; border: 1px solid rgba(140,69,39,.22);
  font: 800 12px/1.45 'Manrope', sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #8c4527; transition: border-color .25s, box-shadow .25s, transform .25s; }
.gl3-pop .es:hover { border-color: #8c4527; box-shadow: 0 10px 24px -14px rgba(140,69,39,.5); transform: translateY(-1px); }
.gl3-pop .es small { display: block; margin-bottom: 4px; font: italic 400 14px/1 'Cormorant Garamond', serif; letter-spacing: 0; text-transform: none; color: rgba(36,29,18,.55); }
.gl3-pop .nv { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(36,29,18,.1); }
.gl3-pop .nv button { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #8c4527; border: 1px solid rgba(140,69,39,.3); transition: background .25s, color .25s; }
.gl3-pop .nv button:hover { background: #8c4527; color: #fdf9ef; }
.gl3-pop .ct { font: 700 11px/1 'Manrope', sans-serif; letter-spacing: .12em; color: rgba(36,29,18,.45); }

/* ---------- list view: letters follow the reader (a rail down the right edge) ---------- */
.gl3-rail { display: none; }
body.gl3-l.gl3 .gl3-rail { display: flex; flex-direction: column; position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 60; padding: 10px 4px;
  background: rgba(253,249,239,.82); border-radius: 16px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 24px rgba(36,29,18,.08);
  opacity: 0; pointer-events: none; transition: opacity .3s; touch-action: none; }
body.gl3 .gl3-rail.show { opacity: 1; pointer-events: auto; }
body.gl3 .gl3-rail::before { content: ''; position: absolute; top: 12px; bottom: 12px; left: 50%; width: 1px; background: rgba(140,69,39,.3); }
.gl3-rail a { position: relative; font: 700 11px/1 'Cinzel', serif; color: #8c4527; text-decoration: none; width: 22px; height: 22px; margin: 2px 5px; display: grid; place-items: center;
  border-radius: 50%; background: #fdf9ef; border: 1px solid rgba(140,69,39,.3); transition: background .25s, color .25s, transform .25s; }
.gl3-rail a:hover { border-color: #8c4527; }
.gl3-rail a.on { background: #8c4527; color: #fdf9ef; border-color: #8c4527; transform: translateX(-5px); box-shadow: 0 0 12px rgba(140,69,39,.4); }
@media (min-width: 761px) { body.gl3-l.gl3 [data-screen-label="Glossary Terms"] { padding-right: max(6vw, 72px) !important; } }
@media (min-width: 761px) and (max-width: 960px) { body.gl3 a.gloL { width: 23px !important; height: 23px !important; font-size: 11px !important; } body.gl3 .gl3-abc > div:not(.gl3-wsec) { gap: 3px !important; } }

/* lifted cards (list view) */
body.gl3 [data-screen-label="Glossary Terms"] [style*="grid-template-columns"] { perspective: 1400px; }
body.gl3 .glocard { position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .45s cubic-bezier(.22,.61,.36,1), box-shadow .4s ease, border-color .4s ease; }
body.gl3 .glocard:hover { box-shadow: 0 26px 40px -22px rgba(60,44,12,.45); border-color: rgba(168,121,31,.45) !important; }
body.gl3 .glocard > div:first-child > span:last-child { transform: translateZ(18px); display: inline-block; transition: transform .45s; }
body.gl3 .glocard::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), rgba(236,196,95,.14), transparent 50%); }
body.gl3 .glocard:hover::after { opacity: 1; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body.gl3-w div.gl3-wsec.gl3-wsec { padding: 0 4vw 70px; }
  body.gl3-w div.gl3-abc.gl3-abc { padding: 12px 0 0 !important; }
  body.gl3-w .gl3-abc > div:not(.gl3-wsec) { gap: 5px !important; row-gap: 8px !important; padding: 0 3vw 4px; }
  body.gl3-w .gl3-abc > div:not(.gl3-wsec)::before { display: none; }
  body.gl3-w a.gloL, body.gl3-w .gl3-key { width: 28px !important; height: 28px !important; font-size: 12px !important; }
  body.gl3-w .gl3-key { margin-right: 0; }
  body.gl3-l .gl3-abc { display: none !important; }
  .gl3-stage { height: 250px; perspective: 1000px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
  .gl3-bead { width: 50px; height: 50px; left: -25px; top: -25px; }
  .gl3-bead .dv { font-size: calc(var(--fs, 17px) * .78); max-width: 42px; }
  .gl3-hint { margin-top: -10px; }
  .gl3-cap .t { font-size: 27px; }
  .gl3-cap .d { font-size: 14px; }
  body.gl3 .gl3-rail { right: 2px; padding: 6px 2px; }
  .gl3-rail a { width: 17px; height: 17px; font-size: 10px; margin: 1px 4px; }
  body.gl3 .glocard { padding: 14px 16px !important; gap: 6px !important; margin-right: 18px; }
  body.gl3 [data-screen-label="Glossary Terms"] [style*="grid-template-columns"] { gap: 10px !important; }
  .gl3-pop { padding: 12px; align-items: flex-end; }
  .gl3-pop .card { padding: 24px 20px 14px; border-radius: 18px; }
  .gl3-pop .tm { font-size: 27px; } .gl3-pop .hd .dv { font-size: 21px; } .gl3-pop .df { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .gl3-pop .card, .gl3-pop .card.r, .gl3-pop .card.l { transition: opacity .2s; transform: none; animation: none; } }
