/* =====================================================================
   Astromitra — Sacred Fire · Vedic Editorial
   Design system v3.0 · Paper (light) + Midnight (dark) themes
   ===================================================================== */

:root {
    --ink: #2A160E;
    --maroon: #7B1112;
    --maroon-dark: #5C0C0D;
    --indigo: var(--maroon);
    --indigo-dark: var(--maroon-dark);
    --violet: #9A3412;
    --violet-light: #E8915C;
    --gold: #C8943F;
    --gold-glow: #E8B55E;
    --gold-light: #FDF0DD;
    --gold-surface: #FCF5E9;
    --saffron: #D9480F;
    --saffron-deep: #B03A0B;
    --saffron-glow: #F08A1D;
    --paper: #FBF5EA;
    --paper-subtle: #F5ECDA;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 251, 243, 0.88);
    --muted: #7A5C48;
    --line: #EAD9C0;
    --line-subtle: #F0E7D3;
    --success: #19784E;
    --danger: #B8203B;
    --shadow-sm: 0 4px 12px rgba(90, 32, 8, 0.05);
    --shadow: 0 14px 34px rgba(90, 32, 8, 0.08);
    --shadow-lg: 0 24px 56px rgba(90, 32, 8, 0.13);
    --cta: var(--saffron);
    --cta-hover: var(--saffron-deep);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* A single overwide child (bare min-width table, translated fixed panel, etc.)
   must never push the whole document sideways on a phone — clip at the root.
   `clip` (unlike `hidden`) does not create a scroll container, so position:sticky
   keeps working; `hidden` remains the fallback where clip is unsupported. */
html, body { overflow-x: hidden; }
@supports (overflow: clip) {
    html, body { overflow-x: clip; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.6 'Manrope', 'Noto Sans Devanagari', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.35s ease, color 0.35s ease;
}

a { color: inherit; }

::selection { background: rgba(224, 92, 10, 0.22); }

:focus-visible { outline: 3px solid rgba(217, 72, 15, 0.5); outline-offset: 2px; }

[id] { scroll-margin-top: 96px; }

/* =====================================================================
   Header — glassmorphic observatory bar
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: var(--surface-glass);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.header-inner {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font: 800 21px/1 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand img {
    background: var(--indigo);
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 4px 14px rgba(123, 17, 18, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.4s var(--spring);
}

.brand:hover img { transform: rotate(14deg) scale(1.06); }

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-tagline {
    color: var(--muted);
    font-size: 13.5px;
    margin: 0;
    font-weight: 500;
}

.lang-pill {
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--indigo);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 7px 13px;
    border-radius: 999px;
    transition: all 0.18s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.lang-pill:hover {
    border-color: var(--gold);
    background: var(--gold-light);
    transform: translateY(-1px);
}

.user-chip {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--indigo), var(--indigo-dark));
    color: #F3E9D2;
    font: 700 14px/1 'Bricolage Grotesque', 'Noto Sans Devanagari', sans-serif;
    box-shadow: 0 4px 12px rgba(123, 17, 18, 0.3);
    flex-shrink: 0;
}

.theme-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--indigo);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s var(--spring);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--gold);
    transform: rotate(18deg) scale(1.05);
    color: var(--gold);
}

.theme-toggle svg { position: absolute; transition: opacity 0.22s ease, transform 0.3s var(--spring); }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="midnight"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="midnight"] .theme-toggle .icon-sun { opacity: 1; transform: none; }

/* =====================================================================
   Navigation
   ===================================================================== */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.nav-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.16s ease, color 0.16s ease;
    white-space: nowrap;
}

.nav-link:hover { background: var(--gold-light); color: var(--indigo-dark); }

.nav-link-admin {
    color: var(--violet);
    border: 1px solid rgba(154, 52, 18, 0.25);
}

.nav-link-btn {
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.nav-logout { margin: 0; }

.nav-group { position: relative; }

.nav-group-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.nav-caret {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.nav-group::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-group:hover .nav-caret,
.nav-group:focus-within .nav-caret { transform: rotate(225deg) translateY(2px); }

.nav-group-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 252px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.24s var(--spring), visibility 0.18s;
    z-index: 40;
}

.nav-group:hover .nav-group-panel,
.nav-group:focus-within .nav-group-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-link {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.14s ease;
}

.nav-drop-link:hover { background: var(--gold-light); }
.nav-drop-link strong { font-size: 13.5px; font-weight: 700; color: var(--indigo); }
.nav-drop-link small { font-size: 12px; color: var(--muted); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 20px;
    border-radius: 999px;
    background: var(--cta);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(123, 17, 18, 0.24);
    transition: all 0.24s var(--spring);
    white-space: nowrap;
}

.nav-cta:hover { background: var(--cta-hover); transform: translateY(-1px); }

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
}

.nav-mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--indigo);
    transition: transform 0.24s var(--spring), opacity 0.18s ease;
}

.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   Layout container
   ===================================================================== */
.container {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
    padding: 44px 0 80px;
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero, .result-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
    gap: 48px;
    align-items: center;
    padding: 24px 0 54px;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -160px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 40%, rgba(224, 92, 10, 0.16), transparent 55%),
        radial-gradient(circle at 65% 60%, rgba(200, 148, 63, 0.14), transparent 62%);
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}

.hero-compact { padding: 28px 0 8px; }

.eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--violet);
    margin: 0 0 10px;
    text-transform: uppercase;
}

.eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 17px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--saffron-glow), var(--saffron));
    border: 0;
    color: #FFF7EC;
    box-shadow: 0 6px 18px rgba(217, 72, 15, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font: 700 11px/1 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 18px;
    width: fit-content;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(200, 148, 63, 0.5);
    animation: pulseDot 2.4s ease-out infinite;
    flex-shrink: 0;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(200, 148, 63, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(200, 148, 63, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 148, 63, 0); }
}

.hero h1, .result-hero h1, .report-header h1 {
    font: 800 clamp(38px, 5.2vw, 66px)/1.02 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.045em;
    margin: 0;
    max-width: 780px;
    color: var(--indigo);
    text-wrap: balance;
}

.hero h1, .result-hero h1 {
    background: linear-gradient(115deg, var(--maroon) 20%, var(--saffron) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-glyph { color: var(--gold); }

.lead {
    font-size: 18.5px;
    color: var(--muted);
    max-width: 640px;
    margin: 18px 0;
    line-height: 1.6;
}

.lead a { color: var(--violet); font-weight: 600; }

.text-link {
    color: var(--violet);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: var(--indigo);
    font-size: 13.5px;
    font-weight: 600;
}

.hero-notes i { color: var(--gold); font-style: normal; }

.hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

.result-hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 26px;
    flex-wrap: wrap;
}

/* ---- Astrolabe hero card ---- */
.hero-card {
    align-self: stretch;
    background:
        radial-gradient(420px 300px at 85% -10%, rgba(232, 181, 94, 0.18), transparent 60%),
        radial-gradient(360px 260px at 0% 110%, rgba(217, 72, 15, 0.3), transparent 60%),
        linear-gradient(150deg, #57180E 0%, #1C0905 100%);
    color: #fff;
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../img/starfield.jpg') center 40%/cover no-repeat;
    opacity: 0.24;
    pointer-events: none;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px dashed rgba(230, 179, 90, 0.3);
    border-radius: 50%;
    right: -110px;
    bottom: -140px;
    animation: slowSpin 60s linear infinite;
}

@keyframes slowSpin { to { transform: rotate(360deg); } }

.hero-card-top { position: relative; z-index: 1; }

.hero-telemetry-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #F3E9D2;
    font: 600 10.5px/1 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.hero-telemetry-tag .pulse-dot { background: var(--gold-glow); }

.astrolabe-wrap {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    place-items: center;
    padding: 18px 0;
}

.astrolabe-svg {
    width: min(230px, 70%);
    height: auto;
    animation: astrolabeFloat 7s ease-in-out infinite;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.35));
}

@keyframes astrolabeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-9px) rotate(2.5deg); }
}

.hero-card-Bottom { position: relative; z-index: 1; margin-top: auto; }

.hero-card p {
    font: 400 25px/1.25 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
}

.hero-card p strong { color: #F7CE7E; }

.hero-card-meta {
    display: block;
    margin-top: 12px;
    font: 500 12px/1.5 'Manrope', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.04em;
}

/* =====================================================================
   Stat strip
   ===================================================================== */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 28px 4px 32px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 40px;
}

.stat-item { display: grid; gap: 3px; }

.stat-item strong {
    font: 700 clamp(30px, 3.4vw, 42px)/1 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.stat-item span { font-size: 14px; font-weight: 600; color: var(--ink); }
.stat-item small { font-size: 12.5px; color: var(--muted); }

/* =====================================================================
   Live sky strip — always-midnight observatory band
   ===================================================================== */
.sky-strip {
    position: relative;
    overflow: hidden;
    margin: 8px 0 44px;
    padding: 30px 34px 32px;
    border-radius: 28px;
    background:
        radial-gradient(620px 240px at 88% -50%, rgba(200, 148, 63, 0.24), transparent 62%),
        radial-gradient(520px 280px at 8% 130%, rgba(217, 72, 15, 0.38), transparent 62%),
        linear-gradient(150deg, #4A0E0E 0%, #1C0905 100%);
    color: #F7EDE0;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: var(--shadow-lg);
}

.sky-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 30%, rgba(255, 255, 255, 0.8), transparent 60%),
        radial-gradient(1px 1px at 34% 64%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(1.6px 1.6px at 56% 18%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 72% 76%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1.3px 1.3px at 89% 36%, rgba(255, 255, 255, 0.65), transparent 60%),
        radial-gradient(1px 1px at 45% 86%, rgba(255, 255, 255, 0.45), transparent 60%),
        radial-gradient(1.2px 1.2px at 25% 12%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1px 1px at 64% 52%, rgba(255, 255, 255, 0.4), transparent 60%),
        radial-gradient(1.4px 1.4px at 8% 8%, rgba(255, 255, 255, 0.6), transparent 60%);
    pointer-events: none;
    animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: 0.75; } to { opacity: 1; } }

.sky-head {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.sky-head .eyebrow { color: var(--gold-glow); margin-bottom: 8px; }
.sky-head h2 { margin: 0; font: 700 clamp(22px, 2.6vw, 30px)/1.15 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: #fff; }

.sky-head-right { display: grid; gap: 6px; justify-items: end; }

.sky-meta { margin: 0; font-size: 13px; font-weight: 600; color: rgba(247, 237, 224, 0.72); }

.sky-link {
    font-size: 12.5px;
    font-weight: 700;
    color: #F7CE7E;
    text-decoration: none;
    border-bottom: 1px solid rgba(247, 206, 126, 0.4);
    padding-bottom: 2px;
    transition: border-color 0.18s ease;
}

.sky-link:hover { border-color: #F7CE7E; }

.sky-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.sky-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease, transform 0.25s var(--spring);
}

.sky-item:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-3px); }

.sky-item dt {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(247, 237, 224, 0.58);
    margin-bottom: 7px;
}

.sky-item dt span { color: var(--gold-glow); margin-right: 4px; }

.sky-item dd {
    margin: 0;
    font: 700 16.5px/1.3 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: #fff;
}

.sky-item dd small {
    display: block;
    font: 500 11.5px/1.4 'Manrope', system-ui, sans-serif;
    color: rgba(247, 237, 224, 0.6);
    margin-top: 4px;
}

/* =====================================================================
   Action cards
   ===================================================================== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 44px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--ink);
    position: relative;
    overflow: hidden;
    transition: transform 0.26s var(--spring), box-shadow 0.24s ease, border-color 0.24s ease;
}

.action-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(200, 148, 63, 0.12), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--gold);
}

.action-card:hover::after { opacity: 1; }
.action-card:active { transform: translateY(-1px) scale(0.98); }

.action-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(145deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    border: 0;
    box-shadow: 0 6px 16px rgba(217, 72, 15, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.3s var(--spring);
}

.action-card:hover .action-icon { transform: scale(1.08) rotate(-4deg); }
.action-icon svg { width: 22px; height: 22px; }
.action-text { display: grid; gap: 3px; min-width: 0; }
.action-text strong { font: 700 15px/1.25 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.action-text small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.action-arrow { margin-left: auto; color: var(--gold); font-weight: 700; transition: transform 0.24s var(--spring); }
.action-card:hover .action-arrow { transform: translateX(4px); }

/* =====================================================================
   Activity ticker
   ===================================================================== */
.activity-ticker {
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding: 11px 0;
    margin-bottom: 28px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.activity-ticker-track {
    display: flex;
    gap: 38px;
    width: max-content;
    animation: ticker 44s linear infinite;
}

.activity-ticker:hover .activity-ticker-track { animation-play-state: paused; }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.ticker-item i { color: var(--gold); font-style: normal; font-size: 11px; }

@keyframes ticker { to { transform: translateX(-50%); } }

/* =====================================================================
   Section headings
   ===================================================================== */
.section-heading h2 {
    font: 700 clamp(24px, 2.8vw, 34px)/1.14 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    margin: 0;
    text-wrap: balance;
}

.section-heading h3 {
    font: 700 20px/1.2 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    margin: 0;
}

.section-heading p:not(.eyebrow) {
    color: var(--muted);
    margin: 8px 0 0;
    font-size: 15px;
    max-width: 680px;
}

/* Closing call-to-action band */
.cta-final {
    text-align: center;
    padding: 24px 0 12px;
}

.cta-final .eyebrow { color: var(--saffron-deep); }

.cta-final h2 {
    font: 800 clamp(30px, 3.6vw, 46px)/1.06 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.04em;
    color: var(--indigo);
    margin: 0;
}

.cta-final p:not(.eyebrow) {
    color: var(--muted);
    font-size: 16px;
    margin: 12px auto 0;
    max-width: 560px;
}

.cta-final .hero-actions { justify-content: center; margin-top: 22px; }

/* Legal pages */
.legal-stack { display: grid; gap: 18px; margin-bottom: 40px; }

.legal-block { padding: 26px 28px; }

.legal-block h2 {
    font: 700 19px/1.2 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.02em;
    color: var(--indigo);
    margin: 0 0 8px;
}

.legal-block p { color: var(--muted); font-size: 15px; margin: 0; }

/* Share-card preview on /share/{id} */
.share-card-preview {
    margin: 0 auto 28px;
    max-width: 720px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}

.share-card-preview img { display: block; width: 100%; height: auto; }

.count-pill {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--gold-glow), var(--gold));
    color: #241A08;
    font: 700 14px/1 'Manrope', sans-serif;
    vertical-align: middle;
    margin-left: 8px;
    box-shadow: 0 4px 10px rgba(200, 148, 63, 0.35);
}

/* =====================================================================
   Dashboard — saved Kundalis
   ===================================================================== */
.dashboard-shell {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 32px 34px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.dashboard-empty {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 18px;
    padding: 56px 34px;
}

.empty-state-art { color: var(--gold); opacity: 0.75; }
.empty-state-art svg { width: 84px; height: 84px; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dashboard-search .input-icon > input {
    min-width: 280px;
    max-width: 380px;
    height: 46px;
    border-radius: 999px;
    font-size: 14px;
    padding: 8px 16px 8px 42px;
}

.kundali-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}

.kundali-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--gold-surface) 160%);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.28s var(--spring), box-shadow 0.24s ease, border-color 0.24s ease;
    position: relative;
    overflow: hidden;
}

.kundali-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--saffron), var(--gold-glow), var(--saffron));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kundali-card:hover {
    border-color: rgba(200, 148, 63, 0.5);
    box-shadow: 0 16px 34px rgba(200, 148, 63, 0.14), var(--shadow-sm);
    transform: translateY(-4px);
}

.kundali-card:hover::before { opacity: 1; }

.kundali-card-identity { display: flex; align-items: center; gap: 14px; }

.kundali-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--saffron), var(--maroon));
    color: #FFF3E0;
    font: 700 18px/1 'Bricolage Grotesque', 'Noto Sans Devanagari', sans-serif;
    box-shadow: 0 6px 14px rgba(123, 17, 18, 0.28);
}

.kundali-card-name {
    margin: 0;
    font: 700 18px/1.25 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.kundali-card-name a { text-decoration: none; transition: color 0.16s ease; }
.kundali-card-name a:hover { color: var(--gold); }

.kundali-card-date {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.kundali-card-place {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    color: var(--ink);
    margin: 14px 0 10px;
    font-weight: 500;
}

.kundali-card-place svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }

.kundali-card-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-pill {
    display: grid;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--paper-subtle);
    border: 1px solid var(--line-subtle);
    flex: 1;
    min-width: 110px;
}

.stat-pill small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.stat-pill strong { font-size: 13.5px; color: var(--indigo); font-weight: 700; }

.kundali-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--line-subtle);
}

/* =====================================================================
   Buttons & chips
   ===================================================================== */
.button-chip {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--indigo);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.button-chip:hover {
    background: var(--gold-light);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.button-chip-primary {
    background: var(--cta);
    color: #fff;
    border-color: var(--cta);
}

.button-chip-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }

.button-chip-danger {
    color: var(--danger);
    border-color: rgba(184, 32, 59, 0.25);
    padding: 7px 10px;
}

.button-chip-danger:hover {
    background: rgba(184, 32, 59, 0.08);
    border-color: var(--danger);
}

.delete-inline-form { display: inline; margin: 0; }

.button-primary {
    border: 0;
    border-radius: 12px;
    min-height: 48px;
    padding: 12px 26px;
    background: var(--cta);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    font: 700 15px/1 'Manrope', 'Noto Sans Devanagari', system-ui, sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(123, 17, 18, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.button-primary:hover {
    background: var(--cta-hover);
    box-shadow: 0 10px 28px rgba(123, 17, 18, 0.35);
    transform: translateY(-1px);
}

.button-secondary {
    border: 1.5px solid #E4C6A0;
    border-radius: 999px;
    min-height: 48px;
    padding: 12px 24px;
    color: var(--maroon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
    background: #FDF6EA;
    white-space: nowrap;
}

.button-secondary:hover {
    background: var(--gold-light);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.button-gold {
    border: 0;
    border-radius: 999px;
    min-height: 50px;
    padding: 14px 30px;
    background: linear-gradient(180deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font: 800 15px/1 'Manrope', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 10px 26px rgba(217, 72, 15, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.2s var(--spring), box-shadow 0.2s ease, filter 0.2s ease;
}

.button-gold:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(217, 72, 15, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.button-gold:active { transform: scale(0.97); }
.button-gold:disabled { filter: saturate(0.4); opacity: 0.75; }

.button-primary:active,
.button-secondary:active,
.button-chip:active,
.nav-cta:active,
.city-chip:active { transform: scale(0.97); }

.button-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--violet);
    font: 700 14px/1 'Manrope', system-ui, sans-serif;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.logout-form { margin-top: 24px; }

/* =====================================================================
   Panels, forms, inputs
   ===================================================================== */
.form-shell, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.form-shell { padding: 38px; }
.panel { padding: 30px; }

.form-shell-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.form-accuracy-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--gold-surface);
    border: 1px solid rgba(200, 148, 63, 0.3);
    color: #79571b;
    font: 600 12px/1 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.accuracy-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 148, 63, 0.18);
}

.birth-form { margin-top: 28px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.birth-form label, .stacked-form label {
    display: grid;
    gap: 7px;
    font-weight: 600;
    font-size: 14px;
    color: var(--indigo);
}

input, select, textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid #E0CBAE;
    background: var(--surface);
    border-radius: 14px;
    padding: 10px 14px;
    font: inherit;
    color: var(--ink);
    transition: border 0.16s, box-shadow 0.16s;
}

input::placeholder, textarea::placeholder { color: #A08B77; }

input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(224, 92, 10, 0.24);
    border-color: var(--saffron);
}

.field-error {
    color: var(--danger);
    font-size: 14px;
    margin: 12px 0 0;
    font-weight: 500;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.form-actions p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    max-width: 600px;
}

.stacked-form { display: grid; gap: 14px; }
.stacked-form input { min-height: 44px; padding: 10px 14px; }

.helper { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

.field-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin: 4px 0 0;
}

.field-hint { color: var(--muted); font-size: 11.5px; font-weight: 500; }

.field-block { display: grid; gap: 7px; align-content: start; }

.field-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--indigo);
}

.birth-form .field-block { font-weight: 600; font-size: 14px; color: var(--indigo); }

/* Password visibility toggle */
.input-pw { position: relative; }

.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--violet);
    font: 700 11px/1 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: color 0.16s ease, background 0.16s ease;
}

.pw-toggle:hover { color: var(--indigo); background: var(--gold-light); }

.input-pw input { padding-right: 64px; }

/* Icon-prefixed inputs */
.input-icon { position: relative; display: block; }

.input-icon > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #B59477;
    pointer-events: none;
    transition: color 0.18s ease;
}

.input-icon > input, form .input-icon > select { padding-left: 42px; }

.input-icon:focus-within > svg { color: var(--gold); }

/* Place autocomplete */
.place-autocomplete { position: relative; }

.place-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.place-suggest[hidden] { display: none; }

.place-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    border-radius: var(--radius-sm);
    font: 600 13.5px/1.3 'Manrope', system-ui, sans-serif;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    transition: background 0.14s ease;
}

.place-option:hover, .place-option.active { background: var(--gold-light); }
.place-option small { color: var(--muted); font-weight: 500; }

/* Segmented gender pill */
.seg-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--line-subtle);
    border: 1px solid var(--line);
    border-radius: 999px;
    min-height: 48px;
}

.seg-option { position: relative; flex: 1; }

.seg-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    border: 0;
    cursor: pointer;
    z-index: 1;
}

.seg-option span {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.24s var(--spring);
}

.seg-option:hover span { color: var(--indigo); }

.seg-option input:checked + span {
    background: linear-gradient(160deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    box-shadow: 0 4px 12px rgba(217, 72, 15, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.seg-option input:focus-visible + span {
    outline: 2px solid var(--indigo);
    outline-offset: 2px;
}

/* City quick-prefill */
.city-picker-bar {
    margin: 20px 0 26px;
    padding: 16px 18px;
    background: var(--gold-surface);
    border: 1px solid var(--gold-light);
    border-radius: 14px;
}

.city-picker-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #79571b;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.city-picker-label svg { width: 13px; height: 13px; }

.city-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.city-chip {
    background: var(--surface);
    border: 1px solid rgba(200, 148, 63, 0.35);
    color: #63430f;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.city-chip:hover, .city-chip.active {
    background: linear-gradient(160deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    border-color: transparent;
    box-shadow: 0 5px 14px rgba(217, 72, 15, 0.32);
    transform: translateY(-1px);
}

/* Submit bar */
.match-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line-subtle);
    flex-wrap: wrap;
}

.match-submit-bar .form-note {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    max-width: 560px;
}

/* =====================================================================
   Metric cards
   ===================================================================== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.metric-grid > article, .metric-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-width: 0;
    transition: transform 0.26s var(--spring), box-shadow 0.24s ease, border-color 0.24s ease;
}

.metric-grid > article::before, .metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent 70%);
    opacity: 0.7;
}

.metric-grid > article:hover, .metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(200, 148, 63, 0.4);
}

.metric-grid p {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--violet);
    margin: 0 0 8px;
    text-transform: uppercase;
}

.metric-grid p span { color: var(--gold); margin-right: 4px; }

.metric-grid strong {
    display: block;
    font: 700 26px/1.15 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.metric-grid small {
    display: block;
    color: var(--muted);
    margin-top: 8px;
    font-size: 13.5px;
}

/* Kaal cards inside panchang metric-grid */
.kaal-card p { margin: 0 0 6px; }
.kaal-grid .kaal-card strong + p { color: var(--danger); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.kaal-grid .kaal-card.kaal-good strong + p { color: var(--success); }
.kaal-grid .kaal-card.is-now {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-light), var(--shadow-sm);
}

/* =====================================================================
   Split layout & detail lists
   ===================================================================== */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 24px;
}

.split > * { min-width: 0; }

.detail-list { margin: 18px 0 0; }

.detail-list div {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-subtle);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.detail-list div:last-child { border-bottom: 0; }

.detail-list dt {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--violet);
    flex-shrink: 0;
}

.detail-list dd {
    margin: 0;
    color: var(--ink);
    font-weight: 500;
    text-align: right;
    font-size: 14.5px;
}

.detail-list-wide div { padding: 10px 0; }

.panel-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* =====================================================================
   Charts — viewport, controls, inspector
   ===================================================================== */
.chart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.chart-panel-header .section-heading h3 { font-size: 22px; }

.chart-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.segmented-control {
    display: inline-flex;
    background: var(--line-subtle);
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.seg-btn {
    border: 0;
    background: transparent;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.seg-btn.active {
    background: var(--surface);
    color: var(--indigo);
    box-shadow: 0 2px 6px rgba(90, 32, 8, 0.1);
}

.chart-viewport {
    width: 100%;
    margin-top: 14px;
}

.chart-container { display: none; }
.chart-container.active { display: block; animation: chartFade 0.35s ease; }

@keyframes chartFade {
    from { opacity: 0; transform: scale(0.985); }
    to { opacity: 1; transform: scale(1); }
}

.kundali-chart {
    display: block;
    width: min(100%, 440px);
    margin: 0 auto;
    overflow: visible;
}

.chart-frame { fill: #FDFBF4; stroke: #7B1112; stroke-width: 0.85; }
.chart-lines { fill: none; stroke: #A67C2E; stroke-width: 0.65; }
.chart-house { transition: opacity 0.2s ease; }
.chart-viewport.dim-houses .chart-house:not(.house-hot) { opacity: 0.42; }
.chart-house text { text-anchor: middle; }
.chart-rashi-num { font: 700 4.2px 'Bricolage Grotesque', 'Manrope', sans-serif; fill: #967027; }
.chart-planets { font: 600 3.1px 'Manrope', Arial, sans-serif; fill: #7B1112; }
.chart-retro { font-size: 2.2px; fill: #B4233D; }
.chart-lagna-badge { font: 700 2.6px 'Manrope', sans-serif; letter-spacing: 0.05em; fill: #C8943F; text-anchor: middle; }
.chart-lagna-wash { pointer-events: none; }

.chart-box-cell { fill: none; stroke: none; }
.chart-center-cell { fill: #F6EBD2; stroke: #A67C2E; stroke-width: 0.5; }
.chart-center-title { font: 700 3.6px 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; fill: #7B1112; text-anchor: middle; }
.chart-center-sub { font: 600 2.4px 'Manrope', sans-serif; letter-spacing: 0.08em; fill: #E8915C; text-anchor: middle; }
.chart-south-sign-name { font: 700 2.8px 'Manrope', sans-serif; fill: #9A8A76; text-anchor: middle; }
.chart-south-planets { font: 600 3.1px 'Manrope', sans-serif; fill: #7B1112; text-anchor: middle; }
.chart-lagna-line { stroke: #C8943F; stroke-width: 0.8; }
.chart-south-lagna { font: 700 2.6px 'Manrope', sans-serif; fill: #C8943F; }

.chart-inspector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--gold-surface);
    border: 1px dashed rgba(200, 148, 63, 0.4);
    color: #63430f;
    font-size: 13px;
    font-weight: 500;
    min-height: 46px;
}

.chart-inspector strong { color: var(--indigo); font-weight: 700; }
.inspector-dot { color: var(--gold); font-size: 14px; }

/* =====================================================================
   Report layout
   ===================================================================== */
.report-header { padding: 0 0 32px; }

.report-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.report-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-hero-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.report-hero-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stat-pill {
    display: grid;
    gap: 3px;
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    min-width: 118px;
}

.hero-stat-pill small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--violet);
}

.hero-stat-pill strong {
    font: 700 17px/1.2 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.report-sub {
    color: var(--muted);
    font-size: 14px;
    margin: 10px 0 0;
}

.report-nav {
    position: sticky;
    top: calc(var(--header-h) + 10px);
    z-index: 15;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    scrollbar-width: thin;
}

.report-nav a {
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--indigo);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

.report-nav a:hover { background: var(--gold-light); border-color: var(--gold); }

.report-nav a.active {
    background: var(--cta);
    color: #fff;
    border-color: var(--cta);
    box-shadow: 0 4px 10px rgba(123, 17, 18, 0.25);
}

.report-section { margin-top: 48px; }
.report-section > .panel { margin-top: 16px; }

/* =====================================================================
   Tables
   ===================================================================== */
.table-wrap, .table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.table-wrap { margin-top: 16px; }
.table-scroll { margin-top: 14px; }
.panel .table-scroll:first-of-type { margin-top: 18px; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

/* Inside two-column split panels the 640px table minimum would clip the last
   column — let these smaller tables fit their card instead. */
.split .table-wrap table { min-width: 0; }
.split .table-wrap th, .split .table-wrap td { padding: 11px 9px; font-size: 13.5px; }
.split .table-wrap thead { font-size: 11.5px; letter-spacing: 0.03em; }
.split .strength-meter-cell { gap: 6px; }
.split .strength-bar-svg { width: 44px; }
.split .planet-orb { width: 24px; height: 24px; font-size: 11px; }

th, td {
    text-align: left;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line-subtle);
    font-size: 14.5px;
    vertical-align: top;
}

thead {
    background: var(--paper-subtle);
    color: var(--indigo);
    font-size: 12.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

thead th { font-weight: 700; vertical-align: bottom; }

tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.16s ease; }
tbody tr:hover { background: rgba(200, 148, 63, 0.045); }

tfoot th, tfoot td {
    background: var(--gold-surface);
    font-weight: 700;
    border-top: 2px solid var(--gold);
    border-bottom: 0;
}

.planet-cell { display: inline-flex; align-items: center; gap: 9px; }
.planet-title { font-weight: 700; color: var(--indigo); }

.planet-orb {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font: 700 12px/1 'Manrope', sans-serif;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 6px rgba(90, 32, 8, 0.12);
}

.pb-sun { background: radial-gradient(circle at 32% 28%, #FCD34D, #D97706); color: #fff; }
.pb-moon { background: radial-gradient(circle at 32% 28%, #EADDC8, #A98F7E); color: #7B1112; }
.pb-mars { background: radial-gradient(circle at 32% 28%, #F87171, #B91C1C); color: #fff; }
.pb-mercury { background: radial-gradient(circle at 32% 28%, #86EFAC, #059669); color: #fff; }
.pb-jupiter { background: radial-gradient(circle at 32% 28%, #FCD34D, #B45309); color: #fff; }
.pb-venus { background: radial-gradient(circle at 32% 28%, #F9A8D4, #DB2777); color: #fff; }
.pb-saturn { background: radial-gradient(circle at 32% 28%, #A5B4FC, #4338CA); color: #fff; }
.pb-rahu { background: radial-gradient(circle at 32% 28%, #8A7060, #3B2417); color: #fff; }
.pb-ketu { background: radial-gradient(circle at 32% 28%, #E0D5C2, #6E5B4E); color: #fff; }
.pb-asc { background: radial-gradient(circle at 32% 28%, var(--gold-glow), var(--gold)); color: #241A08; }
.pb-default { background: radial-gradient(circle at 32% 28%, #C4B5FD, #7C3AED); color: #fff; }

.pada-pill, .house-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--paper-subtle);
    border: 1px solid var(--line);
    font: 700 11.5px/1.4 ui-monospace, 'Cascadia Code', monospace;
    color: var(--indigo);
    white-space: nowrap;
}

.numeric {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}

.dense-table td, .dense-table th { padding: 7px 9px; font-size: 12.5px; white-space: nowrap; }

.flag-dosha { color: var(--danger); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; }
.flag-ok { color: var(--success); font-size: 11.5px; font-weight: 600; }

/* =====================================================================
   Status badges
   ===================================================================== */
.status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-exalted { background: rgba(200, 148, 63, 0.15); color: #8C6016; border: 1px solid rgba(200, 148, 63, 0.4); }
.badge-debilitated { background: rgba(184, 32, 59, 0.1); color: var(--danger); border: 1px solid rgba(184, 32, 59, 0.3); }
.badge-own { background: rgba(123, 17, 18, 0.1); color: var(--indigo); border: 1px solid rgba(123, 17, 18, 0.25); }
.badge-moola { background: rgba(154, 52, 18, 0.1); color: var(--violet); border: 1px solid rgba(154, 52, 18, 0.25); }
.badge-friendly { background: rgba(25, 120, 78, 0.1); color: var(--success); border: 1px solid rgba(25, 120, 78, 0.25); }
.badge-enemy { background: rgba(122, 92, 72, 0.1); color: var(--muted); border: 1px solid rgba(122, 92, 72, 0.2); }
.badge-neutral { background: var(--line-subtle); color: var(--muted); }
.badge-combust { background: rgba(220, 80, 30, 0.12); color: #C44010; border: 1px solid rgba(220, 80, 30, 0.3); }
.badge-retro { background: rgba(200, 148, 63, 0.12); color: #9C6C1B; }
.badge-strong { background: rgba(25, 120, 78, 0.12); color: #176541; }
.badge-moderate { background: rgba(200, 148, 63, 0.15); color: #8C6016; }
.badge-standard { background: rgba(154, 52, 18, 0.1); color: var(--violet); }
.badge-cancelled { background: var(--line-subtle); color: #8F7C6C; text-decoration: line-through; }
.badge-review { background: rgba(184, 32, 59, 0.1); color: var(--danger); }
.badge-mitigated { background: rgba(25, 120, 78, 0.12); color: #176541; }
.badge-info { background: rgba(154, 52, 18, 0.1); color: var(--violet); }
.badge-danger { background: rgba(184, 32, 59, 0.1); color: var(--danger); }

/* =====================================================================
   Rule cards (yogas & doshas)
   ===================================================================== */
.rule-list-enhanced {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    gap: 14px;
}

.rule-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    background: linear-gradient(180deg, var(--surface), var(--paper-subtle) 180%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.24s var(--spring);
}

.rule-card:hover {
    border-color: rgba(200, 148, 63, 0.45);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.rule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.rule-card-header strong { font-size: 15.5px; color: var(--indigo); }

.rule-card-desc, .rule-card-evidence {
    font-size: 13.5px;
    color: var(--ink);
    margin: 4px 0 6px;
}

.rule-card-cancel {
    font-size: 12.5px;
    background: var(--gold-light);
    border-radius: 8px;
    padding: 7px 10px;
    color: #63430f;
    margin: 6px 0;
}

.rule-card-id {
    font-size: 11.5px;
    color: var(--muted);
    font-family: ui-monospace, monospace;
}

.empty { color: var(--muted); font-size: 14px; font-style: italic; }

.notice {
    margin-top: 36px;
    border-left: 4px solid var(--gold);
    background: var(--gold-surface);
    padding: 18px 22px;
    border-radius: 0 14px 14px 0;
    color: #553e16;
    font-size: 14px;
    line-height: 1.55;
}

/* =====================================================================
   Strength meters (Shadbala / Koota)
   ===================================================================== */
.strength-meter-cell { display: flex; align-items: center; gap: 10px; }

.strength-bar-svg { flex-shrink: 0; }
.strength-bar-track { fill: var(--line-subtle); }
.strength-bar-fill { fill: var(--gold); }
.fill-strong { fill: var(--success); }
.fill-low { fill: var(--danger); }

.rank-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font: 700 12px/1.4 ui-monospace, monospace;
}

.rank-gold { background: rgba(200, 148, 63, 0.16); color: #8C6016; }
.rank-silver { background: rgba(122, 92, 72, 0.12); color: var(--muted); }
.rank-normal { background: var(--line-subtle); color: var(--muted); }

/* Ashtakavarga bindu cards */
.sav-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.sav-card {
    display: grid;
    gap: 2px;
    padding: 12px 10px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform 0.22s var(--spring), box-shadow 0.2s ease;
}

.sav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.sav-sign { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sav-pts { font: 700 21px/1 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.sav-card small { font-size: 10px; color: var(--muted); }

.bindu-high { background: linear-gradient(180deg, rgba(25, 120, 78, 0.1), var(--surface)); border-color: rgba(25, 120, 78, 0.35); }
.bindu-high .sav-pts { color: var(--success); }
.bindu-mid { background: linear-gradient(180deg, rgba(200, 148, 63, 0.1), var(--surface)); border-color: rgba(200, 148, 63, 0.35); }
.bindu-mid .sav-pts { color: #8C6016; }
.bindu-low { background: var(--surface); }
.bindu-low .sav-pts { color: var(--muted); }

.yogini-code { font-weight: 600; color: var(--muted); font-size: 11px; }

/* =====================================================================
   Match pages
   ===================================================================== */
.score-panel { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 34px 24px; }

.score-ring { position: relative; width: 168px; height: 168px; display: grid; place-content: center; }
.score-ring-svg { position: absolute; inset: 0; }
.score-ring-track { fill: none; stroke: var(--line-subtle); stroke-width: 10; }
.score-ring-arc { fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round; }
.verdict-excellent .score-ring-arc { stroke: var(--success); }
.verdict-good .score-ring-arc { stroke: var(--gold); }
.verdict-acceptable .score-ring-arc { stroke: var(--violet); }
.verdict-low .score-ring-arc { stroke: var(--danger); }
.score-ring strong, .score-ring > span { position: relative; z-index: 1; }
.score-ring strong { font: 700 34px/1 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.score-ring strong small { font-size: 16px; color: var(--muted); }
.score-ring > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.score-verdict { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }

.koota-full { color: var(--success); font-weight: 700; }
.koota-part { color: var(--gold); font-weight: 700; }
.koota-low { color: var(--danger); font-weight: 700; }
.koota-remark { font-size: 13px; color: var(--muted); white-space: normal; min-width: 220px; }
.match-row-actions { display: flex; gap: 8px; align-items: center; }

.match-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 20px;
    margin-top: 26px;
    align-items: start;
}

.match-vs-badge {
    align-self: center;
    justify-self: center;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--indigo), var(--indigo-dark));
    color: #F7CE7E;
    box-shadow: 0 10px 26px rgba(123, 17, 18, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    margin-top: 60px;
}

.match-vs-badge span { font-size: 18px; line-height: 1; }
.match-vs-badge small { font: 700 8.5px/1 'Manrope', sans-serif; letter-spacing: 0.18em; color: rgba(247, 206, 126, 0.8); }

.partner-card {
    position: relative;
    border: 1px solid var(--line-subtle);
    border-radius: 22px;
    padding: 26px 26px 20px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--gold-surface) 145%);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 12px;
    align-content: start;
    transition: transform 0.28s var(--spring), box-shadow 0.28s ease, border-color 0.28s ease;
}

.partner-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--line);
}

.partner-card:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(200, 148, 63, 0.14), var(--shadow);
}

.partner-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.partner-id { display: flex; align-items: center; gap: 13px; }

.partner-glyph {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, var(--gold-glow), var(--gold));
    color: #fff;
    font-size: 21px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(200, 148, 63, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.partner-card-head .eyebrow { margin: 0; }

.partner-card-head h3 {
    margin: 2px 0 0;
    font: 700 21px/1.15 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.partner-picker {
    display: grid;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.partner-picker select {
    width: auto;
    min-width: 218px;
    min-height: 38px;
    border-radius: 999px;
    padding: 7px 34px 7px 16px;
    background: var(--gold-light);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    color: var(--indigo);
    box-shadow: var(--shadow-sm);
}

.partner-card .form-grid { gap: 15px 16px; }
.partner-card input[type="number"] { font-variant-numeric: tabular-nums; }

.partner-hint {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

/* =====================================================================
   AI astrologer (explanations + Q&A sidebar)
   ===================================================================== */
.ai-answer { padding: 26px 28px; line-height: 1.75; }
.ai-answer h3, .ai-answer h4 { color: var(--indigo); font-family: 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; margin: 20px 0 8px; }
.ai-answer p { margin: 0 0 12px; }
.ai-answer ul { margin: 0 0 14px; padding-left: 22px; }
.ai-answer li { margin-bottom: 6px; }

.ai-lang-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 10px;
}

.ai-explanation-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: -8px 0 18px;
}

.ai-explain-form { max-width: 520px; }
.ai-explain-form select { min-height: 44px; padding: 10px 14px; }

.qa-fab {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border: none;
    border-radius: 999px;
    background: var(--cta);
    color: #fff;
    font: 600 14.5px/1 'Manrope', sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(123, 17, 18, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.qa-fab span { color: var(--gold-glow); font-size: 15px; }

.qa-fab:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(123, 17, 18, 0.42);
}

.kundali-qa {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 48px rgba(90, 32, 8, 0.16);
    z-index: 70;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.kundali-qa.open { transform: translateX(0); }

.qa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line-subtle);
    background: linear-gradient(180deg, var(--gold-surface), var(--surface));
}

.qa-header .eyebrow { margin: 0 0 2px; }
.qa-header h2 { margin: 0; font-size: 20px; color: var(--indigo); }

.qa-close {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.16s ease, border-color 0.16s ease, transform 0.2s var(--spring);
}

.qa-close:hover { color: var(--indigo); border-color: var(--gold); transform: rotate(90deg); }

.qa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qa-msg {
    max-width: 88%;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.55;
    animation: msgIn 0.28s var(--spring);
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.qa-msg p { margin: 0; white-space: pre-wrap; }
.qa-msg p + p, .qa-msg p + ul, .qa-msg ul + p, .qa-msg h3 + p, .qa-msg h4 + p { margin-top: 8px; }
.qa-msg ul { margin: 8px 0 0; padding-left: 18px; }
.qa-msg li { margin-bottom: 4px; }
.qa-msg h3, .qa-msg h4 { margin: 10px 0 4px; font-size: 14.5px; color: var(--indigo); }
.qa-msg strong { color: var(--indigo); }

.qa-msg-user {
    align-self: flex-end;
    background: var(--cta);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.qa-msg-user strong, .qa-msg-user h3, .qa-msg-user h4 { color: #fff; }

.qa-msg-assistant {
    align-self: flex-start;
    background: var(--gold-surface);
    border: 1px solid var(--line-subtle);
    border-bottom-left-radius: 4px;
}

.qa-msg-error {
    align-self: stretch;
    max-width: 100%;
    background: rgba(184, 32, 59, 0.08);
    color: var(--danger);
    border: 1px solid rgba(184, 32, 59, 0.25);
    font-size: 13px;
}

.qa-msg-pending p { color: var(--muted); font-style: italic; }

.qa-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px 0;
}

.qa-chip {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--violet);
    cursor: pointer;
    transition: all 0.16s ease;
    font-family: inherit;
}

.qa-chip:hover { border-color: var(--gold); background: var(--gold-light); }

.qa-form { padding: 12px 14px 14px; border-top: 1px solid var(--line-subtle); }

.qa-input-row { display: flex; gap: 8px; align-items: flex-end; }

.qa-form textarea {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    min-height: 42px;
    resize: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
}

.qa-lang {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--indigo);
    background: var(--surface);
}

.qa-send {
    border: none;
    border-radius: 12px;
    background: var(--cta);
    color: #fff;
    width: 42px;
    height: 42px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.2s var(--spring);
    flex-shrink: 0;
}

.qa-send:hover { background: var(--cta-hover); transform: scale(1.06); }
.qa-send:disabled { opacity: 0.5; cursor: default; transform: none; }

.qa-offline {
    padding: 14px 18px;
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    border-top: 1px solid var(--line-subtle);
}

.qa-billing {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    border-top: 1px solid var(--line-subtle);
}

.qa-billing a { color: var(--violet); font-weight: 600; }

/* Site-wide support bot — the same chat chrome as the Kundali Q&A panel,
   mirrored onto the left edge so both can coexist on a report page. */
.support-fab {
    right: auto;
    left: 26px;
}

.support-qa {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--line);
    box-shadow: 18px 0 48px rgba(90, 32, 8, 0.16);
    transform: translateX(-100%);
}

/* Live voice consultation bar (Gemini Live API, ephemeral token sessions) */

.qa-live {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px 0;
}

.qa-live-cta {
    background: linear-gradient(180deg, var(--gold-glow), var(--gold));
    border-color: transparent;
    color: #241A08;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(200, 148, 63, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.qa-live-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.qa-live-cta.qa-live-on {
    background: linear-gradient(180deg, #e2574b, #b93a30);
    color: #fff;
    box-shadow: 0 8px 20px rgba(185, 58, 48, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.qa-live-lang {
    min-height: 34px;
    border-radius: 999px;
    padding: 6px 10px;
}

.qa-live-lang:disabled { opacity: 0.55; }

.qa-live-send {
    border-color: var(--gold);
    color: var(--gold);
}

.qa-live-send:hover { border-color: var(--cta); background: var(--gold-light); }
.qa-live-send[hidden] { display: none; }

/* Mobile call screen: JS moves .qa-live under <body> and adds .qa-live-call.
   On desktop/inactive the face wrapper is transparent (display:contents) so
   the normal bar layout is untouched; its children stay hidden. */

.qa-call-face { display: contents; }
.qa-call-avatar, .qa-call-name, .qa-call-role, .qa-call-timer { display: none; }

body.qa-call-lock { overflow: hidden; }

.qa-live.qa-live-call {
    position: fixed;
    inset: 0;
    z-index: 300;
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px 24px calc(40px + env(safe-area-inset-bottom));
    background: radial-gradient(130% 100% at 50% 0%, #4A140E 0%, #33160D 52%, #1A0C06 100%);
}

.qa-live.qa-live-call .qa-call-face {
    order: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.qa-live.qa-live-call .qa-call-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #f4d488, #c99a3a);
    color: #4a3405;
    font-size: 52px;
    font-family: 'Noto Serif Devanagari', serif;
    box-shadow: 0 0 0 10px rgba(201, 154, 58, 0.16), 0 0 0 22px rgba(201, 154, 58, 0.06);
    margin-bottom: 14px;
}

.qa-live.qa-live-call[data-tone="listening"] .qa-call-avatar,
.qa-live.qa-live-call[data-tone="speaking"] .qa-call-avatar,
.qa-live.qa-live-call[data-tone="connecting"] .qa-call-avatar {
    animation: qa-call-pulse 1.8s ease-in-out infinite;
}

@keyframes qa-call-pulse {
    0%, 100% { box-shadow: 0 0 0 10px rgba(201, 154, 58, 0.16), 0 0 0 22px rgba(201, 154, 58, 0.06); }
    50% { box-shadow: 0 0 0 18px rgba(201, 154, 58, 0.28), 0 0 0 36px rgba(201, 154, 58, 0.1); }
}

.qa-live.qa-live-call .qa-call-name {
    display: block;
    font: 700 26px/1.2 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: #fff;
    letter-spacing: 0.03em;
}

.qa-live.qa-live-call .qa-call-role {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

.qa-live.qa-live-call .qa-call-timer {
    display: block;
    font: 600 15px/1 'Manrope', sans-serif;
    color: #D9BFA4;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

.qa-live.qa-live-call .qa-live-status { font-size: 15px; color: #F2C9A0; min-height: 20px; }
.qa-live.qa-live-call .qa-live-status[data-tone="listening"] { color: #F0A860; }
.qa-live.qa-live-call .qa-live-status[data-tone="speaking"] { color: var(--gold-glow); }
.qa-live.qa-live-call .qa-live-status[data-tone="error"] { color: #ff9d94; }
.qa-live.qa-live-call .qa-live-status[data-tone="warn"] { color: #f0c46a; }

.qa-live.qa-live-call .qa-live-btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
}

.qa-live.qa-live-call .qa-live-btn.qa-live-on {
    background: #c2332f;
    color: #fff;
}

.qa-live.qa-live-call .qa-live-btn.qa-live-on:hover { background: #a92b27; }
.qa-live.qa-live-call .qa-live-btn.qa-live-on .qa-live-icon { animation: none; }

.qa-live.qa-live-call .qa-live-send {
    background: var(--gold);
    color: #2a1d04;
}

.qa-live.qa-live-call .qa-live-send:hover { background: var(--gold-glow); }
.qa-live.qa-live-call .qa-live-lang { display: none; }

/* In-call controls (mute / audio route). Outside the call screen they stay
   hidden — the wrapper is transparent to the normal bar layout. */
.qa-call-controls { display: contents; }
.qa-live-callctl { display: none; }

.qa-live.qa-live-call .qa-call-controls {
    order: 1;
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}

.qa-live.qa-live-call .qa-call-controls .qa-live-btn {
    width: auto;
    max-width: none;
    flex: 1;
    padding: 13px 8px;
    font-size: 13px;
    justify-content: center;
}

.qa-live.qa-live-call .qa-live-callctl { display: inline-flex; }

.qa-live.qa-live-call .qa-live-callctl[aria-pressed="true"] {
    background: var(--gold);
    color: #2a1d04;
    border-color: transparent;
}

/* The red End call action sits at the bottom of the call screen, under the
   in-call controls — the way phone dialers lay it out. */
.qa-live.qa-live-call [data-live-toggle] { order: 2; }

.qa-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--indigo);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.16s ease;
}

.qa-live-btn:hover { border-color: var(--gold); background: var(--gold-light); }

.qa-live-icon { font-size: 14px; }

.qa-live-btn.qa-live-on {
    border-color: var(--cta);
    background: var(--cta);
    color: #fff;
}

.qa-live-btn.qa-live-on:hover { background: var(--cta-hover); }

.qa-live-btn.qa-live-on .qa-live-icon { animation: qa-live-pulse 1.6s ease-in-out infinite; }

@keyframes qa-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.qa-live-status {
    font-size: 11.5px;
    color: var(--muted);
    min-height: 14px;
}

.qa-live-status[data-tone="listening"] { color: var(--violet); }
.qa-live-status[data-tone="speaking"] { color: var(--gold); }
.qa-live-status[data-tone="error"] { color: #b3261e; }
.qa-live-status[data-tone="warn"] { color: #8a5a00; }

/* =====================================================================
   Auth screens
   ===================================================================== */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 64px;
    align-items: center;
    min-height: calc(100vh - 320px);
    padding: 30px 0 20px;
}

.auth-intro h1 {
    font: 700 clamp(38px, 5.2vw, 60px)/1.06 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.04em;
    color: var(--indigo);
    margin: 0;
}

.auth-benefits {
    padding: 0;
    margin: 30px 0 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.auth-benefits li {
    display: grid;
    gap: 3px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--gold);
}

.auth-benefits strong { font-size: 14.5px; color: var(--indigo); }
.auth-benefits span { font-size: 13px; color: var(--muted); }

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 22px;
    padding: 34px;
    display: grid;
    gap: 18px;
}

.auth-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-subtle);
}

.auth-card-head img { border-radius: 12px; background: var(--indigo); padding: 4px; }
.auth-card-head .eyebrow { margin: 0 0 2px; }
.auth-card-head h2 { margin: 0; font: 700 22px/1.2 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }

.auth-card label {
    display: grid;
    gap: 7px;
    color: var(--indigo);
    font-size: 14px;
    font-weight: 700;
}

.auth-card .button-primary { justify-content: center; margin-top: 6px; }

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.auth-card a { color: var(--violet); font-weight: 700; }

.auth-cta { width: 100%; justify-content: center; margin-top: 6px; }

/* =====================================================================
   Flash messages
   ===================================================================== */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    animation: msgIn 0.3s var(--spring);
}

.flash-icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    flex-shrink: 0;
}

.flash-success { background: #E9F7F0; color: var(--success); border-color: #BEE3D1; }
.flash-success .flash-icon { background: var(--success); color: #fff; }
.flash-error { background: #FBEEE6; color: var(--danger); border-color: #F5CDB8; }
.flash-error .flash-icon { background: var(--danger); color: #fff; }
.flash-info { background: rgba(154, 52, 18, 0.08); color: var(--violet); border-color: rgba(154, 52, 18, 0.25); }
.flash-info .flash-icon { background: var(--violet); color: #fff; }

/* =====================================================================
   Engine feature grid (landing)
   ===================================================================== */
.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 40px 0;
}

.engine-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.engine-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 148, 63, 0.1), transparent 70%);
    pointer-events: none;
}

.engine-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(200, 148, 63, 0.4);
}

.engine-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.engine-num {
    font: 700 12px/1 ui-monospace, 'Cascadia Code', monospace;
    color: var(--gold);
    letter-spacing: 0.12em;
}

.engine-glyph {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--gold-surface), var(--gold-light));
    border: 1px solid rgba(200, 148, 63, 0.25);
    color: var(--gold);
    font-size: 17px;
}

.engine-card h3 { margin: 0 0 6px; font: 700 17px/1.3 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.engine-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Principles (how it works) */
.principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.principles article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    border-radius: 16px;
    padding: 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s var(--spring), box-shadow 0.2s ease;
}

.principles article:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.step-badge {
    display: inline-block;
    font: 700 10.5px/1 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.14em;
    color: var(--gold);
    background: var(--gold-light);
    border: 1px solid rgba(200, 148, 63, 0.3);
    padding: 6px 12px;
    border-radius: 999px;
}

.principles h2 {
    font: 700 22px/1.15 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    margin: 14px 0 8px;
}

.principles p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }

/* Trust band */
.trust-band {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 32px;
    padding: 38px 0 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.trust-band span { display: inline-flex; align-items: center; gap: 9px; }
.trust-band i { color: var(--gold); font-style: normal; font-size: 9px; }

/* =====================================================================
   Panchang page
   ===================================================================== */
.panchang-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 22px 26px;
}

.panchang-picker {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.panchang-picker label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font: 700 12px/1 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--violet);
}

.panchang-picker select,
.panchang-picker input {
    width: auto;
    min-width: 220px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--paper);
}

.panchang-picker input { min-width: 150px; }

.panchang-picker select:focus,
.panchang-picker input:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.day-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.button-chip.active {
    background: var(--cta);
    color: #fff;
    border-color: var(--cta);
}

.chip-glyph { color: var(--gold); margin-right: 2px; }
.button-chip.active .chip-glyph { color: var(--gold-glow); }

.tl-item {
    display: inline-block;
    margin: 2px 14px 2px 0;
    font-weight: 600;
    color: var(--indigo);
}

.tl-item small { color: var(--muted); font-weight: 500; }
.tl-item:last-child { margin-right: 0; }

.now-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-glow), var(--gold));
    color: #241A08;
    font: 700 10px/1.5 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

tr.is-now td, tr.is-now th { background: var(--gold-light); }

.nature-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.nature-auspicious { background: rgba(25, 120, 78, 0.12); color: var(--success); }
.nature-neutral { background: var(--line-subtle); color: var(--muted); }
.nature-inauspicious { background: rgba(184, 32, 59, 0.1); color: var(--danger); }

.engine-note {
    margin: 18px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

/* =====================================================================
   Sign tiles & cards (horoscope / calculators)
   ===================================================================== */
.sign-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.sign-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform 0.2s var(--spring), box-shadow 0.18s ease, border-color 0.18s ease;
}

.sign-tile:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: var(--shadow);
}

.sign-tile-glyph {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: var(--gold-surface);
    border: 1px solid rgba(200, 148, 63, 0.25);
    color: var(--gold);
    font-size: 19px;
    transition: transform 0.26s var(--spring);
}

.sign-tile:hover .sign-tile-glyph { transform: scale(1.1) rotate(-6deg); }

.sign-tile-text { display: grid; gap: 2px; min-width: 0; }
.sign-tile strong { font: 700 17px/1.2 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.sign-tile small { color: var(--muted); font-size: 12px; }
.sign-tile .action-arrow { margin-left: auto; }

.sign-tile-moon {
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--surface), var(--gold-surface));
    box-shadow: 0 0 0 2px rgba(200, 148, 63, 0.2), var(--shadow-sm);
}

.sign-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 6px;
    position: relative;
}

.sign-card-glyph {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 34px;
    color: var(--gold);
    opacity: 0.3;
}

.sign-card p {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--violet);
    margin: 0 0 6px;
}

.sign-card strong { font: 700 30px/1.1 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.sign-card small { color: var(--muted); font-size: 13px; }
.sign-card-primary { border-color: var(--gold) !important; box-shadow: 0 0 0 2px var(--gold-light), var(--shadow) !important; }

.horoscope-prose p { line-height: 1.7; }
.horoscope-prose strong { color: var(--indigo); }

.sign-switcher { margin-bottom: 24px; }

form .form-grid select {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--surface);
}

form .form-grid select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

/* =====================================================================
   Admin console
   ===================================================================== */
.admin-body { background: var(--paper); }

.admin-shell {
    display: grid;
    grid-template-columns: 232px 1fr;
    gap: 28px;
    width: min(1320px, calc(100% - 40px));
    margin-inline: auto;
    padding: 32px 0 80px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 96px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 12px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 4px;
}

.admin-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 10px 8px;
}

.admin-nav-link {
    display: block;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    padding: 10px 14px;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav-link:hover { background: var(--gold-light); }

.admin-nav-link.active {
    background: var(--cta);
    color: #fff;
    box-shadow: 0 4px 12px rgba(123, 17, 18, 0.25);
}

.admin-sidebar-foot {
    margin-top: 14px;
    padding: 12px 10px 4px;
    border-top: 1px solid var(--line-subtle);
    display: grid;
    gap: 2px;
}

.admin-sidebar-foot small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-sidebar-foot span {
    font-size: 12px;
    color: var(--indigo);
    font-weight: 600;
    word-break: break-all;
}

.admin-main { min-width: 0; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--gold);
    transition: transform 0.22s var(--spring), box-shadow 0.2s ease;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat-card p { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.stat-card strong { font-size: 30px; color: var(--indigo); display: block; line-height: 1.1; font-family: 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif; }
.stat-card small { color: var(--muted); font-size: 12px; }

.admin-create-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 2fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.admin-create-form input, .admin-create-form select,
.inline-form select, .inline-form input {
    min-height: 40px;
    width: auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13.5px;
    background: var(--surface);
}

.admin-create-form input, .admin-create-form select { width: 100%; }

.inline-form { display: inline-flex; gap: 6px; margin: 0; align-items: center; flex-wrap: wrap; }
.inline-form input[type="password"] { width: 150px; }

.actions-cell { min-width: 240px; }
.actions-cell .button-chip { margin: 2px 0; }

.settings-form { display: grid; gap: 20px; }
.settings-panel { padding: 26px; }

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
    margin: 10px 0;
}

.check-row input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--indigo); }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    background: var(--paper-subtle);
}

.footer-inner {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    padding: 30px 0;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font: 700 16px/1 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.footer-brand img { border-radius: 8px; }

.footer-brand small {
    display: block;
    margin-top: 4px;
    font: 500 11.5px/1.4 'Manrope', system-ui, sans-serif;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color 0.16s ease; }
.footer-links a:hover { color: var(--gold); }
.footer-note { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }

/* =====================================================================
   Motion: reveals, stagger, submission state
   ===================================================================== */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js [data-reveal].is-visible { opacity: 1; transform: none; }

html.js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
html.js .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
html.js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.07s; }
html.js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.12s; }
html.js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.17s; }
html.js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.22s; }
html.js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.27s; }
html.js .reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.32s; }
html.js .reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.37s; }
html.js .reveal-stagger.is-visible > *:nth-child(n+9) { transition-delay: 0.42s; }

/* AJAX form submission feedback (app.js .is-submitting) */
form.is-submitting {
    opacity: 0.72;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

form.is-submitting :is(button, input[type=submit]) { cursor: progress; }

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(122, 92, 72, 0.28); border-radius: 6px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: rgba(200, 148, 63, 0.55); }

/* =====================================================================
   Midnight theme
   ===================================================================== */
[data-theme="midnight"] {
    --ink: #F5E9DC;
    --maroon: #F0A868;
    --maroon-dark: #E8A05C;
    --indigo: var(--maroon);
    --indigo-dark: var(--maroon-dark);
    --violet: #E8915C;
    --violet-light: #D97F45;
    --gold: #DEB064;
    --gold-glow: #EDC57F;
    --gold-light: rgba(222, 176, 100, 0.12);
    --gold-surface: #2A1812;
    --saffron: #F08A1D;
    --saffron-deep: #D9480F;
    --saffron-glow: #F7A84A;
    --paper: #150B07;
    --paper-subtle: #1F120C;
    --surface: #251410;
    --surface-glass: rgba(31, 18, 12, 0.82);
    --muted: #B39B8C;
    --line: #43291A;
    --line-subtle: #3A2414;
    --success: #4FD69B;
    --danger: #F0728B;
    --cta: var(--saffron-deep);
    --cta-hover: var(--saffron);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

[data-theme="midnight"] body {
    background-color: var(--paper);
    background-image:
        radial-gradient(1.2px 1.2px at 12% 22%, rgba(255, 255, 255, 0.28), transparent 60%),
        radial-gradient(1px 1px at 38% 58%, rgba(255, 255, 255, 0.2), transparent 60%),
        radial-gradient(1.4px 1.4px at 62% 14%, rgba(255, 255, 255, 0.24), transparent 60%),
        radial-gradient(1px 1px at 82% 42%, rgba(255, 255, 255, 0.18), transparent 60%),
        radial-gradient(1.2px 1.2px at 55% 78%, rgba(255, 255, 255, 0.2), transparent 60%),
        radial-gradient(1px 1px at 90% 86%, rgba(255, 255, 255, 0.22), transparent 60%),
        radial-gradient(1px 1px at 28% 90%, rgba(255, 255, 255, 0.16), transparent 60%),
        radial-gradient(900px 520px at 50% -8%, rgba(160, 60, 12, 0.22), transparent 70%);
    background-attachment: fixed;
}

[data-theme="midnight"] .eyebrow-pill {
    background: rgba(222, 176, 100, 0.09);
    border-color: rgba(222, 176, 100, 0.3);
    color: var(--gold-glow);
}

[data-theme="midnight"] .brand img,
[data-theme="midnight"] .user-chip,
[data-theme="midnight"] .kundali-avatar,
[data-theme="midnight"] .match-vs-badge {
    background: linear-gradient(145deg, #8C2410, #4A140E);
}

[data-theme="midnight"] .auth-card-head img { background: #57180E; }

[data-theme="midnight"] input,
[data-theme="midnight"] select,
[data-theme="midnight"] textarea {
    border-color: #4A2C1B;
    background: #1F120C;
    color: var(--ink);
}

[data-theme="midnight"] input::placeholder,
[data-theme="midnight"] textarea::placeholder { color: #8A7263; }

[data-theme="midnight"] .hero::before {
    background: radial-gradient(circle, rgba(222, 176, 100, 0.14), transparent 65%);
}

[data-theme="midnight"] .kundali-card,
[data-theme="midnight"] .partner-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--gold-surface) 160%);
}

[data-theme="midnight"] .chart-frame { fill: #2E1A10; stroke: #E8A05C; }
[data-theme="midnight"] .chart-lines { stroke: #8A4A2E; }
[data-theme="midnight"] .chart-rashi-num { fill: #DCB268; }
[data-theme="midnight"] .chart-planets { fill: #F5E4D4; }
[data-theme="midnight"] .chart-retro { fill: #F38BA0; }
[data-theme="midnight"] .chart-lagna-badge, [data-theme="midnight"] .chart-south-lagna { fill: #EDC57F; }
[data-theme="midnight"] .chart-lagna-line { stroke: #EDC57F; }
[data-theme="midnight"] .chart-center-cell { fill: #2C1A12; stroke: #8A4A2E; }
[data-theme="midnight"] .chart-center-title { fill: #F5E4D4; }
[data-theme="midnight"] .chart-south-sign-name { fill: #B39B8C; }
[data-theme="midnight"] .chart-south-planets { fill: #F5E4D4; }

[data-theme="midnight"] .chart-inspector {
    color: var(--gold-glow);
    background: rgba(222, 176, 100, 0.07);
}

[data-theme="midnight"] .form-accuracy-badge { color: var(--gold-glow); }
[data-theme="midnight"] .city-picker-label { color: var(--gold-glow); }
[data-theme="midnight"] .city-chip { color: var(--gold-glow); }
[data-theme="midnight"] .rule-card-cancel { color: var(--gold-glow); }
[data-theme="midnight"] .notice { color: var(--gold-glow); }
[data-theme="midnight"] .step-badge { color: var(--gold-glow); }

[data-theme="midnight"] .badge-exalted,
[data-theme="midnight"] .badge-moderate,
[data-theme="midnight"] .badge-retro,
[data-theme="midnight"] .koota-part,
[data-theme="midnight"] .bindu-mid .sav-pts,
[data-theme="midnight"] .rank-gold { color: var(--gold-glow); }

[data-theme="midnight"] .badge-debilitated,
[data-theme="midnight"] .badge-combust,
[data-theme="midnight"] .badge-review,
[data-theme="midnight"] .badge-danger,
[data-theme="midnight"] .koota-low,
[data-theme="midnight"] .nature-inauspicious { color: var(--danger); }

[data-theme="midnight"] .badge-own { background: rgba(240, 168, 104, 0.12); border-color: rgba(240, 168, 104, 0.3); }

[data-theme="midnight"] .flash-success {
    background: rgba(79, 214, 155, 0.1);
    border-color: rgba(79, 214, 155, 0.3);
    color: var(--success);
}

[data-theme="midnight"] .flash-error {
    background: rgba(240, 114, 139, 0.1);
    border-color: rgba(240, 114, 139, 0.3);
    color: var(--danger);
}

[data-theme="midnight"] .flash-info {
    background: rgba(232, 145, 92, 0.1);
    border-color: rgba(232, 145, 92, 0.3);
    color: var(--violet);
}

[data-theme="midnight"] .qa-msg-assistant { background: var(--gold-surface); }
[data-theme="midnight"] .seg-btn.active { background: #2C1A12; }
[data-theme="midnight"] .input-icon > svg { color: #9A8A76; }
[data-theme="midnight"] .theme-toggle { color: var(--gold-glow); }

[data-theme="midnight"] .panchang-picker select,
[data-theme="midnight"] .panchang-picker input { background: var(--paper-subtle); }

/* =====================================================================
   Reduced motion
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
    .activity-ticker-track { animation: none; }
    html.js [data-reveal], html.js .reveal-stagger > * { opacity: 1; transform: none; }
    .astrolabe-svg, .hero-card::after, .pulse-dot { animation: none; }
}

/* =====================================================================
   Public-domain celestial artwork
   ===================================================================== */
/* Framed gallery plates (Cellarius, Harmonia Macrocosmica 1660) */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 40px 0;
}

.archive-plate {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
}

.archive-plate:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.archive-plate img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3.1;
    object-fit: cover;
    object-position: center;
    border-bottom: 1px solid var(--line-subtle);
}

.archive-plate figcaption {
    display: grid;
    gap: 3px;
    padding: 15px 18px 17px;
}

.archive-plate figcaption strong {
    font: 700 15px/1.3 'Bricolage Grotesque', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.archive-plate figcaption small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* Antique constellation card thumb inside horoscope sign tiles */
.sign-tile-art {
    width: 58px;
    height: 44px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--paper-subtle);
    flex-shrink: 0;
    transition: transform 0.35s var(--spring);
}

.sign-tile:hover .sign-tile-art { transform: scale(1.08) rotate(-2deg); }

.sign-tile-glyph-inline { color: var(--gold); }

/* Framed celestial plate inside the dark hero card */
.hero-art-frame {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 16px 0;
}

.hero-art-frame img {
    width: 100%;
    max-height: 265px;
    object-fit: cover;
    object-position: center 32%;
    border-radius: 14px;
    border: 1px solid rgba(230, 179, 90, 0.45);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

/* Celestial print under the auth benefits list */
.auth-art {
    margin: 28px 0 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.auth-art img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    object-position: center 30%;
}

.auth-art figcaption {
    padding: 10px 16px;
    border-top: 1px solid var(--line-subtle);
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.footer-art-credit {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

/* =====================================================================
   Print
   ===================================================================== */
@media print {
    .site-header, .site-footer, .qa-fab, .kundali-qa, .support-fab, .support-qa,
    .report-nav, .nav-mobile-toggle, .activity-ticker { display: none !important; }
    body { background: #fff; }
    .panel, .form-shell, .dashboard-shell, .metric-grid > article { box-shadow: none; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1080px) {
    .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sky-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sign-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero, .result-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hero-card { min-height: 300px; }
    .admin-shell { grid-template-columns: 200px 1fr; }
}

@media (max-width: 980px) {
    .nav-mobile-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        padding: 12px 20px 18px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }

    .site-nav.nav-open { display: flex; }
    .nav-link { padding: 12px 14px; }
    .nav-group::after { display: none; }

    .nav-group-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        padding: 0 0 0 12px;
        display: none;
    }

    .nav-group:hover .nav-group-panel,
    .nav-group:focus-within .nav-group-panel { display: grid; }

    .nav-cta { justify-content: center; margin-top: 8px; }
    .split { grid-template-columns: minmax(0, 1fr); }
    .auth-shell { grid-template-columns: minmax(0, 1fr); gap: 36px; min-height: 0; }
    .match-pair { grid-template-columns: minmax(0, 1fr); }
    .match-vs-badge { margin-top: 0; }
    .sav-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .principles { grid-template-columns: minmax(0, 1fr); }
    .archive-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 12px;
    }
    .admin-sidebar-label, .admin-sidebar-foot { width: 100%; }
    .admin-create-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 640px) {
    :root { --header-h: 64px; }
    .header-inner { width: min(100% - 28px, 1220px); }
    .header-right { gap: 8px; }
    .header-tagline, .user-chip { display: none; }
    .brand { font-size: 18px; }
    .brand img { width: 30px; height: 30px; }
    .container { width: min(100% - 28px, 1220px); padding: 28px 0 56px; }
    .hero, .result-hero { padding: 12px 0 34px; }
    .hero h1, .result-hero h1, .report-header h1 { font-size: clamp(30px, 9vw, 40px); }
    .lead { font-size: 16px; }
    .hero-actions .button-primary, .hero-actions .button-gold,
    .hero-actions .button-secondary { width: 100%; justify-content: center; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
    .sky-strip { padding: 22px 18px; }
    .sky-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .action-grid { grid-template-columns: minmax(0, 1fr); }
    .metric-grid { grid-template-columns: minmax(0, 1fr); }
    .sign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-shell { padding: 24px 20px; }
    .panel { padding: 22px 18px; }
    .dashboard-shell { padding: 22px 18px; }
    .dashboard-header { flex-direction: column; align-items: stretch; }
    .dashboard-search .input-icon > input { min-width: 0; max-width: none; }
    .kundali-card-grid { grid-template-columns: minmax(0, 1fr); }
    .report-hero-banner { flex-direction: column; align-items: stretch; }
    .report-hero-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-nav { top: calc(var(--header-h) + 6px); }
    th, td { padding: 10px 12px; font-size: 13px; }
    table { min-width: 560px; }
    .sav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .partner-card { padding: 20px 18px 16px; }
    .partner-card-head { flex-direction: column; }
    .partner-picker select { width: 100%; min-width: 0; }
    .match-submit-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .button-gold { width: 100%; }
    .panchang-controls { flex-direction: column; align-items: stretch; }
    .panchang-picker select, .panchang-picker input { min-width: 0; width: 100%; }
    .admin-create-form { grid-template-columns: minmax(0, 1fr); }
    .qa-fab { right: 16px; bottom: 16px; padding: 12px 18px; }
    .support-fab { right: auto; left: 16px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-links { gap: 14px; }

    /* Compact header — the right-side cluster (sign out / theme / language /
       CTA / hamburger) plus the brand exceed a phone's width, so the brand
       truncates and every control shrinks instead of overflowing. */
    .header-inner { gap: 10px; }
    .brand { flex: 0 1 auto; min-width: 0; }
    .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .header-right { gap: 6px; }
    .nav-cta { min-height: 34px; padding: 7px 12px; font-size: 12.5px; }
    .nav-link-btn { padding: 8px 10px; font-size: 12.5px; }
    .lang-pill { padding: 6px 10px; font-size: 12px; }
    .theme-toggle { width: 34px; height: 34px; }
    .nav-mobile-toggle { width: 36px; height: 36px; }
}

/* Below ~480px even a compact "Create workspace" pill can't fit — drop it;
   the hero's primary button carries the same action one scroll away. */
@media (max-width: 480px) {
    .nav-cta { display: none; }
}

/* =====================================================================

/* =====================================================================
   Installed app — JS adds .standalone to <html> (more reliable than the
   display-mode media query, which some WebViews do not evaluate)
   ===================================================================== */

.standalone .auth-intro { display: none; }
.standalone .auth-shell { justify-content: center; }
.standalone .auth-card { margin-inline: auto; }

/* Wide screens: glass header becomes a fixed left rail. */
@media (min-width: 821px) {
    html.standalone body { padding-left: 236px; }
    html.standalone .site-header {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 236px;
        height: auto;
        border-bottom: 0;
        border-right: 1px solid var(--line);
    }
    html.standalone .header-inner {
        flex-direction: column;
        align-items: stretch;
        height: 100%;
        width: 100%;
        padding: 22px 16px;
        gap: 20px;
    }
    html.standalone .site-nav { flex-direction: column; gap: 4px; width: 100%; }
    html.standalone .nav-link { display: block; padding: 11px 14px; border-radius: 12px; }
    html.standalone .nav-group { position: static; }
    html.standalone .nav-group::after { display: none; }
    html.standalone .nav-caret { display: none; }
    html.standalone .nav-group-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 2px 0 0 16px;
    }
    html.standalone .header-right {
        margin-top: auto;
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    html.standalone .nav-logout { margin: 0; width: 100%; }
    html.standalone .nav-mobile-toggle { display: none; }
}

/* Narrow screens: the opened nav becomes a proper side drawer.
   backdrop-filter/transform on the header creates a containing block for
   position:fixed descendants — it must go or the drawer traps inside it. */
@media (max-width: 820px) {
    html.standalone .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none;
        will-change: auto;
    }
    html.standalone .site-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: min(280px, 82vw);
        height: auto;
        max-height: none;
        overflow-y: auto;
        padding: 78px 14px 18px;
        background: var(--surface);
        border-right: 1px solid var(--line);
        box-shadow: 24px 0 64px rgba(90, 32, 8, 0.28);
        flex-direction: column;
        gap: 4px;
        z-index: 40;
    }
    html.standalone .site-nav .nav-link { display: block; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
    /* Groups stay accordions: caret restored, panel expands inline on tap. */
    html.standalone .nav-group-panel {
        position: static;
        min-width: 0;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 2px 0 0 14px;
    }
    html.standalone .site-footer { padding-bottom: 30px; }
}

/* Anchor targets land below the fixed header. */
[id] { scroll-margin-top: 84px; }

/* Credits chip in the header (visible only when the wallet is enabled). */
.credits-pill { border-color: var(--gold); color: var(--indigo); font-weight: 800; }

/* Sign-out + language live at the drawer's foot in app mode. */
.nav-rail-extra { display: none; }

@media (max-width: 820px) {
    html.standalone .nav-rail-extra {
        display: block;
        margin-top: auto;
        padding-top: 14px;
        border-top: 1px solid var(--line);
    }
}

/* In app mode Sign out + language live in the drawer foot — not the bar.
   The credits chip (also .lang-pill) and theme toggle stay on top. */
@media (max-width: 820px) {
    html.standalone .header-right .nav-logout,
    html.standalone .header-right .lang-pill:not(.credits-pill) { display: none; }
}

/* Keep the drawer's foot links clear of the floating Support button. */
@media (max-width: 820px) {
    html.standalone .nav-rail-extra { padding-bottom: 84px; }
}

/* Global Call-Pandit FAB + picker dialog (support fab sits bottom-left). */
.callpandit-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--saffron), var(--maroon));
    color: #fff;
    font: 700 14px/1 'Manrope', sans-serif;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform 0.18s ease;
}
.callpandit-fab:hover { transform: translateY(-2px); }

.callpandit-dialog {
    position: fixed;
    right: 18px;
    bottom: 74px;
    z-index: 61;
    width: min(320px, calc(100vw - 36px));
    display: none;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}
.callpandit-dialog.is-open { display: block; }
.callpandit-dialog label {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font: 600 12px/1.4 'Manrope', sans-serif;
    color: var(--muted);
}
.callpandit-dialog select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font: 500 14px/1.3 'Manrope', sans-serif;
}
.callpandit-start { width: 100%; justify-content: center; }

/* The [hidden] attribute alone loses to the inline-flex display rule — the
   report-page hide flag (native Talk-to-Pandit already exists) needs this. */
.callpandit-fab[hidden] { display: none !important; }

/* Collapsible advanced geodetic fields in the kundali form. */
.form-advanced {
    grid-column: 1 / -1;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: var(--surface-subtle, var(--paper));
}
.form-advanced > summary {
    cursor: pointer;
    padding: 13px 16px;
    font: 600 12.5px/1.4 'Manrope', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    list-style: none;
}
.form-advanced > summary::before { content: '▸ '; color: var(--gold); }
.form-advanced[open] > summary::before { content: '▾ '; }
.form-advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding: 0 16px 16px;
}

/* Install-app nav item — hidden until a prompt is available (or iOS). */
.nav-install[hidden] { display: none !important; }
html.standalone .nav-install { display: none !important; }
