@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&display=swap");
/* ==========================================================================
   TRAC theme — "Classic": a standard, international look taken from the logo.
   One brand colour (TRAC navy) for what is chosen, a touch of the logo's gold,
   neutral greys for everything else, and dark text throughout. The only light
   text is on the main action buttons, which use solid navy for contrast.
   Green and red are kept only for meaning (good / avoid).
   To go back to the plain look, delete the THEME line in Views/Shared/_ChartLayout.cshtml.
   ========================================================================== */
:root {
    /* Navy family taken from the reference portal: dark navy banner, navy menu, lighter navy cards. */
    /* Saffron family (the "navy" names are kept so every rule follows): saffron bars and buttons
       with white text, yellow for what is chosen, dark text everywhere else. */
    --k-navy-900: #5A2306; --k-navy-800: #C2410C; --k-navy-700: #EF6C00; --k-navy-600: #F57C00;
    --k-navy-200: #FFD3A3; --k-navy-100: #FFEAD1; --k-navy-50: #FFF6EB;
    --k-ink-accent: #9A3412; --k-yellow: #FFC107; --k-yellow-ink: #1F1A10;
    --k-gold-600: #E0A800; --k-gold-500: #FFC107; --k-gold-100: #FFF6D6;
    --k-ink: #111827; --k-ink-2: #374151; --k-ink-3: #4B5563;
    --k-page: #FFF9F2; --k-card: #FFFFFF; --k-line: #E2E6ED; --k-line-2: #EEF1F5;

    /* Every page reads its accent from these. */
    --c: var(--k-navy-700); --c50: var(--k-navy-50); --c100: var(--k-navy-100); --c200: var(--k-navy-200); --cink: var(--k-navy-900);
}

.trac { background: var(--k-page); }
.trac-main { background: var(--k-page); }

/* ---------- Header: white, a thin gold rule ---------- */
.trac-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--k-line);
    box-shadow: 0 1px 0 rgba(201, 150, 43, 0.55), 0 2px 10px rgba(17, 24, 39, 0.05);
    color: var(--k-ink);
}
.trac-header-brand img { height: 42px; }
.trac-header-systems { background: var(--k-page); border: 1px solid var(--k-line); border-radius: 12px; padding: 4px; box-shadow: none; }
.trac-header .trac-system { color: var(--k-ink-2); font-weight: 500; }
.trac-header .trac-system:hover { background: #FFFFFF; color: var(--k-ink); }
.trac-header .trac-system .nav-icon { color: var(--k-ink-3); }
.trac-header .trac-system.is-current, .trac-header .tp-menu.is-open .tp-menu-btn {
    background: #FFFFFF !important; color: var(--k-navy-900) !important; font-weight: 600;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.10), inset 0 -2px 0 var(--k-navy-700);
}
.trac-header .trac-system.is-current .nav-icon, .trac-header .tp-menu.is-open .tp-menu-btn .nav-icon { color: var(--k-ink-accent); }
.trac-header-native b { color: var(--k-ink); }
.trac-header-native span { color: var(--k-ink-3); }
.trac-header-btn { background: #FFFFFF; border: 1px solid var(--k-line); color: var(--k-ink); }
.trac-header-btn:hover { border-color: var(--k-navy-200); background: var(--k-navy-50); }
.trac-header-btn .nav-icon { color: var(--k-ink-3); }
.trac-header-btn.is-primary { background: var(--k-navy-700); border-color: var(--k-navy-700); color: #FFFFFF; box-shadow: 0 2px 6px rgba(239, 108, 0, 0.25); }
.trac-header-btn.is-primary .nav-icon { color: #F3D58E; }
.trac-header-btn.is-primary:hover { background: var(--k-navy-800); }

/* ---------- Panes ---------- */
.trac-ws-charts, .trac-ws-details {
    background: var(--k-card); border: 1px solid var(--k-line); border-radius: 14px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 6px 18px rgba(17, 24, 39, 0.05);
}
.trac-ws-bar { background: #FFFFFF; border-bottom: 1px solid var(--k-line-2); }
.trac-ws-subbar { background: var(--k-navy-50); border-bottom: 1px solid var(--k-line-2); }
.trac-ws-subpick span { text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.72rem; color: var(--k-navy-800); font-weight: 600; }
.trac-ws-split::after { background: #D5DAE3; }
.trac-ws-split:hover::after, .trac-ws.is-dragging .trac-ws-split::after { background: var(--k-navy-600); }

/* ---------- Tabs ---------- */
.trac-ws-tab { color: var(--k-ink-2); border-radius: 8px; }
.trac-ws-tab:hover { background: var(--k-page); color: var(--k-ink); }
.trac-ws-tab[aria-selected="true"], .trac-ws-tab.is-on {
    background: var(--k-navy-100); color: var(--k-navy-900); font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--k-navy-700);
}
.trac-ws-menu { border-color: var(--k-line); }
.trac-ws-menu .trac-ws-tab[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--k-navy-700); }

/* ---------- Buttons and fields ---------- */
.trac-ws-btn { background: #FFFFFF; border: 1px solid var(--k-line); color: var(--k-ink); }
.trac-ws-btn:hover { border-color: var(--k-navy-200); background: var(--k-navy-50); }
.trac-ws-btn.is-on, .trac-ws.is-max .trac-ws-btn[data-ws-max] { background: var(--k-navy-100); border-color: var(--k-navy-200); color: var(--k-navy-900); }
.trac-dash-styles { border: 1px solid var(--k-line); border-radius: 9px; }
.trac-dash-styles button { color: var(--k-ink-2); background: #FFFFFF; }
.trac-dash-styles button.is-on { background: var(--k-navy-100); color: var(--k-navy-900); box-shadow: inset 0 -2px 0 var(--k-navy-700); }
.trac-dash-actions button.is-primary { background: var(--k-navy-700); border-color: var(--k-navy-700); color: #FFFFFF; }
.trac-ws-more, .trac-ws-pick, .trac-ws-subpick select, .trac-dash-field select, .trac-dash-field input, .trac-opt select {
    border: 1px solid #D5DAE3; border-radius: 9px; color: var(--k-ink); background-color: #FFFFFF;
}
.trac-ws-more:hover, .trac-ws-subpick select:hover { border-color: var(--k-navy-200); }
.trac-ws-more:focus, .trac-ws-pick:focus, .trac-ws-subpick select:focus, .trac-opt select:focus,
.trac-dash-field select:focus, .trac-dash-field input:focus {
    outline: none; border-color: var(--k-navy-600); box-shadow: 0 0 0 3px rgba(43, 75, 168, 0.18);
}
.trac-dash-settings { border: 1px solid var(--k-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(17, 24, 39, 0.14); }
.trac-dash-note { background: var(--k-gold-100); color: #5C4108; }

/* ---------- Page content ---------- */
.trac-ws-page h3, .trac-ws-page .trac-part > h3 { color: var(--k-ink); font-family: "IBM Plex Serif", Georgia, serif; font-weight: 500; font-size: 1.06rem; }
.trac-ws-page .trac-part > h3:first-child { padding-bottom: 0.35rem; border-bottom: 1px solid var(--k-line); }
.trac-ws-page .trac-lede { color: var(--k-ink-2); }
.trac-opt label, .trac-dash-field > span { text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.7rem; color: var(--k-ink-3); font-weight: 600; }
.trac-options { background: #FFFFFF; border: 1px solid var(--k-line); border-radius: 12px; }

.trac-ws-page .trac-tablewrap { border: 1px solid var(--k-line); border-radius: 10px; background: #FFFFFF; }
.trac-ws-page .trac-table { border: 0; }
.trac-ws-page .trac-table tbody tr:last-child td { border-bottom: 0; }
.trac-ws-page .trac-table thead th { color: var(--k-ink); background: var(--k-navy-50); border-bottom: 1px solid var(--k-navy-200); letter-spacing: 0.02em; }
.trac-ws-page .trac-table td { border-bottom: 1px solid var(--k-line-2); }
.trac-ws-page .trac-table tbody tr:hover td { background: #F8F9FC; }
.trac-ws-page .trac-table td.name, .trac-ws-page .trac-table tr.lagna-row td { color: var(--k-ink); }

.trac-ws .trac-dash-summary { background: var(--k-navy-50); border-top: 1px solid var(--k-line-2); }
.trac-ws .trac-dash-summary em { color: var(--k-navy-800); font-weight: 600; }

.trac-ws-page::-webkit-scrollbar { width: 10px; height: 10px; }
.trac-ws-page::-webkit-scrollbar-thumb { background: #D5DAE3; border-radius: 10px; border: 2px solid #FFFFFF; }
.trac-ws-page::-webkit-scrollbar-thumb:hover { background: #B7BFCC; }
.trac-ws-page { scrollbar-color: #D5DAE3 transparent; }

/* ==========================================================================
   Panchang pages and menu: the same navy accent. Green and red stay for
   meaning (auspicious / to avoid); the menu groups keep only a small coloured dot.
   ========================================================================== */
.tp-c-saffron, .tp-t-saffron, .tp-c-marigold, .tp-t-marigold, .tp-c-lotus, .tp-t-lotus,
.tp-c-peacock, .tp-t-peacock, .tp-c-sky, .tp-t-sky, .tp-c-note, .tp-t-note {
    --c: var(--k-navy-700); --c50: var(--k-navy-50); --c100: var(--k-navy-100); --c200: var(--k-navy-200); --cink: var(--k-navy-900);
}
.tp-c-note, .tp-t-note { --c: #9AA3B2; --c50: #F8F9FB; --c100: #EEF1F5; --c200: #DDE2EA; --cink: var(--k-ink); }
.tp-c-leaf, .tp-t-leaf { --c: #2E7D32; --c50: #F3F9F3; --c100: #E1F0E2; --c200: #C2E0C4; --cink: #1B4D1F; }
.tp-c-rose, .tp-t-rose { --c: #C62828; --c50: #FDF4F4; --c100: #FAE3E3; --c200: #F2C4C4; --cink: #7F1D1D; }
.tp-mega-group.tp-c-saffron .tp-dot { background: #E07B1F; }
.tp-mega-group.tp-c-marigold .tp-dot { background: #C9962B; }
.tp-mega-group.tp-c-rose .tp-dot { background: #C62828; }
.tp-mega-group.tp-c-lotus .tp-dot { background: #7E57C2; }
.tp-mega-group.tp-c-peacock .tp-dot { background: #00897B; }
.tp-mega-group.tp-c-leaf .tp-dot { background: #2E7D32; }
.tp-mega-group.tp-c-sky .tp-dot { background: #1E88E5; }
.tp-mega-group .tp-dot { box-shadow: none; }
.tp-mega-panel.tp-c-rose, .tp-mega-panel.tp-c-leaf, .tp-mega-group.tp-c-rose, .tp-mega-group.tp-c-leaf {
    --c: var(--k-navy-700); --c50: var(--k-navy-50); --c100: var(--k-navy-100); --c200: var(--k-navy-200); --cink: var(--k-navy-900);
}
.tp-mega::before { background: var(--k-gold-500); height: 3px; }
.tp-mega { border-color: var(--k-line); box-shadow: 0 20px 50px rgba(17, 24, 39, 0.16), 0 4px 12px rgba(17, 24, 39, 0.06); }
.tp-mega-groups { background: var(--k-page); border-right-color: var(--k-line); }
.tp-tile { background: #FFFFFF; border-color: var(--k-line); }
.tp-tile:hover { background: var(--k-navy-50); border-color: var(--k-navy-200); }
.tp-tile.is-on { background: var(--k-navy-100); border-color: var(--k-navy-600); }
.tp-page { background: var(--k-page); }
.tp-hero { background: #FFFFFF; border-color: var(--k-line); border-left: 4px solid var(--k-navy-700); }
.tp-hero::after { display: none; }
.tp-controls { border-color: var(--k-line); }
.tp-field input, .tp-field select { border-color: #D5DAE3; }
.tp-go { background: var(--k-navy-700); color: #FFFFFF; box-shadow: 0 2px 6px rgba(239, 108, 0, 0.25); }
.tp-go:hover { background: var(--k-navy-800); filter: none; }
.tp-card { border-color: var(--k-line); border-top: 3px solid var(--c); box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 6px 18px rgba(17, 24, 39, 0.04); }
.tp-card h2::before { border-radius: 2px; }
.tp-fact { background: #FAFBFC; border-color: var(--k-line-2); }
.tp-table tbody tr:nth-child(even) td { background: #FAFBFC; }
.tp-cal-day { border-color: var(--k-line); }
.tp-cal-day.is-purnima { background: linear-gradient(160deg, #FFF7DD, #FFFFFF 70%); border-color: #EBD9A3; }
.tp-cal-day.is-amavasya { background: linear-gradient(160deg, #EDEFF5, #FFFFFF 70%); border-color: #D5DAE3; }
.tp-chip.is-festival { background: var(--k-navy-100); color: var(--k-navy-900); }
.tp-chip.is-sankranti { background: var(--k-gold-100); color: #5C4108; }
.tp-citylist li.is-active, .tp-citylist li:hover { background: var(--k-navy-50); }

/* ==========================================================================
   Birth-details form
   ========================================================================== */
.trac-drawer { background: rgba(15, 30, 74, 0.38); backdrop-filter: blur(3px); padding: 2.2rem 1rem; }
.trac-home-mode .trac-drawer { background: rgba(15, 30, 74, 0.30); }
.trac-drawer .trac-form {
    max-width: 680px; padding: 0; border-radius: 18px; overflow: hidden; background: #FFFFFF;
    box-shadow: 0 30px 70px rgba(15, 30, 74, 0.28), 0 6px 18px rgba(15, 30, 74, 0.10);
    color: var(--k-ink); font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.trac-home-mode .trac-drawer .trac-form { max-height: none; overflow: hidden; }
.trac-drawer .trac-form > .trac-alert { margin: 1rem 1.6rem 0; max-width: none; border-radius: 10px; }

.bf-head {
    position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.6rem 1rem;
    background: linear-gradient(180deg, var(--k-navy-50), #FFFFFF); border-bottom: 1px solid var(--k-line);
}
.bf-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--k-gold-500), transparent 70%); }
.bf-logo { width: 116px; height: auto; flex: 0 0 auto; }
.bf-title { flex: 1 1 auto; min-width: 0; padding-left: 1rem; border-left: 1px solid var(--k-line); }
.bf-title h2 { margin: 0; padding: 0; border: 0; font-family: "IBM Plex Serif", Georgia, serif; font-weight: 500; font-size: 1.35rem; color: var(--k-ink); }
.bf-title p { margin: 0.15rem 0 0; color: var(--k-ink-3); font-size: 0.88rem; }
.bf-close {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--k-line); background: #FFFFFF;
    color: var(--k-ink-2); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.bf-close:hover { background: var(--k-page); color: var(--k-ink); }

.bf-section { padding: 1.05rem 1.6rem 0.2rem; }
.bf-section + .bf-section { border-top: 1px solid var(--k-line-2); }
.bf-section-title { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.75rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--k-navy-800); }
.bf-step { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--k-navy-100); color: var(--k-navy-900); font-size: 0.75rem; letter-spacing: 0; }
.bf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.bf-wide { grid-column: 1 / -1; }
.bf-person .bf-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.bf-person .bf-wide { grid-column: auto; }

.trac-form .trac-field { margin-bottom: 0.9rem; }
.trac-form .trac-field label, .bf-label { display: block; margin-bottom: 0.32rem; font-size: 0.82rem; font-weight: 600; color: var(--k-ink); }
.trac-form .trac-field input, .trac-form .trac-field select {
    height: 44px; padding: 0 0.8rem; border: 1px solid #D0D6E0; border-radius: 10px; background: #FFFFFF;
    font: inherit; font-size: 0.95rem; color: var(--k-ink); transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.trac-form .trac-field input::placeholder { color: #6B7280; }
.trac-form .trac-field input:hover, .trac-form .trac-field select:hover { border-color: #B4BDCB; }
.trac-form .trac-field input:focus, .trac-form .trac-field select:focus {
    outline: none; border-color: var(--k-navy-600); box-shadow: 0 0 0 3px rgba(43, 75, 168, 0.18);
}
.bf-input { position: relative; }
.bf-input .bf-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--k-ink-3); pointer-events: none; z-index: 1; }
.bf-input .bf-icon svg { width: 18px; height: 18px; display: block; }
.trac-form .bf-input > input { padding-left: 2.4rem; }
.bf-input .trac-citylist { z-index: 5; }

.bf-seg { display: flex; height: 44px; padding: 3px; border: 1px solid #D0D6E0; border-radius: 10px; background: var(--k-page); }
.bf-seg label { flex: 1 1 0; margin: 0 !important; position: relative; cursor: pointer; }
.bf-seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.bf-seg span { display: flex; align-items: center; justify-content: center; height: 100%; border-radius: 8px; font-size: 0.92rem; font-weight: 500; color: var(--k-ink-2); transition: background 0.12s ease; }
.bf-seg label:hover span { color: var(--k-ink); }
.bf-seg input:checked + span { background: #FFFFFF; color: var(--k-navy-900); font-weight: 600; box-shadow: 0 1px 3px rgba(17, 24, 39, 0.14), inset 0 -2px 0 var(--k-navy-700); }
.bf-seg input:focus-visible + span { outline: 2px solid var(--k-navy-600); outline-offset: 1px; }

.bf-placeinfo { display: inline-block; margin-top: 0.45rem; padding: 0.25rem 0.6rem; border-radius: 7px; background: var(--k-navy-50); border: 1px solid var(--k-navy-100); color: var(--k-navy-900); font-size: 0.8rem; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.bf-placeinfo:empty, .bf-placeinfo[hidden] { display: none; }
.trac-form .trac-hint { color: var(--k-ink-3); font-size: 0.78rem; margin-top: 0.35rem; }
.trac-form .trac-error { color: #B91C1C; }

.trac-settings-toggle.bf-adv {
    display: flex; align-items: center; gap: 0.8rem; width: calc(100% - 3.2rem); margin: 0.3rem 1.6rem 0.9rem; padding: 0.7rem 0.9rem;
    border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-page); text-transform: none; letter-spacing: 0;
    text-align: left; color: var(--k-ink); cursor: pointer;
}
.trac-settings-toggle.bf-adv:hover { background: var(--k-navy-50); border-color: var(--k-navy-200); }
.bf-adv-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.bf-adv-text b { font-size: 0.9rem; font-weight: 600; color: var(--k-ink); }
.bf-adv-text small { font-size: 0.8rem; color: var(--k-ink-3); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-adv .trac-settings-sign { display: none; }
.bf-chev { width: 20px; height: 20px; color: var(--k-ink-3); transition: transform 0.15s ease; }
.bf-chev svg { width: 20px; height: 20px; display: block; }
.bf-adv[aria-expanded="true"] .bf-chev { transform: rotate(180deg); }
.bf-adv[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; background: var(--k-navy-50); }

.trac-settings.bf-settings { margin: 0 1.6rem 0.9rem; padding: 0.9rem 0.9rem 0.2rem; border: 1px solid var(--k-line); border-top: 0; border-radius: 0 0 12px 12px; background: #FFFFFF; }
.bf-subtitle { margin: 0.1rem 0 0.55rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--k-navy-800); }
.bf-note { margin: -0.4rem 0 0.9rem !important; }
.trac-form .trac-field input.num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.9rem; }

.trac-actions.bf-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin: 0; padding: 0.95rem 1.6rem 1.15rem; border-top: 1px solid var(--k-line); background: #FAFBFC; }
.trac-form .trac-btn { height: 46px; border-radius: 10px; font-size: 0.98rem; font-weight: 600; }
.trac-form .trac-btn.bf-submit { flex: 1 1 auto; background: var(--k-navy-700); border: 1px solid var(--k-navy-700); color: #FFFFFF; box-shadow: 0 3px 10px rgba(239, 108, 0, 0.28); }
.trac-form .trac-btn.bf-submit:hover { background: var(--k-navy-800); }
.trac-form .trac-btn.bf-submit span { color: #F3D58E; margin-left: 0.25rem; }
.trac-form .trac-btn.ghost { flex: 0 0 auto; padding: 0 1.3rem; background: #FFFFFF; border: 1px solid #D0D6E0; color: var(--k-ink); }
.trac-form .trac-btn.ghost:hover { background: var(--k-page); }

@media (max-width: 600px) {
    .trac-drawer { padding: 0.6rem; }
    .bf-head { flex-wrap: wrap; padding: 1rem; }
    .bf-logo { width: 96px; }
    .bf-title { flex-basis: 100%; order: 3; padding-left: 0; border-left: 0; }
    .bf-close { margin-left: auto; }
    .bf-section { padding: 0.9rem 1rem 0.1rem; }
    .bf-grid, .bf-person .bf-grid { grid-template-columns: 1fr; }
    .trac-settings-toggle.bf-adv { width: calc(100% - 2rem); margin: 0.3rem 1rem 0.9rem; }
    .trac-settings.bf-settings { margin: 0 1rem 0.9rem; }
    .trac-actions.bf-actions { padding: 0.9rem 1rem; }
}

/* Action buttons inside the pages use the same navy as the main button. */
.trac .trac-btn:not(.ghost) { background: var(--k-navy-700); border-color: var(--k-navy-700); color: #FFFFFF; }
.trac .trac-btn:not(.ghost):hover { background: var(--k-navy-800); }

/* ==========================================================================
   Birth-details form: always fits the screen.
   The dark layer no longer scrolls (its scrollbar used to count as a click
   outside and close the form). The form itself scrolls; its header and the
   Calculate button stay pinned, so the button is always visible.
   ========================================================================== */
.trac-drawer, .trac-home-mode .trac-drawer {
    overflow: hidden; align-items: center; padding: 1.2rem 1rem;
}
.trac-drawer .trac-form, .trac-home-mode .trac-drawer .trac-form {
    max-height: calc(100vh - 2.4rem); max-height: calc(100dvh - 2.4rem);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
}
.trac-drawer .bf-head { position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, var(--k-navy-50), #FFFFFF); }
.trac-drawer .trac-actions.bf-actions {
    position: sticky; bottom: 0; z-index: 5;
    box-shadow: 0 -8px 16px -10px rgba(15, 30, 74, 0.25);
}
html.trac-drawer-open, html.trac-drawer-open body { overflow: hidden; }

/* Short screens (most laptops): a more compact header and spacing. */
@media (max-height: 820px) {
    .trac-drawer .bf-head { padding: 0.7rem 1.4rem 0.6rem; }
    .trac-drawer .bf-logo { width: 92px; }
    .trac-drawer .bf-title h2 { font-size: 1.15rem; margin: 0; }
    .trac-drawer .bf-title p { display: none; }
    .trac-drawer .bf-section { padding-top: 0.7rem; padding-bottom: 0; }
    .trac-drawer .trac-actions.bf-actions { padding: 0.6rem 1.4rem 0.7rem; }
    .trac-form .trac-btn { height: 42px; }
}
@media (max-width: 600px) {
    .trac-drawer, .trac-home-mode .trac-drawer { padding: 0.5rem; }
    .trac-drawer .trac-form, .trac-home-mode .trac-drawer .trac-form {
        max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem); border-radius: 14px;
    }
}

/* ---- Chart style: pages follow the style chosen in the chart pane ---- */
.trac-cs{display:block}
.trac-cs > svg{display:block;width:100%;height:auto;margin:0 auto}
.trac-cs:not(.is-default){display:none}
[data-chart-style="North Indian"] .trac-cs[data-cs="North Indian"],
[data-chart-style="South Indian"] .trac-cs[data-cs="South Indian"]{display:block}
[data-chart-style="North Indian"] .trac-cs.is-default:not([data-cs="North Indian"]),
[data-chart-style="South Indian"] .trac-cs.is-default:not([data-cs="South Indian"]){display:none}
.ov-card > .trac-cs > svg{max-width:340px}

/* ==========================================================================
   Panchang menu: navy banner, navy group rail with lighter-navy cards and
   white text, white page tiles on a light grey panel. Held in the window by
   left/right insets, so it is never cut off at any width or zoom.
   ========================================================================== */
.tp-menu .tp-mega {
    --pm-banner: #C2410C; --pm-rail: #EF6C00; --pm-card: #F68A1F; --pm-card-hi: #FF9A2E;
    --pm-blue: #EF6C00; --pm-page: #FFF9F2; --pm-line: #F3E3CF; --pm-ink: #1F1A10; --pm-ink-2: #4A5568;
    position: fixed; left: 12px; right: 12px; margin: 0 auto; transform: none;
    width: auto; max-width: 1100px; max-height: calc(100dvh - 84px);
    display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    background: var(--pm-page); border: 1px solid #C2410C; border-radius: 14px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(120, 50, 0, 0.28), 0 4px 14px rgba(120, 50, 0, 0.12);
    color: var(--pm-ink);
}
.tp-menu .tp-mega[hidden] { display: none; }
.tp-menu .tp-mega::before { display: none; }

.tp-mega-banner {
    grid-column: 1 / -1; display: flex; align-items: center; gap: 0.85rem;
    padding: 0.85rem 1.1rem; background: var(--pm-banner); color: #FFFFFF;
    border-bottom: 3px solid #C9962B;
}
.tp-mega-banner-icon {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.12); color: #FFFFFF;
}
.tp-mega-banner-icon svg { width: 22px; height: 22px; }
.tp-mega-banner-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tp-mega-banner-text b { font-size: 1.05rem; font-weight: 700; color: #FFFFFF; }
.tp-mega-banner-text span { font-size: 0.82rem; color: #FFE7CC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-mega-close {
    margin-left: auto; width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.25); background: transparent; color: #FFFFFF;
    font: inherit; font-size: 0.95rem; cursor: pointer;
}
.tp-mega-close:hover { background: rgba(255, 255, 255, 0.14); }

.tp-menu .tp-mega-groups {
    display: flex; flex-direction: column; gap: 6px; padding: 14px 12px;
    background: var(--pm-rail); border-right: 0; overflow-y: auto; min-height: 0;
    scrollbar-color: #FFB067 transparent;
}
.tp-menu .tp-mega-group {
    display: flex; align-items: center; gap: 0.65rem; width: 100%;
    padding: 0.7rem 0.8rem; border: 1px solid transparent; border-radius: 10px;
    background: var(--pm-card); color: #FFFFFF; box-shadow: none;
    font: inherit; font-size: 0.93rem; font-weight: 600; text-align: left; cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.tp-menu .tp-mega-group:hover { background: var(--pm-card-hi); }
.tp-menu .tp-mega-group.is-on {
    background: #FFFFFF; color: var(--pm-banner); border-color: #FFFFFF;
    box-shadow: inset 4px 0 0 #C9962B;
}
.tp-menu .tp-mega-group:focus-visible { outline: 2px solid #C9962B; outline-offset: 2px; }
.tp-menu .tp-mega-group .tp-dot { width: 9px; height: 9px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.tp-menu .tp-mega-group.is-on .tp-dot { box-shadow: none; }
.tp-mega-group-label { flex: 1 1 auto; min-width: 0; }
.tp-mega-count {
    flex: 0 0 auto; min-width: 1.6rem; padding: 0.05rem 0.4rem; border-radius: 999px; text-align: center;
    font-size: 0.72rem; font-weight: 700; background: rgba(255, 255, 255, 0.16); color: #FFFFFF;
}
.tp-menu .tp-mega-group.is-on .tp-mega-count { background: #FFEAD1; color: var(--pm-banner); }

.tp-menu .tp-mega-items { overflow-y: auto; min-height: 0; padding: 16px 18px 18px; background: var(--pm-page); }
.tp-menu .tp-mega-title {
    display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem;
    margin: 0 0 0.8rem; padding: 0 0 0.55rem; border-bottom: 1px solid var(--pm-line);
    font-family: inherit; font-size: 1.05rem; font-weight: 700; color: var(--pm-ink);
}
.tp-menu .tp-mega-title small { font-size: 0.78rem; font-weight: 600; color: var(--pm-ink-2); }
.tp-menu .tp-mega-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tp-menu .tp-tile {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.62rem 0.8rem; border-radius: 9px; text-decoration: none;
    background: #FFFFFF; border: 1px solid var(--pm-line); border-left: 3px solid #FFD3A3;
    color: var(--pm-ink); font-size: 0.9rem; font-weight: 500; line-height: 1.25;
    box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.tp-menu .tp-tile:hover {
    background: #FFFFFF; color: var(--pm-ink); border-color: #FFD3A3; border-left-color: var(--pm-blue);
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 27, 45, 0.08);
}
.tp-menu .tp-tile.is-on { background: #FFF3E0; border-color: #FFD3A3; border-left-color: var(--pm-blue); color: #C2410C; font-weight: 700; }
.tp-menu .tp-tile.is-soon { background: #FAFBFC; border-style: dashed; border-left-style: solid; color: var(--pm-ink-2); }
.tp-tile-go { font-style: normal; font-size: 1.1rem; line-height: 1; color: #C9A27A; transition: color 0.12s ease, transform 0.12s ease; }
.tp-menu .tp-tile:hover .tp-tile-go, .tp-menu .tp-tile.is-on .tp-tile-go { color: var(--pm-blue); transform: translateX(2px); }
.tp-menu .tp-tile em { background: #FFEAD1; color: #EF6C00; }

@media (max-width: 760px) {
    .tp-menu .tp-mega { left: 8px; right: 8px; grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); max-height: calc(100dvh - 76px); }
    .tp-mega-banner { padding: 0.7rem 0.85rem; }
    .tp-mega-banner-text span { display: none; }
    .tp-menu .tp-mega-groups { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding: 10px; gap: 6px; }
    .tp-menu .tp-mega-group { width: auto; flex: 0 0 auto; padding: 0.45rem 0.7rem; font-size: 0.86rem; white-space: nowrap; }
    .tp-mega-count { display: none; }
    .tp-menu .tp-mega-items { padding: 12px; }
    .tp-menu .tp-mega-tiles { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}

/* ---- Foreign travel reading ---- */
.ftr { color: var(--k-ink, #111827); }
.ftr-head { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; margin: 0.4rem 0 1.2rem;
    background: #FFFFFF; border: 1px solid var(--k-line, #E5E7EB); border-left: 4px solid #1E3A8A; border-radius: 10px; }
.ftr-head h3 { margin: 0 0 0.35rem; font-size: 1.12rem; color: #1F1A10; }
.ftr-head p { margin: 0; line-height: 1.55; color: #1F2937; }
.ftr-badge { flex: 0 0 auto; padding: 0.3rem 0.7rem; border-radius: 999px; font-weight: 700; font-size: 0.82rem;
    background: #FFEAD1; color: #1E3A8A; white-space: nowrap; }
.ftr-yes .ftr-badge { background: #E3F1E4; color: #1B4D1F; }
.ftr-yes { border-left-color: #2E7D32; }
.ftr-mixed .ftr-badge { background: #FDF1D8; color: #6B4A00; }
.ftr-mixed { border-left-color: #C9962B; }
.ftr-no .ftr-badge { background: #FAE3E3; color: #7F1D1D; }
.ftr-no { border-left-color: #C62828; }
.ftr-section { margin: 0 0 1.25rem; }
.ftr-section h3 { margin: 0 0 0.5rem; font-size: 1.02rem; color: #1F1A10; padding-bottom: 0.3rem; border-bottom: 1px solid var(--k-line, #E5E7EB); }
.ftr-section p { margin: 0 0 0.6rem; line-height: 1.65; color: #1F2937; }
.ftr-dates { list-style: none; margin: 0.2rem 0 0.4rem; padding: 0; display: grid; gap: 0.45rem; }
.ftr-dates li { display: grid; grid-template-columns: minmax(10.5rem, max-content) 1fr; gap: 0.75rem; padding: 0.55rem 0.75rem;
    background: #F8FAFC; border: 1px solid var(--k-line, #E5E7EB); border-radius: 8px; line-height: 1.5; color: #1F2937; }
.ftr-dates b { color: #1F1A10; }
.ftr-treatment { padding: 0.8rem 0.9rem; background: #FFFBF2; border: 1px solid #F1DFB8; border-radius: 10px; }
.ftr-treatment h3 { border-bottom-color: #F1DFB8; }
.ftr-caution { font-size: 0.9rem; color: #374151; font-style: italic; margin-top: 0.4rem; }
@media (max-width: 640px) { .ftr-dates li { grid-template-columns: 1fr; gap: 0.2rem; } .ftr-head { flex-direction: column; } }


/* ==========================================================================
   Colour scheme across the software (from the reference portal):
   navy menu bar with lighter-navy items and white text, the chosen item in
   white with navy text, navy banners, white cards on a light grey page,
   solid navy buttons, and a cream note box. All other text stays dark.
   ========================================================================== */
:root { --k-banner: linear-gradient(120deg, #EF6C00 0%, #F57C00 55%, #FF9800 100%); --k-card-navy: #F68A1F; --k-card-navy-hi: #FF9A2E; }

/* Header: white bar (as the portal's top bar), the systems in a navy menu strip. */
.trac-header { box-shadow: 0 1px 0 var(--k-line), 0 2px 10px rgba(120, 50, 0, 0.06); }
.trac-header-systems { background: var(--k-navy-700); border-color: var(--k-navy-700); padding: 5px; gap: 4px; }
.trac-header .trac-system { color: #FFFFFF; background: var(--k-card-navy); border-radius: 9px; }
.trac-header .trac-system .nav-icon { color: #FFF1E0; }
.trac-header .trac-system:hover { background: var(--k-card-navy-hi); color: #FFFFFF; }
.trac-header .trac-system:hover .nav-icon { color: #FFFFFF; }
.trac-header .trac-system.is-current, .trac-header .tp-menu.is-open .tp-menu-btn {
    background: #FFFFFF !important; color: var(--k-ink-accent) !important;
    box-shadow: inset 0 -3px 0 var(--k-gold-500);
}
.trac-header .trac-system.is-current .nav-icon, .trac-header .tp-menu.is-open .tp-menu-btn .nav-icon { color: var(--k-ink-accent); }
.trac-header-btn.is-primary { background: var(--k-navy-700); border-color: var(--k-navy-700); }
.trac-header-btn.is-primary:hover { background: var(--k-navy-800); border-color: var(--k-navy-800); }

/* Panes: white cards, navy titles. */
.trac-panel > h2, .trac-panel h2 { color: var(--k-ink-accent); }
.trac-panel h3 { color: var(--k-navy-800); }
.trac-ws-tabs [aria-selected="true"], .trac-ws-tab[aria-selected="true"] { color: var(--k-ink-accent); }

/* Buttons: solid navy, white text. */
.trac-panel button[type="submit"], .trac-inline button[type="submit"], .trac-btn-primary, .bf-actions .bf-submit, .bf-actions button[type="submit"] {
    background: var(--k-navy-700); border-color: var(--k-navy-700); color: #FFFFFF;
}
.trac-panel button[type="submit"]:hover, .trac-inline button[type="submit"]:hover, .trac-btn-primary:hover,
.bf-actions .bf-submit:hover, .bf-actions button[type="submit"]:hover { background: var(--k-navy-800); border-color: var(--k-navy-800); }

/* Note boxes: cream, as the portal's tip. */
.trac-alert { background: #FFF8E6; border: 1px solid #F1DFB0; color: #5C4300; border-radius: 10px; }

/* Panchang pages: the page title as a navy banner. */
.tp-hero { background: var(--k-banner) !important; border: 0 !important; border-radius: 16px; color: #FFFFFF;
    box-shadow: 0 8px 22px rgba(120, 50, 0, 0.18); }
.tp-hero h1 { color: #FFFFFF; }
.tp-hero .tp-hero-lead { color: #FFF1E0; }
.tp-hero .tp-crumb, .tp-hero .tp-crumb span { color: #FFE7CC; }
.tp-hero .tp-crumb a { color: #FFFFFF; }
.tp-card h2 { color: var(--k-ink-accent); }

/* Foreign travel reading: headline as a navy banner. */
.ftr-head { background: var(--k-banner); border: 0; color: #FFFFFF; }
.ftr-head h3 { color: #FFFFFF; }
.ftr-head p { color: #FFF1E0; }
.ftr-head .ftr-badge { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.3); }
.ftr-section h3 { color: var(--k-ink-accent); }

/* Panchang menu: line icons in place of dots. */
.tp-mega-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px;
    background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }
.tp-mega-icon svg { width: 18px; height: 18px; }
.tp-menu .tp-mega-group.is-on .tp-mega-icon { background: var(--k-navy-100); color: var(--k-ink-accent); }
.tp-menu .tp-mega-group { padding: 0.55rem 0.7rem; }
.chat-send { background: var(--k-navy-700); }
.chat-send:hover { background: var(--k-navy-800); }
.chat-attach, .chat-mic { color: var(--k-ink-accent); }
.ftr-working { margin: 0.9rem 0 0.4rem; padding: 0.85rem 0.95rem; background: var(--k-navy-50); border: 1px solid var(--k-navy-100); border-left: 4px solid var(--k-navy-700); border-radius: 10px; color: var(--k-ink); }
.ftr-working h4 { margin: 0 0 0.55rem; font-size: 0.95rem; color: var(--k-ink-accent); }
.ftr-working p { margin: 0 0 0.55rem; line-height: 1.55; color: #1F2937; }
.ftr-working ul { margin: 0 0 0.5rem 1.1rem; padding: 0; color: #1F2937; }
.ftr-working .trac-tablewrap { margin: 0.4rem 0 0.7rem; background: #FFFFFF; }
.trac-home-using { margin: 0.9rem auto 0; max-width: 760px; text-align: center; color: var(--k-ink-2); font-size: 0.92rem; }
.trac-home-using b { color: var(--k-ink-accent); }
.trac-home-change { margin-left: 0.4rem; border: 1px solid var(--k-navy-200); background: #FFFFFF; color: var(--k-ink-accent); border-radius: 999px; padding: 0.2rem 0.7rem; font: inherit; font-size: 0.85rem; cursor: pointer; }
.trac-home-change:hover { background: var(--k-navy-50); }

/* ---- Ads: calm, clearly marked, never inside a reading ---- */
.trac-ad { margin: 1rem 0; padding: 0.6rem 0.8rem 0.8rem; background: #FFFFFF; border: 1px solid var(--k-line); border-radius: 12px; max-width: 760px; }
.trac-ad-label { display: inline-block; margin-bottom: 0.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--k-ink-3); background: var(--k-line-2); padding: 0.1rem 0.45rem; border-radius: 6px; }
.trac-ad-answer { width: min(78ch, 100%); max-width: 78ch; margin: 0.6rem auto 1.4rem; box-sizing: border-box; }
.trac-header-user { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }
.trac-header-user span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--k-ink-2); font-size: 0.85rem; }
.trac-google-btn { display: inline-flex; align-items: center; gap: 0.45rem; }
.trac-google-btn span { color: var(--k-ink); max-width: none; }

/* ---- Question box under the answers: full width, tools on the right ---- */
.ask-wrap.ask-panel { width: 100%; max-width: none; margin-left: 0; margin-right: 0; padding: 0 1.5rem; box-sizing: border-box; }
.ask-wrap.ask-panel .trac-chatbox { width: 100%; max-width: none; margin: 0; border-radius: 16px; }
/* One slim row: the question on the left, the tools on the right. */
.ask-wrap.ask-panel .trac-chatbox { flex-direction: row; align-items: center; gap: 10px; min-height: 0; padding: 7px 8px 7px 18px; border-radius: 14px; }
.ask-wrap.ask-panel .trac-chatbox .ask-input { flex: 1 1 auto; min-width: 0; min-height: 0; height: 40px; margin: 0; font-size: 16px; }
.ask-wrap.ask-panel .ask-tools { flex: 0 0 auto; width: auto; justify-content: flex-end; gap: 8px; }
.ask-wrap.ask-panel .ask-tools-right { gap: 8px; }
.ask-wrap.ask-panel .chat-attach, .ask-wrap.ask-panel .chat-mic { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
.ask-wrap.ask-panel .chat-mic svg { width: 17px; height: 17px; }
.ask-wrap.ask-panel .ask-model-btn { height: 36px; padding: 0 12px; font-size: 0.82rem; border: 1px solid var(--k-line); border-radius: 10px; background: #FFFFFF; }
.ask-wrap.ask-panel .chat-send { width: 40px; height: 40px; font-size: 20px; }
@media (max-width: 700px) { .ask-wrap.ask-panel { padding: 0 0.5rem; } }

/* ---- Site pages, footer and cookie notice ---- */
.site-body { margin: 0; background: var(--k-page); color: var(--k-ink); font-family: "IBM Plex Sans", system-ui, sans-serif; }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.7rem 1.4rem; background: #FFFFFF; border-bottom: 1px solid var(--k-line); }
.site-logo img { height: 40px; display: block; }
.site-head nav { display: flex; gap: 0.4rem; flex-wrap: wrap; background: var(--k-navy-700); padding: 5px; border-radius: 12px; }
.site-head nav a { color: #FFFFFF; text-decoration: none; padding: 0.45rem 0.9rem; border-radius: 9px; background: var(--k-card-navy); font-weight: 500; }
.site-head nav a:hover { background: var(--k-card-navy-hi); }
.site-main { padding: 1.6rem 1rem 2rem; }
.site-article { max-width: 820px; margin: 0 auto; background: #FFFFFF; border: 1px solid var(--k-line); border-radius: 14px; padding: 1.6rem 1.8rem; line-height: 1.7; color: #1F2937; }
.site-article h1 { margin: 0 0 1rem; color: var(--k-ink-accent); font-family: "IBM Plex Serif", Georgia, serif; font-weight: 500; }
.site-article h2 { margin: 1.4rem 0 0.5rem; font-size: 1.1rem; color: var(--k-ink-accent); }
.site-article a { color: var(--k-ink-accent); }
.site-updated { color: var(--k-ink-3); font-size: 0.9rem; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.3rem 1rem; text-align: center; padding: 1rem 1rem 1.2rem; color: var(--k-ink-3); font-size: 0.8rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 0.9rem; }
.site-footer a { color: var(--k-ink-accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; }
.trac-home .site-footer { margin-top: 0.6rem; padding-bottom: 0.4rem; }
.cookie-note { font-family: "IBM Plex Sans", system-ui, sans-serif; position: fixed; left: 14px; bottom: 14px; z-index: 400; width: min(400px, calc(100% - 28px)); display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start;
    background: #FFFFFF; border: 1px solid var(--k-line); border-left: 4px solid var(--k-navy-700); border-radius: 12px; padding: 0.8rem 1rem; box-shadow: 0 10px 30px rgba(120, 50, 0, 0.18); box-sizing: border-box; }
.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; font-size: 0.82rem; color: #1F2937; line-height: 1.5; }
.cookie-note a { color: var(--k-ink-accent); }
.cookie-note button { flex: 0 0 auto; background: var(--k-navy-700); color: #FFFFFF; border: 0; border-radius: 9px; padding: 0.4rem 1rem; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
@media (max-width: 600px) { .cookie-note { flex-direction: column; align-items: stretch; } }

.site-footer a { color: var(--k-ink-3); }
.site-footer a:hover { color: var(--k-ink-accent); }
.site-footer p { color: var(--k-ink-3); }
.trac-home .site-footer { position: absolute; left: 0; right: 0; bottom: 0.4rem; margin: 0; padding: 0.4rem 1rem; }
.trac-home-using { font-size: 0.85rem; margin-top: 0.7rem; }
.trac-home-using .trac-home-change { font-size: 0.8rem; padding: 0.12rem 0.6rem; }

/* ---- Main menu: the Kundli / Chart dropdown ---- */
.tm-drop { position: relative; display: inline-flex; }
.tm-drop-btn .tp-caret { font-size: 0.7rem; margin-left: 0.1rem; opacity: 0.85; transition: transform 0.15s ease; }
.tm-drop.is-open .tm-drop-btn .tp-caret { transform: rotate(180deg); }
.tm-drop-menu { position: fixed; top: 64px; left: 0; z-index: 210; min-width: 210px; padding: 6px;
    background: var(--k-navy-700); border-radius: 12px; box-shadow: 0 16px 36px rgba(120, 50, 0, 0.28); display: grid; gap: 4px; }
.tm-drop-menu[hidden] { display: none; }
.tm-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.6rem 0.75rem; border: 0; border-radius: 9px;
    background: var(--k-card-navy); color: #FFFFFF; font: inherit; font-size: 0.93rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.tm-item .nav-icon { color: #FFF1E0; display: inline-flex; }
.tm-item .nav-icon svg { width: 18px; height: 18px; }
.tm-item:hover, .tm-item:focus-visible { background: #FFFFFF; color: var(--k-ink-accent); box-shadow: inset 3px 0 0 var(--k-gold-500); outline: none; }
.tm-item:hover .nav-icon, .tm-item:focus-visible .nav-icon { color: var(--k-ink-accent); }
.tm-item.is-current { background: #FFFFFF; color: var(--k-ink-accent); box-shadow: inset 3px 0 0 var(--k-gold-500); }
.tm-item.is-current .nav-icon { color: var(--k-ink-accent); }
.trac-header .tm-drop:has(.tm-item.is-current) .tm-drop-btn, .trac-header .tm-drop.is-open .tm-drop-btn {
    background: #FFFFFF !important; color: var(--k-ink-accent) !important; box-shadow: inset 0 -3px 0 var(--k-gold-500); }
.trac-header .tm-drop:has(.tm-item.is-current) .tm-drop-btn .nav-icon, .trac-header .tm-drop.is-open .tm-drop-btn .nav-icon { color: var(--k-ink-accent); }


/* ---- Saffron scheme: what is chosen or pointed at turns yellow with dark text ---- */
.trac-header .trac-system.is-current, .trac-header .tp-menu.is-open .tp-menu-btn,
.trac-header .tm-drop:has(.tm-item.is-current) .tm-drop-btn, .trac-header .tm-drop.is-open .tm-drop-btn {
    background: var(--k-yellow) !important; color: var(--k-yellow-ink) !important; box-shadow: none; }
.trac-header .trac-system.is-current .nav-icon, .trac-header .tp-menu.is-open .tp-menu-btn .nav-icon,
.trac-header .tm-drop:has(.tm-item.is-current) .tm-drop-btn .nav-icon, .trac-header .tm-drop.is-open .tm-drop-btn .nav-icon { color: var(--k-yellow-ink); }
.trac-header .trac-system { font-weight: 600; }
.trac-header .trac-system:hover { background: #FF9A2E; }
.tm-item:hover, .tm-item:focus-visible, .tm-item.is-current { background: var(--k-yellow); color: var(--k-yellow-ink); box-shadow: none; }
.tm-item:hover .nav-icon, .tm-item:focus-visible .nav-icon, .tm-item.is-current .nav-icon { color: var(--k-yellow-ink); }
.tp-menu .tp-mega-group:hover { background: #FF9A2E; }
.tp-menu .tp-mega-group.is-on { background: var(--k-yellow); color: var(--k-yellow-ink); border-color: var(--k-yellow); box-shadow: none; }
.tp-menu .tp-mega-group.is-on .tp-mega-icon { background: rgba(0, 0, 0, 0.08); color: var(--k-yellow-ink); }
.tp-mega-banner { border-bottom-color: var(--k-yellow); }
.tp-menu .tp-tile:hover { border-left-color: var(--k-navy-700); }
.tp-menu .tp-tile-go { color: #C9A27A; }
.tp-menu .tp-tile:hover .tp-tile-go, .tp-menu .tp-tile.is-on .tp-tile-go { color: var(--k-navy-700); }
.trac-header-btn.is-primary { color: #FFFFFF; font-weight: 600; }
.trac-header-btn.is-primary .nav-icon { color: var(--k-yellow); }
.ftr-head .ftr-badge { background: var(--k-yellow); color: var(--k-yellow-ink); border-color: var(--k-yellow); }
.trac-ws-tabs [aria-selected="true"], .trac-ws-tab[aria-selected="true"] { color: var(--k-ink-accent); }

/* ---- Main menu: separate solid saffron buttons on the white header, no strip behind ---- */
.trac-header-systems { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 2px 0 !important; gap: 8px !important; }
.trac-header .trac-system { background: #F57C00; color: #FFFFFF; border-radius: 7px; padding: 0.5rem 1rem; font-weight: 600;
    box-shadow: 0 1px 2px rgba(120, 50, 0, 0.18); }
.trac-header .trac-system .nav-icon { color: #FFFFFF; }
.trac-header .trac-system:hover { background: #E86F00; color: #FFFFFF; }
.trac-header .trac-system:hover .nav-icon { color: #FFFFFF; }

/* ---- Site pages use the main header; social links ---- */
.site-header { position: sticky; top: 0; z-index: 150; }
.social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0.3rem 0; }
.site-article .social-links { justify-content: flex-start; }
.social-links a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--k-line);
    background: #FFFFFF; color: var(--k-ink-2) !important; text-decoration: none !important; font-size: 0.85rem; }
.social-links a:hover { border-color: var(--k-navy-700); color: var(--k-ink-accent) !important; }
.site-footer .social-links a { padding: 0.25rem 0.6rem; font-size: 0.78rem; }
.site-footer .social-links { flex-basis: 100%; }

/* Menu links keep the same height as the menu buttons on every page. */
.trac-header-systems > a.trac-system { align-self: center; height: auto; text-decoration: none; }
.site-header .trac-header-systems { align-items: center; }

/* ---- Brand name as text: TRAC ASTROLOGY AI ---- */
.brand-word { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; text-decoration: none; }
.brand-word .bw-name { font-family: "Montserrat", "IBM Plex Sans", sans-serif; font-weight: 800; font-size: 1.32rem; letter-spacing: 0.01em; color: #14286B; white-space: nowrap; }
.brand-word .bw-name b { font-weight: 800; background: linear-gradient(180deg, #F2B33D, #C98A12); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-word .bw-tag { margin-top: 4px; font-size: 0.56rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #14286B; white-space: nowrap; }
.trac-header-brand { text-decoration: none; }
.trac-hero-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 auto 18px; position: relative; z-index: 1; }
.trac-hero-brand img { width: 140px; height: auto; display: block; }
.brand-word.is-big .bw-name { font-size: 2.15rem; }
.brand-word.is-big .bw-tag { font-size: 0.78rem; margin-top: 7px; }
@media (max-height: 800px) { .trac-hero-brand img { width: 112px; } .brand-word.is-big .bw-name { font-size: 1.8rem; } }
@media (max-width: 520px) { .brand-word.is-big .bw-name { font-size: 1.45rem; } .brand-word .bw-name { font-size: 1.05rem; } }

/* ---- Kundli / Chart list: items stay inside the list ---- */
.tm-drop-menu { box-sizing: border-box; min-width: 220px; }
.tm-drop-menu .tm-item { box-sizing: border-box; width: 100%; margin: 0; }

/* ---- New Analysis: icon in bright white ---- */
.trac-header-btn.is-primary .nav-icon, .trac-header-btn.is-primary .nav-icon svg { color: #FFFFFF !important; stroke: #FFFFFF; }
.trac-header-btn.is-primary .nav-icon svg { stroke-width: 1.8; fill: #FFFFFF; }
.bf-brand { flex: 0 0 auto; } .bf-brand .bw-name { font-size: 1.05rem; } .bf-brand .bw-tag { font-size: 0.48rem; }

/* ======================================================================
   Phones and small tablets: everything fits the screen width.
   ====================================================================== */
.ask-model-btn, .ask-model-name { white-space: nowrap; }
@media (max-width: 760px) {
    /* Header: logo and actions on one line, the four menu buttons in a 2 x 2 grid below. */
    .trac-header { flex-wrap: wrap; row-gap: 0.45rem; }
    .trac-header .trac-header-systems { order: 3; flex: 1 1 100%; width: 100%; overflow: visible;
        display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; padding: 0; background: transparent; border: 0; }
    .trac-header .trac-header-systems > .tm-drop, .trac-header .trac-header-systems .tm-drop-btn { width: 100%; }
    .trac-header .trac-header-systems .trac-system { box-sizing: border-box; width: 100%; justify-content: center; padding: 0.5rem 0.4rem; font-size: 0.9rem; }
    .trac-header .trac-header-actions { margin-left: auto; }
    .trac-header-brand .brand-word .bw-name { font-size: 1.05rem; }
    .trac-header-brand .brand-word .bw-tag { font-size: 0.47rem; }

    /* Chart pane: the chart is a square as wide as the screen; no empty band above or below. */
    .trac-ws-charts { height: auto !important; }
    .trac-ws-charts > .trac-ws-bar { flex-wrap: wrap; row-gap: 0.35rem; }
    .trac-ws-charts .trac-ws-more { min-width: 0; flex: 1 1 100%; }
    .trac-ws-stage { flex: 0 0 auto; flex-direction: column; }
    .trac-ws-fig { flex: 0 0 auto; }
    .trac-ws-svg { flex: 0 0 auto; width: 100%; aspect-ratio: 1 / 1; height: auto; }
    .trac-ws-svg svg { width: 100%; height: 100%; }
    .trac-ws-thumb-pic { height: 64px; }

    /* Pages under the chart: the page scrolls as one, no box inside a box. */
    .trac-ws-details { height: auto !important; overflow: visible; }
    .trac-ws-details .trac-ws-page { overflow: visible; max-height: none; }
    .trac-ws-page table { display: block; max-width: 100%; overflow-x: auto; }
    .trac-ws-page img, .trac-ws-page svg { max-width: 100%; height: auto; }

    /* Home */
    .trac-hero-brand img { width: 104px; }
    .ask-tools-right { gap: 0.4rem; }
}
@media (max-width: 380px) {
    .trac-header .trac-header-systems .trac-system { font-size: 0.82rem; gap: 0.35rem; }
    .brand-word.is-big .bw-name { font-size: 1.25rem; }
    .brand-word.is-big .bw-tag { font-size: 0.6rem; }
}

/* ======================================================================
   Plans, My account, sign-in button, saved profiles
   ====================================================================== */
.site-article.is-wide { max-width: 1120px; }
.plans-lede { font-size: 1.05rem; color: #1F2937; max-width: 760px; }
.plans-msg { margin: 1rem 0; padding: 0.8rem 1rem; border-radius: 10px; font-weight: 500; color: #1F2937; }
.plans-msg.is-ok { background: #ECFDF3; border: 1px solid #A6E3BD; }
.plans-msg.is-warn { background: #FFF4E5; border: 1px solid #F8C98A; }
.plans-current { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin: 1rem 0; padding: 0.8rem 1rem;
    border: 1px solid var(--k-line); border-radius: 12px; background: #FFFBF5; color: #1F2937; }
.plans-current-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6B4E2E; }
.plans-period { display: inline-flex; gap: 4px; padding: 4px; margin: 0.6rem 0 1rem; border-radius: 12px; background: #FFF1E0; border: 1px solid #F8D3A6; }
.plans-period label { cursor: pointer; }
.plans-period input { position: absolute; opacity: 0; pointer-events: none; }
.plans-period span { display: inline-block; padding: 0.45rem 1rem; border-radius: 9px; font-weight: 600; color: #7C2D12; }
.plans-period em { font-style: normal; font-size: 0.72rem; margin-left: 0.3rem; padding: 0.1rem 0.4rem; border-radius: 6px; background: #FFC107; color: #3B2300; }
.plans-period input:checked + span { background: #F57C00; color: #FFFFFF; }
.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 1.2rem 1.1rem 1.1rem; border: 1px solid var(--k-line); border-radius: 16px; background: #FFFFFF; box-shadow: 0 2px 10px rgba(120, 50, 0, 0.06); }
.plan-card.is-highlight { border: 2px solid #F57C00; box-shadow: 0 8px 24px rgba(245, 124, 0, 0.18); }
.plan-card.is-current { background: #FFFBF2; }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 0.15rem 0.7rem; border-radius: 999px; background: #FFC107; color: #3B2300; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.plan-card h2 { margin: 0.1rem 0 0.2rem; font-size: 1.2rem; color: #7C2D12; }
.plan-tag { margin: 0 0 0.6rem; font-size: 0.88rem; color: #4B5563; min-height: 2.4em; }
.plan-price { margin: 0.2rem 0 0.8rem; color: #1F2937; }
.plan-price b { display: block; font-size: 1.8rem; line-height: 1.1; color: #111827; }
.plan-price span span, .plan-price > span { font-size: 0.82rem; color: #4B5563; }
.plan-features { list-style: none; margin: 0 0 1rem; padding: 0; flex: 1 1 auto; color: #1F2937; font-size: 0.92rem; }
.plan-features li { position: relative; padding: 0.28rem 0 0.28rem 1.5rem; }
.plan-features li::before { content: "✓"; position: absolute; left: 0.1rem; color: #E86F00; font-weight: 700; }
.plan-action { margin-top: auto; }
.plan-note { display: block; font-size: 0.85rem; color: #4B5563; }
.plan-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.6rem 1rem; border: 0; border-radius: 10px;
    background: #F57C00; color: #FFFFFF; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.plan-action .plan-btn { width: 100%; box-sizing: border-box; }
.plan-btn:hover { background: #E86F00; color: #FFFFFF; }
.plan-btn.is-current { background: #FFC107; color: #3B2300; cursor: default; }
.plan-btn.is-off { background: #F3F4F6; color: #374151; cursor: default; font-weight: 500; }
.plan-btn.is-light { background: #FFF1E0; color: #7C2D12; border: 1px solid #F8D3A6; }
.plan-btn.is-light:hover { background: #FFE2BF; color: #7C2D12; }
.plan-btn.is-danger { background: #B91C1C; }
.plan-btn.is-danger:hover { background: #991B1B; }
.plan-btn:disabled { opacity: 0.6; cursor: wait; }
.plans-code, .plans-faq { margin-top: 2rem; }
.plans-code-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.plans-code-form input { flex: 0 1 260px; padding: 0.6rem 0.75rem; border: 1px solid var(--k-line); border-radius: 10px; font: inherit; color: #111827; }
.plans-faq h3 { margin: 1rem 0 0.25rem; font-size: 1rem; color: #7C2D12; }
.plans-faq p { margin: 0; color: #1F2937; }

.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.acct-card, .acct-section { padding: 1.1rem 1.2rem; border: 1px solid var(--k-line); border-radius: 14px; background: #FFFFFF; color: #1F2937; }
.acct-section { margin-top: 1rem; }
.acct-card h2, .acct-section h2 { margin: 0 0 0.4rem; font-size: 1.1rem; color: #7C2D12; }
.acct-big { margin: 0.1rem 0 0.3rem; font-size: 1.35rem; font-weight: 700; color: #111827; }
.acct-email { font-size: 1.05rem; word-break: break-all; }
.acct-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.acct-head h2 { margin: 0; }
.acct-count { font-size: 0.85rem; font-weight: 500; color: #4B5563; margin-left: 0.4rem; }
.acct-search { width: 100%; box-sizing: border-box; margin-bottom: 0.6rem; padding: 0.55rem 0.75rem; border: 1px solid var(--k-line); border-radius: 10px; font: inherit; color: #111827; }
.acct-profiles { display: grid; gap: 0.5rem; }
.acct-profile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; padding: 0.7rem 0.8rem; border: 1px solid #F1E3D3; border-radius: 12px; background: #FFFCF8; }
.acct-profile-main { display: flex; flex-direction: column; min-width: 0; }
.acct-profile-main b { color: #111827; }
.acct-profile-main span { font-size: 0.88rem; color: #374151; }
.acct-notes { font-style: italic; }
.acct-profile-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.acct-profile-actions .plan-btn { padding: 0.4rem 0.75rem; font-size: 0.88rem; }
.acct-notes-edit { flex: 1 1 100%; display: flex; flex-direction: column; gap: 0.4rem; }
.acct-notes-edit textarea { width: 100%; box-sizing: border-box; padding: 0.5rem; border: 1px solid var(--k-line); border-radius: 8px; font: inherit; color: #111827; }
.acct-notes-edit .plan-btn { align-self: flex-start; }
.acct-danger { border-color: #F5C2C2; background: #FFF8F8; }
.admin-grant { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.admin-grant input, .admin-grant select { padding: 0.5rem 0.6rem; border: 1px solid var(--k-line); border-radius: 8px; font: inherit; color: #111827; }
.admin-grant input[type="number"] { width: 6rem; }
.hist-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.hist-list a { display: flex; flex-direction: column; padding: 0.65rem 0.8rem; border: 1px solid var(--k-line); border-radius: 10px; background: #FFFFFF; text-decoration: none; color: #111827; }
.hist-list a:hover { border-color: #F57C00; }
.hist-list span { font-size: 0.85rem; color: #4B5563; }
.hist-meta { color: #4B5563; font-size: 0.88rem; }
.hist-answer { color: #1F2937; }

/* Header: account button and sign-in */
.trac-account-btn { position: relative; padding: 0 !important; width: 38px; height: 38px; justify-content: center; border-radius: 50% !important; background: #FFF1E0 !important; border: 1px solid #F8C98A !important; }
.acct-avatar { font-weight: 700; color: #7C2D12; font-size: 1rem; }
.acct-plan-badge { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 0 0.3rem; border-radius: 6px; background: #FFC107; color: #3B2300; font-size: 0.6rem; font-weight: 700; line-height: 1.35; }
.trac-header .trac-google-btn { background: #FFFFFF; border: 1px solid #E5E7EB; color: #1F2937; font-weight: 600; text-decoration: none; }

/* Birth form: saved profiles */
.bf-saved { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 0.7rem; }
.bf-saved label { font-size: 0.82rem; font-weight: 600; color: #374151; }
.bf-saved select { padding: 0.55rem 0.6rem; border: 1px solid var(--k-line); border-radius: 10px; font: inherit; color: #111827; background: #FFFCF8; }
.bf-save-profile { display: flex; align-items: center; gap: 0.45rem; margin: 0.4rem 0 0; color: #1F2937; font-size: 0.92rem; cursor: pointer; }
.bf-save-profile[hidden], .bf-saved[hidden] { display: none; }

/* Answers: daily limit and the locked working */
.ai-limit-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ai-limit-btn { display: inline-block; padding: 0.45rem 0.9rem; border-radius: 9px; border: 1px solid #F8C98A; background: #FFF1E0; color: #7C2D12; font-weight: 600; text-decoration: none; }
.ai-limit-btn.is-main { background: #F57C00; border-color: #F57C00; color: #FFFFFF; }
.ai-locked, .ai-left { margin: 0.6rem 0 0; padding: 0.45rem 0.7rem; border-radius: 8px; background: #FFF8EC; color: #374151; font-size: 0.9rem; }
.ai-locked a, .ai-left a { color: #B45309; font-weight: 600; }

/* Inside the Android app: the app has its own menu at the bottom and no cookie notice. */
.in-app .cookie-note { display: none !important; }
.in-app .trac-header .trac-header-systems { display: block !important; height: 0; min-height: 0; padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: visible !important; flex: 0 0 0 !important; width: 0 !important; }
.in-app .trac-header-systems .trac-system, .in-app .trac-header-systems .tm-drop { display: none !important; }

@media (max-width: 980px) { .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
    .plans-grid, .acct-grid { grid-template-columns: 1fr; }
    .plan-card.is-highlight { order: -1; }
    .acct-profile-actions { width: 100%; }
}
.bf-save-profile { margin: 0.5rem 26px 0.25rem; }
.trac-header .trac-account-btn .acct-avatar { display: inline-block !important; } .trac-header .trac-account-btn .acct-plan-badge { display: inline-block !important; }
.site-article a.plan-btn, .site-article a.plan-btn:visited { color: #FFFFFF; text-decoration: none; }
.site-article a.plan-btn.is-light, .site-article a.plan-btn.is-light:visited { color: #7C2D12; }

/* ======================================================================
   The TRAC ASTROLOGY AI mark and the white home page
   ====================================================================== */
.tmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.tmark-logo { display: block; }
.tmark-words { display: flex; flex-direction: column; line-height: 0.95; }
.tmark-a { font-family: "Montserrat", "Inter", "IBM Plex Sans", sans-serif; font-weight: 900; color: #14286B; letter-spacing: 0.01em; }
.tmark-b { font-family: "Montserrat", "Inter", "IBM Plex Sans", sans-serif; font-weight: 800; color: #14286B; letter-spacing: 0.02em; white-space: nowrap; }
.tmark-b i { font-style: normal; background: linear-gradient(180deg, #F7B733, #E07B00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tmark-small .tmark-logo { width: 46px; height: auto; }
.tmark-small .tmark-a { font-size: 25px; }
.tmark-small .tmark-b { font-size: 14px; }
.tmark-big { flex-direction: column; gap: 6px; text-align: center; }
.tmark-big .tmark-logo { width: 132px; height: auto; filter: drop-shadow(0 8px 20px rgba(245, 124, 0, 0.28)); }
.tmark-big .tmark-words { align-items: center; margin-top: 4px; }
.tmark-big .tmark-a { font-size: 58px; }
.tmark-big .tmark-b { font-size: 32px; }
.tmark-tag { margin-top: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #374151; }
.tmark-tag b { color: #E86F00; font-weight: 800; }
.trac-header-brand { gap: 0; }
.trac-header-brand .brand-word { display: none; }
.bf-brand .tmark-small .tmark-logo { width: 36px; }
.bf-brand .tmark-small .tmark-a { font-size: 19px; }
.bf-brand .tmark-small .tmark-b { font-size: 11px; }

.trac-home-mode .trac-main, .trac-home-mode .trac-body { background: #FFFFFF !important; }
.trac-home-mode [data-home="true"] { display: none !important; }
.trac-home { background: #FFFFFF; }
.trac-home-art { opacity: 1 !important; }
.trac-home-art .trac-orbit, .trac-home-art .trac-star { display: none; }
.home-wheel { position: absolute; width: 600px; opacity: 0.2; top: 50%; }
.home-wheel.is-left { left: -320px; transform: translateY(-48%); }
.home-wheel.is-right { right: -320px; transform: translateY(-42%) rotate(15deg); }
.home-globe { position: absolute; left: 50%; top: 40%; width: 600px; transform: translate(-50%, -50%); opacity: 0.14; }
.home-star { position: absolute; color: #F5B041; opacity: 0.35; font-size: 22px; }
.home-star.s1 { left: 22%; top: 12%; } .home-star.s2 { right: 22%; top: 14%; font-size: 26px; }
.home-star.s3 { left: 27%; top: 62%; font-size: 28px; } .home-star.s4 { right: 26%; top: 66%; }
.trac-hero-mark { position: relative; z-index: 1; display: flex; justify-content: center; margin-bottom: 6px; }
.trac-hero-brand { display: none !important; }
.trac-home h1 { position: relative; z-index: 1; margin: 14px 0 0; }

/* Home ask box: one slim row */
.ask-wrap.ask-home { position: relative; z-index: 2; width: 100%; max-width: 900px; margin-top: 22px; }
.ask-wrap.ask-home .trac-chatbox { flex-direction: row; align-items: center; gap: 10px; min-height: 0; padding: 8px 10px 8px 24px; border-radius: 40px;
    border: 1.5px solid #E5E7EB; box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08); background: #FFFFFF; }
.ask-wrap.ask-home .trac-chatbox .ask-input { flex: 1 1 auto; min-width: 0; height: 50px; margin: 0; font-size: 18px; border: 0; }
.ask-wrap.ask-home .ask-tools { flex: 0 0 auto; width: auto; justify-content: flex-end; gap: 8px; margin: 0; }
.ask-wrap.ask-home .ask-tools-right { gap: 8px; }
.ask-wrap.ask-home .chat-attach, .ask-wrap.ask-home .chat-mic { width: 44px; height: 44px; border-radius: 12px; }
.ask-wrap.ask-home .ask-model-btn { height: 44px; padding: 0 12px; border: 0; background: transparent; }
.ask-wrap.ask-home .chat-send { width: 54px; height: 54px; border-radius: 50%; }
.home-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.home-chips button, .home-chips a { padding: 9px 16px; border-radius: 999px; background: #FFFFFF; border: 1px solid #E5E7EB; font: inherit; font-size: 14.5px; color: #374151; cursor: pointer; text-decoration: none; }
.home-chips button:hover, .home-chips a:hover { border-color: #F57C00; color: #9A3412; }
.trac-home .site-footer { position: relative; z-index: 1; }

@media (max-width: 760px) {
    .tmark-small .tmark-logo { width: 36px; }
    .tmark-small .tmark-a { font-size: 20px; }
    .tmark-small .tmark-b { font-size: 11.5px; }
    .tmark-big .tmark-logo { width: 96px; }
    .tmark-big .tmark-a { font-size: 42px; }
    .tmark-big .tmark-b { font-size: 23px; }
    .tmark-tag { font-size: 10.5px; letter-spacing: 0.04em; padding: 0 12px; }
    .home-wheel, .home-star { display: none; }
    .home-globe { width: 360px; }
    .ask-wrap.ask-home .trac-chatbox { flex-wrap: wrap; border-radius: 22px; padding: 8px 10px 8px 16px; }
    .ask-wrap.ask-home .trac-chatbox .ask-input { flex: 1 1 100%; height: 44px; font-size: 16px; }
    .ask-wrap.ask-home .ask-tools { width: 100%; }
    .ask-wrap.ask-home .chat-send { width: 46px; height: 46px; }
    .home-chips button, .home-chips a { font-size: 13.5px; padding: 8px 13px; }
}
@media (max-height: 820px) and (min-width: 761px) {
    .tmark-big .tmark-logo { width: 104px; }
    .tmark-big .tmark-a { font-size: 48px; }
    .tmark-big .tmark-b { font-size: 26px; }
    .trac-home h1 { font-size: 38px; }
}
.trac-home .site-footer { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; }
.trac-home h1 { margin-top: 22px; }
.trac-home { padding-bottom: 96px; }
@media (max-width: 760px) { .trac-home .site-footer { position: relative; bottom: auto; margin-top: 28px; } .trac-home { padding-bottom: 20px; } }
@media (max-width: 760px) {
    .trac-home-mode .trac-main { overflow-y: auto !important; }
    .trac-home { height: auto !important; min-height: 100%; justify-content: flex-start !important; overflow: visible !important; padding: 22px 16px 20px !important; }
    .trac-home h1 { font-size: 34px; margin-top: 16px; }
    .ask-wrap.ask-home .ask-tools { justify-content: space-between; }
}

/* Social buttons in each network's own colour */
.social-links a.sl-youtube, .social-links a.sl-instagram, .social-links a.sl-facebook { border: 0 !important; color: #FFFFFF !important; font-weight: 600; text-decoration: none; }
.social-links a.sl-youtube { background: #FF0000; }
.social-links a.sl-instagram { background: linear-gradient(45deg, #F58529 0%, #DD2A7B 45%, #8134AF 75%, #515BD4 100%); }
.social-links a.sl-facebook { background: #1877F2; }
.social-links a.sl-youtube:hover, .social-links a.sl-instagram:hover, .social-links a.sl-facebook:hover { filter: brightness(1.08); color: #FFFFFF !important; }
.site-footer .social-links a { padding: 0.32rem 0.8rem; font-size: 0.8rem; }

/* Home: world map instead of the globe; content centred, footer at the bottom */
.home-globe { display: none !important; }
.home-world { position: absolute; left: 50%; top: 42%; width: min(1100px, 92vw); transform: translate(-50%, -50%); opacity: 0.32; pointer-events: none; }
.trac-home { justify-content: flex-start !important; padding-bottom: 14px !important; }
.trac-home .trac-hero-mark { margin-top: auto; }
.trac-home .site-footer { position: relative !important; bottom: auto !important; margin-top: auto !important; padding-top: 18px; }
.trac-home-using { position: relative; z-index: 1; margin-top: 14px; }

/* Phones (and the Android app): the ask box stays one slim row */
@media (max-width: 760px) {
    .home-world { width: 140vw; top: 30%; opacity: 0.28; }
    .ask-wrap.ask-home .trac-chatbox { flex-wrap: nowrap !important; border-radius: 30px !important; padding: 5px 6px 5px 16px !important; gap: 6px; }
    .ask-wrap.ask-home .trac-chatbox .ask-input { flex: 1 1 auto !important; font-size: 15.5px !important; }
    .ask-wrap.ask-home .ask-tools { width: auto !important; justify-content: flex-end !important; gap: 4px; }
    .ask-wrap.ask-home .ask-tools-right { gap: 4px; }
    .ask-wrap.ask-home .chat-attach, .ask-wrap.ask-home .chat-mic { width: 36px !important; height: 36px !important; border: 0; background: transparent; font-size: 20px; }
    .ask-wrap.ask-home .chat-send { width: 44px !important; height: 44px !important; }
    .ask-wrap.ask-home .ask-model { display: none; }
}
.trac-home-mode .trac-page-footer { display: none !important; }
@media (max-width: 760px) {
    .trac-home h1 { font-size: 32px !important; }
    .site-footer .social-links a { padding: 0.28rem 0.65rem; font-size: 0.74rem; gap: 0.3rem; }
    .site-footer .social-links a svg { width: 15px; height: 15px; }
}
/* World map: lighter, and 20% narrower so it stays clear of the zodiac wheels */
.home-world { width: min(880px, 74vw) !important; opacity: 0.2 !important; }
@media (max-width: 760px) { .home-world { width: 112vw !important; opacity: 0.18 !important; } }

/* Tables: headings wrap onto two lines instead of being cut off; long readings wrap in their column. */
.trac-table th, .trac-ws-page .trac-table th { white-space: normal !important; line-height: 1.3; vertical-align: bottom; }
.trac-table td.is-wrap, .trac-table th.is-wrap { white-space: normal !important; min-width: 14rem; line-height: 1.45; overflow-wrap: break-word; }
.trac-table td { overflow-wrap: break-word; }
.trac-table.has-wrap { width: 100%; }
.trac-ws-page .trac-tablewrap { max-width: 100%; overflow-x: auto; }

/* ======================================================================
   Header extras: Courses / Shop links, language, cleaner sub menus
   ====================================================================== */
.tm-sep { width: 1px; height: 26px; background: #E5E7EB; margin: 0 4px 0 6px; align-self: center; }
.tm-link { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 10px;
    color: #1F2937; font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.tm-link .nav-icon { color: #E86F00; display: inline-flex; }
.tm-link .nav-icon svg { width: 17px; height: 17px; }
.tm-link:hover { background: #FFF4E5; color: #9A3412; }

.trac-lang { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 8px 0 10px;
    border: 1px solid #E5E7EB; border-radius: 10px; background: #FFFFFF; color: #374151; cursor: pointer; }
.trac-lang select { border: 0; background: transparent; font: inherit; font-size: 0.9rem; font-weight: 600; color: #1F2937; cursor: pointer; padding: 0 2px; max-width: 7.5rem; }
.trac-lang select:focus { outline: none; }
.trac-lang:focus-within { border-color: #F57C00; }

/* Google Translate: no bar at the top of the page */
.goog-te-banner-frame, iframe.skiptranslate, .goog-te-balloon-frame, #goog-gt-tt, .goog-tooltip { display: none !important; }
html.is-translated body { top: 0 !important; position: static !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* Kundli / Chart list: white, dark text, a soft saffron highlight */
.tm-drop-menu { background: #FFFFFF !important; border: 1px solid #F1E3D3; box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14) !important; padding: 6px !important; gap: 2px !important; }
.tm-drop-menu .tm-item { background: transparent !important; color: #1F2937 !important; font-weight: 600; box-shadow: none !important; border-left: 3px solid transparent; border-radius: 8px; }
.tm-drop-menu .tm-item .nav-icon { color: #E86F00 !important; }
.tm-drop-menu .tm-item:hover, .tm-drop-menu .tm-item:focus-visible { background: #FFF4E5 !important; color: #9A3412 !important; border-left-color: #F57C00; }
.tm-drop-menu .tm-item.is-current { background: #FFF1E0 !important; color: #9A3412 !important; border-left-color: #F57C00; }

/* Panchang and Muhurta menu: white panel, light rail, dark text */
.tp-menu .tp-mega { --pm-banner: #FFFFFF; --pm-rail: #FFF8EF; --pm-card: transparent; --pm-card-hi: #FFEFD9; --pm-page: #FFFFFF;
    border: 1px solid #F1E3D3 !important; box-shadow: 0 24px 60px rgba(17, 24, 39, 0.16), 0 4px 14px rgba(17, 24, 39, 0.06) !important; }
.tp-mega-banner { background: #FFFFFF !important; color: #1F2937 !important; border-bottom: 1px solid #F1E3D3 !important; }
.tp-mega-banner-icon { background: #FFF1E0 !important; color: #E86F00 !important; }
.tp-mega-banner-text b { color: #111827 !important; }
.tp-mega-banner-text span { color: #4B5563 !important; }
.tp-mega-close { border-color: #E5E7EB !important; color: #374151 !important; }
.tp-mega-close:hover { background: #F3F4F6 !important; }
.tp-menu .tp-mega-groups { border-right: 1px solid #F1E3D3 !important; }
.tp-menu .tp-mega-group { color: #1F2937 !important; background: transparent !important; }
.tp-menu .tp-mega-group:hover { background: #FFEFD9 !important; }
.tp-menu .tp-mega-group.is-on { background: #FFFFFF !important; color: #9A3412 !important; border-color: #F1E3D3 !important; box-shadow: inset 3px 0 0 #F57C00 !important; }
.tp-menu .tp-mega-group .tp-mega-icon, .tp-menu .tp-mega-group.is-on .tp-mega-icon { background: #FFF1E0 !important; color: #E86F00 !important; }
.tp-menu .tp-tile { border-left-width: 1px !important; border-color: #EDE7DF !important; }
.tp-menu .tp-tile:hover { border-color: #F5B26B !important; background: #FFFBF5 !important; }
.tp-menu .tp-tile.is-on { background: #FFF4E5 !important; border-color: #F5B26B !important; color: #9A3412 !important; }

/* Smaller laptop screens: the header keeps everything on one line */
@media (max-width: 1500px) and (min-width: 761px) {
    .trac-header .trac-system { padding-left: 11px !important; padding-right: 11px !important; font-size: 0.9rem !important; }
    .tm-link { padding: 0 7px; font-size: 0.9rem; }
    .trac-header .trac-header-btn.is-primary span:not(.nav-icon) { display: none; }
    .trac-lang select { max-width: 5.6rem; }
}
@media (max-width: 1040px) and (min-width: 761px) {
    .tm-link span:not(.nav-icon) { display: none; }
    .trac-header .trac-google-btn span { display: none; }
}
@media (max-width: 760px) {
    .tm-sep { display: none; }
    .tm-link { justify-content: center; background: #FFF4E5; height: 36px; }
    .trac-lang { padding: 0 6px; }
    .trac-lang select { max-width: 4.8rem; font-size: 0.85rem; }
}
@media (max-width: 1500px) and (min-width: 761px) {
    .trac-header .trac-header-systems .trac-system { padding: 0 10px !important; gap: 6px !important; font-size: 0.88rem !important; }
    .trac-header .trac-header-systems { gap: 6px !important; }
    .trac-lang select { max-width: 4.9rem; }
    .trac-header .trac-header-actions { gap: 6px !important; }
}
@media (max-width: 1300px) and (min-width: 761px) {
    .trac-header .trac-header-systems .trac-system .nav-icon { display: none !important; }
    .trac-header .trac-google-btn span { display: none; }
}
/* Tables with a long column: every text cell may wrap, so the table fits the pane. */
.trac-table.has-wrap td { white-space: normal !important; }
.trac-table.has-wrap td.is-wrap { min-width: 12rem; }
.trac-table.has-wrap td.num, .trac-table.has-wrap td:first-child { white-space: nowrap !important; }
/* Chart page: the birth details take room in the header, so Courses and Shop show as icons. */
@media (max-width: 1700px) { .trac:not(.trac-home-mode) .tm-link span:not(.nav-icon) { display: none; } }
.trac-ws-page .trac-table.has-wrap { font-size: 0.8rem; }
.trac-ws-page .trac-table.has-wrap th, .trac-ws-page .trac-table.has-wrap td { padding: 0.4rem 0.45rem; }
.trac-ws-page .trac-table.has-wrap td.num { font-size: 0.78rem; }
.trac-ws-page .trac-table.has-wrap td.is-wrap { min-width: 10rem; }
.trac-ws-page .trac-table.has-wrap td.is-wrap { min-width: 8.5rem; } .trac-ws-page .trac-table.has-wrap th, .trac-ws-page .trac-table.has-wrap td { padding: 0.4rem 0.4rem; }
@media (max-width: 1700px) and (min-width: 761px) { .trac:not(.trac-home-mode) .tm-link, .trac:not(.trac-home-mode) .tm-sep { display: none !important; } }
/* Words from the engine (home, longevity …) start with a capital letter in every table. */
.trac-ws-page .trac-table td::first-letter, .ai-reply .trac-table td::first-letter { text-transform: uppercase; }

/* ==========================================================================
   HEADER v2: two rows.
   Row 1 (white): the TRAC mark on the left; language, New Analysis, sign-in on the right.
   Row 2 (saffron bar): the whole menu in one line, room for more items.
   Sub menus: white cards with icon tiles and a short line under each name.
   ========================================================================== */
.trac-header { height: auto !important; min-height: 0 !important; flex-wrap: wrap !important; row-gap: 0 !important; column-gap: 14px !important;
    padding: 0 22px !important; background: #FFFFFF !important; border-bottom: 0 !important; box-shadow: 0 2px 10px rgba(17, 24, 39, 0.06) !important; }
.trac-header > .trac-header-brand { order: 1; height: 62px; display: flex; align-items: center; }
.trac-header > .trac-header-native { order: 2; margin-left: auto; }
.trac-header > .trac-header-actions { order: 3; margin-left: auto; height: 62px; display: flex; align-items: center; gap: 8px !important; }
.trac-header > .trac-header-native + .trac-header-actions { margin-left: 14px; }
.trac-header > .trac-header-systems {
    order: 10; flex: 1 1 100% !important; width: auto !important; display: flex !important; align-items: center; gap: 2px !important;
    margin: 0 -22px !important; padding: 0 16px !important; height: 46px; overflow: visible !important;
    background: linear-gradient(90deg, #E8650A 0%, #F57C00 45%, #FB8C1A 100%) !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}
.trac-header .trac-header-systems .trac-system, .trac-header .trac-header-systems .tm-drop-btn {
    height: 46px !important; padding: 0 15px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; color: #FFFFFF !important; box-shadow: none !important;
    font-size: 0.95rem !important; font-weight: 600 !important; gap: 8px !important; display: inline-flex !important; align-items: center; text-decoration: none !important;
    position: relative; transition: background 0.15s ease;
}
.trac-header .trac-header-systems .trac-system .nav-icon { display: inline-flex !important; color: #FFE7C2 !important; }
.trac-header .trac-header-systems .trac-system .nav-icon svg { width: 18px; height: 18px; }
.trac-header .trac-header-systems .trac-system:hover { background: rgba(255, 255, 255, 0.16) !important; }
.trac-header .trac-header-systems .trac-system.is-current,
.trac-header .tp-menu.is-open .tp-menu-btn, .trac-header .tm-drop.is-open .tm-drop-btn,
.trac-header .tm-drop:has(.tm-item.is-current) .tm-drop-btn {
    background: #FFFFFF !important; color: #9A3412 !important;
}
.trac-header .trac-header-systems .trac-system.is-current .nav-icon,
.trac-header .tp-menu.is-open .tp-menu-btn .nav-icon, .trac-header .tm-drop.is-open .tm-drop-btn .nav-icon,
.trac-header .tm-drop:has(.tm-item.is-current) .tm-drop-btn .nav-icon { color: #E86F00 !important; }
.trac-header .trac-header-systems .tp-caret { color: inherit; opacity: 0.85; }
.trac-header .trac-header-systems .tm-link { display: inline-flex !important; }
.trac-header .trac-header-systems .tm-link span:not(.nav-icon) { display: inline !important; }
.trac-header .tm-drop { width: auto !important; height: 46px; }
.tm-sep { display: none !important; }

/* Sub menu: Kundli / Chart */
.tm-drop-menu { min-width: 300px !important; padding: 8px !important; gap: 2px !important; border-radius: 14px !important;
    background: #FFFFFF !important; border: 1px solid #EEE7DE !important; border-top: 3px solid #F57C00 !important;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.16), 0 3px 10px rgba(17, 24, 39, 0.06) !important; }
.tm-drop-menu .tm-item { display: flex !important; align-items: center; gap: 12px !important; padding: 9px 10px !important; border: 0 !important; border-radius: 10px !important;
    background: transparent !important; color: #111827 !important; box-shadow: none !important; text-decoration: none; }
.tm-drop-menu .tm-item .nav-icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: inline-flex !important; align-items: center; justify-content: center;
    background: #FFF4E5 !important; color: #E86F00 !important; transition: background 0.15s ease, color 0.15s ease; }
.tm-drop-menu .tm-item .nav-icon svg { width: 19px; height: 19px; }
.tm-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tm-text b { font-size: 0.95rem; font-weight: 700; color: #111827; }
.tm-text small { font-size: 0.78rem; color: #6B7280; font-weight: 500; }
.tm-drop-menu .tm-item:hover, .tm-drop-menu .tm-item:focus-visible, .tm-drop-menu .tm-item.is-current { background: #FFF8F0 !important; }
.tm-drop-menu .tm-item:hover .nav-icon, .tm-drop-menu .tm-item:focus-visible .nav-icon, .tm-drop-menu .tm-item.is-current .nav-icon { background: #F57C00 !important; color: #FFFFFF !important; }
.tm-drop-menu .tm-item:hover .tm-text b, .tm-drop-menu .tm-item.is-current .tm-text b { color: #9A3412; }

/* Sub menu: Panchang and Muhurta (the large one) */
.tp-menu .tp-mega { border: 1px solid #EEE7DE !important; border-top: 3px solid #F57C00 !important; border-radius: 16px !important; background: #FFFFFF !important;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18), 0 4px 12px rgba(17, 24, 39, 0.06) !important; }
.tp-mega-banner { background: #FFFFFF !important; border-bottom: 1px solid #F3EEE7 !important; padding: 0.8rem 1.1rem !important; }
.tp-mega-banner-icon { background: #F57C00 !important; color: #FFFFFF !important; border-radius: 10px !important; }
.tp-menu .tp-mega-groups { background: #FCFAF7 !important; border-right: 1px solid #F3EEE7 !important; padding: 10px !important; gap: 2px !important; }
.tp-menu .tp-mega-group { background: transparent !important; color: #1F2937 !important; border: 0 !important; box-shadow: none !important; border-radius: 10px !important; padding: 0.55rem 0.6rem !important; }
.tp-menu .tp-mega-group .tp-mega-icon { width: 32px; height: 32px; border-radius: 9px; background: #FFF4E5 !important; color: #E86F00 !important; display: inline-flex; align-items: center; justify-content: center; }
.tp-menu .tp-mega-group:hover { background: #FFF4E5 !important; }
.tp-menu .tp-mega-group.is-on { background: #FFFFFF !important; color: #9A3412 !important; box-shadow: 0 1px 4px rgba(17, 24, 39, 0.08) !important; }
.tp-menu .tp-mega-group.is-on .tp-mega-icon { background: #F57C00 !important; color: #FFFFFF !important; }
.tp-menu .tp-mega-items { background: #FFFFFF !important; }
.tp-menu .tp-mega-title { color: #111827 !important; border-bottom: 1px solid #F3EEE7 !important; }
.tp-menu .tp-tile { background: #FFFFFF !important; border: 1px solid #EEE7DE !important; border-left: 1px solid #EEE7DE !important; border-radius: 10px !important; color: #1F2937 !important; box-shadow: none !important; }
.tp-menu .tp-tile:hover { background: #FFF8F0 !important; border-color: #F5B26B !important; color: #9A3412 !important; transform: translateY(-1px); }
.tp-menu .tp-tile.is-on { background: #FFF4E5 !important; border-color: #F57C00 !important; color: #9A3412 !important; }
.tp-tile-go { color: #F5A35B !important; }

/* Phones: row 1 logo + actions, row 2 the saffron bar scrolls sideways */
@media (max-width: 760px) {
    .trac-header { padding: 0 12px !important; }
    .trac-header > .trac-header-brand, .trac-header > .trac-header-actions { height: 56px; }
    .trac-header > .trac-header-systems { margin: 0 -12px !important; padding: 0 6px !important; height: 44px; display: flex !important; grid-template-columns: none !important;
        overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none; flex-wrap: nowrap !important; }
    .trac-header > .trac-header-systems::-webkit-scrollbar { display: none; }
    .trac-header .trac-header-systems .trac-system, .trac-header .trac-header-systems .tm-drop-btn { height: 44px !important; padding: 0 12px !important; width: auto !important; font-size: 0.9rem !important; white-space: nowrap; flex: 0 0 auto; }
    .trac-header .tm-drop { flex: 0 0 auto; height: 44px; }
    .trac-header > .trac-header-native { display: none; }
}
/* Inside the Android app the bottom tabs replace the bar */
.in-app .trac-header > .trac-header-systems { height: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; overflow: visible !important; }

/* Social buttons: white, with each network's coloured logo */
.social-links a.sl-youtube, .social-links a.sl-instagram, .social-links a.sl-facebook {
    background: #FFFFFF !important; color: #374151 !important; border: 1px solid #E5E7EB !important; font-weight: 500 !important; }
.social-links a.sl-youtube:hover, .social-links a.sl-instagram:hover, .social-links a.sl-facebook:hover { border-color: #F5B26B !important; color: #111827 !important; filter: none; }
@media (min-width: 900px) {
    .trac-header .trac-header-btn.is-primary span:not(.nav-icon) { display: inline !important; }
    .trac-header .trac-google-btn span { display: inline !important; }
    .trac-lang select { max-width: 7.5rem !important; }
}
@media (max-width: 760px) {
    .trac-header > .trac-header-actions { flex-wrap: nowrap !important; margin-left: auto !important; gap: 6px !important; }
    .trac-header [data-home="true"] { display: none !important; }
    .trac-header .trac-lang { padding: 0 6px !important; height: 38px; }
    .trac-header .trac-lang select { max-width: 4.6rem !important; font-size: 0.82rem !important; }
    .trac-header .tmark-small .tmark-logo { width: 32px; }
    .trac-header .tmark-small .tmark-a { font-size: 18px; }
    .trac-header .tmark-small .tmark-b { font-size: 10.5px; }
}

/* ---- Admin panel ---- */
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 1rem; padding: 4px; border-radius: 12px; background: #FFF4E5; border: 1px solid #F8D9B0; width: fit-content; }
.admin-nav a { padding: 0.5rem 1rem; border-radius: 9px; color: #7C2D12; font-weight: 600; text-decoration: none; }
.admin-nav a:hover { background: #FFE7C7; }
.admin-nav a.is-on { background: #F57C00; color: #FFFFFF; }
.admin-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.admin-card { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem; border: 1px solid var(--k-line); border-radius: 14px; background: #FFFFFF; color: #1F2937; text-decoration: none; }
.admin-card span { font-size: 0.8rem; color: #4B5563; font-weight: 600; }
.admin-card b { font-size: 1.5rem; color: #111827; }
a.admin-card:hover { border-color: #F5B26B; }
.admin-card.is-warn { border-color: #F5B26B; background: #FFF8EC; }
.admin-bars { display: grid; gap: 0.5rem; }
.admin-bar { display: grid; grid-template-columns: 8.5rem 1fr 2.5rem; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: #1F2937; }
.admin-bar i { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #F57C00, #FFC107); }
.admin-bar b { text-align: right; }
.admin-note { font-size: 0.85rem; color: #4B5563; margin-top: 0.5rem; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.9rem; }
.admin-filter input, .admin-filter select { padding: 0.5rem 0.6rem; border: 1px solid var(--k-line); border-radius: 9px; font: inherit; color: #111827; background: #FFFFFF; }
.admin-filter label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.88rem; color: #374151; }
.admin-count { margin-left: auto; font-size: 0.88rem; color: #4B5563; }
.admin-table a { color: #9A3412; font-weight: 600; }
.admin-small { padding: 0.3rem 0.7rem !important; font-size: 0.82rem; }
.admin-plan { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: #F3F4F6; color: #374151; }
.admin-plan.p-plus { background: #E0F2FE; color: #075985; }
.admin-plan.p-pro { background: #FFEDD5; color: #9A3412; }
.admin-plan.p-astrologer { background: #EDE9FE; color: #5B21B6; }
.admin-status { font-weight: 600; }
.admin-status.s-paid { color: #166534; } .admin-status.s-created { color: #92400E; } .admin-status.s-failed { color: #B91C1C; }
.admin-ref { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: #4B5563; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
.admin-soon td { background: #FFF8EC !important; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.admin-pager { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0.8rem; }
.admin-pager a { padding: 0.3rem 0.65rem; border-radius: 8px; border: 1px solid var(--k-line); color: #374151; text-decoration: none; }
.admin-pager a.is-on { background: #F57C00; border-color: #F57C00; color: #FFFFFF; }
@media (max-width: 1100px) { .admin-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-count { margin-left: 0; } }
/* Home: the greeting leads (the big logo was taken out of the centre) */
.trac-home h1 { margin-top: auto !important; font-size: 46px; }
@media (max-width: 760px) { .trac-home h1 { margin-top: 40px !important; } }
/* Language: globe and a short code (EN, HI …); the full list opens on click */
.trac-lang { position: relative; gap: 5px !important; padding: 0 10px !important; }
.trac-lang-code { font-weight: 700; font-size: 0.86rem; color: #1F2937; }
.trac-lang::after { content: "▾"; font-size: 0.7rem; color: #6B7280; }
.trac-lang select { position: absolute; inset: 0; width: 100% !important; max-width: none !important; opacity: 0; cursor: pointer; }

/* The question box: one line to start, grows to five lines (about 150px) as the question gets longer. */
textarea.ask-input { resize: none; overflow-y: hidden; background: transparent; font-family: inherit; line-height: 1.5 !important;
    min-height: 0 !important; height: 38px; max-height: 176px; padding: 4px 2px !important; align-self: center !important; box-sizing: border-box !important; }
.ask-wrap.ask-home .trac-chatbox { align-items: flex-end !important; }
.ask-wrap.ask-home .trac-chatbox textarea.ask-input { height: 54px; padding: 13px 2px !important; font-size: 18px !important; }
.ask-wrap.ask-home .trac-chatbox.is-tall { border-radius: 26px !important; }
.ask-wrap.ask-home .ask-tools { align-self: flex-end; margin-bottom: 1px !important; }
.ask-wrap.ask-panel .trac-chatbox { align-items: flex-end !important; }
.ask-wrap.ask-panel .trac-chatbox textarea.ask-input { height: 40px; padding: 7px 2px !important; font-size: 16px !important; }
@media (max-width: 760px) {
    textarea.ask-input { max-height: 140px; }
    .ask-wrap.ask-home .trac-chatbox textarea.ask-input { padding: 11px 2px !important; font-size: 15.5px !important; height: 46px; }
}

/* ==========================================================================
   HEADER v3 (approved design): grey strip · white band · cream menu row
   ========================================================================== */
.th { flex: 0 0 auto; position: relative; z-index: 30; background: #FFFFFF; box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06); }
.th-strip { background: #F3F4F6; border-bottom: 1px solid #E5E7EB; }
.th-strip-in { height: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 32px; }
.th-sep { width: 1px; height: 16px; background: #D1D5DB; }
.th-size { display: inline-flex; border: 1px solid #D1D5DB; border-radius: 999px; overflow: hidden; background: #FFFFFF; }
.th-size button { border: 0; background: transparent; padding: 2px 10px; font: inherit; font-size: 12px; font-weight: 700; color: #374151; cursor: pointer; }
.th-size button + button { border-left: 1px solid #E5E7EB; }
.th-size button.is-on { background: #FFF4E5; color: #C2410C; }
.th-strip .trac-lang { height: 24px !important; border-radius: 999px !important; padding: 0 9px !important; border-color: #D1D5DB !important; }
.th-strip .trac-lang-code { font-size: 12px; }
.th-strip .trac-header-btn { height: 24px !important; min-height: 0 !important; padding: 0 10px !important; border-radius: 999px !important; font-size: 12.5px !important;
    background: #FFFFFF !important; border: 1px solid #D1D5DB !important; color: #1E3A8A !important; font-weight: 600 !important; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.th-strip .trac-header-btn span { display: inline !important; }
.th-strip .trac-account-btn { width: 26px !important; height: 26px !important; padding: 0 !important; justify-content: center; }
.th-strip .acct-plan-badge { bottom: -7px; }

.th-band { height: 84px; display: flex; align-items: center; gap: 18px; padding: 0 32px; }
.th-brand { display: flex; align-items: center; gap: 13px; text-decoration: none; min-width: 0; }
.th-brand img { width: 60px; height: auto; flex: 0 0 auto; }
.th-brand-text { display: flex; flex-direction: column; min-width: 0; }
.th-title { font-family: "Montserrat", "Inter", sans-serif; font-weight: 900; font-size: 28px; line-height: 1.05; color: #14286B; white-space: nowrap; }
.th-title i { font-style: normal; background: linear-gradient(180deg, #FB9A2B, #E8650A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.th-tag { margin-top: 4px; font-size: 13px; color: #4B5563; white-space: nowrap; }
.th-tag b { color: #E8650A; }
.th-band .trac-header-native { margin-left: auto; }
.th-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.th-band .trac-header-native + .th-actions { margin-left: 18px; }
.th-btn { height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 15px; border-radius: 10px; border: 1px solid #E5E7EB; background: #FFFFFF;
    color: #1F2937; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.th-btn svg { color: #E86F00; flex: 0 0 auto; }
.th-btn:hover { border-color: #F5B26B; background: #FFFBF5; }
.th-btn.is-main { border: 0; color: #FFFFFF; background: linear-gradient(135deg, #FB8C1A, #E8650A); box-shadow: 0 6px 14px rgba(232, 101, 10, 0.28); }
.th-btn.is-main svg { color: #FFFFFF; }
.th-btn.is-main:hover { filter: brightness(1.05); background: linear-gradient(135deg, #FB8C1A, #E8650A); }

.th-menu { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 32px;
    background: linear-gradient(180deg, #FFF8EF, #FFF3E3); border-top: 1px solid #F6E3C8; border-bottom: 1px solid #F6E3C8; }
.th .trac-header-systems { display: flex !important; align-items: center; gap: 9px !important; flex: 1 1 auto !important; min-width: 0; height: auto !important;
    margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; overflow: visible !important; width: auto !important; }
.th .trac-header-systems .trac-system, .th .trac-header-systems .tm-drop-btn {
    height: 40px !important; padding: 0 15px !important; margin: 0 !important; border: 0 !important; border-radius: 10px !important;
    background: linear-gradient(180deg, #FB8C1A, #F57C00) !important; color: #FFFFFF !important; box-shadow: 0 3px 8px rgba(232, 101, 10, 0.22) !important;
    font-size: 14.5px !important; font-weight: 600 !important; gap: 7px !important; display: inline-flex !important; align-items: center; white-space: nowrap; text-decoration: none !important; width: auto !important; }
.th .trac-header-systems .trac-system .nav-icon { display: inline-flex !important; color: #FFFFFF !important; opacity: 0.95; }
.th .trac-header-systems .trac-system .nav-icon svg { width: 17px; height: 17px; }
.th .trac-header-systems .trac-system span:not(.nav-icon) { display: inline !important; }
.th .trac-header-systems .trac-system:hover { filter: brightness(1.06); }
.th .tm-drop { height: auto !important; width: auto !important; }
.th .trac-header-systems .trac-system.is-current, .th .tp-menu.is-open .tp-menu-btn, .th .tm-drop.is-open .tm-drop-btn,
.th .tm-drop:has(.tm-item.is-current) .tm-drop-btn {
    background: #FFFFFF !important; color: #C2410C !important; box-shadow: inset 0 0 0 2px #F57C00 !important; filter: none; }
.th .trac-header-systems .trac-system.is-current .nav-icon, .th .tp-menu.is-open .tp-menu-btn .nav-icon, .th .tm-drop.is-open .tm-drop-btn .nav-icon,
.th .tm-drop:has(.tm-item.is-current) .tm-drop-btn .nav-icon { color: #E86F00 !important; }
.th .tp-caret { color: inherit !important; opacity: 0.85; }
.th-home { margin-left: auto; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid #F1D5AE; background: #FFFFFF; color: #C2410C;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.th-home:hover { background: #FFF4E5; }

/* Chart pages need the height for the chart: a slimmer band there. */
.trac:not(.trac-home-mode) .th-band { height: 66px; }
.trac:not(.trac-home-mode) .th-brand img { width: 46px; }
.trac:not(.trac-home-mode) .th-title { font-size: 22px; }
.trac:not(.trac-home-mode) .th-tag { display: none; }
.trac:not(.trac-home-mode) .th-menu { height: 52px; }
.trac-home-mode .th-home { visibility: hidden; }

/* Text size from A- / A / A+ (the page content; the header stays as it is) */
html.fs-sm .trac-body, html.fs-sm .site-main, html.fs-sm .tp-main { zoom: 0.9; }
html.fs-lg .trac-body, html.fs-lg .site-main, html.fs-lg .tp-main { zoom: 1.12; }

/* Laptops */
@media (max-width: 1440px) {
    .th .trac-header-systems .trac-system, .th .trac-header-systems .tm-drop-btn { padding: 0 12px !important; font-size: 14px !important; }
    .th .trac-header-systems { gap: 7px !important; }
}
@media (max-width: 1280px) {
    .th-tag { display: none; }
    .th .trac-header-systems .trac-system .nav-icon { display: none !important; }
    .th-btn span { display: none; }
    .th-btn.is-main span { display: inline; }
    .th-btn { padding: 0 11px; }
}
/* Phones and tablets */
@media (max-width: 760px) {
    .th-strip-in { padding: 0 12px; gap: 7px; }
    .th-band { height: 62px; padding: 0 12px; gap: 8px; }
    .th-brand img { width: 40px; }
    .th-title { font-size: 19px; }
    .th-tag, .th-band .trac-header-native { display: none !important; }
    .th-btn { width: 40px; padding: 0; justify-content: center; }
    .th-btn span, .th-btn.is-main span { display: none; }
    .th-menu { height: 54px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
    .th-menu::-webkit-scrollbar { display: none; }
    .th .trac-header-systems { flex: 0 0 auto !important; overflow: visible !important; display: flex !important; grid-template-columns: none !important; }
    .th .trac-header-systems .trac-system, .th .trac-header-systems .tm-drop-btn { height: 38px !important; padding: 0 12px !important; font-size: 13.5px !important; flex: 0 0 auto; }
    .th .trac-header-systems .trac-system .nav-icon { display: inline-flex !important; }
    .th-home { margin-left: 4px; }
}
/* Inside the Android app the bottom tabs replace the menu row */
.in-app .th-menu { height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; overflow: visible !important; }
.in-app .th-menu .trac-system, .in-app .th-menu .tm-drop, .in-app .th-home { display: none !important; }

@media (max-width: 760px) {
    .th-strip .trac-header-btn { white-space: nowrap; }
    .th-title { font-size: 17px; }
    .th-brand { gap: 8px; }
    .th-brand img { width: 34px; }
    .th-actions { gap: 6px; }
    .th-btn { width: 36px; height: 36px; }
}
/* Home picture: one zodiac wheel (signs, nakshatras, grahas, the Sun) behind the greeting, whole and faint */
.home-astrolabe { position: absolute; left: 50%; top: 50%; width: min(440px, 80vw); transform: translate(-50%, -54%); opacity: 0.32; pointer-events: none; }
@media (max-width: 760px) { .home-astrolabe { width: 92vw; top: 40%; opacity: 0.28; } }

/* ==========================================================================
   HEADER v3.1: orange top strip with name on the left, tagline on every page,
   fluid sizes for every screen width
   ========================================================================== */
.th-strip { background: linear-gradient(90deg, #E8650A, #F57C00 55%, #FB8C1A); border-bottom: 0; color: #FFFFFF; }
.th-strip-in { justify-content: space-between; gap: 12px; }
.th-strip-left { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; color: #FFFFFF; white-space: nowrap; overflow: hidden; }
.th-strip-left b { font-weight: 800; letter-spacing: 0.2px; }
.th-strip-left .th-systems { font-weight: 500; opacity: 0.96; overflow: hidden; text-overflow: ellipsis; }
.th-strip-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.th-strip .th-sep { background: rgba(255, 255, 255, 0.45); }
.th-strip .th-size { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.55); }
.th-strip .th-size button { color: #FFFFFF; }
.th-strip .th-size button + button { border-left-color: rgba(255, 255, 255, 0.4); }
.th-strip .th-size button.is-on { background: #FFFFFF; color: #C2410C; }
.th-strip .trac-lang { background: rgba(255, 255, 255, 0.16) !important; border-color: rgba(255, 255, 255, 0.55) !important; color: #FFFFFF !important; }
.th-strip .trac-lang svg, .th-strip .trac-lang-code { color: #FFFFFF !important; }
.th-strip .trac-header-btn { background: #FFFFFF !important; border-color: #FFFFFF !important; color: #C2410C !important; }
.th-strip .trac-account-btn { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); border-radius: 999px; }

/* Tagline on every page and every width */
.th-tag, .trac:not(.trac-home-mode) .th-tag { display: block !important; }
.trac:not(.trac-home-mode) .th-band { height: 72px; }
.trac:not(.trac-home-mode) .th-tag { font-size: 12px; margin-top: 3px; }
.th-brand, .th-brand-text { min-width: 0; }
.th-band { min-width: 0; }

@media (max-width: 1280px) {
    .th-tag { font-size: 12px; }
}
/* Tablets */
@media (max-width: 1024px) {
    .th-band, .th-strip-in, .th-menu { padding-left: 18px; padding-right: 18px; }
    .th-title { font-size: 22px; }
    .th-brand img { width: 48px; }
    .th-tag { white-space: normal; line-height: 1.25; }
    .th-band .trac-header-native { display: none !important; }
}
/* Phones */
@media (max-width: 760px) {
    .th-strip-in { height: 32px; padding: 0 10px; gap: 8px; }
    .th-strip-left { font-size: 12px; gap: 7px; }
    .th-strip-right { gap: 6px; }
    .th-band, .trac:not(.trac-home-mode) .th-band { height: auto; min-height: 60px; padding: 8px 10px; }
    .th-brand { flex: 1 1 auto; }
    .th-title, .trac:not(.trac-home-mode) .th-title { font-size: 17px; }
    .th-brand img, .trac:not(.trac-home-mode) .th-brand img { width: 36px; }
    .th-tag, .trac:not(.trac-home-mode) .th-tag { display: block !important; font-size: 10.5px; line-height: 1.25; margin-top: 2px; white-space: normal; }
    .th-actions { flex: 0 0 auto; }
}
@media (max-width: 560px) {
    .th-strip-left .th-sep, .th-strip-left .th-systems { display: none; }
    .th-size button { padding: 2px 7px; }
}
@media (max-width: 400px) {
    .th-strip-right .th-sep { display: none; }
    .th-actions { gap: 4px; }
    .th-btn { width: 34px; height: 34px; }
}
.th-strip .trac-header-btn { white-space: nowrap; flex: 0 0 auto; }
.th-strip-right > * { flex: 0 0 auto; }
.th-strip-left { flex: 1 1 auto; }
@media (max-width: 560px) {
    .th-strip .trac-header-btn { padding: 0 8px !important; font-size: 12px !important; }
    .th-strip .trac-lang { padding: 0 7px !important; }
    .th-strip .th-size button { padding: 2px 6px; font-size: 11.5px; }
}
@media (max-width: 400px) {
    .th-strip-left { font-size: 11.5px; }
    .th-strip .trac-header-btn svg { display: none; }
}
.th-strip .trac-header-btn:not(.trac-account-btn) { width: auto !important; }
.th-strip .trac-header-btn .nav-icon, .th-strip .trac-header-btn > svg { display: inline-flex; }
@media (max-width: 400px) { .th-strip .trac-header-btn > svg, .th-strip .trac-header-btn .nav-icon { display: none !important; } }

/* Home: plain white, no background picture */
.trac-home { background: #FFFFFF !important; background-image: none !important; }
.trac-home-art { display: none !important; }

/* ==========================================================================
   Phone menu: all items visible as a tidy 4-column grid of tiles (icon over label)
   ========================================================================== */
.th-home-text { display: none; }
@media (max-width: 760px) {
    .th-menu { height: auto !important; display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 9px 10px !important; overflow: visible !important; }
    .th-menu > .trac-header-systems { display: contents !important; }
    .th .tm-drop, .th .tp-menu { display: block; width: 100% !important; min-width: 0; }
    .th .trac-header-systems .trac-system, .th .trac-header-systems .tm-drop-btn, .th-home {
        width: 100% !important; height: 58px !important; min-width: 0; padding: 6px 3px !important; margin: 0 !important;
        flex-direction: column !important; justify-content: center !important; gap: 4px !important;
        font-size: 11.5px !important; line-height: 1.15 !important; white-space: normal !important; text-align: center; border-radius: 12px !important; }
    .th .trac-header-systems .trac-system .nav-icon { display: inline-flex !important; }
    .th .trac-header-systems .trac-system .nav-icon svg { width: 20px; height: 20px; }
    .th .trac-header-systems .tp-caret { display: none !important; }
    .th-home { margin: 0 !important; border: 0; background: linear-gradient(180deg, #FB8C1A, #F57C00); color: #FFFFFF; box-shadow: 0 3px 8px rgba(232, 101, 10, 0.22); display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
    .th-home svg { width: 20px; height: 20px; }
    .th-home-text { display: inline; }
    .trac-home-mode .th-home { visibility: visible; }
}
@media (max-width: 360px) {
    .th .trac-header-systems .trac-system, .th .trac-header-systems .tm-drop-btn, .th-home { font-size: 10.5px !important; height: 54px !important; }
}
.in-app .th-menu { display: block !important; padding: 0 !important; }
@media (max-width: 760px) {
    .th .trac-header-systems .trac-system span.tp-caret, .th .trac-header-systems .tm-drop-btn span.tp-caret { display: none !important; }
    .th .th-menu .th-home, .trac-home-mode .th .th-menu .th-home { display: inline-flex !important; visibility: visible !important; }
}
@media (max-width: 760px) {
    .th .th-menu .trac-system, .th .th-menu .tm-drop-btn, .th .th-menu .th-home {
        box-sizing: border-box !important; min-height: 0 !important; max-height: none !important; height: 58px !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; transform: none !important; }
    .th .th-menu > * , .th .th-menu .trac-header-systems > * { min-width: 0 !important; margin: 0 !important; }
}
@media (max-width: 360px) { .th .th-menu .trac-system, .th .th-menu .tm-drop-btn, .th .th-menu .th-home { height: 54px !important; } }

/* ==========================================================================
   HEADER v4: white middle row, light menu buttons (orange on hover / current page),
   tools on the left, Courses and Shop Now on the right
   ========================================================================== */
.th-band { background: #FFFFFF !important; }
.th-tag { color: #6B7280 !important; }
.th .trac-header-systems { gap: 10px !important; }
.th .trac-header-systems .trac-system, .th .trac-header-systems .tm-drop-btn {
  background: #FFFFFF !important; color: #1F2937 !important; border: 1px solid #F1D9B5 !important;
  box-shadow: 0 1px 2px rgba(17,24,39,.05) !important; position: relative; }
.th .trac-header-systems .trac-system .nav-icon { color: #E86F00 !important; }
.th .tp-caret { color: #9CA3AF !important; }
.th .trac-header-systems .trac-system:hover, .th .trac-header-systems .tm-drop-btn:hover {
  background: linear-gradient(180deg,#FB8C1A,#F57C00) !important; color: #FFFFFF !important; border-color: transparent !important; filter: none !important; }
.th .trac-header-systems .trac-system:hover .nav-icon, .th .trac-header-systems .trac-system:hover .tp-caret { color: #FFFFFF !important; }
.th .trac-header-systems .trac-system.is-current, .th .tp-menu.is-open .tp-menu-btn, .th .tm-drop.is-open .tm-drop-btn, .th .tm-drop:has(.tm-item.is-current) .tm-drop-btn {
  background: linear-gradient(180deg,#FB8C1A,#F57C00) !important; color: #FFFFFF !important; border-color: transparent !important; box-shadow: 0 4px 10px rgba(232,101,10,.28) !important; }
.th .trac-header-systems .trac-system.is-current .nav-icon, .th .tm-drop:has(.tm-item.is-current) .tm-drop-btn .nav-icon, .th .tm-drop:has(.tm-item.is-current) .tm-drop-btn .tp-caret,
.th .tm-drop.is-open .tm-drop-btn .nav-icon, .th .tp-menu.is-open .tp-menu-btn .nav-icon { color: #FFFFFF !important; }
.th .trac-header-systems .trac-system.is-current::after, .th .tm-drop:has(.tm-item.is-current) .tm-drop-btn::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: -9px; height: 3px; border-radius: 3px; background: #E8650A; }
.th .trac-header-systems .tm-link { background: #FFF7EE !important; }
.th .trac-header-systems .tm-link:hover { background: linear-gradient(180deg,#FB8C1A,#F57C00) !important; }
@media (min-width: 761px) {
  .th .trac-header-systems { flex: 1 1 auto !important; }
  .th .trac-header-systems a.tm-link[href="/courses"] { margin-left: auto !important; }
  .th .trac-header-systems a.tm-link[href="/courses"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 1px; background: #EAD3B2; }
}
@media (max-width: 760px) {
  .th .th-menu .th-home { background: #FFFFFF !important; color: #1F2937 !important; border: 1px solid #F1D9B5 !important; box-shadow: none !important; }
  .th .th-menu .th-home svg { color: #E86F00; }
  .th .trac-header-systems .trac-system.is-current::after, .th .tm-drop:has(.tm-item.is-current) .tm-drop-btn::after { display: none; }
}

/* ==========================================================================
   KP settings: method + Apply in view, the rest under "Advanced KP settings"
   ========================================================================== */
.kp-settings { margin: 0 0 1rem; padding: 14px 16px; background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 12px; }
.kp-set-main { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.kp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kp-field label { font-size: 13px; font-weight: 600; color: #374151; }
.kp-field select, .kp-field input { height: 40px; padding: 0 12px; border: 1px solid #D1D5DB; border-radius: 8px; background: #FFFFFF; font: inherit; font-size: 15px; color: #111827; box-sizing: border-box; width: 100%; }
.kp-field select:focus, .kp-field input:focus { outline: 2px solid #FDBA74; outline-offset: 0; border-color: #F57C00; }
.kp-field input:invalid { border-color: #DC2626; }
.kp-set-main .kp-field { min-width: 240px; }
.kp-apply { height: 40px; padding: 0 22px; border: 0; border-radius: 8px; background: #EE6C0C; color: #FFFFFF; font: inherit; font-weight: 700; cursor: pointer; }
.kp-apply:hover { background: #D85F06; }
.kp-set-summary { margin: 0 0 0 auto; align-self: center; font-size: 13.5px; color: #4B5563; }
.kp-set-summary b { color: #111827; }
.kp-set-warning { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; font-size: 14px; }
.kp-adv { margin-top: 12px; border-top: 1px dashed #E5E7EB; padding-top: 10px; }
.kp-adv > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: #C2410C; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.kp-adv > summary::-webkit-details-marker { display: none; }
.kp-adv > summary::before { content: "▸"; transition: transform .15s; }
.kp-adv[open] > summary::before { transform: rotate(90deg); }
.kp-adv-note { margin: 8px 0 12px; font-size: 13.5px; color: #4B5563; }
.kp-adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 260px)); gap: 12px; margin-bottom: 12px; }
.kp-place { margin-bottom: 12px; max-width: 640px; }
.kp-place-row { display: flex; gap: 10px; align-items: center; }
.kp-citybox { position: relative; flex: 1 1 auto; }
.kp-reset { height: 40px; padding: 0 14px; border: 1px solid #D1D5DB; border-radius: 8px; background: #FFFFFF; color: #374151; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.kp-reset:hover { border-color: #F5B26B; background: #FFFBF5; }
.kp-hint { margin: 4px 0 0; font-size: 12.5px; color: #6B7280; }
.kp-coords { margin-bottom: 4px; }
@media (max-width: 760px) {
    .kp-set-main .kp-field { min-width: 0; flex: 1 1 100%; }
    .kp-apply { width: 100%; }
    .kp-set-summary { margin: 0; }
    .kp-adv-grid { grid-template-columns: 1fr; }
    .kp-place-row { flex-direction: column; align-items: stretch; }
}
.kp-settings [hidden] { display: none !important; }

/* KP house editor */
.kp-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #FFF1E0; color: #9A3412; font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.kp-yes { color: #166534; }
.kp-no { color: #991B1B; }
.kp-set-note { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; font-size: 14px; }
.kp-houses { margin: 14px 0 18px; padding: 12px 14px; border: 1px solid #E5E7EB; border-radius: 12px; background: #F9FAFB; }
.kp-houses > summary { cursor: pointer; font-weight: 700; color: #C2410C; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.kp-houses > summary::-webkit-details-marker { display: none; }
.kp-houses > summary::before { content: "▸"; transition: transform .15s; }
.kp-houses[open] > summary::before { transform: rotate(90deg); }
.kp-htable { border-collapse: collapse; width: 100%; background: #FFFFFF; font-size: 14px; }
.kp-htable th, .kp-htable td { border-bottom: 1px solid #F1F1F1; padding: 5px 4px; text-align: center; color: #1F2937; }
.kp-htable th:first-child, .kp-htable td:first-child { text-align: left; padding-left: 8px; min-width: 170px; }
.kp-htable thead th { background: #FFF7EE; font-weight: 700; font-size: 13px; }
.kp-htable select { height: 30px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 4px; background: #FFFFFF; color: #111827; }
.kp-ev-input { width: 100%; height: 30px; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0 8px; font: inherit; color: #111827; box-sizing: border-box; }
.kp-h { width: 28px; height: 28px; border-radius: 6px; border: 1px solid #D1D5DB; background: #FFFFFF; color: #111827; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.kp-h:hover { border-color: #F5B26B; }
.kp-h.is-r { background: #15803D; border-color: #15803D; color: #FFFFFF; }
.kp-h.is-s { background: #DBEAFE; border-color: #93C5FD; color: #1E3A8A; }
.kp-h.is-a { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
span.kp-h { cursor: default; width: 22px; height: 22px; vertical-align: middle; }
.kp-del { border: 0; background: none; color: #9CA3AF; font-size: 15px; cursor: pointer; }
.kp-del:hover { color: #B91C1C; }
.kp-houses-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 12px; }
.kp-houses [hidden] { display: none !important; }
.kp-subtable tr.is-here td { background: #FFF4E5; }
.kp-subtable tr.is-here td:last-child { font-weight: 700; color: #9A3412; }
.kp-toolbar { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.kp-toolbar .kp-reset { display: inline-flex; align-items: center; gap: 7px; }
.kp-toolbar .kp-reset svg { color: #E86F00; }
.kp-match-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0; }
.kp-match-summary > div { padding: 10px 12px; border: 1px solid #F1D9B5; border-radius: 10px; background: #FFFBF5; display: flex; flex-direction: column; gap: 3px; }
.kp-match-summary span { font-size: 12.5px; color: #4B5563; }
.kp-match-summary b { font-size: 15px; color: #111827; }
.kp-partner .kp-houses-actions { margin-top: 4px; }
.kp-htable td:first-child, .kp-htable th:first-child { position: sticky; left: 0; z-index: 1; background: #FFFFFF; }
.kp-htable thead th:first-child { background: #FFF7EE; }
@media (max-width: 760px) { .kp-htable th:first-child, .kp-htable td:first-child { min-width: 120px; } }
.kp-num { max-width: 150px; min-width: 0 !important; }
.kp-answer { display: flex; gap: 16px; align-items: flex-start; margin: 4px 0 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid #E5E7EB; background: #FFFFFF; }
.kp-answer.is-yes { border-color: #86EFAC; background: #F0FDF4; }
.kp-answer.is-no { border-color: #FCA5A5; background: #FEF2F2; }
.kp-answer-verdict { flex: 0 0 auto; min-width: 74px; text-align: center; padding: 10px 12px; border-radius: 10px; font-size: 24px; font-weight: 800; color: #FFFFFF; }
.kp-answer.is-yes .kp-answer-verdict { background: #15803D; }
.kp-answer.is-no .kp-answer-verdict { background: #B91C1C; }
.kp-answer-reading { margin: 6px 0; color: #1F2937; }
@media (max-width: 560px) { .kp-answer { flex-direction: column; } .kp-num { max-width: none; } }
.kp-hours { display: flex; align-items: center; gap: 6px; }
.kp-hours select { flex: 1 1 0; }
.kp-hours span { color: #4B5563; font-size: 13px; }
tr.kp-best td { background: #F0FDF4; }
tr.kp-diff td { background: #FFF1E0; }
tr.kp-diff-light td { background: #FFFBF5; }
.kp-nowrap { white-space: nowrap !important; }
.jm-notes { margin: 6px 0 12px; padding-left: 18px; color: #1F2937; }
.jm-notes li { margin: 3px 0; }
.acg-wrap { border: 1px solid #E5E7EB; border-radius: 10px; overflow: hidden; margin: 6px 0 12px; background: #EEF4FB; }
.acg-wrap svg { display: block; width: 100%; height: auto; }

/* Sayana tertiary hits: dates already passed shown softer (still dark enough to read). */
.trac-table tr.is-past td { color: #4B5563; }

/* Page headings above the tabs (Sayana): pick a heading, its pages show as tabs below. */
.trac-ws-groups {
    flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 0.35rem;
    padding: 0.5rem 0.5rem 0.45rem; background: #FFFFFF; border-bottom: 1px solid var(--rule-2, #E5E7EB);
}
.trac-ws-group {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.36rem 0.75rem; border: 1px solid #E5E7EB; border-radius: 999px;
    background: #F8FAFC; color: #111827; font-size: 0.88rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.trac-ws-group small {
    min-width: 1.35rem; padding: 0 0.35rem; border-radius: 999px; background: #E5E7EB;
    color: #1F2937; font-size: 0.72rem; font-weight: 700; line-height: 1.35rem; text-align: center;
}
.trac-ws-group:hover { border-color: #F57C00; background: #FFF7EE; }
.trac-ws-group[aria-selected="true"] { background: #FFEBD2; border-color: #F57C00; color: #7C2D12; box-shadow: inset 0 -3px 0 #F57C00; }
.trac-ws-group[aria-selected="true"] small { background: #FED7AA; color: #7C2D12; }
.trac-ws-group:focus-visible { outline: 2px solid #16233D; outline-offset: 1px; }
@media (max-width: 640px) {
    .trac-ws-groups { gap: 0.3rem; padding: 0.45rem 0.4rem; }
    .trac-ws-group { padding: 0.32rem 0.6rem; font-size: 0.82rem; }
}

/* Parashari: the active row (Sudarshana house this year) and the Sudarshana wheel. */
.trac-table tr.is-now td { background: #FFF1E0; color: #111827; }
.pa-sud svg { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; }
.pa-sud-key { text-align: center; }

/* Parashari print: choose the sections. */
.kp-toolbar .pa-print-pick { position: relative; }
.pa-print-pick summary { cursor: pointer; color: #1F2937; font-weight: 600; font-size: 0.88rem; padding: 0.4rem 0.6rem; border: 1px solid #E5E7EB; border-radius: 8px; background: #FFFFFF; list-style: none; }
.pa-print-pick summary::-webkit-details-marker { display: none; }
.pa-print-pick summary::after { content: " ▾"; }
.pa-print-pick[open] .pa-print-list { position: absolute; z-index: 30; right: 0; top: calc(100% + 4px); min-width: 230px; padding: 8px 10px; background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.pa-print-list label { display: flex; gap: 8px; align-items: center; padding: 3px 0; color: #111827; font-size: 0.88rem; cursor: pointer; }
.pa-print-charts[hidden] { display: none !important; }
.pa-print-pick summary { white-space: nowrap; }
#panel-positions .kp-toolbar { flex-wrap: wrap; gap: 8px; }
#panel-positions .kp-toolbar .kp-reset { max-width: 100%; white-space: normal; text-align: left; }

/* Calculation settings panel. */
.trac-methods { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid #E5E7EB; border-radius: 14px; color: #111827; box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.trac-methods::backdrop { background: rgba(17,24,39,.45); }
.trac-methods form { padding: 18px 20px 16px; }
.tm-head { display: flex; align-items: center; justify-content: space-between; }
.tm-head h2 { margin: 0; font-size: 1.15rem; color: #14286B; }
.tm-close { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; color: #374151; cursor: pointer; }
.tm-intro { margin: 6px 0 12px; color: #374151; }
.tm-status { padding: 10px 12px; border-radius: 10px; border: 1px solid #E5E7EB; background: #F8FAFC; }
.tm-status.is-standard { border-color: #86EFAC; background: #F0FDF4; }
.tm-status.is-custom { border-color: #F5C38B; background: #FFF7EE; }
.tm-status ul { margin: 6px 0 0; padding-left: 18px; }
.tm-saved { margin: 6px 0 0; color: #1F2937; font-size: .88rem; }
.tm-details { margin-top: 12px; }
.tm-details > summary { cursor: pointer; font-weight: 600; color: #9A3412; padding: 4px 0; }
.tm-group { border: 1px solid #E5E7EB; border-radius: 10px; margin: 10px 0 0; padding: 6px 12px 10px; }
.tm-group legend { font-weight: 700; color: #14286B; padding: 0 4px; }
.tm-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2px 12px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #EEF0F3; }
.tm-row:last-child { border-bottom: 0; }
.tm-row label { font-weight: 600; color: #111827; }
.tm-row select { width: 100%; padding: 6px 8px; border: 1px solid #D1D5DB; border-radius: 8px; color: #111827; background: #FFFFFF; }
.tm-row small { grid-column: 1 / -1; color: #4B5563; }
.tm-elsewhere { margin: 10px 0 0; color: #4B5563; font-size: .86rem; }
.tm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.tm-actions .kp-reset[disabled] { opacity: .5; cursor: default; }
@media (max-width: 560px) { .tm-row { grid-template-columns: 1fr; } }
.trac-method-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 12px; background: #FFF7EE; border-bottom: 1px solid #F5C38B; color: #7C2D12; font-size: .88rem; }
.trac-method-note span { font-weight: 600; }
.trac-method-note form { display: inline; margin: 0; }
.trac-method-note button { border: 1px solid #F5C38B; background: #FFFFFF; color: #7C2D12; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: .84rem; }
.trac-dash-more { display: block; margin: 6px 0 0; border: 0; background: transparent; color: #9A3412; font-weight: 600; cursor: pointer; padding: 4px 0; text-align: left; }
.trac-method-note button { color: #7C2D12 !important; background: #FFFFFF !important; border: 1px solid #F5C38B !important; border-radius: 6px; padding: 2px 8px; font-weight: 600; cursor: pointer; }
.trac-method-note button:hover { background: #FFEBD2 !important; }

/* Chart size: − Chart size + in the chart bar. The divider is no longer dragged. */
.trac-ws-size { display: inline-flex; align-items: center; border: 1px solid #D1D5DB; border-radius: 8px; overflow: hidden; background: #FFFFFF; height: 1.95rem; }
.trac-ws-size button { border: 0; background: #FFFFFF; color: #111827; font-weight: 700; width: 1.9rem; height: 100%; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.trac-ws-size button:hover:not(:disabled) { background: #FFF3DC; }
.trac-ws-size button:disabled { color: #9CA3AF; cursor: default; }
.trac-ws-size span { padding: 0 0.5rem; color: #1F2937; font-size: 0.8rem; font-weight: 600; border-left: 1px solid #E5E7EB; border-right: 1px solid #E5E7EB; line-height: 1.95rem; white-space: nowrap; }
.trac-ws-split { visibility: hidden; pointer-events: none; }
.trac-ws.has-size .trac-ws-stage { overflow: auto; }
.trac-ws.has-size .trac-ws-svg { flex: 0 0 auto; display: block; }
.trac-ws.has-size .trac-ws-svg svg { width: var(--ws-chart); height: var(--ws-chart); max-width: none; max-height: none; margin: 0 auto; }
.trac-dash-hint { margin: 0 0 8px; color: #374151; font-size: 0.82rem; }
@container (max-width: 520px) { .trac-ws-size span { display: none; } }
@media (max-width: 640px) { .trac-ws-size { display: none; } }

/* ---- Ask box model menu: opens downwards when there is no room above ---- */
.ask-model-menu { overflow-y: auto; }
.ask-model-menu.is-down { bottom: auto; top: calc(100% + 10px); }

/* ---- TRAC NADI pages ---- */
.nd-seq { margin: 0.2rem 0 0.6rem; color: #1F2937; }
.nd-seq span { display: inline-block; font-size: 0.82rem; color: #374151; background: #F3F4F6; border-radius: 6px; padding: 1px 8px; margin-right: 6px; }
.nd-seq b { color: #111827; }
.nd-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.nd-list li { padding: 0.45rem 0; border-bottom: 1px solid #F1E3D3; color: #1F2937; line-height: 1.5; }
.nd-list li b { color: #111827; margin-right: 4px; }
.nd-badge { display: inline-block; min-width: 3.6rem; text-align: center; font-size: 0.74rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-right: 6px; color: #1F2937; }
.nd-badge.nd-strong { background: #DCFCE7; color: #14532D; }
.nd-badge.nd-clear { background: #FEF3C7; color: #78350F; }
.nd-badge.nd-mild { background: #E5E7EB; color: #374151; }
.nd-until { display: inline-block; margin-left: 6px; font-size: 0.8rem; color: #374151; }
.nd-links { font-size: 0.9rem; color: #1F2937; }
.nd-links span { font-weight: 700; color: #111827; margin-right: 6px; }
.nd-wins { margin: 0.4rem 0 1.2rem; }
.nd-ask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0.4rem 0 1rem; }
.nd-ask span { color: #374151; font-size: 0.9rem; }

.nd-ask .trac-btn { width: auto; padding-left: 1.4rem; padding-right: 1.4rem; }
.nd-sub { margin: 1rem 0 0.3rem; font-size: 0.95rem; color: #111827; }
.nd-wins tr.is-past td { color: #4B5563; }

.nd-sum{font-weight:600;color:#1f2937;margin:.2rem 0 .5rem}

/* ---- NADI chart pages ---- */
.nc-grid th, .nc-grid td { text-align: center; min-width: 2.6rem; color: #111827; }
.nc-grid th.name { text-align: left; }
.nc-grid td.nc-self { background: #F3F4F6; }
.nc-k1, .trac-table.nc-grid td.nc-k1 { background: #FDE68A !important; }
.nc-k5, .trac-table.nc-grid td.nc-k5 { background: #BBF7D0 !important; }
.nc-k2, .trac-table.nc-grid td.nc-k2 { background: #BFDBFE !important; }
.nc-k12, .trac-table.nc-grid td.nc-k12 { background: #DDD6FE !important; }
.nc-k7, .trac-table.nc-grid td.nc-k7 { background: #FECACA !important; }
.nc-k3, .trac-table.nc-grid td.nc-k3 { background: #E5E7EB !important; }
.nc-key { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; color: #111827; }
.nc-key span { padding: 2px 8px; border-radius: 6px; }
.nc-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0.5rem 0; border-bottom: 1px solid #F1E3D3; }
.nc-strip-label { min-width: 11rem; font-weight: 700; color: #111827; }
.nc-chip { padding: 2px 10px; border-radius: 999px; font-size: 0.9rem; color: #111827; border: 1px solid #D1D5DB; }
.nc-chip.is-k { background: #FDE68A; border-color: #D97706; font-weight: 700; }
.nc-chip.is-friend { background: #DCFCE7; }
.nc-chip.is-foe { background: #E5E7EB; }
.nc-arrow { color: #374151; }
.nc-none { color: #374151; font-size: 0.88rem; }
.nc-ribbon-wrap { overflow-x: auto; }
.nc-ribbon th, .nc-ribbon td { text-align: center; font-size: 0.78rem; min-width: 2.4rem; padding: 3px 4px; color: #111827; white-space: nowrap; }
.nc-ribbon th.name { text-align: left; position: sticky; left: 0; background: #FFFFFF; }
.nc-ribbon th.nc-year { border-left: 2px solid #6B7280; }
.trac-table.nc-ribbon td.nc-ju { background: #BBF7D0 !important; font-weight: 700; }
.trac-table.nc-ribbon td.nc-sa { background: #BFDBFE !important; font-weight: 700; }
.trac-table.nc-ribbon td.nc-rk { background: #FDE68A !important; font-weight: 700; }
.nc-pic svg { width: 100%; max-width: 440px; height: auto; display: block; }
.nc-sheet { border: 1px solid #D1D5DB; border-radius: 8px; padding: 12px; background: #FFFFFF; color: #111827; }
.nc-sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.nc-sheet-head span { color: #374151; font-size: 0.9rem; }
.nc-sheet-row { display: flex; flex-wrap: wrap; gap: 14px; }
.nc-sheet-row .nc-pic { flex: 1 1 300px; }
.nc-sheet-side { flex: 1 1 260px; }
.nc-sheet h4 { margin: 0.6rem 0 0.3rem; color: #111827; }
.nc-line { font-size: 0.88rem; color: #1F2937; padding: 2px 0; }
.nc-print { width: auto; padding-left: 1.4rem; padding-right: 1.4rem; }
.nadi-sq, .nadi-arc { width: 100%; height: auto; }
.trac-table.nc-ribbon td.nc-sign { color: #4B5563; font-weight: 400; }

/* NADI directional chart and meanings */
.nc-dirgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nc-dircol { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; color: #111827; }
.nc-dircol h3 { margin: 0 0 2px; font-size: 1rem; color: #111827; }
.nc-dir0 { background: #FCE3D0; } .nc-dir1 { background: #E3EFD3; } .nc-dir2 { background: #DCE8F7; } .nc-dir3 { background: #E9E0F5; }
.nc-dirsigns { margin: 0 0 6px; font-size: .8rem; color: #374151; }
.nc-dirsign { margin: 6px 0; }
.nc-dirname { display: block; font-size: .8rem; font-weight: 700; color: #1f2937; }
.nc-dirplanet { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 6px; border-radius: 4px; background: #ffffff; color: #111827; font-weight: 600; font-size: .85rem; border: 1px solid #94a3b8; }
.nc-dirplanet.is-second { font-weight: 400; color: #374151; border-style: dashed; }
.nc-meanings td { white-space: normal; color: #111827; }
@media (max-width: 700px) { .nc-dirgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
