/* ==========================================================================
   Model Foundation (MF) — a thesis, not a storefront.
   Editorial, text-forward, unhurried. Palette follows the site's own
   organizing metaphor: Beej (seed / parchment gold), Mitti (soil / terracotta),
   Vriksha (tree / deep leaf green), against an ivory "page" background.
   ========================================================================== */

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

:root {
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    --ink: #201c16;
    --ink-soft: #4a4238;
    --page: #f7f2e7;
    --page-lift: #fffdf8;
    --border: rgba(32, 28, 22, 0.14);

    --beej: #ffb800;       /* seed — bright amber/gold */
    --beej-deep: #ffe37a;
    --mitti: #ff5722;      /* soil — vivid burnt orange/rust */
    --mitti-deep: #ff9466;
    --vriksha: #00e676;    /* tree — vivid emerald */
    --vriksha-deep: #6dffb0;

    /* Generic per-page accent, used by nav/chapter/entry components below.
       Defaults to the neutral ink so unthemed pages (Home) are unaffected;
       overridden per page by the body.theme-* blocks below. */
    --accent: var(--ink);
    --accent-deep: var(--ink-soft);
}

/* ---------------------------------------------------------------------- */
/* Page themes — bright, dark, "dashing" treatments. Each chapter page      */
/* (Beej/Mitti/Vriksha) goes near-black in its own pillar hue; About stays  */
/* its distinct electric blue. These override --page/--ink/--border/        */
/* --accent, which every component below reads via var(), so the whole      */
/* page recolors from these few overrides rather than per-component rules.  */
/* ---------------------------------------------------------------------- */

body.theme-beej {
    --page: #1a1006;
    --page-lift: #241708;
    --ink: #fff3d6;
    --ink-soft: #e8c67a;
    --border: rgba(255, 184, 0, 0.3);
    --accent: var(--beej);
    --accent-deep: var(--beej-deep);
}

body.theme-mitti {
    --page: #1a0d08;
    --page-lift: #24120c;
    --ink: #ffe4d6;
    --ink-soft: #ffab91;
    --border: rgba(255, 87, 34, 0.32);
    --accent: var(--mitti);
    --accent-deep: var(--mitti-deep);
}

body.theme-vriksha {
    --page: #06170d;
    --page-lift: #0c2314;
    --ink: #d9ffe4;
    --ink-soft: #8fe6ab;
    --border: rgba(0, 230, 118, 0.3);
    --accent: var(--vriksha);
    --accent-deep: var(--vriksha-deep);
}

body.theme-about {
    --page: #0a1128;
    --page-lift: #101a3d;
    --ink: #eaf2ff;
    --ink-soft: #a9c1ff;
    --border: rgba(41, 121, 255, 0.35);
    --accent: #2979ff;
    --accent-deep: #00d4ff;
}

/* Bharat Protocol — dark, deep, and bright like the other pillar pages,
   but in its own hues: bright mustard yellow + a royal, saturated red. */
body.theme-bharat {
    --page: #1f0906;
    --page-lift: #2b0f0a;
    --ink: #fdf3d9;
    --ink-soft: #e8c88a;
    --border: rgba(255, 203, 5, 0.32);
    --accent: #ffcb05;
    --accent-deep: #e0203f;
}

body[class^="theme-"] .mf-chapter-num {
    background: linear-gradient(90deg, var(--accent), var(--accent-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body[class^="theme-"] .mf-chapter-title {
    text-shadow: 0 0 28px var(--accent);
}

/* Bharat Protocol's extra ornamentation: a shimmering mustard-gold title,
   an Oṃ medallion "seal" at the top of the page frame, and a double border
   with a soft warm glow — evoking the emblem's spirit without literally
   reproducing its artwork (no image-generation tool available here). */
body.theme-bharat .mf-chapter-title {
    background: linear-gradient(120deg, #b8860b 0%, #ffe066 25%, #ffcb05 50%, #ffe066 75%, #b8860b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    animation: mf-gold-shine 5s linear infinite;
}

@keyframes mf-gold-shine {
    to { background-position: 200% center; }
}

body.theme-bharat .mf-chapter {
    position: relative;
    margin-top: 2.5rem;
    border: 2px solid var(--accent);
    border-radius: 26px;
    padding: clamp(3rem, 8vw, 5rem) clamp(1.75rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4rem);
    max-width: 900px;
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(255, 203, 5, 0.14) 0%, rgba(255, 203, 5, 0) 65%),
        var(--page-lift);
    box-shadow: 0 0 0 6px rgba(255, 203, 5, 0.1), 0 24px 60px rgba(224, 32, 63, 0.25);
}

/* The भरत Protocol emblem — a real uploaded logo image, replacing the
   earlier CSS-drawn Oṃ medallion placeholder. */
.mf-bp-logo {
    position: absolute;
    top: -54px;
    left: 50%;
    transform: translateX(-50%);
    width: 108px;
    height: 108px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 6px rgba(255, 203, 5, 0.12), 0 0 26px rgba(255, 203, 5, 0.5);
}

body.theme-bharat .mf-map-empty {
    color: var(--ink-soft);
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
}

/* Map images (The Great Maps of Akhand Bharat) — constrained to their
   panel's width rather than rendering at native pixel size, with a
   click-to-zoom lightbox (see js/ui.js) since these are dense
   illustrations meant to be examined up close. */
.mf-map-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    margin-bottom: 1rem;
    cursor: zoom-in;
}

.mf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    background: rgba(5, 3, 8, 0.92);
    cursor: zoom-out;
}

.mf-lightbox[hidden] { display: none; }

.mf-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.mf-lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

/* The general introduction — shown directly on the page, not behind a tab.
   Short, staccato lines read well centered, unlike the longer prose in the
   tabs below (which stays left-aligned via .mf-intro-tab-panel p). */
body.theme-bharat .mf-bp-intro {
    border: 2px solid var(--border);
    border-radius: 22px;
    padding: clamp(2rem, 5vw, 3rem);
    margin: 2.5rem 0;
    background: rgba(255, 255, 255, 0.02);
}

body.theme-bharat .mf-bp-intro p {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--ink-soft);
    margin-bottom: 1.3rem;
    text-align: center;
}

body.theme-bharat .mf-bp-intro p:last-child { margin-bottom: 0; }
body.theme-bharat .mf-bp-intro strong { color: var(--ink); }
body.theme-bharat .mf-bp-intro em { color: var(--accent); }

/* {sanskrit}...{/sanskrit} — a block-level, centered, Devanagari-font span.
   Block+center so a whole Sanskrit line (the common case) reads as its own
   centered verse even inside an otherwise left-aligned paragraph. */
.text-sanskrit {
    display: block;
    text-align: center;
    font-family: 'Tiro Devanagari Hindi', serif;
    line-height: 1.9;
}

/* Nested sub-tabs (the Great Maps series' five map subdomains) read as a
   lighter, secondary level rather than a second identical row. */
body.theme-bharat .mf-intro-tab-panel .mf-intro-tabs .mf-intro-tab-btn {
    flex-basis: 220px;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
}

body.theme-bharat .mf-intro-tab-panel .mf-intro-tabs .mf-intro-tab-panel {
    padding: clamp(1.5rem, 3vw, 2rem);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--page);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.75rem;
}

a { color: inherit; text-decoration: none; }

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

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.mf-header {
    border-bottom: 1px solid var(--border);
    padding: 1.6rem 0;
    background: var(--page-lift);
}

.mf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
}

.mf-header-brand { display: flex; flex-direction: column; gap: 0.25rem; }

.mf-nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.mf-nav-link {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    padding-bottom: 0.2rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.mf-nav-link:hover { color: var(--ink); }

.mf-nav-link-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.mf-logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mf-logo-mark {
    display: inline-block;
    margin-left: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--page-lift);
    background: var(--ink);
    padding: 0.2rem 0.45rem;
    border-radius: 3px;
    vertical-align: middle;
}

.mf-header-tag {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

/* Homepage intro — the page's actual <h1>, kept visually modest since the
   calendar is the real hero, but present and readable rather than hidden. */
.mf-home-intro {
    text-align: center;
    padding: 2.25rem 1.75rem 0;
}

.mf-home-h1 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    letter-spacing: 0.01em;
}

.mf-home-h1-mark {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.5em;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--page-lift);
    background: var(--ink);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    vertical-align: middle;
}

.mf-home-lead {
    margin-top: 0.5rem;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------------------- */
/* Live Sky Calendar — an ornate framed panel whose background mood cycles */
/* through 6 time-of-day phases (see sky-phase-* below, applied by         */
/* js/calendar.js from the real IST hour): dawn/morning/day/dusk/evening/  */
/* night. An analog clock, a tear-off date card, an Oṃ medallion, and a    */
/* lotus divider round out the framing. All computed astronomy is         */
/* untouched — only the presentation changed.                             */
/* ---------------------------------------------------------------------- */

.sky-cal {
    --hl-indigo: #0c0714;
    --hl-indigo-deep: #020103;
    --hl-indigo-lift: #180f28;
    --hl-brass: #C5A45A;
    --hl-brass-light: #E6CD8B;
    --hl-ivory: #F1E9D6;
    --hl-rose: #ff2a85;

    position: relative;
    overflow: hidden;
    padding: 2.1rem 0;
    background:
        radial-gradient(30% 22% at 50% 4%, rgba(140, 90, 210, 0.2) 0%, rgba(140, 90, 210, 0) 72%),
        radial-gradient(130% 100% at 50% 0%, var(--hl-indigo-lift) 0%, var(--hl-indigo) 46%, var(--hl-indigo-deep) 100%);
    border-bottom: 1px solid rgba(197, 164, 90, 0.3);
    transition: background 2s ease;
}

/* Time-of-day phases, applied as a class on .sky-cal by calendar.js. */
.sky-cal.sky-phase-night {
    background:
        radial-gradient(30% 22% at 50% 4%, rgba(140, 90, 210, 0.2) 0%, rgba(140, 90, 210, 0) 72%),
        radial-gradient(130% 100% at 50% 0%, var(--hl-indigo-lift) 0%, var(--hl-indigo) 46%, var(--hl-indigo-deep) 100%);
}
.sky-cal.sky-phase-dawn {
    background:
        radial-gradient(45% 32% at 55% 100%, rgba(255, 150, 80, 0.35) 0%, rgba(255, 150, 80, 0) 70%),
        linear-gradient(180deg, #180f28 0%, #3a1f45 45%, #7a3a4a 75%, #d4703f 100%);
}
.sky-cal.sky-phase-morning {
    background:
        radial-gradient(45% 32% at 55% 100%, rgba(255, 210, 130, 0.28) 0%, rgba(255, 210, 130, 0) 70%),
        linear-gradient(180deg, #14203f 0%, #26406b 55%, #6a86ad 100%);
}
.sky-cal.sky-phase-day {
    background:
        radial-gradient(50% 36% at 55% 100%, rgba(255, 220, 150, 0.32) 0%, rgba(255, 220, 150, 0) 70%),
        linear-gradient(180deg, #0f1f3d 0%, #2c5687 50%, #7fa8c9 100%);
}
.sky-cal.sky-phase-dusk {
    background:
        radial-gradient(50% 36% at 62% 100%, rgba(255, 140, 60, 0.4) 0%, rgba(255, 140, 60, 0) 70%),
        linear-gradient(180deg, #150c28 0%, #3d1b3a 42%, #8a3a3f 72%, #d9793f 100%);
}
.sky-cal.sky-phase-evening {
    background:
        radial-gradient(38% 26% at 55% 100%, rgba(150, 90, 160, 0.28) 0%, rgba(150, 90, 160, 0) 70%),
        linear-gradient(180deg, #0c0714 0%, #241335 55%, #3d2049 100%);
}

/* A glowing sun disc that rises/sets/dims with the phase, and a simple
   mountain-skyline silhouette along the bottom edge — evoking the horizon
   glow + hills motif without literal illustration (no image-generation
   tool available to produce painted artwork). */
.sky-cal-sun {
    position: absolute;
    left: 60%;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: bottom 4s ease, opacity 2.5s ease, box-shadow 2.5s ease, background 2.5s ease;
    z-index: 0;
}

.sky-phase-dawn .sky-cal-sun {
    bottom: 30px;
    opacity: 1;
    background: radial-gradient(circle, #ffdca0, #ff8a3d);
    box-shadow: 0 0 70px 26px rgba(255, 140, 60, 0.55);
}
.sky-phase-morning .sky-cal-sun {
    bottom: 120px;
    opacity: 0.92;
    background: radial-gradient(circle, #fff6d8, #ffd27a);
    box-shadow: 0 0 55px 18px rgba(255, 210, 120, 0.4);
}
.sky-phase-day .sky-cal-sun {
    bottom: 190px;
    opacity: 0.85;
    background: radial-gradient(circle, #fffdf0, #ffe9a8);
    box-shadow: 0 0 45px 16px rgba(255, 230, 150, 0.35);
}
.sky-phase-dusk .sky-cal-sun {
    bottom: 42px;
    opacity: 1;
    background: radial-gradient(circle, #ffcf8f, #ff6a3d);
    box-shadow: 0 0 80px 28px rgba(255, 110, 60, 0.6);
}
.sky-phase-evening .sky-cal-sun {
    bottom: 15px;
    opacity: 0.3;
    background: radial-gradient(circle, #d8b8e0, #8a5a9a);
    box-shadow: 0 0 45px 16px rgba(150, 90, 160, 0.3);
}
.sky-phase-night .sky-cal-sun { opacity: 0; }

.sky-cal-horizon {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    background: rgba(4, 2, 8, 0.6);
    clip-path: polygon(0% 100%, 0% 62%, 7% 48%, 14% 66%, 24% 32%, 34% 56%, 44% 22%, 54% 50%, 64% 36%, 74% 60%, 84% 26%, 92% 55%, 100% 42%, 100% 100%);
    pointer-events: none;
    z-index: 0;
}

.sky-cal-layout { position: relative; z-index: 1; max-width: 900px; }

/* The main ornate panel — a bordered "card" floating on the phase
   gradient, holding the Oṃ medallion, analog clock, and tear-off date. */
.sky-cal-inner {
    position: relative;
    border: 1px solid rgba(197, 164, 90, 0.55);
    border-radius: 20px;
    padding: 1.5rem 1.75rem 1.35rem;
    background: rgba(10, 6, 20, 0.28);
    box-shadow: 0 0 0 6px rgba(197, 164, 90, 0.08), inset 0 0 40px rgba(0, 0, 0, 0.25);
}

.sky-cal-om-badge {
    position: absolute;
    top: -20px;
    right: 26px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 30%, #241735, #0c0714);
    border: 2px solid rgba(197, 164, 90, 0.7);
    color: var(--hl-brass-light);
    font-size: 1.4rem;
    box-shadow: 0 0 18px rgba(197, 164, 90, 0.35);
}

.sky-cal-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--hl-brass-light);
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.sky-cal-timebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.sky-cal-timebar-cell {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.2rem 1.5rem;
    min-width: 0;
}

.sky-cal-timebar-cell-clock {
    flex-direction: column;
    text-align: center;
}

.sky-cal-timebar-cell:first-child { border-right: 1px solid rgba(197, 164, 90, 0.25); }

.sky-cal-analog-clock { width: 50px; height: 50px; margin-bottom: 0.4rem; }

.sky-cal-clock-face { fill: rgba(255, 255, 255, 0.03); stroke: rgba(197, 164, 90, 0.65); stroke-width: 1.5; }
.sky-cal-clock-ticks line { stroke: rgba(197, 164, 90, 0.55); stroke-width: 1.4; }
.sky-cal-clock-hand { stroke: var(--hl-brass-light); stroke-linecap: round; }
.sky-cal-clock-hand-hour { stroke-width: 3.2; }
.sky-cal-clock-hand-min { stroke-width: 2.2; }
.sky-cal-clock-hand-sec { stroke: var(--hl-rose); stroke-width: 1; }
.sky-cal-clock-pivot { fill: var(--hl-brass-light); }

.sky-cal-clock {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--hl-brass-light);
    letter-spacing: 1px;
}

.sky-cal-tz {
    font-size: 0.68rem;
    letter-spacing: 1px;
    color: var(--hl-ivory);
    opacity: 0.6;
}

.sky-cal-tearoff {
    width: 46px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    background: #fdfaf2;
    text-align: center;
}

.sky-cal-tearoff-month {
    display: block;
    background: #b5342a;
    color: #fdfaf2;
    font-family: var(--font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.2rem 0;
}

.sky-cal-tearoff-day {
    display: block;
    color: #201c16;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.2rem 0;
}

.sky-cal-date-big {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hl-ivory);
}

.sky-cal-date-line {
    font-size: 0.78rem;
    color: var(--hl-brass-light);
    margin: 0.25rem 0 0;
}

/* Muhūrta layer — one compact line: current Muhūrta name, a live
   Ghaṭī:Pala:Vipala countdown to the next one (see the title attribute for
   the unit breakdown), and an auspicious/caution tag — computed in
   js/calendar.js from real sunrise/sunset. */
.sky-cal-muhurta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.9rem;
    margin-top: 0.7rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(197, 164, 90, 0.25);
}

.sky-cal-muhurta-name {
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--hl-ivory);
    white-space: nowrap;
}

.sky-cal-muhurta-count {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--hl-brass-light);
    cursor: default;
}

.sky-cal-muhurta-badge {
    font-family: var(--font-ui);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(197, 164, 90, 0.4);
    color: var(--hl-brass-light);
    white-space: nowrap;
}

.sky-cal-muhurta-badge.is-auspicious {
    color: #7be0a8;
    border-color: rgba(123, 224, 168, 0.45);
    background: rgba(123, 224, 168, 0.08);
}

.sky-cal-muhurta-badge.is-caution {
    color: #ff9d7a;
    border-color: rgba(255, 157, 122, 0.45);
    background: rgba(255, 157, 122, 0.08);
}

.sky-cal-lotus-divider {
    text-align: center;
    font-size: 1.4rem;
    line-height: 1;
    margin: 1rem 0;
    opacity: 0.9;
}

/* Sankalpa — a live "cosmological address" of this exact moment, in
   Sanskrit and in IAST/English, tucked into small dropdowns since the
   full text runs long. */
.sky-cal-dropdown {
    border: 1px solid rgba(197, 164, 90, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.sky-cal-dropdown:last-child { margin-bottom: 0; }

.sky-cal-dropdown summary {
    cursor: pointer;
    list-style: none;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.sky-cal-dropdown-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading), 'Tiro Devanagari Hindi', serif;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    color: var(--hl-brass-light);
}

.sky-cal-dropdown-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: radial-gradient(circle at 35% 30%, #3a2a10, #1a1006);
    border: 1.5px solid rgba(197, 164, 90, 0.6);
}

.sky-cal-dropdown summary::-webkit-details-marker { display: none; }

.sky-cal-dropdown summary::after {
    content: '+';
    font-family: var(--font-mono);
    font-size: 1.3rem;
    flex-shrink: 0;
    color: var(--hl-brass-light);
    transition: transform 0.25s ease;
}

.sky-cal-dropdown[open] summary::after { transform: rotate(45deg); }

.sky-cal-dropdown-body {
    padding: 0.25rem 1.3rem 1.4rem;
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--hl-ivory);
}

.sky-cal-dropdown-body p { margin-bottom: 0.9rem; }
.sky-cal-dropdown-body p:last-child { margin-bottom: 0; }
.sky-cal-dropdown-body strong { color: var(--hl-brass-light); }

#sankalp-sanskrit, #sankalp-sanskrit p { font-family: 'Tiro Devanagari Hindi', serif; }

/* Closes the <details> without scrolling back up to its summary — the
   long Sankalpa text otherwise forces a long scroll to collapse it. */
.sky-cal-details-close {
    display: none;
    align-items: center;
    gap: 0.4rem;
    margin: 0 1.3rem 1.3rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(197, 164, 90, 0.35);
    border-radius: 20px;
    background: transparent;
    color: var(--hl-brass-light);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.sky-cal-dropdown[open] .sky-cal-details-close { display: inline-flex; }

.sky-cal-details-close:hover { border-color: var(--hl-brass-light); }

.sky-cal-sankalp-heading {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    text-align: center;
    color: var(--hl-brass-light);
    letter-spacing: 0.04em;
}

.sky-cal-sankalp-chant { text-align: center; font-style: italic; }

@media (max-width: 640px) {
    .sky-cal-timebar { grid-template-columns: 1fr; }
    .sky-cal-timebar-cell:first-child { border-right: none; border-bottom: 1px solid rgba(197, 164, 90, 0.25); }
}

/* ---------------------------------------------------------------------- */
/* Updates & Launches — a running marquee strip between the calendar and   */
/* the pillars. Only ONE pass of the content is ever rendered/visible: it  */
/* starts padded off-screen right (padding-left:100%) and slides fully off */
/* the left (translateX(-100%) of the track's own width), then loops —    */
/* not a duplicated seamless scroller. A diagonal sheen sweeps across      */
/* independently for some shine.                                          */
/* ---------------------------------------------------------------------- */

.mf-ticker {
    position: relative;
    background: linear-gradient(90deg, #14100a, #1f180d, #14100a);
    border-top: 1px solid rgba(197, 164, 90, 0.3);
    border-bottom: 1px solid rgba(197, 164, 90, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
    overflow: hidden;
    padding: 0.95rem 0;
}

.mf-ticker::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.1) 45%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.1) 55%, transparent 100%);
    animation: mf-ticker-shine 7s ease-in-out infinite;
    pointer-events: none;
}

.mf-ticker-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding-left: 100%;
    animation: mf-ticker-scroll 20s linear infinite;
    will-change: transform;
}

.mf-ticker:hover .mf-ticker-track { animation-play-state: paused; }

.mf-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1e4c2;
    padding: 0 1.5rem;
}

a.mf-ticker-item:hover { text-decoration: underline; }

.mf-ticker-badge {
    font-family: var(--font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ffb800, #ff5722);
    color: #14100a;
    padding: 0.22rem 0.6rem;
    border-radius: 20px;
    animation: mf-ticker-badge-pulse 2.6s ease-in-out infinite;
}

.mf-ticker-sep {
    color: #c5a45a;
    opacity: 0.6;
    padding: 0 1.2rem;
    font-size: 0.9rem;
}

@keyframes mf-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes mf-ticker-shine {
    0%, 15% { left: -60%; }
    65%, 100% { left: 120%; }
}

@keyframes mf-ticker-badge-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 184, 0, 0.4); }
    50% { box-shadow: 0 0 14px rgba(255, 87, 34, 0.65); }
}

@media (prefers-reduced-motion: reduce) {
    .mf-ticker-track { animation: none; }
    .mf-ticker::before { animation: none; }
    .mf-ticker-badge { animation: none; }
}

/* ---------------------------------------------------------------------- */
/* The three pillars — Beej / Mitti / Vriksha. Stacked vertically, one full-*/
/* width block per row (never side by side), each a near-black panel with  */
/* nothing but its own keyword set glowing in its pillar color — a neon    */
/* word-cluster rather than a plain list. The keywords ARE the content.    */
/* ---------------------------------------------------------------------- */

.mf-pillars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.5rem 1.75rem;
}

.mf-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 5.5rem) 1.75rem;
    border-radius: 22px;
    border: 2px solid;
    overflow: hidden;
    text-align: center;
    position: relative;
    transition: filter 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.mf-pillar-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }

.mf-pillar-beej    { background: radial-gradient(120% 140% at 25% 0%, #2b1c0a 0%, #1a1006 55%, #100a04 100%); border-color: rgba(255, 184, 0, 0.4); }
.mf-pillar-mitti   { background: radial-gradient(120% 140% at 25% 0%, #2c1710 0%, #1a0d08 55%, #0f0705 100%); border-color: rgba(255, 87, 34, 0.4); }
.mf-pillar-vriksha { background: radial-gradient(120% 140% at 25% 0%, #0e2c19 0%, #06170d 55%, #030c07 100%); border-color: rgba(0, 230, 118, 0.4); }

.mf-pillar:hover { filter: brightness(1.12); transform: translateY(-3px); }
.mf-pillar-beej:hover    { border-color: rgba(255, 184, 0, 0.95); }
.mf-pillar-mitti:hover   { border-color: rgba(255, 87, 34, 0.95); }
.mf-pillar-vriksha:hover { border-color: rgba(0, 230, 118, 0.95); }

.mf-pillar-head {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.6rem, 6.5vw, 4.75rem);
    letter-spacing: 0.01em;
    margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.mf-pillar-beej    .mf-pillar-head { color: var(--beej); text-shadow: 0 0 26px rgba(255, 184, 0, 0.45); }
.mf-pillar-mitti   .mf-pillar-head { color: var(--mitti); text-shadow: 0 0 26px rgba(255, 87, 34, 0.45); }
.mf-pillar-vriksha .mf-pillar-head { color: var(--vriksha); text-shadow: 0 0 26px rgba(0, 230, 118, 0.45); }

.mf-kw-cloud {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 0.7rem 1.5rem;
    color: #f1ece0;
}

.mf-kw-cloud span {
    font-family: var(--font-heading);
    line-height: 1.15;
    white-space: nowrap;
}

/* Deterministic size/weight/tilt rhythm so the cluster reads as composed,
   not randomly generated — cycles every 4 words, alternating the pillar's
   glowing accent color with a muted off-white for contrast/hierarchy. */
.mf-kw-cloud span:nth-child(4n+1) {
    font-size: clamp(1.4rem, 3.4vw, 2.4rem);
    font-weight: 700;
}
.mf-kw-cloud span:nth-child(4n+2) {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-style: italic;
    font-weight: 400;
    opacity: 0.75;
    transform: rotate(-4deg);
}
.mf-kw-cloud span:nth-child(4n+3) {
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    font-weight: 500;
}
.mf-kw-cloud span:nth-child(4n) {
    font-size: clamp(0.68rem, 1.2vw, 0.82rem);
    font-family: var(--font-ui);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 0.7;
}

.mf-pillar-beej .mf-kw-cloud span:nth-child(4n+1),
.mf-pillar-beej .mf-kw-cloud span:nth-child(4n+3) { color: var(--beej); text-shadow: 0 0 16px rgba(255, 184, 0, 0.3); }
.mf-pillar-mitti .mf-kw-cloud span:nth-child(4n+1),
.mf-pillar-mitti .mf-kw-cloud span:nth-child(4n+3) { color: var(--mitti); text-shadow: 0 0 16px rgba(255, 87, 34, 0.3); }
.mf-pillar-vriksha .mf-kw-cloud span:nth-child(4n+1),
.mf-pillar-vriksha .mf-kw-cloud span:nth-child(4n+3) { color: var(--vriksha); text-shadow: 0 0 16px rgba(0, 230, 118, 0.3); }

/* ---------------------------------------------------------------------- */
/* Stub chapter pages (beej / mitti / vriksha)                            */
/* ---------------------------------------------------------------------- */

.mf-chapter {
    padding: clamp(4rem, 10vw, 7rem) 1.75rem;
    max-width: 720px;
    margin: 0 auto;
}

.mf-chapter-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    margin-bottom: 2.5rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mf-chapter-back:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--accent);
    transform: translateX(-2px);
}

.mf-chapter-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.mf-chapter-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.mf-chapter-dev {
    font-family: 'Tiro Devanagari Hindi', serif;
    font-weight: 400;
    font-size: 0.55em;
    opacity: 0.7;
    margin-left: 0.6rem;
}

.mf-chapter-sub {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    margin-bottom: 2.5rem;
}

.mf-chapter-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--ink-soft);
}

.mf-chapter-body p { margin-bottom: 1.2rem; }

/* Intro box — the bordered long-form intro on each pillar page (Soul/Mind/
   Body Infrastructure), authored in intro-content.php. Its heading links
   out to a dedicated subpage. */
.mf-intro-box {
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: clamp(2rem, 5vw, 3rem);
    margin: 2.5rem 0 3rem;
    background: rgba(255, 255, 255, 0.02);
}

.mf-intro-heading {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.3rem;
    transition: opacity 0.2s ease;
}

.mf-intro-heading:hover { opacity: 0.72; }

.mf-intro-heading::after {
    content: ' \2192';
    font-family: var(--font-ui);
    font-size: 0.8em;
}

.mf-intro-box p {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}

.mf-intro-box strong { color: var(--ink); }
.mf-intro-box em { color: var(--accent); font-style: italic; }

.mf-intro-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 2rem;
    margin: 0.5rem 0 1.75rem;
}

.mf-intro-list li {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--ink-soft);
    padding-left: 1.2rem;
    position: relative;
}

.mf-intro-list li::before {
    content: '\25C6';
    position: absolute;
    left: 0;
    top: 0.35em;
    color: var(--accent);
    font-size: 0.6em;
}

/* Tabbed intro sections — headers sit in a row (Core Themes / Definition /
   Domains Covered, or About's single "Details & Definitions"), but the
   open panel spans the FULL width below rather than being squeezed into a
   1/3-width column — the fix for the cramped, over-tall narrow-column look.
   js/ui.js drives showing/hiding; the "Close" button at the bottom of every
   panel means closing never requires scrolling back up to the tab row. */
.mf-intro-tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.mf-intro-tab-btn {
    flex: 1 1 180px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 1rem 1.3rem;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    text-align: left;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.mf-intro-tab-btn:hover { color: var(--accent); }

.mf-intro-tab-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
}

.mf-intro-tab-panel {
    margin-top: 1rem;
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    background: rgba(255, 255, 255, 0.02);
}

.mf-intro-tab-panel p {
    max-width: 68ch;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}

.mf-intro-tab-panel p:last-of-type { margin-bottom: 0; }
.mf-intro-tab-panel strong { color: var(--ink); }
.mf-intro-tab-panel em { color: var(--accent); font-style: italic; }

.mf-intro-kw-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.8rem;
}

.mf-intro-kw-cloud span {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 1rem;
}

.mf-intro-tab-close {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.75rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--ink-soft);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.mf-intro-tab-close:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 640px) {
    .mf-intro-tab-btn { flex-basis: 100%; }
}

/* Launches — pillar-specific project launches (e.g. Vriksha's Bharat
   Protocol), pulled from entries.json where is_launch is true. Shown above
   the regular entries archive, so they stay prominent. */
.mf-launches {
    display: grid;
    gap: 1.25rem;
    margin: 2.5rem 0;
}

.mf-launch-card {
    display: block;
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.mf-launch-card:hover { transform: translateY(-2px); filter: brightness(1.08); }

.mf-launch-badge {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--accent), var(--accent-deep));
    color: #14100a;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

.mf-launch-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.mf-launch-desc {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 1rem;
}

.mf-launch-cta {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

@media (max-width: 640px) {
    .mf-intro-list { grid-template-columns: 1fr; }
}

/* Entries archive — the growing repository of long-form entries filed
   under each pillar, managed from the Control Panel. */
.mf-entries { margin-top: 3rem; }

.mf-entries-empty {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--ink-soft);
    opacity: 0.7;
    font-style: italic;
}

.mf-entry {
    padding-top: 2.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.mf-entry:first-child { padding-top: 0; margin-top: 0; border-top: none; }

.mf-entry-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.mf-entry-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.mf-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
}

.mf-entry-tag {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-deep);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
}

.mf-entry-body {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--ink-soft);
}

.mf-entry-body p { margin-bottom: 1.1rem; }
.mf-entry-body p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.mf-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.mf-footer p {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------- */
/* In-place visual editor (js/edit.js) — admin-only, content only, never    */
/* touches theme/CSS. Fixed magenta accent regardless of page theme, so    */
/* it stays visible whether the underlying page is light, dark, or gold.   */
/* ---------------------------------------------------------------------- */

#mf-edit-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: #201c16;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 0.75rem 1.3rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.mf-edit-mode .mf-editable {
    cursor: pointer;
    outline: 1px dashed transparent;
    outline-offset: 3px;
    transition: outline-color 0.15s ease;
}

body.mf-edit-mode .mf-editable:hover {
    outline: 2px dashed #ff4081;
}

.mf-editor-field {
    display: block;
    width: 100%;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #201c16;
    background: #fffdf6;
    border: 2px solid #ff4081;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    box-sizing: border-box;
    resize: vertical;
}

textarea.mf-editor-field { min-height: 4.5em; }

.mf-editor-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.mf-editor-save,
.mf-editor-cancel {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 16px;
    border: none;
    cursor: pointer;
}

.mf-editor-save { background: #2e7d32; color: #fff; }
.mf-editor-save:disabled { opacity: 0.6; cursor: default; }
.mf-editor-cancel { background: #767676; color: #fff; }
