/* ═══════════════════════════════════════════════════════════════════════
   vs-panchang.css — visual theme for the Shwetambar Vikram Samvat Panchang
   section only (/panchang/vikram-samvat/*, /panchang/pachkhan).

   Deliberately its own micro-theme, distinct from the site's tokens.css
   (marble/lac-red/gold) — ported from the approved mockup design
   (जैन पंचांग – श्रावण २०८३.html): glass-blur cards, royal maroon & gold,
   lotus/swastik/mandala Jain-art motifs. Every class is prefixed `vsp-` so
   nothing here can collide with Bootstrap or the sitewide "jr-" classes it
   sits alongside.

   NO dark-mode variant, deliberately. An earlier version switched to a
   near-black palette under prefers-color-scheme:dark, which on a phone
   with system dark mode on (or Chrome's auto-dark-theme-for-websites)
   turned the background near-black while plain text/links elsewhere on
   the page kept the colours chosen for the light background — unreadable
   dark-on-dark, reported 2026-10-04. The rest of this site has no dark
   mode either, so this section now always renders the one light palette,
   regardless of the visitor's OS/browser theme preference.
   ═══════════════════════════════════════════════════════════════════════ */

.vsp-page {
  --vsp-bg: radial-gradient(1100px 700px at 50% -10%, #ffe9a8, transparent),
            radial-gradient(900px 600px at 0 100%, #ffd0d6, transparent),
            radial-gradient(900px 600px at 100% 100%, #c9ecdf, transparent), #fbf1da;
  --vsp-glass: rgba(255, 251, 240, .66);
  --vsp-gl:    rgba(255, 255, 255, .95);
  --vsp-bd:    rgba(168, 112, 10, .55);
  --vsp-ink:   #3a0f1c;
  --vsp-mute:  #7a5a52;
  --vsp-gold:  #b8860b;
  --vsp-acc:   #8f1239;
  --vsp-teal:  #0f766e;
  --vsp-hi:    rgba(212, 160, 23, .32);
  --vsp-sh:    0 18px 50px rgba(120, 70, 10, .22);

  position: relative;
  overflow-x: hidden;
  background: var(--vsp-bg);
  background-attachment: fixed;
  color: var(--vsp-ink);
  color-scheme: light;
  font-family: "Noto Sans Devanagari", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  isolation: isolate;
}

/* `absolute`, not `fixed` — see the note on .vsp-bgart/.vsp-frame/.vsp-cn
   below: this section sits inside the site's own header/footer, so a
   viewport-fixed element would float over that chrome instead of staying
   within this section. */
.vsp-page::before, .vsp-page::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(50px); pointer-events: none;
}
.vsp-page::before {
  width: 380px; height: 380px; left: -100px; top: 28%;
  background: radial-gradient(circle, rgba(240, 196, 90, .35), transparent 70%);
}
.vsp-page::after {
  width: 420px; height: 420px; right: -120px; top: 55%;
  background: radial-gradient(circle, rgba(143, 18, 57, .4), transparent 70%);
}

.vsp-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 28px 26px; }

.vsp-glass {
  position: relative;
  background: var(--vsp-glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.7);
  backdrop-filter: blur(26px) saturate(1.7);
  border: 1.5px solid var(--vsp-bd);
  border-radius: 24px;
  box-shadow: var(--vsp-sh), inset 0 1px 0 var(--vsp-gl);
  overflow: hidden;
}
.vsp-glass::before {
  content: ""; position: absolute; inset: 0 0 55% 0;
  background: linear-gradient(180deg, var(--vsp-gl), transparent);
  opacity: .35; pointer-events: none;
}

/* ── Month tabs (real links, not JS tab-switching) ── */
.vsp-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 16px; }
.vsp-tabs a {
  flex: none; border: 1px solid var(--vsp-bd); background: var(--vsp-glass); color: var(--vsp-ink);
  padding: 8px 18px; border-radius: 999px; font-size: 16px; text-decoration: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.vsp-tabs a[aria-current="page"] {
  background: linear-gradient(135deg, #8f1239, #c9971c); color: #fff;
  border-color: transparent; font-weight: 600;
}

/* ── "Today" highlight box ── */
.vsp-today {
  padding: 26px; display: grid; grid-template-columns: 1.1fr .9fr 1fr; gap: 24px;
  margin-bottom: 20px; border: 1.5px solid var(--vsp-gold);
  box-shadow: var(--vsp-sh), inset 0 1px 0 var(--vsp-gl), 0 0 44px rgba(245, 158, 11, .28);
}
.vsp-today > * { position: relative; }
.vsp-big {
  font: 800 84px/1 "Noto Serif Devanagari", serif;
  background: linear-gradient(135deg, var(--vsp-gold), var(--vsp-acc));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.vsp-sub { color: var(--vsp-mute); font-size: 17px; }
.vsp-tith { margin-top: 8px; font: 700 34px "Noto Serif Devanagari", serif; color: var(--vsp-acc); }
.vsp-badge {
  display: inline-block; margin: 6px 6px 0 0; padding: 3px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; border: 1px solid var(--vsp-bd); background: var(--vsp-hi);
}
.vsp-badge.vsp-sh { color: var(--vsp-acc); }
.vsp-arc { text-align: center; }
.vsp-arc svg { width: 100%; max-width: 180px; overflow: visible; }
.vsp-cd { font: 800 24px "Noto Serif Devanagari", serif; margin-top: -6px; }
.vsp-cdl { color: var(--vsp-mute); font-size: 16px; }
.vsp-warn { margin-top: 8px; font-size: 15px; color: var(--vsp-acc); font-weight: 600; }
.vsp-city { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; flex-wrap: wrap; }
.vsp-city a {
  border: 1px solid var(--vsp-bd); background: transparent; color: var(--vsp-ink);
  border-radius: 999px; padding: 3px 12px; font-size: 14px; text-decoration: none;
}
.vsp-city a[aria-current="true"] { background: var(--vsp-teal); color: #fff; border-color: transparent; }
.vsp-tlx { list-style: none; margin: 0; padding: 0; }
.vsp-tlx li {
  display: flex; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px dashed var(--vsp-bd); font-size: 17px;
}
.vsp-tlx li.vsp-done { color: var(--vsp-mute); text-decoration: line-through; }
.vsp-tlx li.vsp-next { color: var(--vsp-acc); font-weight: 700; }
.vsp-tw { grid-column: 1 / -1; border-top: 1px solid var(--vsp-bd); padding-top: 12px; }
.vsp-tw h3, .vsp-fest h3 { margin: 0 0 4px; font-size: 15px; color: var(--vsp-mute); font-weight: 600; }
.vsp-tw p { margin: 2px 0; font-size: 16px; }
.vsp-tw .vsp-x { color: var(--vsp-acc); font-weight: 700; }

/* ── Hero header (month name + सुद/वद medallions) ── */
.vsp-hero {
  background: linear-gradient(120deg, #4a0d22, #7a1535 55%, #a8731a);
  border: 1px solid var(--vsp-gold);
  color: #fff; padding: 20px 14px; text-align: center; margin-bottom: 12px;
}
.vsp-hero .vsp-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; }
.vsp-pk {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 800 23px "Noto Serif Devanagari", serif; color: #fff; border: 2px solid #fff3c4;
  background: radial-gradient(circle at 30% 25%, #f0c45a, #8f1239) !important;
  box-shadow: 0 0 18px rgba(252, 211, 77, .6);
}
/* `color` set explicitly: base.css's `h1,h2,...{color:var(--text)}` is a
   tag-selector rule, which beats plain inheritance from .vsp-hero's own
   `color:#fff` — without this the month name rendered in dark ink instead
   of white, reported 2026-10-04. */
.vsp-hero h1 { margin: 0; color: #fff; font: 800 clamp(32px, 6vw, 48px) "Noto Serif Devanagari", serif; }
.vsp-hero small { display: block; color: #ffe7a8; font-size: 15px; }
.vsp-note {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  color: var(--vsp-acc); font-weight: 600; font-size: 17px; padding: 12px 6px;
}

/* ── Sun times ── */
.vsp-sun { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; font-size: 16px; }
.vsp-sun div { padding: 12px 16px; display: flex; justify-content: space-between; border-radius: 12px; }
.vsp-sun b { font-size: 19px; color: var(--vsp-gold); }

/* ── Sud/Vad tithi tables + events (3-col grid) ── */
.vsp-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 12px; align-items: start; }
.vsp-table { width: 100%; border-collapse: collapse; font-size: 18px; }
.vsp-table caption {
  background: linear-gradient(135deg, #8f1239, #5b0f2b); letter-spacing: .02em;
  color: #fff; font-weight: 800; font-size: 20px; padding: 8px;
}
.vsp-table th { color: var(--vsp-mute); font-weight: 600; font-size: 14px; padding: 8px 2px; border-bottom: 1px solid var(--vsp-bd); }
.vsp-table td { border-bottom: 1px solid var(--vsp-bd); text-align: center; padding: 4px 2px; height: 44px; }
.vsp-table tbody tr { text-decoration: none; }
.vsp-table tbody tr:hover td { background: var(--vsp-hi); }
.vsp-table td.vsp-t, .vsp-table td.vsp-d { font-weight: 800; }
.vsp-table td.vsp-d { color: var(--vsp-teal); font-family: system-ui, sans-serif; }
.vsp-table td.vsp-v { color: var(--vsp-acc); font-weight: 600; }
.vsp-table td.vsp-s { color: var(--vsp-acc); width: 28px; font-size: 21px; }
.vsp-table tr.vsp-h td { background: var(--vsp-hi); }
.vsp-table tr.vsp-h td:first-child { box-shadow: inset 4px 0 0 var(--vsp-gold); }
.vsp-table tr.vsp-now td {
  background: linear-gradient(135deg, #e0a82e, #9f1239); color: #fff;
  font-weight: 800; font-size: 20px; box-shadow: 0 0 14px var(--vsp-acc);
}
.vsp-table tr.vsp-now td.vsp-d, .vsp-table tr.vsp-now td.vsp-v, .vsp-table tr.vsp-now td.vsp-s { color: #fff; }
/* a <tr> can't be an <a>, so the whole row is wrapped in a block link per cell instead */
.vsp-table tbody a.vsp-row-link { display: contents; color: inherit; text-decoration: none; }

.vsp-ev { padding: 16px 18px; }
.vsp-ev h2 { margin: 0 0 6px; font-size: 16px; color: var(--vsp-mute); font-weight: 600; }
.vsp-ev ul { list-style: none; margin: 0; padding: 0; }
.vsp-ev li { display: grid; grid-template-columns: 72px 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--vsp-bd); font-size: 17px; }
.vsp-ev li:last-child { border: 0; }
.vsp-ev li.vsp-key { color: var(--vsp-acc); font-weight: 600; }
.vsp-ev li.vsp-on { background: linear-gradient(90deg, var(--vsp-hi), transparent); box-shadow: inset 4px 0 0 var(--vsp-acc); padding-left: 12px; }
.vsp-ev .vsp-k { color: var(--vsp-teal); font-weight: 800; font-size: 15px; }
.vsp-ev a { color: inherit; }

/* ── Festival banner ── */
.vsp-fest {
  grid-column: 1 / -1; order: -1; position: relative; overflow: hidden;
  border-radius: 20px; padding: 18px 22px; color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  background: linear-gradient(120deg, #c9971c, #b3203f 55%, #5b0f2b);
  box-shadow: 0 14px 34px rgba(190, 18, 60, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.vsp-fest h3 { color: #fff3d6; }
.vsp-fest .vsp-fe { font: 800 clamp(24px, 4vw, 34px)/1.3 "Noto Serif Devanagari", serif; }
.vsp-fest .vsp-fe + .vsp-fe { margin-top: 4px; font-size: clamp(19px, 3.2vw, 25px); }
.vsp-fest .vsp-nx {
  margin-top: 8px; font-size: 15px; background: rgba(255, 255, 255, .22);
  display: inline-block; padding: 2px 12px; border-radius: 999px;
}
.vsp-fest.vsp-none {
  background: var(--vsp-glass); color: var(--vsp-ink); box-shadow: none; border: 1px dashed var(--vsp-bd);
}
.vsp-fest.vsp-none h3 { color: var(--vsp-mute); }
.vsp-fest.vsp-none .vsp-fe { font-size: 17px; font-weight: 600; }
.vsp-fest.vsp-none .vsp-nx { background: var(--vsp-hi); }

/* ── Periods footer ── */
.vsp-foot { margin-top: 12px; display: grid; gap: 8px; }
.vsp-foot div { display: grid; grid-template-columns: 120px 1fr; border-radius: 12px; font-size: 16px; }
.vsp-foot b, .vsp-foot span { padding: 11px 14px; }
.vsp-foot b { color: #fff; border-radius: 12px 0 0 12px; }
.vsp-foot div:nth-child(4n+1) b { background: linear-gradient(135deg, #0f766e, #115e59); }
.vsp-foot div:nth-child(4n+2) b, .vsp-foot div:nth-child(4n+3) b { background: linear-gradient(135deg, #9f1239, #7f1d1d); }
.vsp-foot div:nth-child(4n+4) b { background: linear-gradient(135deg, #b8860b, #8a6508); }

.vsp-legend { margin-top: 12px; font-size: 15px; color: var(--vsp-mute); }
.vsp-legend .vsp-swastik { color: var(--vsp-acc); }

/* ── Jain-art decoration (lotus, swastik, mandala) ── */
.vsp-defs { position: absolute; width: 0; height: 0; color: var(--vsp-gold); fill: none; stroke: currentColor; stroke-width: 1.2; }
.vsp-defs * { vector-effect: non-scaling-stroke; }
/*
 * Scoped to .vsp-page's own box with `position: absolute`, NOT `fixed`.
 * This theme wraps one section of a larger site that keeps its own
 * header/nav/footer around it — `fixed` would pin the frame and corner
 * ornaments to the browser viewport and bleed over that sitewide chrome
 * instead of staying within this section, which is correct only for the
 * original mockup's standalone single-page context.
 */
.vsp-bgart {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 100%; z-index: -2; pointer-events: none;
  color: var(--vsp-gold); fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .2;
}
.vsp-frame {
  position: absolute; inset: 10px; z-index: 3; pointer-events: none;
  border: 2px solid var(--vsp-gold); border-radius: 22px;
  box-shadow: inset 0 0 0 7px var(--vsp-bd), 0 0 30px rgba(240, 196, 90, .25);
}
.vsp-cn {
  position: absolute; width: 150px; height: 150px; z-index: 2; pointer-events: none;
  color: var(--vsp-gold); fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .8;
}
.vsp-band { display: block; color: var(--vsp-gold); fill: none; stroke: currentColor; stroke-width: 1.2; margin: 0 0 10px; opacity: .9; }
.vsp-hm {
  position: absolute; top: -70px; right: -50px; width: 230px; height: 230px;
  color: #f0c45a; fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .3; pointer-events: none;
}
.vsp-hm.vsp-l { right: auto; left: -50px; }
.vsp-fw {
  position: absolute; right: -24px; bottom: -44px; width: 170px; height: 170px;
  color: #fff; fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .3; pointer-events: none;
}
.vsp-fest.vsp-none .vsp-fw { color: var(--vsp-gold); }

/* ── Responsive ── */
@media (max-width: 820px) {
  .vsp-today { grid-template-columns: 1fr; padding: 18px; }
  .vsp-tw { grid-template-columns: 1fr !important; }
  .vsp-grid { grid-template-columns: 1fr 1fr; }
  .vsp-ev { grid-column: 1 / -1; order: 3; }
  .vsp-big { font-size: 68px; }
}
@media (max-width: 600px) {
  .vsp-grid { grid-template-columns: 1fr; }
  .vsp-foot div { grid-template-columns: 96px 1fr; }
  .vsp-sun { grid-template-columns: 1fr; }
  .vsp-cn { width: 96px; height: 96px; }
  .vsp-wrap { padding: 22px 14px; }
  .vsp-hm { width: 160px; height: 160px; }
  .vsp-frame { inset: 6px; border-radius: 16px; }
}
@media print {
  .vsp-tabs, .vsp-frame, .vsp-cn, .vsp-bgart { display: none; }
}
