/* =============================================================
   Astrology Hub Dashboard — Modern Cosmic Revision (v45.1)
   ----------------------------------------------------------------
   Bento-grid command-center with the same cosmic-dark aesthetic as
   the Chart Lab. Scoped under .ahd so it doesn't disturb other
   pages that still use the legacy .ah- system in dashboard.css.
   ============================================================= */

.ahd {
    --c-accent:   #a78bfa;
    --c-accent-2: #f0abfc;
    --c-accent-3: #fbbf24;

    --c-bg:        #0b0f1a;
    --c-bg-grad:   radial-gradient(ellipse 1200px 700px at top right, #2a1356 0%, #1a0b2e 30%, #0b0f1a 65%);
    --c-bg-grad-2: radial-gradient(ellipse 800px 500px at 10% 90%, rgba(167,139,250,0.18) 0%, transparent 65%);

    --c-surface:    rgba(255,255,255,0.04);
    --c-surface-2:  rgba(255,255,255,0.06);
    --c-surface-3:  rgba(255,255,255,0.09);
    --c-surface-hi: rgba(255,255,255,0.12);

    --c-border:        rgba(255,255,255,0.08);
    --c-border-strong: rgba(255,255,255,0.16);
    --c-border-accent: rgba(167,139,250,0.32);

    --c-text:       #f8fafc;   /* brighter so headings read on glass */
    --c-text-muted: #cbd5e1;   /* was too dim against violet bg */
    --c-text-faint: #94a3b8;
    --c-text-gold:  #fbbf24;

    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;

    --shadow-1: 0 4px 14px rgba(0,0,0,0.32);
    --shadow-2: 0 14px 30px rgba(0,0,0,0.45);
    --shadow-acc: 0 0 0 1px rgba(167,139,250,0.35), 0 18px 36px rgba(167,139,250,0.2);

    --serif: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    position: relative;
    color: var(--c-text);
    background: var(--c-bg-grad);
    background-color: var(--c-bg);
    min-height: calc(100vh - 60px);
    padding: 18px 22px 80px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-feature-settings: 'cv02','cv11';
    isolation: isolate;
}

/* Light theme — Ivory. Only Cosmic (dark default) and Ivory are kept. */
.ahd[data-theme="ivory"] {
    --c-bg:        #fafaf9;
    --c-bg-grad:   radial-gradient(ellipse 1200px 700px at top right, #ffffff 0%, #f1f5f9 65%);
    --c-bg-grad-2: radial-gradient(ellipse 800px 500px at 10% 90%, rgba(99,102,241,0.12) 0%, transparent 65%);
    --c-surface:    rgba(15,23,42,0.04);
    --c-surface-2:  rgba(15,23,42,0.06);
    --c-surface-3:  rgba(15,23,42,0.10);
    --c-surface-hi: rgba(15,23,42,0.14);
    --c-border:        rgba(15,23,42,0.12);
    --c-border-strong: rgba(15,23,42,0.24);
    --c-text:       #0b1220;   /* near-black for max contrast */
    --c-text-muted: #334155;   /* slate-700 — readable, was slate-600 too light */
    --c-text-faint: #64748b;   /* slate-500 */
}

/* ── Text selection — readable in both themes ─────────────────── */
.ahd ::selection,
.ahd::selection {
    background: rgba(167,139,250,0.50);
    color: #ffffff;
    text-shadow: none;
}
.ahd[data-theme="ivory"] ::selection,
.ahd[data-theme="ivory"]::selection {
    background: rgba(99,102,241,0.28);
    color: #0b1220;
}

/* ── Background — cosmic dot field + secondary glow ─────────────── */
.ahd::before {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1.5px),
        radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1.5px);
    background-size: 64px 64px, 96px 96px;
    background-position: 0 0, 32px 48px;
    animation: ahd-drift 60s linear infinite;
}
.ahd::after {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 0;
    background: var(--c-bg-grad-2);
}
.ahd[data-theme="ivory"]::before { opacity: 0.4; }
.ahd > * { position: relative; z-index: 1; }

@keyframes ahd-drift {
    from { background-position: 0 0, 32px 48px; }
    to   { background-position: 128px 64px, 160px 144px; }
}

/* ── Section headers ──────────────────────────────────────────── */
.ahd__eyebrow {
    display: inline-block;
    padding: 4px 10px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-text-gold);
    margin-bottom: 14px;
}

.ahd__section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
    margin: 36px 0 18px;
}
.ahd__section-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.ahd__section-head p {
    margin: 6px 0 0;
    color: var(--c-text-muted);
    font-size: 0.85rem;
}
.ahd__section-head__count {
    margin-left: 10px;
    padding: 2px 10px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--c-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   HERO — celestial command card
   ═══════════════════════════════════════════════════════════════ */
.ahd__hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
    gap: 0;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(167,139,250,0.16) 0%, rgba(240,171,252,0.10) 35%, rgba(251,191,36,0.06) 100%);
    border: 1px solid var(--c-border-accent);
    border-radius: var(--r-xl);
    overflow: hidden;
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-2);
}
.ahd__hero::before {
    /* Outer mandala — animated rotation */
    content: '';
    position: absolute;
    right: -120px; bottom: -120px;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        rgba(167,139,250,0.15), rgba(240,171,252,0.05),
        rgba(251,191,36,0.10), rgba(167,139,250,0.15));
    filter: blur(20px);
    z-index: 0;
    animation: ahd-rotate 40s linear infinite;
}
@keyframes ahd-rotate { to { transform: rotate(360deg); } }

.ahd__hero__lead {
    position: relative;
    z-index: 1;
    padding: 28px 32px 30px;
}
.ahd__hero__title {
    margin: 6px 0 8px;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--c-text);
}
.ahd__hero__title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ahd__hero__sub {
    margin: 0 0 22px;
    font-size: 0.95rem;
    color: var(--c-text-muted);
    line-height: 1.6;
    max-width: 540px;
}
.ahd__hero__actions {
    display: flex; flex-wrap: wrap;
    gap: 10px;
}
.ahd__cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-strong);
    border-radius: 999px;
    color: var(--c-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ahd__cta:hover {
    transform: translateY(-1px);
    background: var(--c-surface-3);
    border-color: var(--c-border-accent);
}
.ahd__cta svg { width: 16px; height: 16px; }
.ahd__cta--primary {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    border-color: transparent;
    color: #0f172a;
    box-shadow: 0 8px 22px rgba(167,139,250,0.45);
}
.ahd__cta--primary:hover {
    box-shadow: 0 12px 30px rgba(167,139,250,0.6);
    filter: brightness(1.05);
}

/* Right column — today panchanga readout */
.ahd__hero__panchanga {
    position: relative;
    z-index: 1;
    padding: 28px 32px;
    border-left: 1px solid var(--c-border);
    background: var(--c-surface);
    backdrop-filter: blur(8px);
    display: flex; flex-direction: column; gap: 14px;
}
.ahd__hero__date {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--c-text);
    line-height: 1.1;
}
.ahd__hero__date em {
    display: block;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-text-gold);
    margin-bottom: 6px;
    font-family: 'Inter', sans-serif;
}
.ahd__panchanga__rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}
.ahd__panchanga__rows > div {
    padding: 8px 10px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}
.ahd__panchanga__rows > div span {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    margin-bottom: 2px;
}
.ahd__panchanga__rows > div strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--c-text);
}

@media (max-width: 900px) {
    .ahd__hero { grid-template-columns: 1fr; }
    .ahd__hero__panchanga {
        border-left: 0;
        border-top: 1px solid var(--c-border);
    }
}

/* ═══════════════════════════════════════════════════════════════
   STATS — four KPI cards
   ═══════════════════════════════════════════════════════════════ */
.ahd__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}
@media (max-width: 1100px) { .ahd__stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .ahd__stats { grid-template-columns: 1fr; } }

.ahd__stat {
    position: relative;
    padding: 18px 20px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ahd__stat:hover {
    transform: translateY(-2px);
    border-color: var(--c-border-strong);
    box-shadow: var(--shadow-1);
}
.ahd__stat__icon {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--c-surface-3);
    color: var(--c-text);
    border: 1px solid var(--c-border);
}
.ahd__stat__icon svg { width: 18px; height: 18px; }
.ahd__stat__label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    margin-bottom: 6px;
}
.ahd__stat__value {
    font-family: var(--serif);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}
.ahd__stat__delta {
    margin-top: 8px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--c-text-muted);
}
.ahd__stat__delta.is-ok { color: #34d399; }

/* Tone variants */
.ahd__stat--indigo .ahd__stat__icon { background: rgba(167,139,250,0.18); color: var(--c-accent); border-color: rgba(167,139,250,0.32); }
.ahd__stat--gold   .ahd__stat__icon { background: rgba(251,191,36,0.16);  color: var(--c-text-gold); border-color: rgba(251,191,36,0.32); }
.ahd__stat--rose   .ahd__stat__icon { background: rgba(251,113,133,0.16); color: #fb7185; border-color: rgba(251,113,133,0.32); }
.ahd__stat--featured {
    background: linear-gradient(135deg, #1701ac 0%, #5a47dc 60%, #a78bfa 100%);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}
.ahd__stat--featured::after {
    /* Sparkle pattern overlay */
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.18) 1px, transparent 2px),
        radial-gradient(circle at 30% 70%, rgba(255,255,255,0.18) 1px, transparent 2px),
        radial-gradient(circle at 60% 50%, rgba(255,255,255,0.10) 1px, transparent 2px);
    background-size: 80px 80px;
    pointer-events: none;
    opacity: 0.6;
}
.ahd__stat--featured .ahd__stat__label { color: rgba(255,255,255,0.78); }
.ahd__stat--featured .ahd__stat__delta { color: var(--c-text-gold); font-weight: 700; }
.ahd__stat--featured .ahd__stat__icon  { background: rgba(255,255,255,0.18); color: var(--c-text-gold); border-color: rgba(255,255,255,0.28); }

/* Progress bar inside featured card */
.ahd__stat__progress {
    margin-top: 12px;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    overflow: hidden;
}
.ahd__stat__progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--c-text-gold), #fde68a);
    border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════════════
   BENTO GRID — profiles + ai pandit + dashas
   ═══════════════════════════════════════════════════════════════ */
.ahd__bento {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 18px;
}
@media (max-width: 1000px) {
    .ahd__bento { grid-template-columns: 1fr; }
}

/* Profiles section */
.ahd__panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    backdrop-filter: blur(8px);
    overflow: hidden;
}
.ahd__panel__head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--c-border);
}
.ahd__panel__head h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.ahd__panel__head .ahd__chip {
    padding: 3px 10px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--c-text-muted);
}
.ahd__panel__head__actions {
    margin-left: auto;
    display: flex; align-items: center; gap: 8px;
}

.ahd__search {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    max-width: 240px;
}
.ahd__search svg { width: 14px; height: 14px; color: var(--c-text-faint); flex-shrink: 0; }
.ahd__search input {
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--c-text);
    font-size: 0.8rem;
    width: 100%;
}
.ahd__search input::placeholder { color: var(--c-text-faint); }

.ahd__btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-strong);
    border-radius: 999px;
    color: var(--c-text);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.ahd__btn:hover { background: var(--c-surface-3); border-color: var(--c-border-accent); }
.ahd__btn--primary {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    border-color: transparent;
    color: #0f172a;
}
.ahd__btn--danger { color: #fb7185; }
.ahd__btn--ghost { background: transparent; }

/* Profile grid */
.ahd__profiles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 18px 20px;
}
.ahd__profile {
    position: relative;
    display: flex; flex-direction: column;
    padding: 14px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    overflow: hidden;
}
.ahd__profile:hover {
    transform: translateY(-2px);
    border-color: var(--c-border-accent);
    box-shadow: var(--shadow-1);
}
.ahd__profile.is-highlighted {
    border-color: var(--c-border-accent);
    box-shadow: var(--shadow-acc);
}
.ahd__profile.is-highlighted::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c-accent), var(--c-accent-2));
}

.ahd__profile__head {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 10px;
}
.ahd__profile__avi {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800;
    font-family: var(--serif);
    font-size: 1.1rem;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.ahd__profile__name {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--c-text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ahd__profile__module {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(251,191,36,0.16);
    border: 1px solid rgba(251,191,36,0.32);
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--c-text-gold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ahd__profile__sub {
    font-size: 0.74rem;
    color: var(--c-text-muted);
    margin-top: 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ahd__profile__meta {
    display: flex; flex-wrap: wrap; gap: 8px;
    font-size: 0.7rem;
    color: var(--c-text-faint);
    margin: 6px 0 12px;
}
.ahd__profile__meta span {
    display: inline-flex; align-items: center; gap: 3px;
}

.ahd__profile__foot {
    display: flex; gap: 6px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--c-border);
}
.ahd__profile__foot .ahd__btn { flex: 1; justify-content: center; }
.ahd__profile__foot .ahd__btn--icon { flex: 0 0 auto; padding: 5px 8px; }

/* "+ Create new" card */
.ahd__profile--new {
    display: grid;
    place-items: center;
    min-height: 200px;
    background: transparent;
    border: 1px dashed var(--c-border-accent);
    text-align: center;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.ahd__profile--new:hover {
    background: var(--c-surface-2);
    border-color: var(--c-accent);
}
.ahd__profile--new__icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(167,139,250,0.18);
    color: var(--c-accent);
    display: grid; place-items: center;
    margin: 0 auto 12px;
    border: 1px solid var(--c-border-accent);
}
.ahd__profile--new__icon svg { width: 20px; height: 20px; }
.ahd__profile--new__label {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-text);
}
.ahd__profile--new__hint {
    margin-top: 4px;
    font-size: 0.74rem;
    color: var(--c-text-faint);
}

/* Empty state */
.ahd__empty {
    padding: 60px 30px;
    text-align: center;
}
.ahd__empty__icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-accent);
    display: grid; place-items: center;
    margin: 0 auto 14px;
    color: var(--c-accent);
}
.ahd__empty h3 {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--c-text);
}
.ahd__empty p {
    margin: 0 auto 18px;
    max-width: 380px;
    color: var(--c-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Right column stack */
.ahd__col {
    display: flex; flex-direction: column;
    gap: 18px;
}

/* AI Pandit card */
.ahd__ai {
    position: relative;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(251,191,36,0.16) 0%, rgba(167,139,250,0.10) 60%);
    border: 1px solid rgba(251,191,36,0.32);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.ahd__ai::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(251,191,36,0.30), transparent);
    filter: blur(20px);
    animation: ahd-rotate 18s linear infinite;
}
.ahd__ai__head {
    display: flex; align-items: center; gap: 12px;
    position: relative;
    z-index: 1;
}
.ahd__ai__icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #0f172a;
    display: grid; place-items: center;
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(167,139,250,0.4);
}
.ahd__ai__title {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-text);
}
.ahd__ai__prompt {
    margin: 10px 0 14px;
    font-size: 0.84rem;
    font-style: italic;
    color: var(--c-text);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}
.ahd__ai__cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    background: var(--c-text);
    color: var(--c-bg);
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    transition: filter 0.15s ease;
    position: relative;
    z-index: 1;
}
.ahd__ai__cta:hover { filter: brightness(1.1); }

/* Active dasha list */
.ahd__dasha__head { padding: 16px 20px; border-bottom: 1px solid var(--c-border); display: flex; justify-content: space-between; align-items: baseline; }
.ahd__dasha__head h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.ahd__dasha__head em {
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--c-text-gold);
    background: rgba(251,191,36,0.14);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(251,191,36,0.30);
}

.ahd__dasha__rows {
    padding: 6px 0;
}
.ahd__dasha__row {
    display: grid;
    grid-template-columns: 36px 1fr 80px;
    gap: 12px;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--c-border);
}
.ahd__dasha__row:last-child { border-bottom: 0; }
.ahd__dasha__abbr {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: grid; place-items: center;
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
}
.ahd__dasha__info { min-width: 0; }
.ahd__dasha__info strong {
    display: block;
    font-size: 0.86rem;
    color: var(--c-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ahd__dasha__info span {
    display: block;
    font-size: 0.7rem;
    color: var(--c-text-muted);
    margin-top: 2px;
}
.ahd__dasha__bar {
    height: 6px;
    background: var(--c-surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.ahd__dasha__bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--c-accent), var(--c-accent-2));
    border-radius: 999px;
}

.ahd__dasha__empty {
    padding: 26px 20px;
    text-align: center;
    color: var(--c-text-muted);
}
.ahd__dasha__empty strong {
    display: block;
    color: var(--c-text);
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.ahd__dasha__empty span {
    font-size: 0.74rem;
    color: var(--c-text-faint);
}

.ahd__dasha__foot {
    padding: 12px 20px;
    background: var(--c-surface-2);
    border-top: 1px solid var(--c-border);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.74rem;
    color: var(--c-text-muted);
}
.ahd__dasha__foot a {
    color: var(--c-accent);
    font-weight: 700;
    text-decoration: none;
}
.ahd__dasha__foot a:hover { filter: brightness(1.15); }

/* ═══════════════════════════════════════════════════════════════
   MODULES — three big launch cards
   ═══════════════════════════════════════════════════════════════ */
.ahd__modules__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 12px;
}
@media (max-width: 900px)  { .ahd__modules__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .ahd__modules__grid { grid-template-columns: 1fr; } }

.ahd__module {
    position: relative;
    display: flex; flex-direction: column;
    padding: 24px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    min-height: 220px;
    backdrop-filter: blur(8px);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.ahd__module:hover {
    transform: translateY(-4px);
    border-color: var(--c-border-accent);
    box-shadow: var(--shadow-acc);
}
.ahd__module::before {
    /* Decorative gradient blob */
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: var(--blob);
    filter: blur(40px);
    opacity: 0.55;
    z-index: 0;
    transition: transform 0.4s ease;
}
.ahd__module:hover::before { transform: scale(1.3); }
.ahd__module--m01 { --blob: radial-gradient(circle, #a78bfa, transparent); }
.ahd__module--m02 { --blob: radial-gradient(circle, #34d399, transparent); }
.ahd__module--m03 { --blob: radial-gradient(circle, #fb7185, transparent); }

.ahd__module__tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-text-gold);
    width: fit-content;
    position: relative;
    z-index: 1;
}
.ahd__module__title {
    margin: 14px 0 10px;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--c-text);
    position: relative;
    z-index: 1;
}
.ahd__module__desc {
    margin: 0 0 18px;
    font-size: 0.85rem;
    color: var(--c-text-muted);
    line-height: 1.55;
    position: relative;
    z-index: 1;
}
.ahd__module__cta {
    margin-top: auto;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--c-accent);
    position: relative;
    z-index: 1;
}
.ahd__module:hover .ahd__module__cta { filter: brightness(1.2); }

/* ── Quick tools strip — small chips ──────────────────────────── */
.ahd__quick {
    display: flex; flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    padding: 16px 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
}
.ahd__quick > span:first-child {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    align-self: center;
    margin-right: 4px;
}
.ahd__quick a {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    color: var(--c-text);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.ahd__quick a:hover { border-color: var(--c-border-accent); background: var(--c-surface-3); }

/* ═══════════════════════════════════════════════════════════════
   Theme switcher — floating pill bottom-right
   ═══════════════════════════════════════════════════════════════ */
.ahd__theme-switch {
    position: fixed;
    right: 22px; bottom: 22px;
    display: flex; gap: 4px;
    padding: 4px;
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: 999px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-2);
    z-index: 50;
}
.ahd__theme-switch button {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--c-text);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.18s ease;
    display: grid; place-items: center;
}
.ahd__theme-switch button:hover { background: var(--c-surface-3); }
.ahd__theme-switch button.is-active {
    background: var(--c-accent);
    color: #0f172a;
}

/* ═══════════════════════════════════════════════════════════════════
   AHD2 — Cosmic Compass concept (v50+)
   Magazine-style bento command center that actually feels like a
   Vedic almanac. Lives under .ahd2 so it composes with the .ahd
   theme system above.
   ═══════════════════════════════════════════════════════════════════ */

.ahd2 {
    padding: 24px 28px 80px;
}

/* Shared elements ──────────────────────────────────────────────── */
.ahd2__eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-text-gold);
}
.ahd2__pulse {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52,211,153,0.7);
    animation: ahd2-pulse 2.2s infinite;
    margin-right: 4px;
    vertical-align: middle;
}
@keyframes ahd2-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* Section header */
.ahd2__sec__head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.ahd2__sec__head h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--c-text);
}
.ahd2__sec__count,
.ahd2__sec__hint {
    margin-left: 10px;
    padding: 3px 10px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--c-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.ahd2__sec__hint {
    background: transparent;
    border: 0;
    color: var(--c-text-faint);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: 0.78rem;
    display: inline-flex; align-items: center;
}

/* CTAs */
.ahd2__cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-strong);
    border-radius: 999px;
    color: var(--c-text);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
}
.ahd2__cta:hover {
    transform: translateY(-1px);
    background: var(--c-surface-3);
    border-color: var(--c-border-accent);
}
.ahd2__cta--p {
    background: linear-gradient(135deg, #a78bfa 0%, #f0abfc 50%, #fbbf24 100%);
    background-size: 200% 100%;
    border-color: transparent;
    color: #0f172a;
    box-shadow: 0 8px 22px rgba(167,139,250,0.45), inset 0 1px 0 rgba(255,255,255,0.45);
}
.ahd2__cta--p:hover {
    background-position: 100% 0;
    box-shadow: 0 12px 30px rgba(167,139,250,0.6), inset 0 1px 0 rgba(255,255,255,0.55);
}

.ahd2__btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 6px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    color: var(--c-text);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}
.ahd2__btn:hover { background: var(--c-surface-3); border-color: var(--c-border-accent); }
.ahd2__btn--p {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    border-color: transparent;
    color: #0f172a;
    flex: 1 1 auto;
}
.ahd2__btn--icon { width: 32px; padding: 0; }
.ahd2__btn--del { color: #fb7185; }
.ahd2__btn--del:hover { background: rgba(251,113,133,0.14); border-color: rgba(251,113,133,0.4); }

.ahd2__search {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    max-width: 240px;
}
.ahd2__search svg { width: 14px; height: 14px; color: var(--c-text-faint); flex-shrink: 0; }
.ahd2__search input {
    background: transparent;
    border: 0; outline: 0;
    color: var(--c-text);
    font-size: 0.8rem;
    width: 100%;
}
.ahd2__search input::placeholder { color: var(--c-text-faint); }

/* ═══════════════════════════════════════════════════════════════
   1. HERO — COSMIC COMPASS
   ═══════════════════════════════════════════════════════════════ */
.ahd2__compass {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
    gap: 0;
    margin-bottom: 28px;
    background: linear-gradient(135deg, rgba(26,11,46,0.6) 0%, rgba(91,33,182,0.18) 40%, rgba(251,191,36,0.08) 100%);
    border: 1px solid var(--c-border-accent);
    border-radius: var(--r-xl);
    overflow: hidden;
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-2), 0 0 60px rgba(167,139,250,0.18);
    min-height: 380px;
}
.ahd[data-theme="ivory"] .ahd2__compass {
    background: linear-gradient(135deg, rgba(167,139,250,0.10) 0%, rgba(240,171,252,0.07) 50%, rgba(251,191,36,0.04) 100%);
}

/* Hero background — animated stars + orbits */
.ahd2__compass__bg {
    position: absolute; inset: 0;
    pointer-events: none; overflow: hidden;
    z-index: 0;
}
.ahd2__stars {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.7) 0.6px, transparent 1.2px),
        radial-gradient(circle, rgba(167,139,250,0.45) 0.6px, transparent 1.2px),
        radial-gradient(circle, rgba(251,191,36,0.55) 0.5px, transparent 1px);
    background-size: 180px 140px, 260px 200px, 340px 280px;
    background-position: 0 0, 60px 40px, 120px 90px;
    animation: ahd2-stars 90s linear infinite;
    opacity: 0.7;
}
.ahd2__stars--2 {
    background-size: 220px 170px;
    animation-duration: 140s;
    animation-direction: reverse;
    opacity: 0.5;
}
.ahd2__orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(167,139,250,0.18);
    right: -80px; top: -80px;
    animation: ahd2-spin 60s linear infinite;
}
.ahd2__orbit--1 { width: 480px; height: 480px; }
.ahd2__orbit--2 { width: 600px; height: 600px; right: -130px; top: -130px; animation-duration: 90s; animation-direction: reverse; opacity: 0.6; }
.ahd2__orbit--3 { width: 720px; height: 720px; right: -180px; top: -180px; animation-duration: 140s; opacity: 0.35; }
.ahd[data-theme="ivory"] .ahd2__orbit { border-color: rgba(99,102,241,0.18); }
@keyframes ahd2-stars { to { background-position: 360px 280px, 320px 240px, 480px 360px; } }
@keyframes ahd2-spin { to { transform: rotate(360deg); } }

.ahd2__compass__lead {
    position: relative; z-index: 1;
    padding: 36px 40px 32px;
    display: flex; flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.ahd2__skychart {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 2px auto 0;
    filter: drop-shadow(0 12px 30px rgba(167,139,250,0.22));
}

@media (max-width: 1000px) {
    .ahd2__compass { grid-template-columns: 1fr; }
}

.ahd2__sec__tools { display: flex; gap: 8px; align-items: center; }

/* Profile cards grid */
.ahd2__profiles { min-width: 0; }
.ahd2__profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.ahd2__profile {
    position: relative;
    display: flex; flex-direction: column; gap: 12px;
    padding: 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(8px);
    transition: all 0.22s ease;
    overflow: hidden;
}
.ahd2__profile:hover {
    transform: translateY(-3px);
    border-color: var(--c-border-accent);
    box-shadow: var(--shadow-acc);
}
.ahd2__profile__sigil {
    position: absolute;
    right: -8px; top: -8px;
    color: rgba(167,139,250,0.18);
    pointer-events: none;
    transition: transform 0.6s ease, color 0.3s ease;
}
.ahd2__profile:hover .ahd2__profile__sigil {
    transform: rotate(45deg);
    color: rgba(167,139,250,0.40);
}

.ahd2__profile__head { display: flex; align-items: center; gap: 12px; }
.ahd2__profile__avi {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1.15rem;
    color: #0f172a;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.ahd2__profile__head h4 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 140px;
}
.ahd2__profile__mod {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 8px;
    background: rgba(251,191,36,0.16);
    border: 1px solid rgba(251,191,36,0.32);
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--c-text-gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ahd2__profile__signs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 10px;
}
.ahd2__profile__signs > div { display: flex; flex-direction: column; gap: 2px; }
.ahd2__profile__signs span {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}
.ahd2__profile__signs strong {
    font-family: var(--serif);
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.01em;
}

.ahd2__profile__meta {
    display: flex; flex-wrap: wrap; gap: 4px 10px;
    font-size: 0.72rem;
    color: var(--c-text-muted);
}
.ahd2__profile__place {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%;
}

.ahd2__profile__actions {
    display: flex; gap: 6px;
    padding-top: 10px;
    margin-top: auto;
    border-top: 1px solid var(--c-border);
}

/* ── Grid / List view toggle control ────────────────────────────────────── */
.ahpv-toggle {
    display: inline-flex; overflow: hidden;
    border: 1px solid var(--c-border); border-radius: 999px;
    background: var(--c-surface-2);
}
.ahpv-btn {
    display: grid; place-items: center;
    width: 32px; height: 32px;
    border: 0; background: transparent; cursor: pointer;
    color: var(--c-text-muted);
    transition: background 0.15s ease, color 0.15s ease;
}
.ahpv-btn > svg { width: 16px; height: 16px; }
.ahpv-btn:hover { color: var(--c-text); }
.ahpv-btn.is-active { background: #1701AC; color: #fff; }

/* ── Profiles LIST view — compact horizontal rows. flex-wrap + min-width:0
      keep the action buttons inside the card instead of overflowing. ──────── */
.ahprofiles.is-list { display: flex !important; flex-direction: column; gap: 8px; }
.ahprofiles.is-list .ahd2__profile {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 16px;
    min-height: 0;
}
.ahprofiles.is-list .ahd2__profile:hover { transform: none; }
.ahprofiles.is-list .ahd2__profile__sigil { display: none; }
.ahprofiles.is-list .ahd2__profile__head { flex: 1 1 150px; min-width: 0; }
.ahprofiles.is-list .ahd2__profile__head h4 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahprofiles.is-list .ahd2__profile__signs {
    flex: 0 0 auto; padding: 0; background: none; border: 0;
    grid-template-columns: auto auto; gap: 2px 16px;
}
.ahprofiles.is-list .ahd2__profile__meta { flex: 1 1 auto; min-width: 0; gap: 4px 12px; }
.ahprofiles.is-list .ahd2__profile__actions {
    flex: 0 0 auto; margin-left: auto; padding: 0; border: 0;
}
/* Compact the "Cast new profile" tile into a slim row in list mode. */
.ahprofiles.is-list .ahprofiles__add { min-height: 0 !important; padding: 12px 16px; }

.ahd2__profile--new {
    display: grid; place-items: center;
    border: 1px dashed var(--c-border-accent);
    background: transparent;
    text-align: center;
    min-height: 240px;
    transition: all 0.22s ease;
}
.ahd2__profile--new:hover {
    background: var(--c-surface-2);
    border-color: var(--c-accent);
    transform: none;
    box-shadow: none;
}
.ahd2__profile--new__icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(167,139,250,0.18);
    color: var(--c-accent);
    display: grid; place-items: center;
    margin: 0 auto 14px;
    border: 1px solid var(--c-border-accent);
    font-size: 1.6rem;
    font-weight: 200;
}
.ahd2__profile--new h4 {
    margin: 0 0 4px;
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text);
}
.ahd2__profile--new p {
    margin: 0;
    font-size: 0.74rem;
    color: var(--c-text-faint);
}

/* Empty states */
.ahd2__empty {
    padding: 56px 32px;
    text-align: center;
    background: var(--c-surface);
    border: 1px dashed var(--c-border-accent);
    border-radius: var(--r-lg);
}
.ahd2__empty__mark {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(251,191,36,0.16);
    color: var(--c-text-gold);
    display: grid; place-items: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
    border: 1px solid rgba(251,191,36,0.32);
}
.ahd2__empty h4 {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--c-text);
}
.ahd2__empty p {
    margin: 0 auto 18px;
    max-width: 380px;
    font-size: 0.88rem;
    color: var(--c-text-muted);
    line-height: 1.55;
}
.ahd2__empty--inset {
    padding: 28px 22px;
    margin: 0;
}
.ahd2__empty--inset p { margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   7. TOOL UNIVERSE
   ═══════════════════════════════════════════════════════════════ */
.ahd2__tools { margin-bottom: 28px; }
.ahd2__tools__cats {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.ahd2__tools__cats button {
    padding: 6px 14px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    color: var(--c-text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}
.ahd2__tools__cats button:hover {
    border-color: var(--c-border-accent);
    color: var(--c-text);
}
.ahd2__tools__cats button.is-active {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    border-color: transparent;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(167,139,250,0.3);
}
.ahd2__tools__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.ahd2__tool {
    position: relative;
    display: flex; gap: 12px; align-items: flex-start;
    padding: 16px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: inherit;
    cursor: default;            /* display-only catalog card — not a link */
    backdrop-filter: blur(8px);
    transition: border-color 0.2s ease;
    overflow: hidden;
}
/* Subtle border highlight only — no lift/shadow, since these are not clickable. */
.ahd2__tool:hover { border-color: var(--c-border-accent); }
/* Title → description breathing room (was cramped at 2px). */
.ahd2__tool__body { padding-right: 6px; }
.ahd2__tool__glyph {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(167,139,250,0.20), rgba(240,171,252,0.10));
    border: 1px solid rgba(167,139,250,0.30);
    color: var(--c-accent);
    display: grid; place-items: center;
    font-size: 1.2rem;
    font-weight: 800;
}
.ahd2__tool h4 {
    margin: 0 0 5px;
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.01em;
}
.ahd2__tool p {
    margin: 0;
    font-size: 0.74rem;
    color: var(--c-text-muted);
    line-height: 1.4;
}
.ahd2__tool__cat {
    position: absolute;
    top: 10px; right: 12px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════════
   v52 BRAND MIGRATION — Primary indigo #1701AC
   ----------------------------------------------------------------
   Replaces violet/pink/gold accents with the brand indigo system.
   Override the variables so every component inherits the new palette.
   Fixes light-mode contrast + hover states + adds responsive breaks.
   ═══════════════════════════════════════════════════════════════════ */

.ahd, .ahd2 {
    --c-primary:        #1701AC;
    --c-primary-2:      #3320C4;
    --c-primary-3:      #5A47DC;
    --c-primary-4:      #8B7BE8;
    --c-primary-5:      #C7BFF5;

    --c-accent:         #5A47DC;          /* dark-mode default */
    --c-accent-2:       #8B7BE8;
    --c-accent-3:       #C7BFF5;

    --c-border-accent:  rgba(90,71,220,0.42);
    --c-eyebrow:        #8B7BE8;          /* light indigo — readable on dark */
    --c-text-gold:      #8B7BE8;          /* repurposed: NOT gold anymore */

    --shadow-acc: 0 0 0 1px rgba(90,71,220,0.40), 0 18px 36px rgba(23,1,172,0.30);
}
.ahd[data-theme="ivory"], .ahd2[data-theme="ivory"] {
    --c-accent:         #1701AC;          /* deep indigo — readable on light */
    --c-accent-2:       #3320C4;
    --c-accent-3:       #5A47DC;
    --c-border-accent:  rgba(23,1,172,0.36);
    --c-eyebrow:        #1701AC;
    --c-text-gold:      #1701AC;
    --shadow-acc: 0 0 0 1px rgba(23,1,172,0.32), 0 18px 36px rgba(23,1,172,0.18);
}

/* ── Hero · gradient name text ───────────────────────────────────── */
.ahd2__compass__hi em,
.ahd__hero__title em {
    background: linear-gradient(135deg, #1701AC 0%, #5A47DC 50%, #8B7BE8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ahd[data-theme="ivory"] .ahd2__compass__hi em,
.ahd[data-theme="ivory"] .ahd__hero__title em {
    background: linear-gradient(135deg, #1701AC 0%, #3320C4 60%, #5A47DC 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Compass hero card background ───────────────────────────────── */
.ahd2__compass {
    background: linear-gradient(135deg, rgba(23,1,172,0.35) 0%, rgba(90,71,220,0.18) 45%, rgba(139,123,232,0.10) 100%);
    border-color: rgba(90,71,220,0.40);
    box-shadow: var(--shadow-2), 0 0 60px rgba(23,1,172,0.22);
}
.ahd[data-theme="ivory"] .ahd2__compass {
    background: linear-gradient(135deg, rgba(23,1,172,0.10) 0%, rgba(90,71,220,0.07) 50%, rgba(139,123,232,0.05) 100%);
}

/* ── Sky chart — class-driven indigo strokes / fills.
   Dark mode needs MUCH higher opacity — the right-side panel has a
   dark blur on top of a dark gradient, so the chart elements need
   to be bright (60-95% alpha light-indigo). ──────────────────── */
.ahd2__skychart__ring        { stroke: rgba(199,191,245,0.55); stroke-width: 1.2; }
.ahd2__skychart__ring--inner { stroke: rgba(199,191,245,0.32); }
.ahd2__skychart__ring--core  { stroke: rgba(34,211,238,0.65);  }      /* cyan core ring */
.ahd2__skychart__spoke       { stroke: rgba(199,191,245,0.42); }
.ahd2__skychart__sign        { fill:   #C7BFF5; font-weight: 800; }    /* solid light indigo */
.ahd2__skychart__now         { fill:   #22d3ee; }                       /* cyan NOW */
.ahd2__skychart__date        { fill:   rgba(241,245,249,0.85); letter-spacing: 2px; font-weight: 700; }

.ahd[data-theme="ivory"] .ahd2__skychart__ring        { stroke: rgba(23,1,172,0.32); }
.ahd[data-theme="ivory"] .ahd2__skychart__ring--inner { stroke: rgba(23,1,172,0.18); }
.ahd[data-theme="ivory"] .ahd2__skychart__ring--core  { stroke: rgba(23,1,172,0.42); }
.ahd[data-theme="ivory"] .ahd2__skychart__spoke       { stroke: rgba(23,1,172,0.22); }
.ahd[data-theme="ivory"] .ahd2__skychart__sign        { fill:   #1701AC; }
.ahd[data-theme="ivory"] .ahd2__skychart__now         { fill:   #1701AC; }
.ahd[data-theme="ivory"] .ahd2__skychart__date        { fill:   rgba(71,85,105,0.85); }

/* ── Primary CTA — was rainbow gradient, now indigo gradient ────── */
.ahd2__cta--p,
.ahd__cta--primary,
.ahd2__btn--p,
.ahd2__ai__cta,
.ahf__hero__cta,
.ahd2__tools__cats button.is-active {
    background: linear-gradient(135deg, #1701AC 0%, #5A47DC 100%) !important;
    background-size: 200% 100% !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 24px rgba(23,1,172,0.45), inset 0 1px 0 rgba(255,255,255,0.18) !important;
}
.ahd2__cta--p:hover,
.ahd__cta--primary:hover,
.ahd2__btn--p:hover,
.ahd2__ai__cta:hover,
.ahf__hero__cta:hover {
    background-position: 100% 0 !important;
    box-shadow: 0 14px 36px rgba(23,1,172,0.62), inset 0 1px 0 rgba(255,255,255,0.24) !important;
    transform: translateY(-1px);
}

/* ── Secondary CTA — visible hover in BOTH modes ────────────────── */
.ahd2__cta:not(.ahd2__cta--p):hover {
    background: rgba(23,1,172,0.12);
    border-color: #1701AC;
    color: #ffffff;
}
.ahd[data-theme="ivory"] .ahd2__cta:not(.ahd2__cta--p):hover {
    background: rgba(23,1,172,0.08);
    border-color: #1701AC;
    color: #1701AC;
}

.ahd2__btn:not(.ahd2__btn--p):hover {
    background: rgba(23,1,172,0.15);
    border-color: rgba(23,1,172,0.55);
    color: #ffffff;
}
.ahd[data-theme="ivory"] .ahd2__btn:not(.ahd2__btn--p):hover {
    background: rgba(23,1,172,0.08);
    border-color: #1701AC;
    color: #1701AC;
}

/* ── Profile avatars — gradient indigo as default fallback ──────── */
.ahd2__profile__avi {
    color: #ffffff !important;
}

/* ── Module badges (chart-lab gradient blobs unchanged - planet
     colors retain Vedic semantic meaning) ──────────────────────── */

/* ── Profile module pill — was gold tinted, now indigo tinted ──── */
.ahd2__profile__mod {
    background: rgba(23,1,172,0.18) !important;
    border-color: rgba(23,1,172,0.42) !important;
    color: var(--c-eyebrow) !important;
}

/* ── Empty state mark — was gold, now indigo ────────────────────── */
.ahd2__empty__mark {
    background: rgba(23,1,172,0.16) !important;
    color: var(--c-accent) !important;
    border-color: rgba(23,1,172,0.32) !important;
}

/* ── Tools active filter chip + tool glyph ───────────────────────── */
.ahd2__tool__glyph {
    background: linear-gradient(135deg, rgba(23,1,172,0.22), rgba(90,71,220,0.12)) !important;
    border-color: rgba(23,1,172,0.36) !important;
    color: var(--c-accent) !important;
}

/* ── Live "Live" badge stays green (it's a status indicator) ─── */

/* ── Dashboard mandala / cosmic orbits — keep indigo tinted ─── */
.ahd2__orbit { border-color: rgba(90,71,220,0.20); }
.ahd[data-theme="ivory"] .ahd2__orbit { border-color: rgba(23,1,172,0.16); }

/* ── Lift muted text contrast in both modes ─────────────────────── */
.ahd[data-theme="ivory"] {
    --c-text-muted: #1e293b;   /* slate-800 — strong but not pure black */
    --c-text-faint: #475569;   /* slate-600 */
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — tighter breakpoints for all dashboard sections
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
    .ahd2 { padding: 20px 22px 70px; }
    .ahd2__compass { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .ahd2 { padding: 16px 16px 60px; }
    .ahd2__compass__lead { padding: 28px 24px 24px; }
    .ahd2__sec__head h3 { font-size: 1.35rem; }
    /* .ahd2__planets__strip handled by auto-fit minmax — no override needed */
    .ahd2__profile-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .ahd2__tools__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    .ahd2 { padding: 12px 12px 50px; }
    .ahd2__compass__lead { padding: 22px 18px 20px; }
    .ahd2__cta { padding: 9px 14px; font-size: 0.78rem; }
    .ahd2__profile-grid { grid-template-columns: 1fr; }
    .ahd2__tools__grid { grid-template-columns: 1fr; }
    .ahd2__sec__head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .ahd2__sec__head h3 { font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   v53 — Visibility bumps + futuristic accent palette diversification
   ----------------------------------------------------------------
   Adds a secondary CYAN accent ("electric tech" feel) to balance the
   primary indigo. Restricts primary indigo to brand-critical elements
   only — CTAs, brand mark, hero gradient. Lifts light-mode contrast.
   ═══════════════════════════════════════════════════════════════════ */

/* Secondary palette — used for accents/hover/highlights */
.ahd, .ahd2 {
    --c-tech:        #06b6d4;       /* cyan-500 — dark mode highlights */
    --c-tech-2:      #22d3ee;       /* cyan-400 */
    --c-tech-glow:   rgba(34,211,238,0.45);
    --c-mint:        #14b8a6;       /* teal-500 — live/secondary */
}
.ahd[data-theme="ivory"], .ahd2[data-theme="ivory"] {
    --c-tech:        #0891b2;       /* darker cyan for light bg */
    --c-tech-2:      #06b6d4;
    --c-tech-glow:   rgba(6,182,212,0.30);
    --c-mint:        #0d9488;
}

/* ── SKY CHART — make light-mode TRULY readable ────────────────── */
.ahd[data-theme="ivory"] .ahd2__skychart__ring        { stroke: rgba(23,1,172,0.45); stroke-width: 1.2; }
.ahd[data-theme="ivory"] .ahd2__skychart__ring--inner { stroke: rgba(23,1,172,0.28); }
.ahd[data-theme="ivory"] .ahd2__skychart__ring--core  { stroke: rgba(8,145,178,0.55); stroke-dasharray: 2 3; }
.ahd[data-theme="ivory"] .ahd2__skychart__spoke       { stroke: rgba(23,1,172,0.30); }
.ahd[data-theme="ivory"] .ahd2__skychart__sign        { fill: #1701AC; font-weight: 800; }
.ahd[data-theme="ivory"] .ahd2__skychart__now         { fill: #1701AC; }
.ahd[data-theme="ivory"] .ahd2__skychart__date        { fill: #475569; }

/* In dark mode, NOW gets a cyan tint for the futuristic feel */
.ahd2__skychart__now { fill: #22d3ee !important; }
.ahd[data-theme="ivory"] .ahd2__skychart__now { fill: #1701AC !important; }

/* ── PROFILE AVATARS — same darken in light mode ───────────────── */
.ahd[data-theme="ivory"] .ahd2__profile__avi {
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    box-shadow: 0 4px 12px rgba(15,23,42,0.18);
}

/* Hero CTAs: PRIMARY stays indigo gradient, SECONDARY use cyan border on hover (tech feel) */
.ahd2__cta:not(.ahd2__cta--p) {
    background: rgba(255,255,255,0.04);
    border-color: rgba(34,211,238,0.30);
}
.ahd[data-theme="ivory"] .ahd2__cta:not(.ahd2__cta--p) {
    background: rgba(15,23,42,0.04);
    border-color: rgba(8,145,178,0.32);
    color: #0b1220;
}
.ahd2__cta:not(.ahd2__cta--p):hover {
    background: rgba(34,211,238,0.10);
    border-color: var(--c-tech-2);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(34,211,238,0.18), 0 6px 16px rgba(6,182,212,0.25);
}
.ahd[data-theme="ivory"] .ahd2__cta:not(.ahd2__cta--p):hover {
    background: rgba(6,182,212,0.08);
    border-color: #0891b2;
    color: #0891b2;
}

/* "Live Planetary Position" header HINT — cyan pulse */
.ahd2__sec__hint .ahd2__pulse {
    background: var(--c-tech-2);
    box-shadow: 0 0 0 0 rgba(34,211,238,0.7);
    animation: ahd2-pulse-cyan 2.2s infinite;
}
@keyframes ahd2-pulse-cyan {
    0%   { box-shadow: 0 0 0 0 rgba(34,211,238,0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(34,211,238,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

/* Tool category active filter — gradient indigo→cyan (futuristic) */
.ahd2__tools__cats button.is-active {
    background: linear-gradient(135deg, #1701AC 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
}

/* Tool tile glyph — alternate accent based on category */
.ahd2__tool[data-cat="dashas"] .ahd2__tool__glyph    { color: #f59e0b; background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(217,119,6,0.10)); border-color: rgba(245,158,11,0.32); }
.ahd2__tool[data-cat="yogas"] .ahd2__tool__glyph     { color: #ec4899; background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(219,39,119,0.10)); border-color: rgba(236,72,153,0.32); }
.ahd2__tool[data-cat="strength"] .ahd2__tool__glyph  { color: #14b8a6; background: linear-gradient(135deg, rgba(20,184,166,0.18), rgba(13,148,136,0.10)); border-color: rgba(20,184,166,0.32); }
.ahd2__tool[data-cat="kp"] .ahd2__tool__glyph        { color: #06b6d4; background: linear-gradient(135deg, rgba(6,182,212,0.18), rgba(8,145,178,0.10)); border-color: rgba(6,182,212,0.32); }
.ahd2__tool[data-cat="almanac"] .ahd2__tool__glyph   { color: #a78bfa; background: linear-gradient(135deg, rgba(167,139,250,0.18), rgba(139,92,246,0.10)); border-color: rgba(167,139,250,0.32); }

/* Section heading underline accent — animated cyan to break up the indigo */
.ahd2__sec__head h3 {
    position: relative;
    padding-bottom: 4px;
}
.ahd2__sec__head h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 48px; height: 2px;
    background: linear-gradient(90deg, #1701AC, #22d3ee);
    border-radius: 2px;
    opacity: 0.7;
}

/* ── Theme switcher — proper sun/moon SVG icons + clear active state ── */
.ahd__theme-switch {
    background: rgba(15,23,42,0.92) !important;
    border: 1px solid rgba(199,191,245,0.30) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,211,238,0.18) inset !important;
    padding: 5px !important;
    gap: 4px;
}
.ahd[data-theme="ivory"] .ahd__theme-switch {
    background: rgba(255,255,255,0.95) !important;
    border-color: rgba(23,1,172,0.25) !important;
    box-shadow: 0 12px 32px rgba(15,23,42,0.18), 0 0 0 1px rgba(23,1,172,0.10) inset !important;
}
.ahd__theme-switch button {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #C7BFF5 !important;
    font-size: 1.1rem !important;
    line-height: 1;
    font-weight: 700;
    border: 1px solid transparent !important;
    transition: all 0.18s ease !important;
}
.ahd__theme-switch button:hover {
    background: rgba(34,211,238,0.16) !important;
    color: #22d3ee !important;
    transform: scale(1.05);
}
.ahd__theme-switch button.is-active {
    background: linear-gradient(135deg, #1701AC, #5A47DC) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(23,1,172,0.55), 0 0 0 2px rgba(34,211,238,0.40) !important;
    transform: scale(1.08);
}
.ahd[data-theme="ivory"] .ahd__theme-switch button {
    color: #475569 !important;
}
.ahd[data-theme="ivory"] .ahd__theme-switch button:hover {
    background: rgba(23,1,172,0.08) !important;
    color: #1701AC !important;
}
.ahd[data-theme="ivory"] .ahd__theme-switch button.is-active {
    background: linear-gradient(135deg, #1701AC, #5A47DC) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(23,1,172,0.45), 0 0 0 2px rgba(23,1,172,0.30) !important;
}

/* Hero name gradient — add cyan at end for futuristic touch.
   Force ALL properties with !important so nothing in the cascade
   (or external CSS / extensions) can break the text-clip. Newer
   Chrome needs -webkit-text-fill-color too — `color: transparent`
   alone sometimes fails to propagate to the text fill. */
.ahd2__compass__hi em,
.ahd__hero__title em {
    background: linear-gradient(135deg, #1701AC 0%, #5A47DC 50%, #22d3ee 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    font-style: italic;
}
.ahd[data-theme="ivory"] .ahd2__compass__hi em,
.ahd[data-theme="ivory"] .ahd__hero__title em {
    background: linear-gradient(135deg, #1701AC 0%, #3320C4 60%, #0891b2 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════
   v57 — Font-size readability + icon polish pass
   ----------------------------------------------------------------
   Every small label across header/dashboard/footer bumped to a more
   readable minimum (0.72rem ≈ 11.5px). Icons inside meta rows align
   vertically with text. SVG icons standardised to 1.4px stroke for
   crisper line-icon look.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Global base — slight body bump for comfort ─────────────────── */
.ahd, .ahd2 {
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: -0.005em;
}

/* ── EYEBROWS — bump all uppercase labels to readable ──────────── */
.ahd2__eyebrow {
    font-size: 0.72rem !important;
    letter-spacing: 0.14em;
    padding: 5px 12px;
}

/* ── CTAs — readable button text ───────────────────────────────── */
.ahd2__cta {
    font-size: 0.9rem !important;
    padding: 11px 20px !important;
    letter-spacing: -0.005em;
    gap: 8px;
}
.ahd2__cta svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── SECTION HEADS ──────────────────────────────────────────────── */
.ahd2__sec__head h3 { font-size: 1.55rem !important; letter-spacing: -0.02em; }
.ahd2__sec__hint { font-size: 0.84rem !important; }

/* ── PROFILE CARDS ──────────────────────────────────────────────── */
.ahd2__profile { padding: 18px; gap: 12px; }
.ahd2__profile__head h4 {
    font-size: 1.12rem !important;
    letter-spacing: -0.015em;
}
.ahd2__profile__mod {
    font-size: 0.62rem !important;
    padding: 2px 9px;
    letter-spacing: 0.08em;
}
.ahd2__profile__signs > div { padding: 9px 12px; }
.ahd2__profile__signs span {
    font-size: 0.62rem !important;
    letter-spacing: 0.10em;
}
.ahd2__profile__signs strong {
    font-size: 0.98rem !important;
    letter-spacing: -0.01em;
}

/* ── Profile META — emoji removed, SVG icons + readable size ───── */
.ahd2__profile__meta {
    font-size: 0.76rem !important;
    gap: 6px 12px;
    margin: 8px 0 12px;
}
.ahd2__profile__meta span {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    color: var(--c-text-muted);
    line-height: 1.3;
}
.ahd2__profile__meta svg {
    flex-shrink: 0;
    width: 13px; height: 13px;
    color: var(--c-accent-2);
    opacity: 0.85;
}
.ahd[data-theme="ivory"] .ahd2__profile__meta svg { color: #1701AC; opacity: 0.85; }
.ahd2__profile__place {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 170px;
}

/* ── Profile action buttons — larger, color-coded, distinguishable ─ */
.ahd2__profile__actions { gap: 6px; padding-top: 10px; }
.ahd2__profile__actions .ahd2__btn {
    font-size: 0.82rem !important;
    padding: 9px 14px !important;
    height: 40px;
}
.ahd2__btn--icon {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    transition: all 0.18s ease !important;
}
.ahd2__btn--icon svg { width: 17px; height: 17px; stroke-width: 1.9; }
.ahd2__btn--p svg { stroke-width: 2.6; }

/* Color-coded icon buttons so AI / Edit / Delete are instantly distinct */
.ahd2__profile__actions [title="AI insight"],
.ahd2__profile__actions [aria-label="AI insight"] {
    background: rgba(34,211,238,0.10) !important;
    border-color: rgba(34,211,238,0.32) !important;
    color: #22d3ee !important;
}
.ahd2__profile__actions [title="AI insight"]:hover,
.ahd2__profile__actions [aria-label="AI insight"]:hover {
    background: rgba(34,211,238,0.20) !important;
    border-color: #22d3ee !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(34,211,238,0.30);
}
.ahd2__profile__actions [title="Edit"],
.ahd2__profile__actions [aria-label="Edit"] {
    background: rgba(23,1,172,0.10) !important;
    border-color: rgba(23,1,172,0.32) !important;
    color: #8B7BE8 !important;
}
.ahd2__profile__actions [title="Edit"]:hover,
.ahd2__profile__actions [aria-label="Edit"]:hover {
    background: rgba(23,1,172,0.22) !important;
    border-color: #5A47DC !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(23,1,172,0.30);
}
.ahd2__profile__actions [title="Delete"],
.ahd2__profile__actions [aria-label="Delete"] {
    background: rgba(251,113,133,0.10) !important;
    border-color: rgba(251,113,133,0.32) !important;
    color: #fb7185 !important;
}
.ahd2__profile__actions [title="Delete"]:hover,
.ahd2__profile__actions [aria-label="Delete"]:hover {
    background: rgba(251,113,133,0.22) !important;
    border-color: #fb7185 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(251,113,133,0.30);
}

/* Light-mode variants */
.ahd[data-theme="ivory"] .ahd2__profile__actions [title="AI insight"],
.ahd[data-theme="ivory"] .ahd2__profile__actions [aria-label="AI insight"] {
    background: rgba(8,145,178,0.06) !important;
    border-color: rgba(8,145,178,0.28) !important;
    color: #0891b2 !important;
}
.ahd[data-theme="ivory"] .ahd2__profile__actions [title="Edit"],
.ahd[data-theme="ivory"] .ahd2__profile__actions [aria-label="Edit"] {
    background: rgba(23,1,172,0.06) !important;
    border-color: rgba(23,1,172,0.28) !important;
    color: #1701AC !important;
}
.ahd[data-theme="ivory"] .ahd2__profile__actions [title="Delete"],
.ahd[data-theme="ivory"] .ahd2__profile__actions [aria-label="Delete"] {
    background: rgba(220,38,38,0.06) !important;
    border-color: rgba(220,38,38,0.28) !important;
    color: #dc2626 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   v62 — Tool tile SVG icons + stronger profile action buttons
   ═══════════════════════════════════════════════════════════════════ */

/* Tool tile glyph — now hosts an inline SVG, give it a bigger,
   more saturated tile with per-category accent colour */
.ahd2__tool__glyph {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(23,1,172,0.30), rgba(90,71,220,0.18)) !important;
    border: 1px solid rgba(90,71,220,0.45) !important;
    color: #C7BFF5 !important;
    display: inline-grid !important;
    place-items: center !important;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(23,1,172,0.25), inset 0 1px 0 rgba(255,255,255,0.10);
}
.ahd2__tool__glyph svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 1.9 !important;
}
.ahd[data-theme="ivory"] .ahd2__tool__glyph {
    background: linear-gradient(135deg, rgba(23,1,172,0.10), rgba(90,71,220,0.05)) !important;
    border-color: rgba(23,1,172,0.30) !important;
    color: #1701AC !important;
}

/* Per-category icon tints — each category gets its own colour for
   visual variety. Charts stays brand indigo; others shift cyan/teal/
   amber/rose/violet to break the wall-of-indigo. */
.ahd2__tool--cat-dashas   .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(245,158,11,0.26), rgba(217,119,6,0.14)) !important; border-color: rgba(245,158,11,0.42) !important; color: #fbbf24 !important; box-shadow: 0 4px 12px rgba(245,158,11,0.22), inset 0 1px 0 rgba(255,255,255,0.10); }
.ahd2__tool--cat-yogas    .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(236,72,153,0.26), rgba(219,39,119,0.14)) !important; border-color: rgba(236,72,153,0.42) !important; color: #f0abfc !important; box-shadow: 0 4px 12px rgba(236,72,153,0.22), inset 0 1px 0 rgba(255,255,255,0.10); }
.ahd2__tool--cat-strength .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(20,184,166,0.26), rgba(13,148,136,0.14)) !important; border-color: rgba(20,184,166,0.42) !important; color: #5eead4 !important; box-shadow: 0 4px 12px rgba(20,184,166,0.22), inset 0 1px 0 rgba(255,255,255,0.10); }
.ahd2__tool--cat-kp       .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(6,182,212,0.26), rgba(8,145,178,0.14)) !important; border-color: rgba(6,182,212,0.42) !important; color: #67e8f9 !important; box-shadow: 0 4px 12px rgba(6,182,212,0.22), inset 0 1px 0 rgba(255,255,255,0.10); }
.ahd2__tool--cat-almanac  .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(167,139,250,0.26), rgba(139,92,246,0.14)) !important; border-color: rgba(167,139,250,0.42) !important; color: #c4b5fd !important; box-shadow: 0 4px 12px rgba(167,139,250,0.22), inset 0 1px 0 rgba(255,255,255,0.10); }

/* Light-mode tints */
.ahd[data-theme="ivory"] .ahd2__tool--cat-dashas   .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(245,158,11,0.10), rgba(217,119,6,0.06)) !important; border-color: rgba(245,158,11,0.32) !important; color: #b45309 !important; }
.ahd[data-theme="ivory"] .ahd2__tool--cat-yogas    .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(236,72,153,0.10), rgba(219,39,119,0.06)) !important; border-color: rgba(236,72,153,0.32) !important; color: #be185d !important; }
.ahd[data-theme="ivory"] .ahd2__tool--cat-strength .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(20,184,166,0.10), rgba(13,148,136,0.06)) !important; border-color: rgba(20,184,166,0.32) !important; color: #0d9488 !important; }
.ahd[data-theme="ivory"] .ahd2__tool--cat-kp       .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(6,182,212,0.10), rgba(8,145,178,0.06)) !important; border-color: rgba(6,182,212,0.32) !important; color: #0e7490 !important; }
.ahd[data-theme="ivory"] .ahd2__tool--cat-almanac  .ahd2__tool__glyph { background: linear-gradient(135deg, rgba(167,139,250,0.10), rgba(139,92,246,0.06)) !important; border-color: rgba(167,139,250,0.32) !important; color: #6d28d9 !important; }

/* v66 — Profile action buttons SHINING + BRIGHT versions */
.ahd2__profile__actions .ahd2__btn--icon {
    width: 42px !important;
    height: 42px !important;
    border-width: 1.5px !important;
    position: relative;
    overflow: hidden;
}
.ahd2__profile__actions .ahd2__btn--icon svg {
    width: 19px !important;
    height: 19px !important;
    stroke-width: 2.6 !important;
    /* Dark halo (not a same-hue glow) so the bright icon reads clearly
       against its translucent same-coloured glass button in dark mode. */
    filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.6));
}
/* Shimmer overlay — diagonal glossy sweep on hover */
.ahd2__profile__actions .ahd2__btn--icon::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.ahd2__profile__actions .ahd2__btn--icon:hover::before { transform: translateX(100%); }

/* AI insight — vibrant cyan with bright glow */
.ahd2__profile__actions button[aria-label="AI insight"],
.ahd2__profile__actions a[aria-label="AI insight"] {
    background: linear-gradient(135deg, rgba(34,211,238,0.60), rgba(6,182,212,0.46)) !important;
    border-color: #22d3ee !important;
    color: #ecfeff !important;
    box-shadow: 0 0 0 1px rgba(34,211,238,0.45), 0 4px 14px rgba(34,211,238,0.40), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}
.ahd2__profile__actions button[aria-label="AI insight"]:hover,
.ahd2__profile__actions a[aria-label="AI insight"]:hover {
    background: linear-gradient(135deg, #22d3ee, #06b6d4) !important;
    color: #0b0f1a !important;
    box-shadow: 0 0 0 2px rgba(34,211,238,0.55), 0 8px 22px rgba(34,211,238,0.60), inset 0 1px 0 rgba(255,255,255,0.40) !important;
    transform: translateY(-2px);
}

/* Edit — vibrant indigo with bright glow */
.ahd2__profile__actions a[aria-label="Edit"] {
    background: linear-gradient(135deg, rgba(139,123,232,0.60), rgba(90,71,220,0.50)) !important;
    border-color: #8B7BE8 !important;
    color: #f5f3ff !important;
    box-shadow: 0 0 0 1px rgba(139,123,232,0.45), 0 4px 14px rgba(90,71,220,0.40), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}
.ahd2__profile__actions a[aria-label="Edit"]:hover {
    background: linear-gradient(135deg, #8B7BE8, #5A47DC) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(139,123,232,0.55), 0 8px 22px rgba(90,71,220,0.60), inset 0 1px 0 rgba(255,255,255,0.40) !important;
    transform: translateY(-2px);
}

/* Delete — vibrant rose with bright glow */
.ahd2__profile__actions button[aria-label="Delete"] {
    background: linear-gradient(135deg, rgba(251,113,133,0.60), rgba(244,63,94,0.48)) !important;
    border-color: #fb7185 !important;
    color: #fff1f2 !important;
    box-shadow: 0 0 0 1px rgba(251,113,133,0.45), 0 4px 14px rgba(251,113,133,0.40), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}
.ahd2__profile__actions button[aria-label="Delete"]:hover {
    background: linear-gradient(135deg, #fb7185, #e11d48) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(251,113,133,0.55), 0 8px 22px rgba(251,113,133,0.60), inset 0 1px 0 rgba(255,255,255,0.40) !important;
    transform: translateY(-2px);
}

/* Light-mode variants — saturated but darker for white-bg readability */
.ahd[data-theme="ivory"] .ahd2__profile__actions button[aria-label="AI insight"],
.ahd[data-theme="ivory"] .ahd2__profile__actions a[aria-label="AI insight"] {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    border-color: #0891b2 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(8,145,178,0.50), 0 4px 14px rgba(8,145,178,0.45) !important;
}
.ahd[data-theme="ivory"] .ahd2__profile__actions a[aria-label="Edit"] {
    background: linear-gradient(135deg, #5A47DC, #1701AC) !important;
    border-color: #1701AC !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(23,1,172,0.50), 0 4px 14px rgba(23,1,172,0.45) !important;
}
.ahd[data-theme="ivory"] .ahd2__profile__actions button[aria-label="Delete"] {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(220,38,38,0.50), 0 4px 14px rgba(220,38,38,0.45) !important;
}

/* ── TOOL UNIVERSE ──────────────────────────────────────────────── */
.ahd2__tools__cats button {
    font-size: 0.8rem !important;
    padding: 7px 16px !important;
}
.ahd2__tool { padding: 16px 18px; gap: 14px; }
.ahd2__tool__glyph {
    width: 42px; height: 42px;
    font-size: 1.3rem;
}
.ahd2__tool h4 {
    font-size: 1.02rem !important;
    letter-spacing: -0.01em;
    margin-bottom: 5px;
}
.ahd2__tool p {
    font-size: 0.8rem !important;
    line-height: 1.5;
}
.ahd2__tool__cat {
    font-size: 0.6rem !important;
    letter-spacing: 0.12em;
    top: 12px; right: 14px;
}

/* ── SKY CHART — bigger glyphs/text inside SVG ─────────────────── */
.ahd2__skychart__sign { font-size: 11.5px !important; font-weight: 800; }
.ahd2__skychart__now  { font-size: 12px !important; font-weight: 700; }
.ahd2__skychart__date { font-size: 7.5px !important; font-weight: 700; }

/* Planet code labels INSIDE the sky chart (white-on-color circles) */
.ahd2__skychart text[font-size="6.5"] {
    font-size: 8px !important;
    font-weight: 800;
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
.ahf__bar {
    font-size: 0.8rem !important;
    padding: 16px 28px 18px !important;
}
.ahf__bar__brand { font-size: 0.84rem !important; }
.ahf__bar__center { gap: 14px; }
.ahf__bar a { font-size: 0.8rem !important; }
.ahf__build {
    font-size: 0.74rem !important;
    padding: 6px 14px !important;
}
.ahf__bar__region svg { width: 13px; height: 13px; }

/* ── Avatar circles — slightly larger initials ─────────────────── */
.ahd2__profile__avi { font-size: 1.18rem !important; width: 46px; height: 46px; }

/* ── SVG icon stroke standardisation — all line icons 1.6-1.8px ── */
.ahd2 svg:not(.ahd2__skychart):not(.ahd2__profile__sigil svg) {
    stroke-linecap: round;
    stroke-linejoin: round;
}
