/* ANTRRA — free tools: shared tool layout, six animated hero graphics and the result views.
   Builds on the tokens in site.css. Motion runs only under .motion (respects reduced motion). */

/* ---------- homepage: the six tools ---------- */
.tools-home { padding-block: clamp(90px, 12vw, 150px); background: radial-gradient(50% 60% at 90% 10%, rgba(201, 160, 112, .45), transparent 70%), linear-gradient(180deg, #efdcbf, #f6ead8); }
.to-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.to-head h2 { font-size: var(--s-h2); }
.to-head > p { color: var(--ink-2); max-width: 46ch; font-size: 1.08rem; }
.tgrid { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; perspective: 1000px; }
.tc { --rx: 0deg; --ry: 0deg; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); }
.tc a { position: relative; display: grid; gap: 10px; padding: 28px 26px 30px; height: 100%; background: #fbf4e8; border: 1px solid var(--rule-2); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.tc a::before { content: ""; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(232, 190, 140, .55), transparent); transition: transform .6s var(--ease); }
.tc a:hover { border-color: var(--copper); box-shadow: 0 18px 40px -22px rgba(59, 38, 22, .5); }
.tc a:hover::before { transform: scale(1.4); }
.tc h3 { font: 600 1.6rem/1.1 var(--f-display); position: relative; }
.tc p { color: var(--ink-2); position: relative; }
.tc-go { position: absolute; right: 22px; top: 22px; font-size: 1.3rem; color: var(--copper); transition: transform .4s var(--ease); }
.tc a:hover .tc-go { transform: translateX(6px); }
.motion .tgrid .tc { animation: rise3d .9s var(--ease) both; animation-delay: calc(var(--i) * .08s); animation-timeline: view(); animation-range: entry 0% cover 30%; }
@keyframes rise3d { from { opacity: 0; transform: perspective(900px) rotateX(-30deg) translateY(50px); } }

/* ---------- animated tool icons ---------- */
.ti { width: 56px; height: 56px; fill: none; stroke: var(--copper); stroke-width: 1.6; overflow: visible; position: relative; }
.ti .c { fill: #f4e5cf; }
.ti text { fill: var(--copper); stroke: none; font: 600 14px var(--f-brand); text-anchor: middle; }
.ti-kundli .lit rect { fill: var(--copper-hi); stroke: none; opacity: 0; }
.motion .ti-kundli .lit rect { animation: lit 4s infinite; }
.motion .ti-kundli .lit rect:nth-child(2) { animation-delay: 1s; } .motion .ti-kundli .lit rect:nth-child(3) { animation-delay: 2s; } .motion .ti-kundli .lit rect:nth-child(4) { animation-delay: 3s; }
@keyframes lit { 0%, 30%, 100% { opacity: 0; } 8%, 20% { opacity: .85; } }
.ti-timings .hand { transform-origin: 24px 24px; }
.motion .ti-timings .hand { animation: spin 6s linear infinite; }
.ti-timings .sun { fill: var(--copper-hi); stroke: none; }
.ti-timings .arc { stroke-dasharray: 2 3; }
.motion .ti-num circle:not(:first-child) { transform-origin: 24px 24px; animation: breathe 3s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(.82); } }
.ti-match .r1, .ti-match .r2 { transform-box: fill-box; transform-origin: center; }
.motion .ti-match .r1 { animation: nudgeL 3s ease-in-out infinite alternate; } .motion .ti-match .r2 { animation: nudgeR 3s ease-in-out infinite alternate; }
@keyframes nudgeL { to { transform: translateX(4px); } } @keyframes nudgeR { to { transform: translateX(-4px); } }
.ti-match .heart { stroke: var(--copper-hi); }
.ti-fest .flame { fill: #e2a35c; stroke: #b8845e; transform-origin: 24px 26px; transform-box: view-box; }
.motion .ti-fest .flame { animation: flicker 1.4s ease-in-out infinite alternate; }
@keyframes flicker { 0% { transform: scale(1, 1) skewX(0); } 40% { transform: scale(.92, 1.08) skewX(4deg); } 70% { transform: scale(1.05, .95) skewX(-3deg); } 100% { transform: scale(.96, 1.04) skewX(2deg); } }
.ti-tr .earth { fill: var(--copper-hi); stroke: none; }
.ti-tr .pl { fill: var(--copper); stroke: none; }
.ti-tr .o1, .ti-tr .o2 { transform-origin: 24px 24px; }
.motion .ti-tr .o1 { animation: spin 9s linear infinite; } .motion .ti-tr .o2 { animation: spin 4s linear infinite reverse; }

/* ---------- tool strip under the header ---------- */
.tstrip { background: rgba(233, 211, 178, .6); border-bottom: 1px solid var(--rule); }
.tstrip ul { list-style: none; margin: 0 auto; padding: 8px var(--gut-r) 8px var(--gut); max-width: 1320px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tstrip ul::-webkit-scrollbar { display: none; }
.tstrip a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; min-height: 44px; white-space: nowrap; border: 1px solid transparent; font-weight: 500; color: var(--ink-2); transition: background-color .25s, border-color .25s; }
.tstrip .ti { width: 28px; height: 28px; stroke-width: 2; }
.tstrip a:hover { background: #fbf4e8; border-color: var(--rule-2); }
.tstrip a[aria-current="page"] { background: var(--forest); color: var(--ivory); border-color: var(--forest); }
.tstrip a[aria-current="page"] .ti { stroke: #e2b98a; }

/* ---------- tool page hero with live art ---------- */
.tool .t-hero { position: relative; overflow: clip; padding-block: clamp(56px, 8vw, 110px) clamp(40px, 6vw, 80px);
  background: radial-gradient(42% 70% at 82% 40%, rgba(255, 244, 226, .95), transparent 72%), radial-gradient(40% 60% at 100% 0%, rgba(201, 160, 112, .55), transparent 70%), linear-gradient(180deg, #ecd5b3 0%, #f3e3cb 60%, #f3e6d3 100%); }
.t-hero-in { position: relative; z-index: 1; display: grid; gap: 18px; }
.t-hero h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 5.4rem); max-width: 14ch; }
.t-hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 52ch; }
.t-art { position: absolute; right: max(4vw, 20px); top: 50%; width: min(38vw, 420px); aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; opacity: .9; }
.art-wheel .wheel { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--copper-hi);
  background: repeating-conic-gradient(from 0deg, rgba(140, 90, 53, .55) 0deg .6deg, transparent .6deg 30deg), repeating-conic-gradient(from 0deg, rgba(140, 90, 53, .25) 0deg .3deg, transparent .3deg 10deg);
  -webkit-mask: radial-gradient(closest-side, transparent 66%, #000 67%, #000 99%, transparent 100%); mask: radial-gradient(closest-side, transparent 66%, #000 67%, #000 99%, transparent 100%); }
.art-wheel .w2 { inset: 18%; background: repeating-conic-gradient(from 15deg, rgba(140, 90, 53, .5) 0deg 1deg, transparent 1deg 13.333deg); }
.motion .art-wheel .wheel { animation: spin 80s linear infinite; } .motion .art-wheel .w2 { animation: spin 50s linear infinite reverse; }
.art-sun .horizon { position: absolute; left: 0; right: 0; top: 62%; height: 1px; background: linear-gradient(90deg, transparent, var(--copper), transparent); }
.art-sun .sunpath { position: absolute; left: 10%; right: 10%; top: 22%; height: 80%; border-radius: 50%; border: 1px dashed rgba(140, 90, 53, .5); clip-path: inset(0 0 50% 0); }
.art-sun .sunball { position: absolute; left: 50%; top: 62%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff3d6, #e8b56f 60%, #c98c4a); box-shadow: 0 0 40px 14px rgba(232, 181, 111, .55); transform: rotate(-30deg) translateY(-160px) rotate(30deg); }
.art-sun .sunpath .sunball { display: none; }
.motion .art-sun .sunball { animation: sunarc 9s ease-in-out infinite alternate; }
@keyframes sunarc { from { transform: rotate(-78deg) translateY(-160px) rotate(78deg); } to { transform: rotate(78deg) translateY(-160px) rotate(-78deg); } }
.art-digits span { position: absolute; left: 50%; top: 50%; font: 400 clamp(1.6rem, 1rem + 2vw, 2.6rem)/1 var(--f-num); color: var(--copper); transform: rotate(calc(var(--i) * 40deg)) translateY(-150px) rotate(calc(var(--i) * -40deg)); }
.motion .art-digits { animation: spin 60s linear infinite; }
.motion .art-digits span { animation: digit 60s linear infinite reverse, glowd 3s ease-in-out infinite alternate; animation-delay: 0s, calc(var(--i) * -.33s); }
@keyframes digit { from { transform: rotate(calc(var(--i) * 40deg)) translateY(-150px) rotate(calc(var(--i) * -40deg)); } to { transform: rotate(calc(var(--i) * 40deg)) translateY(-150px) rotate(calc(var(--i) * -40deg - 360deg)); } }
@keyframes glowd { to { color: #c98c4a; text-shadow: 0 0 18px rgba(232, 181, 111, .8); } }
.art-rings { perspective: 800px; }
.art-rings span { position: absolute; inset: 18%; border-radius: 50%; border: 3px solid var(--copper-hi); transform-style: preserve-3d; }
.art-rings span:first-child { transform: translateX(-16%) rotateY(55deg); } .art-rings span:last-child { transform: translateX(16%) rotateY(-55deg); border-color: var(--forest); }
.motion .art-rings span:first-child { animation: ringA 8s ease-in-out infinite alternate; } .motion .art-rings span:last-child { animation: ringB 8s ease-in-out infinite alternate; }
@keyframes ringA { to { transform: translateX(-8%) rotateY(-30deg) rotateX(20deg); } } @keyframes ringB { to { transform: translateX(8%) rotateY(30deg) rotateX(-20deg); } }
.art-diya .rangoli { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(140, 90, 53, .45) 1.5px, transparent 2px) 0 0 / 22px 22px; -webkit-mask: radial-gradient(closest-side, #000 60%, transparent); mask: radial-gradient(closest-side, #000 60%, transparent); }
.motion .art-diya .rangoli { animation: spin 90s linear infinite; }
.art-diya svg { position: absolute; left: 22%; right: 22%; bottom: 22%; fill: none; stroke: var(--copper); stroke-width: 2; overflow: visible; }
.art-diya .bowl { fill: #c98c4a; stroke: #8c5a35; } .art-diya .rim { stroke: #fbe3bd; }
.art-diya .flame { fill: url(#none); fill: #f2b664; stroke: #e2973c; transform-origin: 60px 44px; transform-box: view-box; filter: drop-shadow(0 0 14px rgba(242, 182, 100, .9)); }
.motion .art-diya .flame { animation: flicker 1.3s ease-in-out infinite alternate; }
.art-orbits span { position: absolute; border-radius: 50%; border: 1px solid rgba(140, 90, 53, .55); }
.art-orbits span:nth-child(1) { inset: 0; } .art-orbits span:nth-child(2) { inset: 16%; } .art-orbits span:nth-child(3) { inset: 32%; }
.art-orbits span::before { content: ""; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 16px 4px rgba(232, 181, 111, .6); }
.art-orbits span:nth-child(2)::before { background: #c98c4a; width: 14px; height: 14px; top: -7px; } .art-orbits span:nth-child(3)::before { background: var(--forest); width: 12px; height: 12px; top: -6px; }
.motion .art-orbits span:nth-child(1) { animation: spin 30s linear infinite; } .motion .art-orbits span:nth-child(2) { animation: spin 14s linear infinite; } .motion .art-orbits span:nth-child(3) { animation: spin 22s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.t-body { padding-block: 40px 90px; display: grid; gap: 40px; }
.card { background: #fbf4e8; border: 1px solid var(--rule-2); padding: clamp(20px, 3vw, 34px); }
.tform { display: grid; gap: 18px; position: relative; margin-top: -70px; z-index: 2; box-shadow: 0 24px 50px -30px rgba(59, 38, 22, .5); }
.tform.inline { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.tform fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.tform legend { font: 600 1.4rem/1.2 var(--f-display); margin-bottom: 8px; padding: 0; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row2.pair { gap: 34px; }
.tform .field input, .tform .field select { min-height: 48px; width: 100%; background: #fffaf2; border: 1px solid var(--ink); padding: 0 12px; font-size: 1rem; border-radius: 0; font-variant-numeric: tabular-nums; }
.tform .field select { appearance: auto; }
.flabel, .tform .field label { font-weight: 600; }
.tform-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg button { min-height: 46px; padding: 0 16px; background: none; border: 0; cursor: pointer; font-weight: 500; }
.seg button + button { border-inline-start: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--forest); color: var(--ivory); }
.tnote { font-size: .95rem; color: var(--ink-3); font-style: italic; }
.tout { display: grid; gap: 28px; scroll-margin-top: 90px; }

/* staggered entrance shared by result views */
.motion .tout.play [style*="--i"] { animation: pop .8s var(--ease) both; animation-delay: calc(var(--i) * 55ms); }
@keyframes pop { from { opacity: 0; transform: perspective(700px) rotateX(-40deg) translateY(16px); } }

/* ---------- kundli ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; perspective: 900px; }
.chip { --rx: 0deg; --ry: 0deg; display: grid; gap: 4px; padding: 16px; background: #fbf4e8; border: 1px solid var(--rule-2); border-top: 3px solid var(--copper-hi); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); }
.chip-k { font-size: .82rem; color: var(--ink-3); }
.chip b { font: 600 1.5rem/1.1 var(--f-display); color: var(--copper); }
.chip-s { font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.kd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: start; }
.kd-switch { display: inline-flex; border: 1px solid var(--ink); margin-bottom: 18px; }
.kd-switch button { min-height: 44px; padding: 0 16px; background: none; border: 0; cursor: pointer; font-weight: 500; }
.kd-switch button + button { border-inline-start: 1px solid var(--ink); }
.kd-switch button[aria-pressed="true"] { background: var(--forest); color: var(--ivory); }
.kd-stage { perspective: 1400px; }
.kd-flip { position: relative; transform-style: preserve-3d; transition: transform 1s var(--ease); aspect-ratio: 1; }
.kd-flip.north { transform: rotateY(180deg); }
.kd-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.kd-n { transform: rotateY(180deg); }
.motion .kd-flip { animation: tablet 14s ease-in-out infinite alternate; }
.motion .kd-flip.north { animation-name: tabletN; }
@keyframes tablet { 0% { transform: rotateX(8deg) rotateY(-8deg); } 100% { transform: rotateX(4deg) rotateY(8deg); } }
@keyframes tabletN { 0% { transform: rotateY(172deg) rotateX(8deg); } 100% { transform: rotateY(188deg) rotateX(4deg); } }
.kd-chart { box-shadow: 0 0 0 6px #fbf4e8, 0 0 0 7px var(--ink), 0 30px 50px -24px rgba(59, 38, 22, .55); background: #fffaf2; }
.kd-chart .centre { background: #f4e5cf; }
.kd-c { font: 600 1.3rem/1.1 var(--f-display); color: var(--ink-2); }
.kd-chart .cell.lagna { background: repeating-linear-gradient(135deg, rgba(184, 132, 94, .14) 0 6px, transparent 6px 12px), #fff6e9; }
.g.la { color: var(--forest); }
.g i { font-style: normal; font-size: .6em; color: var(--ink-3); margin-inline-start: 1px; }
.motion .tout.play .kd-chart .g { animation: settle .9s var(--ease) both; animation-delay: calc(.3s + var(--i) * 70ms); }
.kd-north { width: 100%; height: 100%; display: block; background: #fffaf2; box-shadow: 0 0 0 6px #fbf4e8, 0 0 0 7px var(--ink), 0 30px 50px -24px rgba(59, 38, 22, .55); }
.kd-north rect { fill: none; stroke: var(--ink); stroke-width: 3; }
.kd-north .ln { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.motion .tout.play .kd-north .ln { stroke-dasharray: 1; animation: draw 1.6s var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.kd-north .sn { fill: var(--ink-3); font: 500 13px var(--f-text); text-anchor: middle; dominant-baseline: middle; }
.kd-north .pt { fill: var(--copper); font: 700 15px var(--f-text); text-anchor: middle; dominant-baseline: middle; }
.kd-north .pt.la { fill: var(--forest); }
.kd-table td:first-child b { color: var(--copper); }
.rt { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--copper); color: var(--ivory); font-size: .7rem; font-weight: 700; vertical-align: 1px; }
.la-row td { color: var(--forest); font-weight: 600; }
.dasha h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.dtrack { position: relative; margin: 30px 0 34px; }
.dbar { list-style: none; margin: 0; padding: 0; display: flex; height: 64px; }
.db { flex: 0 0 var(--w); position: relative; display: grid; align-content: center; justify-items: center; background: #f0dcc0; border-inline-end: 2px solid #fbf4e8; transform-origin: 0 50%; overflow: hidden; }
.db:nth-child(even) { background: #e6cba6; }
.db.cur { background: var(--forest); color: var(--ivory); }
.db-l { font-weight: 700; } .db-y { font-size: .72rem; opacity: .75; font-variant-numeric: tabular-nums; }
.motion .tout.play .db { animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes grow { from { transform: scaleX(0); } }
.needle { position: absolute; top: -10px; bottom: -10px; width: 2px; background: var(--copper); transition: left 1s var(--ease); }
.needle i { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font: 500 .72rem/1 var(--f-brand); letter-spacing: .14em; text-transform: uppercase; color: var(--copper); font-style: normal; white-space: nowrap; }
.motion .needle::after { content: ""; position: absolute; left: -5px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--copper-hi); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 132, 94, .6); } 50% { box-shadow: 0 0 0 10px rgba(184, 132, 94, 0); } }
.dasha h3 { font: 600 1.3rem/1.2 var(--f-display); margin-bottom: 12px; }
.antar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.antar li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--rule); background: #fffaf2; font-size: .9rem; }
.antar li span { color: var(--ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.antar li.cur { border-color: var(--forest); box-shadow: inset 4px 0 0 var(--forest); }

/* ---------- timings ---------- */
.tm-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.dial-wrap { perspective: 1200px; }
.dial { width: 100%; height: auto; display: block; overflow: visible; }
.motion .dial { animation: dialfloat 12s ease-in-out infinite alternate; }
@keyframes dialfloat { from { transform: rotateX(10deg) rotateY(-8deg); } to { transform: rotateX(4deg) rotateY(8deg); } }
.d-face { fill: url(#sky); stroke: var(--rule-2); }
.d-ring { fill: none; stroke: rgba(59, 38, 22, .12); stroke-width: 34; }
.d-day { fill: none; stroke: rgba(232, 181, 111, .5); stroke-width: 10; stroke-linecap: round; }
.d-seg { fill: none; stroke-width: 34; stroke-dasharray: 1; stroke-dashoffset: 0; }
.d-seg.q-good { stroke: #c98c4a; } .d-seg.q-neutral { stroke: #e9d4b4; } .d-seg.q-bad { stroke: url(#hatch); }
.motion .dial.play .d-seg { animation: draw .7s var(--ease) both; animation-delay: calc(var(--i) * 80ms); }
.d-lab { fill: var(--ink); font: 600 10px var(--f-text); text-anchor: middle; dominant-baseline: middle; }
.motion .dial.play .d-lab { animation: fadein .6s both; animation-delay: calc(.4s + var(--i) * 80ms); }
@keyframes fadein { from { opacity: 0; } }
.d-rahu { fill: none; stroke: #6b2a1a; stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(107, 42, 26, .6)); }
.d-abhi { fill: none; stroke: var(--forest); stroke-width: 8; stroke-linecap: round; }
.motion .dial.play .d-rahu, .motion .dial.play .d-abhi { stroke-dasharray: 1; animation: draw 1s 1.2s var(--ease) both; }
.d-rise, .d-set { fill: #fff3d6; stroke: var(--copper); stroke-width: 2; }
.d-hr { fill: var(--ink-3); font: 500 11px var(--f-text); text-anchor: middle; dominant-baseline: middle; font-variant-numeric: tabular-nums; }
.d-hand path { stroke: var(--ink); stroke-width: 2; }
.d-hand { transition: transform 1.2s var(--ease); }
.d-sun { fill: #f2b664; stroke: #c98c4a; filter: drop-shadow(0 0 10px rgba(242, 182, 100, .9)); }
.motion .d-sun { animation: sunglow 2.4s ease-in-out infinite alternate; }
@keyframes sunglow { to { filter: drop-shadow(0 0 22px rgba(242, 182, 100, 1)); } }
.d-hub { fill: #fbf4e8; stroke: var(--rule-2); }
.d-now { fill: var(--ink); font: 600 15px var(--f-text); text-anchor: middle; font-variant-numeric: tabular-nums; }
.tcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; perspective: 900px; }
.tcard { --rx: 0deg; --ry: 0deg; display: grid; gap: 4px; padding: 14px 16px; background: #fbf4e8; border: 1px solid var(--rule-2); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); }
.tc-k { font-size: .85rem; color: var(--ink-3); }
.tcard b { font: 600 1.35rem/1.15 var(--f-display); font-variant-numeric: tabular-nums; }
.tcard.rahu { border-left: 4px solid #6b2a1a; } .tcard.abhijit { border-left: 4px solid var(--forest); } .tcard.sunrise, .tcard.sunset { border-left: 4px solid #c98c4a; }
.tm-side h3 { font: 600 1.2rem/1.2 var(--f-display); margin: 22px 0 10px; }
.tpanch { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tpanch li { padding: 6px 12px; border: 1px solid var(--rule-2); background: #fffaf2; font-weight: 500; }
.chlists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.chlists h3 { font: 600 1.4rem/1.2 var(--f-display); margin-bottom: 12px; }
.chlists .night { background: var(--forest); color: var(--ivory); border-color: var(--forest); }
.chl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chl li { display: grid; grid-template-columns: 6.5em 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-left: 4px solid; font-variant-numeric: tabular-nums; }
.chl li em { font-style: normal; font-size: .8rem; opacity: .8; }
.chl .q-good { border-color: #c98c4a; background: rgba(201, 140, 74, .12); } .chl .q-neutral { border-color: #d8bf98; } .chl .q-bad { border-color: #6b2a1a; background: repeating-linear-gradient(135deg, rgba(107, 42, 26, .07) 0 5px, transparent 5px 10px); }
.night .chl .q-bad { border-color: #e2a07a; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 5px, transparent 5px 10px); }
.night .chl .q-good { background: rgba(226, 185, 138, .18); }
.motion .chl li { animation: slidein .6s var(--ease) both; animation-delay: calc(var(--i) * 60ms); animation-timeline: view(); animation-range: entry 0% cover 25%; }
@keyframes slidein { from { opacity: 0; transform: translateX(-24px); } }

/* ---------- numerology ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; perspective: 800px; }
.tiles li { position: relative; width: clamp(44px, 6vw, 64px); aspect-ratio: 3 / 4; transform-style: preserve-3d; transform: rotateY(180deg); }
.motion .tout.play .tiles li { animation: tileflip 1s var(--ease) both; animation-delay: calc(.2s + var(--i) * 110ms); }
@keyframes tileflip { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
.tiles span { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid var(--ink); }
.tl-f { background: #fbf4e8; font: 500 1.8rem/1 var(--f-brand); }
.tl-b { background: var(--forest); color: #f1d3a8; font: 600 2rem/1 var(--f-display); transform: rotateY(180deg); }
.motion .tout.play .tiles li { animation-fill-mode: both; }
.nu-sum { text-align: center; font-size: 1.15rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nu-sum b { font: 600 1.8rem/1 var(--f-display); color: var(--copper); }
.nm-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.nm-wheel { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin-inline: auto; }
.nm-wheel ul { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.nm-wheel li { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; width: 54px; padding: 6px 0; border: 1px solid var(--rule-2); background: #fbf4e8; transition: background-color .4s, color .4s, transform .5s var(--ease); }
.nm-wheel li b { font: 600 1.3rem/1 var(--f-display); } .nm-wheel li span { font-size: .72rem; color: var(--ink-3); }
.nm-wheel li.on { background: var(--forest); color: var(--ivory); transform: translate(-50%, -50%) scale(1.18); }
.nm-wheel li.on span { color: #f1d3a8; }
.nm-emb { position: absolute; inset: 22%; display: grid; place-items: center; perspective: 700px; }
.emb.mini { position: absolute; inset: 0; transform-style: preserve-3d; }
.emb.mini span { position: absolute; border-radius: 50%; border: 2px solid var(--copper-hi); }
.motion .emb.mini { animation: emb 12s ease-in-out infinite alternate; }
.nm-emb b { position: relative; font: 600 clamp(3rem, 2rem + 4vw, 5.5rem)/1 var(--f-display); color: var(--copper); text-shadow: 0 0 30px rgba(232, 181, 111, .7); }
.motion .tout.play .nm-emb b { animation: pop 1s 1.2s var(--ease) both; }
.nm-read { display: grid; gap: 10px; align-content: center; }
.nm-pl { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.nm-tk { color: var(--ink-3); } .nm-tr { font: 600 1.4rem/1.3 var(--f-display); color: var(--copper); }
.nm-more { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; perspective: 800px; }
.nm-more li { --rx: 0deg; --ry: 0deg; display: grid; gap: 2px; padding: 14px; background: #fbf4e8; border: 1px solid var(--rule-2); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); }
.nm-more b { font: 600 2.2rem/1 var(--f-display); color: var(--copper); } .nm-more em { font-style: normal; color: var(--ink-3); font-size: .85rem; } .nm-more small { color: var(--ink-2); }

/* ---------- matching ---------- */
.m-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 28px; align-items: center; }
.m-moon { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 22px; }
.m-moon::before { content: ""; width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8ea, #e9d2ae 55%, #b8946b); box-shadow: 0 0 40px 8px rgba(232, 190, 140, .55); }
.motion .m-moon::before { animation: orbA 6s ease-in-out infinite alternate; }
.motion #mGirl::before { animation-name: orbB; }
@keyframes orbA { to { transform: translateX(14px) scale(1.05); } } @keyframes orbB { to { transform: translateX(-14px) scale(1.05); } }
.m-moon b { font: 600 1.5rem/1.1 var(--f-display); } .m-moon span { color: var(--ink-2); }
.m-ring { --p: 0; position: relative; width: clamp(180px, 22vw, 240px); aspect-ratio: 1; display: grid; place-items: center; }
.m-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.m-ring .bg { fill: #fbf4e8; stroke: #ead6b8; stroke-width: 10; }
.m-ring .fg { fill: none; stroke: var(--copper-hi); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); transition: stroke-dashoffset 1.6s var(--ease); filter: drop-shadow(0 0 8px rgba(232, 181, 111, .7)); }
.m-ring div { position: relative; display: grid; justify-items: center; }
.m-ring b { font: 600 clamp(3rem, 2rem + 3vw, 4.4rem)/1 var(--f-display); color: var(--copper); font-variant-numeric: tabular-nums; }
.m-ring span { color: var(--ink-3); font-size: .9rem; }
.m-verdict { text-align: center; font: 600 1.4rem/1.3 var(--f-display); }
.kootas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.kootas li { display: grid; grid-template-columns: 8.5em 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.k-n { font-weight: 600; grid-row: 1; } .k-w { grid-column: 1 / -1; grid-row: 2; font-size: .82rem; color: var(--ink-3); }
.k-bar { height: 10px; background: #ead6b8; overflow: hidden; }
.k-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #c98c4a, var(--forest)); transform-origin: 0 50%; transform: scaleX(var(--f)); }
.motion .tout.play .k-bar i { animation: grow 1.2s var(--ease) both; animation-delay: calc(.4s + var(--i) * 120ms); }
.kootas b { font-variant-numeric: tabular-nums; }

/* ---------- festivals ---------- */
.fc-next { position: relative; display: grid; gap: 4px; padding: 26px 30px 26px 120px; background: var(--forest); color: var(--ivory); overflow: hidden; min-height: 110px; }
.fc-next:empty { display: none; }
.fc-next::before { content: ""; position: absolute; left: 34px; top: 50%; width: 46px; height: 58px; margin-top: -40px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(circle at 50% 70%, #fff4d6, #f2b664 50%, #e2973c); filter: drop-shadow(0 0 20px rgba(242, 182, 100, .9)); transform-origin: 50% 100%; }
.fc-next::after { content: ""; position: absolute; left: 24px; top: 50%; width: 66px; height: 26px; margin-top: 14px; border-radius: 0 0 40px 40px; background: #c98c4a; }
.motion .fc-next::before { animation: flicker 1.3s ease-in-out infinite alternate; }
.fn-k { font: 500 .8rem/1 var(--f-brand); letter-spacing: .2em; text-transform: uppercase; color: #e2b98a; }
:root:not([lang="en"]) .fn-k { font-family: var(--f-text); letter-spacing: .02em; text-transform: none; }
.fc-next b { font: 600 clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem)/1.1 var(--f-display); }
.fn-d { opacity: .85; }
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mcard { background: #fbf4e8; border: 1px solid var(--rule-2); padding: 18px; display: grid; gap: 12px; align-content: start; }
.motion .mcard { opacity: 0; transform: perspective(900px) rotateY(-24deg) translateY(30px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i) % 3 * 90ms); }
.motion .mcard.in { opacity: 1; transform: none; }
.mcard header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.mcard h3 { font: 600 1.5rem/1 var(--f-display); } .mcard header span { font-size: .78rem; color: var(--ink-3); text-align: end; }
.mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mgrid .wk { text-align: center; font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.dc { position: relative; display: grid; justify-items: center; gap: 1px; padding: 4px 0 3px; border: 1px solid transparent; font-size: .82rem; font-variant-numeric: tabular-nums; }
.dc svg { width: 13px; height: 13px; }
.dc svg circle { fill: #4a3524; } .dc svg path { fill: #f3e2c6; }
.dc.fest { background: rgba(201, 140, 74, .25); border-color: #c98c4a; font-weight: 700; }
.dc.vr::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--forest); }
.dc.today { background: var(--forest); color: var(--ivory); }
.motion .dc.today { animation: pulse 2s ease-in-out infinite; }
.mev { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.mev li { display: grid; grid-template-columns: 2em 1fr; gap: 8px; }
.mev time { font-weight: 700; color: var(--copper); font-variant-numeric: tabular-nums; }
.mev .festival span { font-weight: 600; } .mev .vrat span { color: var(--ink-2); } .mev .none { color: var(--ink-3); grid-template-columns: 1fr; }

/* ---------- transits ---------- */
.tr-out { margin-top: -50px; position: relative; z-index: 2; }
.tr-wheel-wrap, .tr-side { min-width: 0; }
.tr-wheel-wrap { overflow: clip; overflow-clip-margin: 0; padding: 4px; }
.tr-wheel { max-width: 100%; }
.tr-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; }
.tr-wheel-wrap { display: grid; gap: 14px; }
.tr-wheel { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 24px 30px rgba(59, 38, 22, .25)); }
.ws { fill: #fbf4e8; stroke: var(--rule-2); transition: fill .4s; }
.ws:nth-child(4n+1) { fill: #f3e3cb; }
.ws.moon { fill: rgba(31, 61, 50, .18); stroke: var(--forest); }
.wl { fill: var(--ink-2); font: 600 12px var(--f-text); text-anchor: middle; dominant-baseline: middle; }
.orb { fill: none; stroke: rgba(140, 90, 53, .35); stroke-dasharray: 3 4; }
.tr-wheel .earth { fill: #e9d2ae; stroke: var(--copper); }
.tp circle { stroke: #fbf4e8; stroke-width: 2; } .tp text { fill: var(--ivory); font: 700 11px var(--f-text); text-anchor: middle; }
.tp.sa circle { fill: #3b2616; } .tp.ju circle { fill: #b8845e; filter: drop-shadow(0 0 8px rgba(232, 181, 111, .8)); } .tp.ra circle { fill: var(--forest); } .tp.ke circle { fill: #6b4f3a; }
.tr-ctrl { display: flex; align-items: center; gap: 14px; }
.tr-ctrl input[type="range"] { flex: 1; accent-color: var(--copper); min-height: 44px; }
.tr-ctrl output { min-width: 9em; font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-house { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tr-house li { padding: 8px 12px; border-left: 3px solid var(--copper-hi); background: #fffaf2; }
.tr-side h3 { font: 600 1.25rem/1.2 var(--f-display); margin: 22px 0 10px; }
.tr-sade { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tr-sade li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--rule); background: #fffaf2; font-size: .92rem; }
.tr-sade li span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tr-sade li.cur { border-color: var(--forest); box-shadow: inset 4px 0 0 var(--forest); }
.tr-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tr-cols h3 { font: 600 1.5rem/1.1 var(--f-display); }
.trad { color: var(--ink-2); font-size: .92rem; margin: 8px 0 14px; padding-left: 12px; border-left: 2px solid var(--copper-hi); }
.ingl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 420px; overflow: auto; }
.ingl li { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 7px 8px; font-size: .9rem; border-bottom: 1px dotted var(--rule-2); font-variant-numeric: tabular-nums; }
.ingl li.past { opacity: .5; } .ingl li.rx span::after { content: " ℞"; color: var(--copper); }
.ingl li.next { background: var(--forest); color: var(--ivory); opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kd-wrap, .tm-wrap, .nm-wrap, .tr-wrap { grid-template-columns: minmax(0, 1fr); }
  .kd-charts { max-width: 560px; width: 100%; margin-inline: auto; }
  .months, .tr-cols, .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .antar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .to-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .t-art { width: 62vw; right: -14vw; opacity: .45; }
  .row2, .row2.pair, .chlists, .kootas { grid-template-columns: minmax(0, 1fr); }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .m-ring { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .months, .tr-cols, .tgrid { grid-template-columns: minmax(0, 1fr); }
  .tcards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chl li { grid-template-columns: 5.5em 1fr; } .chl li em { grid-column: 1 / -1; }
  .kootas li { grid-template-columns: 7em 1fr auto; }
  .fc-next { padding-left: 100px; }
  .db-y { display: none; }
}
@media (max-width: 480px) {
  .antar, .nm-more { grid-template-columns: minmax(0, 1fr); }
  .tcards { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tiles li { transform: rotateY(180deg) !important; }
  .mcard { opacity: 1 !important; transform: none !important; }
}
