/* Form and result pages. */
.result-head h1 { background: linear-gradient(120deg, #fff 40%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.k-section { margin-top: 2.5rem; scroll-margin-top: 5.5rem; }
.k-section > h2 { margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.k-section > h2::before { content: ""; width: .5rem; height: 1.4rem; border-radius: 3px; background: linear-gradient(180deg, var(--gold), var(--saffron)); }
.k-card { padding: 1.35rem; }
@media (max-width: 575.98px) { .k-card { padding: 1rem; border-radius: .85rem; } }
.section-nav { position: sticky; top: 4.1rem; z-index: 20; display: flex; gap: .25rem; overflow-x: auto; padding: .5rem .5rem; background: rgba(7, 12, 32, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 2rem; margin-bottom: .5rem; }
.section-nav a { white-space: nowrap; padding: .35rem .85rem; border-radius: 2rem; color: var(--ink-2); text-decoration: none; font-size: .9rem; transition: background .2s, color .2s; }
.section-nav a:hover, .section-nav a:focus-visible { background: rgba(246, 198, 91, .15); color: var(--gold-2); }
.k-stat { padding: 1.05rem 1.25rem; transition: transform .3s ease, border-color .3s; }
.k-stat:hover { transform: translateY(-3px); border-color: rgba(246, 198, 91, .45); }
.k-stat-label { font-size: .78rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
html[lang="hi"] .k-stat-label, html[lang="hi"] .section-label { letter-spacing: 0; text-transform: none; font-size: .92rem; }
.k-stat-value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--gold-2); line-height: 1.3; margin: .15rem 0; }
.k-stat-meta { font-size: .85rem; color: var(--ink-2); }
.info-list .info-row { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.info-list .info-row:last-child { border-bottom: 0; }
.info-list dt { font-weight: 400; color: var(--ink-2); font-size: .85rem; }
.info-list dd { margin: 0; color: var(--ink); }
.section-label { color: var(--gold); letter-spacing: .12em; }

/* Tables (Bootstrap dark theme supplies base colours) */
.k-table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); --bs-table-hover-bg: rgba(116, 208, 255, .06); margin-bottom: .5rem; }
.k-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); white-space: nowrap; border-bottom-color: var(--line-strong); }
html[lang="hi"] .k-table thead th { text-transform: none; letter-spacing: 0; font-size: .92rem; }
.k-lagna-row { background: rgba(246, 198, 91, .1); }
.k-card > .table-responsive {
    background:
        linear-gradient(to right, var(--glass-solid) 30%, rgba(17, 27, 70, 0)) 0 0 / 40px 100% no-repeat local,
        linear-gradient(to left, var(--glass-solid) 30%, rgba(17, 27, 70, 0)) 100% 0 / 40px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)) 0 0 / 12px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)) 100% 0 / 12px 100% no-repeat scroll;
}
.k-table-sticky tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--glass-solid); white-space: nowrap; }
.k-table-sticky tr.k-lagna-row th[scope="row"] { background: #1b2250; }
@media (max-width: 575.98px) { .k-table { font-size: .82rem; } .k-table > :not(caption) > * > * { padding: .3rem .45rem; } }
.planet-card { padding: 1rem 1.1rem; transition: transform .3s, border-color .3s; }
.planet-card:hover { transform: translateY(-3px); border-color: rgba(116, 208, 255, .5); }

/* North Indian chart */
.chart-card { display: flex; justify-content: center; }
.kc-chart { width: 100%; max-width: 520px; height: auto; display: block; }
.kc-cell { fill: rgba(8, 14, 40, .55); stroke: var(--gold); stroke-width: 1.5; stroke-linejoin: round; transition: fill .25s; }
.kc-house:hover .kc-cell { fill: rgba(116, 208, 255, .12); }
.kc-lagna .kc-cell { fill: rgba(246, 198, 91, .16); animation: lagna-pulse 3.2s ease-in-out infinite; }
.kc-sign { fill: var(--ink-3); font-weight: 600; }
.kc-hnum { fill: #7480b3; }
.kc-planets { fill: var(--ink); font-weight: 700; }
.kc-asc { fill: var(--gold-2); font-weight: 700; }
.kc-retro { fill: var(--saffron); font-weight: 600; }
.kc-p-sun { fill: #ffc861; } .kc-p-moon { fill: #e8eeff; } .kc-p-mars { fill: #ff7d6e; } .kc-p-mercury { fill: var(--green); }
.kc-p-jupiter { fill: #ffb454; } .kc-p-venus { fill: #ffc4e0; } .kc-p-saturn { fill: #9db0ff; } .kc-p-rahu, .kc-p-ketu { fill: var(--violet); }
.kc-blank .kc-cell { fill: transparent; stroke: rgba(246, 198, 91, .55); animation: none; }
.kc-blank .kc-sign { fill: rgba(246, 198, 91, .5); font-size: 20px; }
@keyframes lagna-pulse { 0%, 100% { fill: rgba(246, 198, 91, .12); } 50% { fill: rgba(246, 198, 91, .26); } }

/* Dasha */
.dasha-now { background: linear-gradient(135deg, rgba(246, 198, 91, .14), rgba(116, 208, 255, .08)); border: 1px solid rgba(246, 198, 91, .4); border-radius: 1rem; padding: 1rem 1.25rem; }
.dasha-progress { width: 100%; height: .55rem; accent-color: var(--gold); }
.dasha-item { border: 1px solid var(--line); border-radius: .8rem; padding: .65rem .9rem; margin-bottom: .5rem; background: rgba(255, 255, 255, .03); transition: border-color .2s, background .2s; }
.dasha-item:hover { border-color: var(--line-strong); }
.dasha-item.is-current { border-color: var(--gold); background: rgba(246, 198, 91, .08); }
.dasha-item > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }

/* Interpretation */
.interp-block { margin-bottom: 1.4rem; }
.interp-block:last-child { margin-bottom: 0; }
.interp-block h3 { color: var(--gold-2); }
.interp-list { margin: 0; padding-left: 1.1rem; }
.interp-list li { margin-bottom: .5rem; }
.interp-list li::marker { color: var(--gold); }

/* How it was produced */
.how-steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1rem; }
.how-steps::before { content: ""; position: absolute; left: .55rem; top: .6rem; bottom: .6rem; width: 2px; background: linear-gradient(180deg, var(--cyan), var(--gold), transparent); opacity: .6; }
.how-step { position: relative; padding-left: 2.1rem; }
.how-step::before { content: ""; position: absolute; left: 0; top: .35rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--sky-1); border: 2px solid var(--gold); box-shadow: 0 0 12px rgba(246, 198, 91, .6); }
.how-step.is-sample { border: 1px dashed var(--saffron); border-radius: .8rem; padding: .7rem .9rem .7rem 2.1rem; background: rgba(255, 154, 74, .07); }
.how-step.is-sample::before { top: .95rem; border-color: var(--saffron); }

/* Form pages */
.narrow-card { max-width: 46rem; margin: 0 auto; padding: 2rem; }
@media (max-width: 575.98px) { .narrow-card { padding: 1.25rem; } }
.form-section { margin-bottom: 1.5rem; }
.section-label { margin-bottom: 1rem; }
.place-status.is-selected { color: var(--green); }
.is-invalid { border-color: var(--rose) !important; }
.invalid-feedback { color: var(--rose); }
