/* ============================================================================
   Bhoomi796 — interface styles
   ========================================================================== */

:root{
  /* ---- ground ----------------------------------------------------------
     Indigo rather than the old purple-grey. India exported the dye for
     centuries — the word is literally "from India" — and a blue-black
     reads considerably richer than a mauve-black at large areas. */
  --ink:#0f1626;
  --ink-2:#16203a;
  --ink-3:#1e2c4d;
  --ink-glass:rgba(15,22,38,.82);

  /* ---- gilding ----------------------------------------------------------
     Gold is used as hairlines and rules, almost never as a fill. That is
     the difference between gilded and gaudy. */
  --gold:#d4a544;
  --gold-soft:#f0cd80;
  --gold-deep:#9a7523;
  --gold-line:rgba(212,165,68,.28);
  --gold-line-soft:rgba(212,165,68,.14);

  --line:rgba(240,230,210,.10);
  --line-2:rgba(240,230,210,.055);

  /* ---- pigments ---------------------------------------------------------
     Lac red, marigold, peacock — dyestuffs and mineral colours rather than
     screen primaries. */
  --paper:#f7f1e4;
  --paper-2:#ece2cd;
  --lac:#a8323b;
  --saffron:#e8912f;
  --marigold:#e5b02c;
  --peacock:#1c8a86;
  --rose:#c05f7d;

  --text:#f4ecdd;
  --text-dim:rgba(244,236,221,.66);
  --text-faint:rgba(244,236,221,.42);

  --topbar-h:62px;
  --timeline-h:56px;
  --rail-w:330px;
  --radius:14px;
  --radius-lg:18px;

  /* layered rather than one big blur — closer to how a real card sits */
  --shadow:0 1px 2px rgba(0,0,0,.34), 0 8px 20px rgba(0,0,0,.30),
           0 28px 64px rgba(0,0,0,.42);
  --shadow-soft:0 2px 8px rgba(0,0,0,.24), 0 14px 34px rgba(0,0,0,.28);

  --font-display:'Fraunces','Bhoomi Display',Georgia,'Times New Roman',serif;
  --font-ui:'Mukta','Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;

  /* A jaali — the pierced stone screen of Mughal and Rajput architecture.
     Geometric, architectural, and at 3% opacity it reads as texture rather
     than as decoration. */
  --jaali:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52' viewBox='0 0 52 52'%3E%3Cg fill='none' stroke='%23d4a544' stroke-width='1'%3E%3Cpath d='M26 1 L51 26 L26 51 L1 26 Z'/%3E%3Ccircle cx='26' cy='26' r='10'/%3E%3Cpath d='M0 0 L9 9 M52 0 L43 9 M0 52 L9 43 M52 52 L43 43'/%3E%3C/g%3E%3C/svg%3E");
}

*,*::before,*::after{box-sizing:border-box}

/* The UA stylesheet gives [hidden] display:none, but ANY author display rule
   beats it — and .onboard/.panel/.wander-opts all set display. Without this,
   dismissing the intro left an invisible full-screen grid swallowing every
   click on the canvas. Keep this rule above everything that sets display. */
[hidden]{display:none !important}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--font-ui);
  background:var(--ink);
  color:var(--text);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
button{font:inherit;color:inherit}
a{color:inherit}
svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ─────────────────────────── LOADER ─────────────────────────── */
#loader{
  position:fixed;inset:0;z-index:200;display:grid;place-items:center;
  background:radial-gradient(120% 100% at 50% 40%,#2a2130 0%,#15111a 70%);
  transition:opacity .6s ease,visibility .6s;
}
#loader.is-done{opacity:0;visibility:hidden;pointer-events:none}
.loader__inner{text-align:center}
.loader__mark{display:flex;gap:6px;justify-content:center;margin-bottom:18px}
.loader__mark span{
  width:9px;height:26px;border-radius:5px;background:var(--saffron);
  animation:bump 1.05s ease-in-out infinite;
}
.loader__mark span:nth-child(2){background:var(--paper);animation-delay:.13s}
.loader__mark span:nth-child(3){background:#2f8a55;animation-delay:.26s}
@keyframes bump{0%,100%{transform:scaleY(.55);opacity:.55}50%{transform:scaleY(1);opacity:1}}
.loader__title{font-family:var(--font-display);font-size:30px;margin:0;letter-spacing:-.01em}
.loader__title span{color:var(--gold)}
.loader__sub{margin:8px 0 0;font-size:13.5px;color:var(--text-faint)}

/* ─────────────────────────── APP SHELL ─────────────────────────── */
.app{
  height:100svh;min-height:520px;
  display:grid;
  grid-template-rows:var(--topbar-h) 1fr var(--timeline-h);
  position:relative;
}
/* grid-template-rows:100% is load-bearing: without it the implicit row is
   `auto`, the canvas's height:100% has nothing to resolve against, and the
   stage collapses to content height on every viewport where the sidebar
   isn't there to prop it open — i.e. all of them under 1280px. */
.body{display:grid;grid-template-columns:1fr var(--rail-w);grid-template-rows:100%;min-height:0}
@media (max-width:1279px){ .body{grid-template-columns:1fr} .rail{display:none} }

/* ─────────────────────────── TOPBAR ─────────────────────────── */
.topbar{
  display:flex;align-items:center;gap:14px;padding:0 14px;
  background:linear-gradient(180deg,#241d26,#1d1722);
  border-bottom:1px solid var(--line);
  position:relative;z-index:40;
}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none;flex:none}
.brand__mark{
  width:26px;height:26px;border-radius:8px;flex:none;
  background:conic-gradient(from 220deg,var(--saffron),#fff6e6 45%,#2f8a55 70%,var(--saffron));
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.25);
}
.brand__text{font-family:var(--font-display);font-size:19px;letter-spacing:-.015em}
.brand__text b{color:var(--gold);font-weight:700}
@media (max-width:640px){ .brand__text{display:none} }

.searchbox{position:relative;flex:1 1 auto;max-width:520px}
.searchbox__icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--text-faint)}
#search-input{
  width:100%;height:38px;padding:0 46px 0 36px;
  background:rgba(255,246,230,.07);border:1px solid var(--line);
  border-radius:10px;color:var(--text);font-size:14px;outline:none;
  transition:border-color .16s,background .16s;
}
#search-input::placeholder{color:var(--text-faint)}
#search-input:focus{border-color:rgba(232,180,39,.6);background:rgba(255,246,230,.1)}
.searchbox__kbd{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);
  font-size:10.5px;font-family:var(--font-ui);color:var(--text-faint);
  border:1px solid var(--line);border-radius:5px;padding:2px 6px;
}
@media (max-width:640px){ .searchbox__kbd{display:none} }

.search-results{
  position:absolute;top:46px;left:0;right:0;z-index:60;
  background:#241d26;border:1px solid var(--line);border-radius:12px;
  box-shadow:var(--shadow);overflow:hidden;max-height:min(58vh,460px);overflow-y:auto;
}
.sr-row{
  display:flex;align-items:center;gap:10px;width:100%;padding:9px 12px;
  background:none;border:0;text-align:left;cursor:pointer;border-bottom:1px solid var(--line-2);
}
.sr-row:last-child{border-bottom:0}
.sr-row:hover,.sr-row.is-active{background:rgba(255,246,230,.07)}
.sr-dot{width:7px;height:7px;border-radius:50%;flex:none}
.sr-main{display:flex;flex-direction:column;min-width:0;flex:1}
.sr-name{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-role{font-size:11.5px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-zone{font-size:11px;color:var(--text-faint);flex:none;max-width:130px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-empty{padding:14px;font-size:13px;color:var(--text-faint)}

.tools{display:flex;align-items:center;gap:6px;flex:none;margin-left:auto}
.tool{
  display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 12px;
  background:rgba(255,246,230,.06);border:1px solid var(--line);border-radius:9px;
  cursor:pointer;font-size:13px;font-weight:500;white-space:nowrap;
  transition:background .16s,border-color .16s,color .16s;
}
.tool:hover{background:rgba(255,246,230,.12)}
.tool svg{width:16px;height:16px;flex:none}
.tool--wander.is-active{
  background:linear-gradient(180deg,#f4972c,#d97d1c);border-color:#f4972c;color:#2a1c06;
}
.tool--wander.is-active svg{stroke-width:2.2}
@media (max-width:1100px){ .tool__label{display:none} .tool{padding:0 10px} }
@media (max-width:560px){
  .tool[data-panel="help"]{display:none}
  #btn-random{display:none}
  /* the search field is the primary way in on a phone — give it the room */
  #wander-state{display:none}
  .tool{padding:0 9px;gap:0}
  .topbar{gap:8px;padding:0 10px}
  .searchbox{max-width:none}
  #search-input{padding-right:12px;font-size:16px} /* 16px stops iOS zooming */
}

/* ─────────────────────────── STAGE ─────────────────────────── */
.stage{position:relative;overflow:hidden;background:#15111a;min-height:0}
#world{display:block;width:100%;height:100%;touch-action:none;cursor:grab}
#world:active{cursor:grabbing}

.hud{
  position:absolute;left:14px;bottom:14px;z-index:10;
  display:flex;flex-direction:column;gap:8px;align-items:flex-start;
  pointer-events:none;
}
.hud > *{pointer-events:auto}
.hud__era{
  background:rgba(20,15,22,.78);backdrop-filter:blur(8px);
  border:1px solid var(--line);border-radius:10px;padding:7px 12px;
}
.hud__label{display:block;font-size:9.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--text-faint)}
.hud__era strong{font-family:var(--font-display);font-size:15px;font-weight:600}
.hud__prog{
  background:rgba(20,15,22,.78);backdrop-filter:blur(8px);
  border:1px solid var(--line);border-radius:10px;padding:7px 11px;
  display:flex;align-items:center;gap:9px;
}
.prog{width:110px;height:5px;border-radius:3px;background:rgba(255,246,230,.14);overflow:hidden}
.prog__fill{height:100%;width:0;border-radius:3px;
  background:linear-gradient(90deg,var(--saffron),var(--gold-soft));transition:width .5s ease}
#prog-label{font-size:11px;color:var(--text-dim);white-space:nowrap}
@media (max-width:760px){
  .hud{left:10px;bottom:10px;flex-direction:row;align-items:flex-end}
}

.zoomer{position:absolute;right:14px;bottom:14px;z-index:10;display:flex;flex-direction:column;gap:6px}
.zoomer__b{
  width:36px;height:36px;border-radius:9px;cursor:pointer;font-size:17px;line-height:1;
  background:rgba(20,15,22,.82);border:1px solid var(--line);backdrop-filter:blur(8px);
}
.zoomer__b:hover{background:rgba(255,246,230,.14)}
.zoomer__b--fit{font-size:14px}

.wander-opts{
  position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:12;
  display:flex;align-items:center;gap:10px;
  background:rgba(20,15,22,.85);backdrop-filter:blur(8px);
  border:1px solid var(--line);border-radius:999px;padding:6px 16px;font-size:12px;
}
.wander-opts label{color:var(--text-faint);letter-spacing:.05em;text-transform:uppercase;font-size:10px}
.wander-opts input[type=range]{width:110px;accent-color:var(--saffron)}
#wander-speed-label{min-width:44px;color:var(--gold-soft)}

/* onboarding */
.onboard{position:absolute;inset:0;z-index:70;display:grid;place-items:center;
  background:rgba(14,10,18,.72);backdrop-filter:blur(3px);padding:20px}
.onboard__card{
  max-width:470px;background:linear-gradient(180deg,#2b2331,#221b28);
  border:1px solid var(--line);border-radius:18px;padding:26px;box-shadow:var(--shadow);
}
.onboard__card h2{font-family:var(--font-display);margin:0 0 10px;font-size:24px;letter-spacing:-.015em}
.onboard__card p{margin:0 0 14px;font-size:14.5px;line-height:1.65;color:var(--text-dim)}
.onboard__card ul{margin:0 0 20px;padding-left:18px;font-size:13.5px;line-height:1.9;color:var(--text-dim)}
.onboard__card b{color:var(--text)}
.onboard__row{display:flex;gap:10px;flex-wrap:wrap}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  height:38px;padding:0 16px;border-radius:9px;cursor:pointer;
  background:rgba(255,246,230,.08);border:1px solid var(--line);
  font-size:13.5px;font-weight:500;text-decoration:none;transition:background .16s;
}
.btn:hover{background:rgba(255,246,230,.15)}
.btn--primary{background:linear-gradient(180deg,#f4972c,#d97d1c);border-color:#f4972c;color:#2a1c06;font-weight:600}
.btn--primary:hover{background:linear-gradient(180deg,#ffa93d,#e88a22)}
.btn--small{height:32px;padding:0 12px;font-size:12.5px}
.btn--ghost{background:none}

/* ─────────────────────────── RAIL ─────────────────────────── */
.rail{
  border-left:1px solid var(--line);background:#1d1722;
  padding:16px;display:flex;flex-direction:column;gap:14px;overflow-y:auto;
}
.rail__note{font-size:11.5px;line-height:1.65;color:var(--text-faint);
  border-top:1px solid var(--line-2);padding-top:12px}
.rail__note p{margin:0}

/* Ad slots reserve their height up front so nothing shifts when they fill. */
.ad-slot{width:100%;display:flex;flex-direction:column;align-items:center;gap:6px}
.ad-slot--rail{min-height:600px}
.ad-slot--panel{min-height:120px;margin-top:16px;border-top:1px solid var(--line-2);padding-top:14px}
.ad-label{
  align-self:flex-start;font-size:9px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--text-faint);
}
.house-ad{
  width:100%;border:1px dashed rgba(255,246,230,.2);border-radius:12px;padding:16px;
  background:linear-gradient(160deg,rgba(244,151,44,.09),rgba(42,143,146,.07));
}
.house-ad--rail{min-height:270px;display:flex;flex-direction:column;justify-content:center}
.house-ad__kicker{font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);margin-bottom:8px}
.house-ad__title{font-family:var(--font-display);font-size:19px;margin-bottom:8px;line-height:1.25}
.house-ad__body{font-size:12.5px;line-height:1.7;color:var(--text-dim);margin-bottom:14px}
.house-ad__cta{
  display:inline-block;font-size:12.5px;font-weight:600;color:var(--gold-soft);
  text-decoration:none;border-bottom:1px solid rgba(255,209,102,.4);padding-bottom:2px;
}

/* ─────────────────────────── TIMELINE ─────────────────────────── */
.timeline{
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,#1d1722,#171220);
  position:relative;z-index:20;
}
.timeline__track{
  position:relative;height:100%;margin:0 14px;cursor:ew-resize;touch-action:none;
}
.timeline__track::before{
  content:'';position:absolute;left:0;right:0;top:50%;height:2px;
  background:linear-gradient(90deg,#8e8375,#c8853a,#a86a86,#ccc2b4,#cfc5ae,#5b3550,#26314a);
  border-radius:2px;opacity:.55;
}
.timeline__cursor{
  position:absolute;top:8px;bottom:8px;width:2px;background:var(--gold-soft);
  box-shadow:0 0 8px rgba(255,209,102,.7);border-radius:2px;pointer-events:none;
  transition:left .08s linear;
}
.tl-tick{
  position:absolute;top:0;bottom:0;transform:translateX(-50%);
  background:none;border:0;padding:0 5px;cursor:pointer;display:flex;
  flex-direction:column;align-items:center;justify-content:center;gap:3px;
}
.tl-mark{width:7px;height:7px;border-radius:50%;box-shadow:0 0 0 2px rgba(0,0,0,.35);transition:transform .16s}
/* 21 eras across one bar means the labels collide, so only the era you are
   actually in (or hovering) names itself. The dots stay clickable. */
.tl-name{
  position:absolute;top:calc(50% + 9px);left:50%;transform:translateX(-50%);
  font-size:10px;color:var(--gold-soft);white-space:nowrap;letter-spacing:.02em;
  opacity:0;transition:opacity .16s;pointer-events:none;
  background:rgba(20,15,22,.9);border-radius:5px;padding:2px 7px;
}
.tl-tick:hover .tl-mark,.tl-tick.is-current .tl-mark{transform:scale(1.6)}
.tl-tick:hover .tl-name,.tl-tick.is-current .tl-name{opacity:1}
.tl-tick:hover{z-index:3}
.tl-tick.is-current{z-index:2}
@media (max-width:900px){ .timeline{--timeline-h:34px} }

/* ─────────────────────────── PANELS ─────────────────────────── */
.panel{
  position:fixed;top:var(--topbar-h);right:0;bottom:0;width:min(420px,92vw);z-index:80;
  background:linear-gradient(180deg,#241d26,#1c1622);
  border-left:1px solid var(--line);box-shadow:var(--shadow);
  display:flex;flex-direction:column;
  transform:translateX(102%);transition:transform .26s cubic-bezier(.22,1,.36,1);
}
.panel.is-open{transform:none}
.panel--narrow{width:min(400px,92vw)}
.panel__head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px 10px;border-bottom:1px solid var(--line-2);
}
.panel__head h2{font-family:var(--font-display);font-size:20px;margin:0;letter-spacing:-.01em}
.panel__x{background:none;border:0;font-size:15px;cursor:pointer;color:var(--text-faint);padding:4px 6px}
.panel__x:hover{color:var(--text)}
.panel__intro{margin:12px 18px;font-size:12.5px;line-height:1.6;color:var(--text-faint)}
.panel__body{overflow-y:auto;padding:0 12px 26px;flex:1}
.panel__body--prose{padding:16px 18px 30px;font-size:13.5px;line-height:1.7;color:var(--text-dim)}
.panel__body--prose h3{font-family:var(--font-display);font-size:15px;color:var(--text);margin:20px 0 8px}
.panel__body--prose h3:first-child{margin-top:0}
.panel__body--prose p{margin:0 0 12px}
.keys{list-style:none;margin:0 0 14px;padding:0}
.keys li{padding:5px 0;border-bottom:1px solid var(--line-2);font-size:12.5px}
kbd{
  display:inline-block;font-family:var(--font-ui);font-size:10.5px;
  border:1px solid var(--line);border-radius:5px;padding:1px 6px;margin-right:3px;
  background:rgba(255,246,230,.07);color:var(--text);
}

.idx-group{border-bottom:1px solid var(--line-2)}
.idx-sum{
  display:flex;align-items:center;gap:9px;padding:11px 8px;cursor:pointer;
  list-style:none;font-size:13.5px;font-weight:600;
}
.idx-sum::-webkit-details-marker{display:none}
.idx-sum:hover{background:rgba(255,246,230,.05)}
.idx-icon{font-size:14px;width:16px;text-align:center}
.idx-label{flex:1}
.idx-count{font-size:11px;color:var(--text-faint);background:rgba(255,246,230,.08);
  border-radius:999px;padding:2px 8px}
.idx-list{padding:0 0 10px}
.idx-item{
  display:flex;flex-direction:column;gap:1px;width:100%;text-align:left;
  background:none;border:0;padding:7px 10px 7px 34px;cursor:pointer;border-radius:7px;
}
.idx-item:hover{background:rgba(255,246,230,.07)}
.idx-name{font-size:13px;font-weight:500}
.idx-role{font-size:11px;color:var(--text-faint)}
.idx-item.is-found .idx-name::after{content:' ✓';color:#5ddb7a;font-size:11px}

/* ─────────────────────────── DRAWER ─────────────────────────── */
.drawer{
  position:fixed;left:14px;bottom:calc(var(--timeline-h) + 14px);z-index:75;
  width:min(400px,calc(100vw - 28px));
  background:linear-gradient(180deg,#2b2331,#211a27);
  border:1px solid var(--line);border-radius:16px;padding:18px 18px 16px;
  box-shadow:var(--shadow);
  opacity:0;transform:translateY(14px);transition:opacity .22s,transform .22s;
  max-height:min(72vh,640px);overflow-y:auto;
}
.drawer.is-open{opacity:1;transform:none}
.drawer__x{position:absolute;top:12px;right:12px;background:none;border:0;
  color:var(--text-faint);cursor:pointer;font-size:14px;padding:4px 6px}
.drawer__x:hover{color:var(--text)}
.drawer__cat{
  display:inline-block;font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  font-weight:600;border-radius:999px;padding:3px 10px;margin-bottom:10px;
}
.drawer__name{font-family:var(--font-display);font-size:24px;margin:0 0 3px;line-height:1.15;letter-spacing:-.015em}
.drawer__role{margin:0 0 12px;font-size:12.5px;color:var(--gold-soft);font-weight:500}
.drawer__blurb{margin:0 0 14px;font-size:14px;line-height:1.68;color:var(--text-dim)}
.drawer__meta{display:flex;gap:22px;margin:0 0 14px;padding:11px 0;
  border-top:1px solid var(--line-2);border-bottom:1px solid var(--line-2)}
.drawer__meta dt{font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-faint);margin-bottom:2px}
.drawer__meta dd{margin:0;font-size:12.5px}
.drawer__row{display:flex;gap:8px;flex-wrap:wrap}
@media (max-width:760px){
  .drawer{left:8px;right:8px;width:auto;bottom:calc(var(--timeline-h) + 8px);max-height:52vh}
}

/* ─────────────────────────── TOASTS ─────────────────────────── */
.toasts{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--timeline-h) + 20px);
  z-index:120;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{
  background:rgba(28,21,32,.94);border:1px solid var(--line);border-radius:999px;
  padding:8px 18px;font-size:12.5px;box-shadow:var(--shadow);
  opacity:0;transform:translateY(10px);transition:opacity .28s,transform .28s;
}
.toast.is-in{opacity:1;transform:none}

/* ─────────────────────────── LONG FORM ─────────────────────────── */
.scroll-hint{
  display:flex;align-items:center;justify-content:center;gap:8px;
  padding:14px;font-size:12px;color:var(--text-faint);
  background:var(--ink-2);border-top:1px solid var(--line);
}
.scroll-hint svg{width:15px;height:15px}

.longform{background:var(--paper);color:#231a15}
.longform__inner{max-width:760px;margin:0 auto;padding:60px 22px 50px}
.eyebrow{font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:#a4713a;margin:0 0 12px;font-weight:600}
.longform h1{font-family:var(--font-display);font-size:clamp(30px,5vw,44px);line-height:1.1;
  margin:0 0 20px;letter-spacing:-.022em;color:#1d1510}
.longform h2{font-family:var(--font-display);font-size:clamp(21px,3vw,27px);
  margin:38px 0 12px;letter-spacing:-.015em;color:#1d1510}
.longform p{font-size:16.5px;line-height:1.75;margin:0 0 16px;color:#3d332b}
.longform .lede{font-size:19px;line-height:1.62;color:#2a2119}
.longform ul{margin:0 0 18px;padding-left:20px}
.longform li{font-size:16px;line-height:1.75;margin-bottom:10px;color:#3d332b}
.longform strong{color:#1d1510}
.longform em{font-style:italic}
.longform__cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:34px}
.longform .btn{background:rgba(35,26,21,.07);border-color:rgba(35,26,21,.16);color:#231a15}
.longform .btn:hover{background:rgba(35,26,21,.13)}
.longform .btn--primary{background:linear-gradient(180deg,#f4972c,#d97d1c);border-color:#d97d1c;color:#2a1c06}

.era-links{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 8px}
.era-link{
  display:inline-flex;align-items:center;gap:7px;text-decoration:none;
  border:1px solid rgba(35,26,21,.16);border-radius:999px;padding:6px 13px;
  font-size:13px;color:#3d332b;transition:background .16s;
}
.era-link:hover{background:rgba(35,26,21,.07)}
.era-link__dot{width:8px;height:8px;border-radius:50%}

.sitefoot{background:#211a27;color:var(--text-dim);padding:34px 22px}
.sitefoot__inner{max-width:760px;margin:0 auto;font-size:13px;line-height:1.7}
.sitefoot strong{color:var(--text)}
.sitefoot nav{display:flex;gap:16px;flex-wrap:wrap;margin:12px 0}
.sitefoot nav a{color:var(--gold-soft);text-decoration:none}
.sitefoot nav a:hover{text-decoration:underline}
.sitefoot__fine{font-size:11.5px;color:var(--text-faint);margin-top:14px}

.noscript{max-width:640px;margin:60px auto;padding:24px;background:var(--ink-2);
  border:1px solid var(--line);border-radius:14px}
.noscript h2{font-family:var(--font-display);margin-top:0}
.noscript a{color:var(--gold-soft)}

/* ─────────────────────────── STATIC PAGES ─────────────────────────── */
.page{background:var(--paper);color:#231a15;min-height:100svh}
.page__nav{
  background:#1d1722;border-bottom:1px solid var(--line);
  padding:0 20px;height:56px;display:flex;align-items:center;gap:18px;
}
.page__nav .brand{margin-right:auto}
.page__nav a{color:var(--text-dim);text-decoration:none;font-size:13.5px}
.page__nav a:hover{color:var(--text)}
.page__body{max-width:720px;margin:0 auto;padding:54px 22px 60px}
.page__body h1{font-family:var(--font-display);font-size:clamp(28px,5vw,40px);
  line-height:1.12;margin:0 0 18px;letter-spacing:-.022em;color:#1d1510}
.page__body h2{font-family:var(--font-display);font-size:23px;margin:34px 0 10px;color:#1d1510}
.page__body h3{font-size:16px;margin:24px 0 8px;color:#1d1510}
.page__body p,.page__body li{font-size:16px;line-height:1.75;color:#3d332b}
.page__body p{margin:0 0 15px}
.page__body ul,.page__body ol{padding-left:20px;margin:0 0 16px}
.page__body li{margin-bottom:8px}
.page__body a{color:#a4713a}
.page__body table{width:100%;border-collapse:collapse;margin:0 0 18px;font-size:14.5px}
.page__body th,.page__body td{text-align:left;padding:9px 10px;border-bottom:1px solid rgba(35,26,21,.13)}
.page__body th{font-weight:600;color:#1d1510}
.page__updated{font-size:13px;color:#7a6a5c;margin-bottom:26px}

/* entry list on explore pages */
.entry{padding:16px 0;border-bottom:1px solid rgba(35,26,21,.11)}
.entry__head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.entry__name{font-family:var(--font-display);font-size:19px;margin:0;color:#1d1510;letter-spacing:-.01em}
.entry__role{font-size:13px;color:#8a6a3a}
.entry__tag{font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  border-radius:999px;padding:2px 8px;background:rgba(35,26,21,.07);color:#5c4d40}
.entry p{margin:7px 0 0;font-size:15.5px;line-height:1.7;color:#3d332b}
.entry__where{font-size:12.5px;color:#8a7a6c;margin-top:6px}
.hall{margin:38px 0 0}
.hall__title{font-family:var(--font-display);font-size:24px;margin:0 0 2px;color:#1d1510}
.hall__sub{font-size:13px;color:#8a6a3a;margin:0 0 6px}
.ad-slot--article{min-height:120px;margin:30px 0;padding:14px 0;
  border-top:1px solid rgba(35,26,21,.13);border-bottom:1px solid rgba(35,26,21,.13)}
.longform .house-ad,.page__body .house-ad{border-color:rgba(35,26,21,.22);
  background:linear-gradient(160deg,rgba(244,151,44,.1),rgba(42,143,146,.07))}
.longform .house-ad__body,.page__body .house-ad__body{color:#4b4038}
.longform .house-ad__cta,.page__body .house-ad__cta{color:#a4713a;border-color:rgba(164,113,58,.4)}
.longform .ad-label,.page__body .ad-label{color:#8a7a6c}

/* ─────────────────────────── MOTION ─────────────────────────── */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important;animation-iteration-count:1 !important;
    transition-duration:.001ms !important}
}


/* A person standing four centuries from home says so, quietly, rather than
   looking like a placement bug. */
.drawer__drift {
  margin: -2px 0 14px;
  padding: 8px 10px;
  border-left: 2px solid var(--accent, #f4972c);
  background: rgba(244, 151, 44, 0.08);
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft, #8a7f72);
}

/* ============================================================================
 * THEME — "Manuscript & Jaali"
 *
 * The brief was premium and Indian. The trap with that brief is decoration:
 * paisley borders, mandala clip-art, a font that looks like it was carved from
 * a temple. None of that reads as expensive; it reads as a restaurant menu.
 *
 * What actually reads as expensive is restraint — one metal used as hairlines
 * rather than fills, a lot of quiet space, deep saturated ground, and type
 * that has been set rather than merely chosen. The Indian content comes from
 * material sources: indigo, lac, marigold, gold leaf, and the geometry of a
 * pierced stone screen used as texture at three percent opacity.
 * ========================================================================== */

/* ---- ground ------------------------------------------------------------- */
body{
  background:
    radial-gradient(1200px 620px at 18% -8%, rgba(40,62,110,.55), transparent 62%),
    radial-gradient(900px 520px at 92% 4%, rgba(120,58,52,.28), transparent 58%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 58%, #0a1020 100%);
  background-attachment:fixed;
}
body::before{
  content:'';
  position:fixed; inset:0;
  background-image:var(--jaali);
  background-size:52px 52px;
  opacity:.035;
  pointer-events:none;
  z-index:0;
}

/* ---- typography ---------------------------------------------------------
 * Fraunces is a variable face with an optical-size axis. Setting it large for
 * display and small for body is the whole reason to use it. */
body{ font-family:var(--font-ui); font-weight:400; letter-spacing:.005em; }

.loader__title,.brand__text,.hud__era strong,.onboard__card h2,
.house-ad__title,.panel__head h2,.panel__body--prose h3,
.drawer__name,.longform h1,.longform h2,.hall__title{
  font-variation-settings:'opsz' 108, 'SOFT' 0, 'WONK' 1;
  font-weight:600;
  letter-spacing:-.018em;
}
.drawer__name{ font-size:25px; line-height:1.14; }
.longform h1{ font-variation-settings:'opsz' 144,'WONK' 1; letter-spacing:-.024em; }

/* small caps labels, spaced out — the manuscript convention */
.eyebrow,.hud__label,.ad-label,.house-ad__kicker,.drawer__meta dt{
  text-transform:uppercase;
  letter-spacing:.15em;
  font-size:9.5px;
  font-weight:600;
  color:var(--text-faint);
}

/* ---- gilded surfaces ----------------------------------------------------
 * One hairline of gold along the top edge, and a whisper of light just
 * inside it. That is what makes a flat panel look like an object. */
/* NOTE: no `position` here. .drawer and .panel are already position:fixed and
   setting them relative drops them into normal flow — the drawer falls to the
   bottom of the document and the slide-in panel stops sliding. They are
   already positioned ancestors, so the ::before rule below anchors fine. */
.drawer,.panel,.onboard__card,.house-ad{
  background:
    linear-gradient(180deg, rgba(255,244,224,.045), rgba(255,244,224,0) 120px),
    linear-gradient(180deg, var(--ink-3), var(--ink-2) 70%);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}
/* these two sit in normal flow, so they do need a positioning context */
.onboard__card,.house-ad{ position:relative; }

/* the side panel is a full-height edge drawer — rounding all four corners of
   something flush to the viewport edge just looks like a mistake */
.drawer,.onboard__card,.house-ad{ border-radius:var(--radius-lg); }
.panel{ border-radius:var(--radius-lg) 0 0 var(--radius-lg); border-right:0; }
.drawer::before,.panel::before,.onboard__card::before,.house-ad::before{
  content:'';
  position:absolute; left:14px; right:14px; top:0; height:1px;
  background:linear-gradient(90deg,
    transparent, var(--gold-line) 18%, rgba(240,205,128,.55) 50%,
    var(--gold-line) 82%, transparent);
  pointer-events:none;
}

/* jaali showing faintly through the panels, as if lit from behind */
.drawer::after,.panel::after{
  content:'';
  position:absolute; inset:0;
  background-image:var(--jaali);
  background-size:52px 52px;
  opacity:.028;
  border-radius:inherit;
  pointer-events:none;
}
.drawer > *,.panel > *{ position:relative; z-index:1; }

/* ---- the chrome bar ------------------------------------------------------ */
.topbar{
  background:linear-gradient(180deg, rgba(22,32,58,.94), rgba(15,22,38,.88));
  backdrop-filter:blur(14px) saturate(1.15);
  -webkit-backdrop-filter:blur(14px) saturate(1.15);
  border-bottom:1px solid var(--gold-line-soft);
  box-shadow:0 1px 0 rgba(255,244,224,.04), 0 10px 30px rgba(0,0,0,.34);
}
.brand__text{ color:var(--text); }
.brand__text::after{
  content:''; display:block; height:1px; margin-top:2px;
  background:linear-gradient(90deg, var(--gold), transparent 80%);
}

/* ---- controls ------------------------------------------------------------ */
.btn{
  border-radius:11px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,244,224,.055), rgba(255,244,224,.014));
  color:var(--text);
  font-family:var(--font-ui);
  font-weight:500;
  letter-spacing:.012em;
  transition:border-color .18s ease, background .18s ease, transform .12s ease;
}
.btn:hover{
  border-color:var(--gold-line);
  background:linear-gradient(180deg, rgba(240,205,128,.10), rgba(240,205,128,.03));
}
.btn:active{ transform:translateY(1px); }
.btn--primary{
  background:linear-gradient(180deg, var(--saffron), #c8761f);
  border-color:rgba(0,0,0,.28);
  color:#231603;
  font-weight:600;
  box-shadow:0 1px 0 rgba(255,225,170,.5) inset, 0 6px 16px rgba(200,118,31,.30);
}
.btn--primary:hover{ filter:brightness(1.06); }

/* keyboard focus has to be obvious, and gold is already the accent */
:where(a,button,input,[tabindex]):focus-visible{
  outline:2px solid var(--gold-soft);
  outline-offset:2px;
  border-radius:8px;
}

/* ---- the category chip ---------------------------------------------------
 * Shaped after a cusped arch — the lobed opening you see in Indo-Islamic
 * doorways — rather than a plain pill. */
.drawer__cat,.entry__tag{
  border:1px solid var(--gold-line-soft);
  border-radius:11px 11px 4px 4px;
  padding:3px 10px 4px;
  font-weight:600;
  letter-spacing:.09em;
}

/* ---- a small ornament between the blurb and the metadata ----------------- */
.drawer__meta{
  border-top:1px solid var(--line-2);
  padding-top:14px;
  margin-top:16px;
  position:relative;
}
.drawer__meta::before{
  content:'';
  position:absolute; top:-5px; left:50%; width:9px; height:9px;
  transform:translateX(-50%) rotate(45deg);
  background:var(--ink-2);
  border:1px solid var(--gold-line);
  border-bottom:0; border-right:0;
}
.drawer__meta dd{ color:var(--text); font-weight:500; }

/* ---- reading surface -----------------------------------------------------
 * The longform article sits on khadi-coloured paper, with the jaali pressed
 * into it like a watermark. */
.longform{
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  color:#2a2119;
  position:relative;
}
.longform::before{
  content:'';
  position:absolute; inset:0;
  background-image:var(--jaali);
  background-size:52px 52px;
  opacity:.05;
  pointer-events:none;
}
.longform__inner{ position:relative; z-index:1; }
.longform h1,.longform h2{ color:#1d160f; }
.longform h2{
  padding-bottom:8px;
  border-bottom:1px solid rgba(154,117,35,.30);
}
.longform .lede{ font-size:19px; line-height:1.62; color:#3a2e22; }

/* ---- timeline ------------------------------------------------------------ */
.timeline{
  background:linear-gradient(180deg, rgba(15,22,38,.92), rgba(10,16,32,.98));
  border-top:1px solid var(--gold-line-soft);
}

/* ---- scrollbars ---------------------------------------------------------- */
*{ scrollbar-width:thin; scrollbar-color:rgba(212,165,68,.34) transparent; }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(212,165,68,.40), rgba(212,165,68,.18));
  border-radius:99px;
  border:3px solid transparent;
  background-clip:content-box;
}
::-webkit-scrollbar-thumb:hover{ background:rgba(240,205,128,.55); background-clip:content-box; }

::selection{ background:rgba(212,165,68,.30); color:#fff; }

/* ---- motion -------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    transition-duration:.001ms !important;
  }
}

/* The drawer is fixed to the viewport, which is right while you are on the
   floor and wrong the moment you scroll down to read — it parks itself over
   the first third of every line. Step it aside when the prose is in view. */
.drawer.is-away{
  opacity:0;
  transform:translateY(18px) scale(.985);
  pointer-events:none;
}
