/* The site's other pages (FAQ, guides, signs, tools and their indexes), in the home page's design: the pinned
   mulberry panel with the emblem and a planet, beside the ivory reading column. Fonts and colours: brand.css. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.article { margin: 0; font: 400 18px/1.7 var(--sans); color: var(--plum); background: var(--ivory); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; text-wrap: balance; }
h1 em, h2 em { font-style: italic; color: var(--gold-ink); }
a { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--ame); outline-offset: 3px; }

/* ---------- the mulberry panel ---------- */
.panel { position: relative; overflow: hidden; color: var(--ivory); padding: 22px 20px 26px; display: flex; align-items: center; gap: 18px;
  background: radial-gradient(ellipse at 32% 26%, var(--mulberry-a) 0%, var(--mulberry-b) 48%, var(--mulberry-c) 100%); }
.panel .brand { position: absolute; top: 16px; left: 20px; z-index: 2; display: flex; align-items: center; gap: 10px;
  font: 400 22px var(--serif); color: var(--ivory); text-decoration: none; }
.panel .brand img { border-radius: 50%; }
.panel .glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, #F3ECFB30, transparent 62%);
  animation: breathe 9s ease-in-out infinite alternate; }

/* the chart, on the home page's paper plate (drawn by app/kundli.py) */
.plate { position: relative; z-index: 1; width: 100%; max-width: 230px; margin: 52px auto 0; padding: 0 10px 8px; border: 1px solid #9577524d; border-radius: 3px;
  background: radial-gradient(ellipse at 28% 15%, #fffaf0, transparent 60%), linear-gradient(135deg, #f6ecd9, #eadbc0 55%, #f1e4cc);
  box-shadow: 0 24px 55px -20px #000b, 0 2px 3px #0005, inset 0 1px 0 #fff9e6; color: #5d4630; }
.plate-label { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px 8px; border-bottom: 1px solid #9b7e5340;
  font: 500 8px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #746047; }
.plate-label span:last-child { color: #57432f; letter-spacing: .06em; }
.plate-foot { padding: 6px 2px 2px; font: 400 10.5px/1.35 var(--sans); text-align: center; color: #77634c; }
.kd { display: block; width: 100%; height: auto; overflow: visible; }
.kd .hs { fill: transparent; }
.kd .hs.soft { fill: #b5853016; }
.kd .hs.hot { fill: #b5853030; animation: house-breathe 3.4s ease-in-out infinite; }
.kd .ln > * { fill: none; stroke: #795b3f; stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.3, .1, .2, 1) forwards; }
.kd .ln > :nth-child(2) { animation-delay: .35s; } .kd .ln > :nth-child(3) { animation-delay: .7s; }
.kd .sg { font: 400 15px var(--serif); fill: #7a6553; text-anchor: middle; dominant-baseline: central; }
.kd .sg.asc { font: 600 8px var(--sans); letter-spacing: .12em; text-transform: uppercase; fill: #96713e; }
.kd .pl { opacity: 0; animation: arrive .7s ease-out forwards; animation-delay: 1.2s; }
.kd .pl text { font: 700 11.5px var(--sans); text-anchor: middle; dominant-baseline: central; }
.kd .pl .disc { stroke: rgba(46, 28, 10, .5); stroke-width: .6; }
.kd .pl .shine { fill: #fff; opacity: .6; }
.kd .pl .ring { fill: none; stroke: #8494DA; stroke-width: 1.5; }
.kd .pl .corona { fill: #f6b84a; opacity: .45; }
.kd .pl.node .disc { stroke: #c4b0c9; stroke-dasharray: 2 1.6; }
.kd.focus .pl:not(.f) { animation-name: arrive-dim; }
.kd .pl.f .disc { stroke: #fffdf2; stroke-width: 1.4; }
.kd .pl.f > circle:first-child { animation: glow 3s ease-in-out 2s infinite; transform-box: fill-box; transform-origin: center; }
.wheel .turn { transform-box: view-box; transform-origin: 200px 200px; animation: turn 1.6s cubic-bezier(.3, .1, .2, 1) both; }
.wheel .seg { fill: #fffaf00d; stroke: #795b3f; stroke-width: 1; }
.wheel .seg.on { fill: #b5853038; animation: house-breathe 3.4s ease-in-out 1.6s infinite; }
.wheel .gl { font: 400 19px var(--serif); fill: #8a7560; text-anchor: middle; dominant-baseline: central; }
.wheel .gl.on { font-size: 25px; fill: #4a321c; }
.wheel .nk { fill: none; stroke: #795b3f80; stroke-width: .8; }
.wheel .nk.on { fill: #c9963f8c; stroke: #fffaf0; stroke-width: .6; }
.wheel .nm { font: 400 30px var(--serif); fill: #3d2a18; text-anchor: middle; }
.wheel .el { font: 600 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; fill: #96713e; text-anchor: middle; }
.wheel .no { font: 600 10px var(--sans); fill: #8a7560; text-anchor: middle; dominant-baseline: central; }
.wheel .lord { opacity: .5; stroke: #fffaf0; stroke-width: 1; }
.wheel .ab, .wheel .yr { font: 700 10px var(--sans); fill: #3d2a18; text-anchor: middle; dominant-baseline: central; }
.wheel .yr { font-size: 12px; fill: #6b5440; }
.wheel .gl.big { font-size: 34px; } .wheel .no.big, .wheel .ab.big { font-size: 14px; }
@keyframes turn { from { opacity: 0; transform: rotate(-40deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes arrive { to { opacity: 1; } }
@keyframes arrive-dim { to { opacity: .42; } }
@keyframes glow { 50% { transform: scale(1.45); } }
@keyframes house-breathe { 50% { fill: #b5853018; } }
@keyframes breathe { to { opacity: .55; transform: scale(1.06); } }

/* ---------- the top bar (as on the home page) ---------- */
.nav { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 20px; background: rgba(251, 247, 241, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14.5px; font-weight: 500; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--plum); }
.nav .lang:lang(hi) { font-family: "Noto Sans Devanagari Label", var(--sans); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--plum);
  border-radius: 6px; background: var(--plum); color: var(--ivory); font: 600 15px var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -10px rgba(42, 24, 50, .55); }
.btn:disabled { opacity: .7; cursor: progress; }
.nav .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }

/* ---------- the reading column ---------- */
.body { max-width: 760px; padding: 36px 20px 40px; }
.tag { font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.tag b { display: inline-block; margin-right: 10px; padding: 3px 9px; border-radius: 99px; background: var(--plum); color: var(--gold-hi); letter-spacing: .08em; }
.body > h1 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 16px; }
.lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 58ch; }
.lead small { display: block; margin-top: 10px; font-size: 14px; letter-spacing: .02em; }
.body h2 { font-size: clamp(27px, 3vw, 38px); margin: 48px 0 14px; scroll-margin-top: 80px; }
.body p { max-width: 62ch; margin: 0 0 16px; }
.body ul { max-width: 62ch; padding: 0; margin: 0 0 18px; list-style: none; }
.body li { position: relative; padding: 5px 0 5px 24px; }
.body li::before { content: "✦"; position: absolute; left: 0; top: 10px; font-size: 12px; color: var(--gold-ink); }

/* cards, in the home page's lavender feature style */
.card, .toc, .facts { margin: 28px 0; padding: 22px 24px; border-radius: 12px; background: var(--lav); }
.toc p { font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2 220px; column-gap: 24px; }
.toc li { padding: 3px 0; break-inside: avoid; }
.toc li::before { content: none; }
.toc a { color: var(--plum); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
ul.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 22px; max-width: none; }
ul.facts li { font-size: 16px; }

/* related pages and indexes: cards with a small planet */
.related, .index { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0 8px; padding: 0; }
.related li, .index li { padding: 0; }
.related li::before, .index li::before { content: none; }
.related a, .index a { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); color: var(--plum); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.related a:hover, .index a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(42, 24, 50, .5); }
.related img, .index img { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.related b, .index b { display: block; font: 400 20px/1.2 var(--serif); margin-bottom: 4px; }
.related span, .index span { display: block; font-size: 14.5px; line-height: 1.45; color: var(--muted); }

/* the FAQ: questions as cards that open */
.faq-group { margin-top: 40px; }
.faq-group h2 { margin-top: 0; display: flex; align-items: center; gap: 14px; }
.faq-group h2 img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
details.qa { margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
details.qa summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; position: relative; font: 400 21px/1.3 var(--serif); }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; position: absolute; right: 20px; top: 14px; font: 300 26px var(--sans); color: var(--gold-ink); }
details.qa[open] summary::after { content: "−"; }
details.qa div { padding: 0 20px 18px; }
details.qa div p { margin: 0; }

/* forms (the FAQ question, the Moon-sign tool) */
.card form { display: grid; gap: 14px; }
.card label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.card label small { font-weight: 400; color: var(--muted); }
.card input, .card textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font: 400 16px var(--sans); color: var(--plum); background: #fff; }
.card input { min-height: 46px; }
.card button { justify-self: start; }
.card .err { color: var(--red); margin: 0; }
.card h2 { margin: 0 0 6px; }
.note { font-size: 14px; color: var(--muted); }
.placebox { position: relative; }
.placebox ul { position: absolute; z-index: 2; left: 0; right: 0; margin: 4px 0 0; padding: 4px 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.placebox li { padding: 8px 12px; cursor: pointer; }
.placebox li::before { content: none; }
.placebox li:hover, .placebox li:focus { background: var(--lav); outline: none; }
#moon-answer:not(:empty) { margin-top: 18px; padding-top: 18px; border-top: 1px solid #DDD2E1; }
#moon-answer h2 { margin: 0 0 10px; font-size: 26px; }
#moon-answer .stop { margin-top: 6px; color: var(--ivory); }
.stop { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--plum); border-radius: 6px; background: var(--plum);
  color: var(--ivory); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; }

/* tables, questions and numbered steps in guides and on /about */
.table { margin: 24px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table thead th { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.table tbody th { font-weight: 600; white-space: nowrap; }
.body h3 { margin: 26px 0 8px; font-size: 22px; }
.body ol:not(.toc ol) { padding-left: 22px; }
.body ol:not(.toc ol) li { padding: 4px 0; }

/* today's sky */
table.sky { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 16px; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
table.sky th, table.sky td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.sky tr:last-child td { border-bottom: 0; }
table.sky th { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
table.sky .r { color: var(--gold-ink); font-size: 14px; }
.now { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.now span { padding: 6px 14px; border-radius: 99px; background: var(--plum); color: var(--gold-hi); font-size: 14.5px; font-weight: 600; }

/* the invitation, as at the end of the home page */
.invite { margin-top: 56px; padding: 30px 28px; border-radius: 16px; color: var(--ivory);
  background: radial-gradient(ellipse at 20% 0%, var(--mulberry-a), var(--mulberry-b) 55%, var(--mulberry-c)); }
.invite .tag { color: #E6DCF2; }
.invite .tag b { background: var(--gold-hi); color: var(--night); }
.invite h2 { font-size: clamp(30px, 3.4vw, 44px); margin: 0 0 12px; color: #fff; }
.invite h2 em { color: var(--gold-hi); }
.invite p { color: #EFE6F7; }
.invite .btn { background: var(--ivory); color: var(--plum); border-color: var(--ivory); margin-top: 6px; }

footer { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: 13.5px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }

/* ---------- wide screens: the pinned panel beside the column, as on the home page ---------- */
/* phones and narrow windows: the links on a row of their own, then the profile buttons and the invitation */
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px; }
  .nav nav { flex-basis: 100%; gap: 6px 16px; }
  .nav .btn { margin-left: auto; }
}
@media (min-width: 861px) {
  .panel { position: fixed; inset: 0 auto 0 0; width: 35vw; min-width: 372px; flex-direction: column; justify-content: center; padding: 40px; gap: 26px; }
  .panel .brand { top: 22px; left: 28px; }
  .plate { max-width: min(27vw, 46vh, 420px); margin: 0; padding: 0 16px 12px; }
  .plate-label { font-size: 9px; padding: 15px 2px 12px; }
  .plate-foot { font-size: 12px; padding-top: 8px; }
  .story { margin-left: max(35vw, 372px); }
  .nav { padding: 14px 5vw; }
  .body { padding: 9vh 5vw 6vh 6vw; }
}
@media (prefers-reduced-motion: reduce) { .panel .glow, .kd * { animation: none !important; } .kd .ln > * { stroke-dashoffset: 0; } .kd .pl { opacity: 1; } .kd.focus .pl:not(.f) { opacity: .42; } html { scroll-behavior: auto; } .btn, .related a, .index a { transition: none; } }
html:lang(hi) em { font-style: normal; }
html:lang(hi) body * { letter-spacing: normal !important; }
