/* Satya Panchang theme: "classic almanac reborn" (preview of Nov 17, 2026).
   Theme verdict pending: every colour is a variable here, so a theme change
   is a pass over this block only. */
:root {
  --paper: #FAF1DC; --card: #FFF9EC; --ink: #4A0E18; --body: #3E2A20; --muted: #6E5236;
  --saffron: #E07B0F; --saffron-deep: #A85205; --gold: #B8860B;
  --line: #E0CD9E; --line-soft: #F0E2BC; --shubh: #2E7D32; --ashubh: #B3261E;
  --serif: 'Fraunces', Georgia, serif; --deva: 'Tiro Devanagari Hindi', 'Noto Serif Devanagari', serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--body); font-family: var(--sans); padding: 0 16px 48px; line-height: 1.45; }
html[lang="hi"] body { font-family: var(--sans), var(--deva); }
a { color: inherit; }
#sp { max-width: 900px; margin: 0 auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.err { background: #FDECEA; border: 1px solid #EBC4C0; color: var(--ashubh); padding: 14px; border-radius: 10px; margin-top: 18px; }

/* masthead: classic almanac double rule */
.mast { text-align: center; padding: 26px 0 8px; border-bottom: 3px double var(--ink); }
.mast-link { text-decoration: none; display: inline-block; }
.deva { font-family: var(--deva); font-size: clamp(28px, 6vw, 44px); color: var(--ink); line-height: 1.15; }
.wordmark { letter-spacing: .42em; font-weight: 700; font-size: clamp(12px, 2.6vw, 15px); color: var(--saffron-deep); margin-top: 6px; text-transform: uppercase; }
.tagline { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); margin-top: 8px; }

/* nav + bar */
.nav { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.nav a { text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink); padding: 7px 14px; border-radius: 999px; }
.nav a:hover { background: var(--card); }
.nav a.on { background: var(--ink); color: #FFF9EC; }
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.lang { display: flex; gap: 4px; font-size: 13px; }
.lang a { text-decoration: none; padding: 5px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; border: 1px solid transparent; }
.lang a.on { color: var(--ink); border-color: var(--line); background: var(--card); }

/* location picker (tz-picker.js markup, re-coloured for this theme) */
#sp .vtz-btn { border-color: var(--line); background: var(--card); color: var(--ink); }
#sp .vtz-btn:hover { background: #FFFDF4; }
#sp .vtz-btn .vtz-pin { color: var(--saffron-deep); }
#sp .vtz-btn .vtz-abbr { background: var(--ink); }
#sp .vtz-panel { background: #FFFDF4; border-color: var(--line); box-shadow: 0 14px 40px rgba(74, 14, 24, .18); }
#sp .vtz-row, #sp .vtz-chip { color: var(--ink); }
#sp .vtz-row:hover, #sp .vtz-row.hot, #sp .vtz-chip:hover { background: var(--line-soft); }
#sp .vtz-search, #sp .vtz-chip { border-color: var(--line); }
#sp .vtz-auto { border-color: var(--gold); }

/* date navigation */
.datenav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 6px; }
.datenav .date { font-family: var(--serif); font-size: clamp(18px, 4vw, 24px); color: var(--ink); font-weight: 600; text-align: center; }
.datenav .arrow { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card); color: var(--saffron-deep); font-weight: 700; font-size: 22px; text-decoration: none; }
.datenav .arrow:hover { background: #FFFDF4; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--saffron-deep); border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 14px; }

/* hero */
.hero { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 14px; margin-top: 10px; box-shadow: 0 2px 10px rgba(74, 14, 24, .06); }
.hero h2 { font-family: var(--serif); color: var(--ink); font-size: 21px; }
.limbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 14px; }
.limb { border-top: 2px solid var(--saffron); padding-top: 8px; }
.limb .k, .cell .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--saffron-deep); font-weight: 700; }
html[lang="hi"] .limb .k, html[lang="hi"] .cell .k { letter-spacing: .02em; font-size: 13px; }
.limb .v { font-family: var(--serif); font-size: 19px; color: var(--ink); margin-top: 3px; }
html[lang="hi"] .limb .v { font-family: var(--deva); }
.limb .pada { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.limb .t { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.nd { font-size: 11.5px; color: var(--saffron-deep); white-space: nowrap; }
.track { height: 5px; background: var(--line-soft); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--saffron)); border-radius: 99px; }

/* sun and moon */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.cell { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.cell .k { color: #7A5B3A; }
.cell .v { font-family: var(--serif); font-size: 19px; color: var(--ink); margin-top: 4px; }
.cell .t { font-size: 12.5px; color: var(--muted); }

/* sections, chips, tables */
h3.sec { font-family: var(--serif); color: var(--ink); font-size: 19px; margin: 26px 0 10px; }
html[lang="hi"] h3.sec { font-family: var(--deva); }
.secsub { font-family: var(--sans); font-size: 12.5px; font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; background: var(--card); border: 1px solid var(--line); }
.chip.good { border-color: #BFD8BF; color: var(--shubh); }
.chip.bad { border-color: #EBC4C0; color: var(--ashubh); }
.chip small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.tbl caption { text-align: left; font-weight: 700; color: var(--ink); padding: 0 0 6px 2px; font-size: 13px; }
.tbl td { padding: 6px 12px; border-top: 1px solid var(--line-soft); }
.tbl tr:first-child td { border-top: 0; }
.tbl td:first-child { white-space: nowrap; color: var(--body); }
.tbl td.g { color: var(--shubh); font-weight: 600; }
.tbl td.b { color: var(--ashubh); font-weight: 600; }
.tbl td.n { color: var(--ink); font-weight: 600; }
.tbl td small { font-weight: 400; color: var(--muted); }
.tbl tr.now td { background: #FFF1D6; }
.nowtag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; background: var(--saffron); color: #fff; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.facts dt { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.facts dd { font-family: var(--serif); color: var(--ink); font-size: 17px; }
html[lang="hi"] .facts dd { font-family: var(--deva); }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 10px 2px; text-decoration: none; }
.day:hover { background: #FFFDF4; }
.day .d { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7A5B3A; font-weight: 700; }
.day .n { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.day .ti { font-size: 11px; color: var(--muted); line-height: 1.3; }
.day.sel { border: 2px solid var(--saffron); background: #FFFDF4; }
.day.today .d { color: var(--saffron-deep); }

/* festivals */
.fest { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fest .row { display: flex; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); align-items: baseline; text-decoration: none; }
.fest .row:hover { background: #FFFDF4; }
.fest .row:last-child { border-bottom: none; }
.fest .row.past { opacity: .62; }
.fest .dt { font-family: var(--serif); color: var(--saffron-deep); font-weight: 700; white-space: nowrap; font-size: 15px; min-width: 112px; }
.fest .nm { font-weight: 600; color: var(--ink); }
.fest .deva4 { font-family: var(--deva); font-weight: 400; }
.fest .rule { font-weight: 400; font-size: 12.5px; color: var(--muted); }

/* month grid */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.ch { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7A5B3A; padding: 4px 0; }
.cc { background: var(--card); border: 1px solid var(--line); border-radius: 9px; min-height: 96px; padding: 6px 7px; display: flex; flex-direction: column; gap: 1px; text-decoration: none; overflow: hidden; }
.cc:hover { background: #FFFDF4; }
.cc.empty { background: transparent; border: 0; }
.cc .cn { font-family: var(--serif); font-size: 17px; color: var(--ink); font-weight: 700; }
.cc .ct { font-size: 11.5px; color: var(--ink); font-weight: 600; line-height: 1.25; }
.cc .ck, .cc .cs { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.cc .cf { font-size: 10.5px; color: var(--saffron-deep); font-weight: 700; line-height: 1.25; margin-top: 2px; }
.cc.today { border: 2px solid var(--saffron); }
.cc.ek, .lg.ek { box-shadow: inset 0 3px 0 var(--shubh); }
.cc.pur, .lg.pur { box-shadow: inset 0 3px 0 var(--gold); }
.cc.ama, .lg.ama { box-shadow: inset 0 3px 0 var(--ink); }
.lg { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); margin-left: 4px; }
@media (max-width: 560px) {
  .cc { min-height: 74px; padding: 4px; }
  .cc .ck, .cc .cs { display: none; }
  .cc .ct, .cc .cf { font-size: 10px; }
  .week .ti { font-size: 10px; }
  .fest .dt { min-width: 92px; font-size: 14px; }
}

/* footer */
.foot { margin-top: 34px; border-top: 3px double var(--ink); padding-top: 16px; text-align: center; }
.foot p { font-size: 12.5px; color: var(--muted); line-height: 1.6; max-width: 640px; margin: 0 auto 6px; }
.foot .quiet a { color: var(--ink); }
.foot .small { font-size: 11.5px; }
:focus-visible { outline: 2px solid var(--saffron-deep); outline-offset: 2px; }
