/* ============================================
   Parkaran — Space/Solar System Terminal Theme
   Bloomberg-grade information density
   ============================================ */

:root {
    /* Celestial Observatory: warm purple-black space */
    --void: #0f0d13;
    --deep: #161420;
    --mid: #1e1a2a;
    --space-surface: #272236;
    --star-core: #f59e0b;
    --star-glow: #fbbf24;
    --star-corona: rgba(245, 158, 11, 0.12);
    --nebula-blue: #3b82f6;
    --nebula-purple: #8b5cf6;
    --nebula-cyan: #06b6d4;
    --signal-green: #10b981;
    --signal-red: #ef4444;
    /* Warm parchment text scale */
    --text-scripture: #f5e6c8;
    --text-primary: #e8dcc8;
    --text-secondary: #a89b8a;
    --text-dim: #6b5f52;
    --text-faint: #4a3f35;  /* tertiary: timestamps, counts, disabled hints */
    --grid-line: rgba(255, 255, 255, 0.03);
    --border-subtle: #3d3552;
    --border-hover: rgba(245, 158, 11, 0.2);
}

/* --- Light Theme: Warm Parchment Manuscript ---
   Dark = Celestial Observatory (amber on void)
   Light = Parchment Manuscript (sepia ink, gold-leaf accents)
   All text colors pass WCAG AA on their target surfaces. */
[data-theme="light"] {
    --void: #f8f5f0;          /* page bg: unbleached linen */
    --deep: #efe9e0;          /* panels: aged parchment */
    --mid: #e4ddd3;           /* elevated: vellum */
    --space-surface: #d8d0c5; /* cards, controls */
    --star-core: #a35c00;     /* primary accent: 4.72:1 on void */
    --star-glow: #8b4e00;     /* emphasis accent: 6.06:1 on void */
    --star-corona: rgba(163, 92, 0, 0.08);
    --text-scripture: #1c1610; /* Gurmukhi: near-black warm. 16.48:1 */
    --text-primary: #2a231a;   /* body text. 14.26:1 */
    --text-secondary: #5c5246; /* secondary. 7.02:1 */
    --text-dim: #7e7263;       /* labels, captions. 4.32:1 */
    --text-faint: #948877;     /* tertiary. 3.4:1 — non-essential text only */
    --grid-line: rgba(0, 0, 0, 0.04);
    --border-subtle: #c2b9ab;
    --border-hover: rgba(163, 92, 0, 0.25);
    --signal-green: #15803d;
    --signal-red: #b91c1c;
}
[data-theme="light"] body,
body[data-theme="light"] {
    background: var(--void) !important;
    color: var(--text-primary) !important;
}
/* Nav bar */
[data-theme="light"] .nav-bar {
    background: rgba(239, 233, 224, 0.88);
    border-bottom-color: var(--border-subtle);
}
/* Floating sidebar: frosted aged paper */
[data-theme="light"] .library-panel {
    background: rgba(248, 245, 240, 0.94);
    border-right-color: rgba(194, 185, 171, 0.5);
}
/* Graph canvas: subtle manuscript grid */
[data-theme="light"] .graph-container {
    background: var(--void);
}
/* Force panel: translucent vellum */
[data-theme="light"] .force-panel {
    background: rgba(239, 233, 224, 0.82);
    border-color: rgba(194, 185, 171, 0.6);
}
/* Graph controls (SPREAD / SELECTIVE / AK MODE / FIT).
   The dark theme paints these translucent amber, which all but disappears on
   parchment. Light needs the opaque sepia accent and a darker value readout. */
[data-theme="light"] .graph-controls label {
    color: var(--star-core);
}
[data-theme="light"] .graph-controls span {
    color: var(--text-secondary);
}
[data-theme="light"] .graph-controls input[type="range"] {
    accent-color: var(--star-core);
}
/* RESET chip: translucent red on linen reads as a smudge */
[data-theme="light"] .breadcrumb-reset {
    background: rgba(185, 28, 28, 0.06);
    border-color: rgba(185, 28, 28, 0.3);
    color: var(--signal-red);
}
[data-theme="light"] .breadcrumb-reset:hover {
    background: rgba(185, 28, 28, 0.12);
    color: #991b1b;
}
/* Search-mode glyphs (ABC / ੳ▸ / ▸ੳ▸ / ✨) */
[data-theme="light"] .search-mode {
    color: var(--text-secondary);
}
[data-theme="light"] .search-mode:hover {
    color: var(--star-core);
}
/* HUD tooltip: solid parchment */
[data-theme="light"] .hud-tooltip {
    background: rgba(248, 245, 240, 0.98);
    border-color: rgba(194, 185, 171, 0.5);
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.12), 0 0 16px -4px rgba(163, 92, 0, 0.06);
}
/* Preview modal */
[data-theme="light"] .shabad-preview-overlay {
    background: rgba(248, 245, 240, 0.98);
    border-color: rgba(163, 92, 0, 0.18);
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .shabad-preview-overlay .preview-header {
    background: rgba(239, 233, 224, 0.98);
}
[data-theme="light"] .shabad-preview-backdrop {
    background: rgba(0, 0, 0, 0.25);
}
/* Sidebar open button */
[data-theme="light"] .sidebar-open-btn {
    background: rgba(248, 245, 240, 0.95);
    border-color: var(--border-subtle);
    color: var(--star-core);
}
/* Toast */
[data-theme="light"] .parkaran-toast {
    background: rgba(248, 245, 240, 0.96);
    border-color: rgba(163, 92, 0, 0.3);
    color: var(--star-core);
}
/* Autocomplete dropdown */
[data-theme="light"] .autocomplete-dropdown {
    background: rgba(248, 245, 240, 0.97);
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.12);
}
/* Tag modal */
[data-theme="light"] .tag-modal-overlay {
    background: rgba(248, 245, 240, 0.85);
}
/* Search mode buttons */
[data-theme="light"] .search-mode-selector {
    border-color: var(--border-subtle);
    background: rgba(239, 233, 224, 0.5);
}
[data-theme="light"] .search-mode.active {
    background: rgba(163, 92, 0, 0.12);
}
/* Library section */
[data-theme="light"] .sidebar-library {
    border-color: rgba(194, 185, 171, 0.4);
}
/* App tabs */
[data-theme="light"] .app-tabs {
    border-color: var(--border-subtle);
    background: rgba(239, 233, 224, 0.3);
}
[data-theme="light"] .app-tab.active {
    background: rgba(163, 92, 0, 0.1);
    border-color: rgba(163, 92, 0, 0.25);
}
/* Breadcrumb chips */
[data-theme="light"] .breadcrumb-chip {
    background: rgba(248, 245, 240, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-color: rgba(163, 92, 0, 0.15);
}
[data-theme="light"] .breadcrumb-chip.active {
    background: rgba(163, 92, 0, 0.12);
    border-color: rgba(163, 92, 0, 0.3);
}
/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.14); }
/* Selection */
[data-theme="light"] ::selection {
    background: rgba(163, 92, 0, 0.15);
    color: #1c1610;
}
/* Search input */
[data-theme="light"] .search-input {
    background: rgba(239, 233, 224, 0.6);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}
/* Default search input has .gurmukhi-mode class; force readable text in light mode
   (base rule sets color to --text-dim which fades to near-invisible on parchment). */
[data-theme="light"] .search-input.gurmukhi-mode {
    color: var(--text-primary);
}
/* Override the hardcoded dark focus background so the input doesn't go dark
   on first click in light mode (uddam #17). */
[data-theme="light"] .search-input:focus {
    background: rgba(248, 245, 240, 0.95);
    border-color: rgba(163, 92, 0, 0.45);
    box-shadow: 0 0 0 2px rgba(163, 92, 0, 0.08), 0 0 12px -4px rgba(163, 92, 0, 0.15);
}
/* Sidebar footer (BaniDB credit) — base rgba(200,200,210,0.3) is invisible on parchment. */
[data-theme="light"] .sidebar-footer {
    color: var(--text-dim);
}
[data-theme="light"] .sidebar-footer a {
    color: var(--star-core);
}
[data-theme="light"] .sidebar-footer a:hover {
    color: var(--star-glow);
}
/* Mission panel / library items */
[data-theme="light"] .parkaran-sidebar-item {
    background: rgba(239, 233, 224, 0.3);
    border-color: rgba(194, 185, 171, 0.3);
}
[data-theme="light"] .parkaran-sidebar-item:hover {
    background: rgba(163, 92, 0, 0.06);
    border-color: rgba(163, 92, 0, 0.15);
}
/* Review content */
[data-theme="light"] #reviewContent {
    border-color: rgba(194, 185, 171, 0.3);
}
/* Tag shabads modal rows */
[data-theme="light"] .tag-shabad-row:hover {
    background: rgba(163, 92, 0, 0.05);
    border-color: rgba(163, 92, 0, 0.15);
}
/* Library modal rows */
[data-theme="light"] .library-modal-row:hover {
    background: rgba(163, 92, 0, 0.05);
}
[data-theme="light"] .library-modal-row.current {
    background: rgba(163, 92, 0, 0.08);
    border-color: rgba(163, 92, 0, 0.2);
}
/* Buttons */
[data-theme="light"] .btn-ghost {
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}
[data-theme="light"] .btn-ghost:hover {
    background: rgba(163, 92, 0, 0.06);
    border-color: rgba(163, 92, 0, 0.2);
    color: var(--star-core);
}
[data-theme="light"] .btn-secondary {
    background: rgba(163, 92, 0, 0.12);
    border-color: rgba(163, 92, 0, 0.3);
    color: var(--star-core);
}
[data-theme="light"] .btn-secondary:hover {
    background: rgba(163, 92, 0, 0.2);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Focus visible (keyboard accessibility) --- */
:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.6);
    outline-offset: 2px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* --- Star field background --- */
.star-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.12) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 50%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.12) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.05) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,0.07) 0%, transparent 100%),
        radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.09) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 5%, rgba(255,255,255,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 90%, rgba(255,255,255,0.11) 0%, transparent 100%),
        radial-gradient(1px 1px at 95% 50%, rgba(255,255,255,0.04) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 70%, rgba(245,158,11,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 60%, rgba(59,130,246,0.04) 0%, transparent 100%);
}

/* --- Typography --- */
.font-mono { font-family: 'IBM Plex Mono', 'Space Mono', monospace; }
.font-terminal { font-family: 'Space Mono', monospace; }

.page-title {
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.page-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    letter-spacing: 0.02em;
}
.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.detail-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.625rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

/* --- Navigation --- */
.nav-bar {
    background: rgba(15, 13, 19, 0.92);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid var(--border-subtle);
}
.nav-link {
    font-family: 'Space Mono', monospace;
    padding: 0.625rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    transition: all 0.15s ease;
    position: relative;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
}
.nav-link:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}
.nav-link.active {
    color: var(--star-core);
    background: rgba(245, 158, 11, 0.06);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.375rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.75rem;
    height: 1.5px;
    background: var(--star-core);
    border-radius: 1px;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

/* --- Site Footer (hidden on unified app page; shown via sidebar-footer instead.
   Also hidden on /about, which credits BaniDB in its own credits block —
   showing both stacked the same credit twice.) --- */
body.app-page > .site-footer,
body.app-page > main + .site-footer,
body.about-page > .site-footer,
body.about-page > main + .site-footer {
    display: none !important;
}
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: rgba(15, 13, 19, 0.6);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(200, 200, 210, 0.35);
    letter-spacing: 0.04em;
    position: relative;
    z-index: 10;
    margin-top: 2rem;
}
/* Sidebar-embedded footer for the unified app */
.sidebar-footer {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: rgba(200, 200, 210, 0.3);
    text-align: center;
    padding: 6px 8px;
    line-height: 1.5;
    flex-shrink: 0;
}
.sidebar-footer a {
    color: rgba(245, 158, 11, 0.5);
    text-decoration: none;
    padding: 2px 0;
    display: inline-block;
}
.sidebar-footer a:hover {
    color: var(--star-core);
    text-decoration: underline;
}
.site-footer a {
    color: rgba(245, 158, 11, 0.55);
    text-decoration: none;
    transition: color 0.15s;
}
.site-footer a:hover {
    color: var(--star-core);
    text-decoration: underline;
}

/* --- Panels & Cards --- */
.card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 20px -4px rgba(245, 158, 11, 0.06);
}

.glass-card-gold {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.panel {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
}
.panel-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.015);
}
.panel-scanline {
    border-top: 2px solid var(--star-core);
    box-shadow: 0 -1px 8px -2px rgba(245, 158, 11, 0.2);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem 0.4375rem;
    border-radius: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.badge-high { background: rgba(16, 185, 129, 0.1); color: var(--signal-green); border: 1px solid rgba(16, 185, 129, 0.15); }
.badge-medium { background: rgba(245, 158, 11, 0.1); color: var(--star-core); border: 1px solid rgba(245, 158, 11, 0.15); }
.badge-low { background: rgba(239, 68, 68, 0.1); color: var(--signal-red); border: 1px solid rgba(239, 68, 68, 0.15); }
.badge-raag { background: rgba(139, 92, 246, 0.08); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.1); }
.badge-theme { background: rgba(245, 158, 11, 0.08); color: var(--star-core); border: 1px solid rgba(245, 158, 11, 0.12); }

.badge-sggs {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.1875rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.12);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge-library {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.1875rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.08);
    color: var(--star-core);
    border: 1px solid rgba(245, 158, 11, 0.12);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* --- Score gauge --- */
.score-gauge {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.score-high { background: rgba(16, 185, 129, 0.08); color: var(--signal-green); border: 1.5px solid rgba(16, 185, 129, 0.25); box-shadow: 0 0 8px -2px rgba(16, 185, 129, 0.15); }
.score-mid { background: rgba(245, 158, 11, 0.08); color: var(--star-core); border: 1.5px solid rgba(245, 158, 11, 0.25); box-shadow: 0 0 8px -2px rgba(245, 158, 11, 0.15); }
.score-low { background: rgba(239, 68, 68, 0.08); color: var(--signal-red); border: 1.5px solid rgba(239, 68, 68, 0.25); }

/* --- Transition ratings --- */
.transition-strong { border-left: 2px solid var(--signal-green); }
.transition-moderate { border-left: 2px solid var(--star-core); }
.transition-weak { border-left: 2px solid var(--signal-red); }

/* --- Loading --- */
.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Orbital spinner */
.orbital-spinner {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--border-subtle);
    border-top-color: var(--star-core);
    border-radius: 50%;
    animation: orbit 1s linear infinite;
}
@keyframes orbit {
    to { transform: rotate(360deg); }
}

/* --- Form inputs --- */
.search-input {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
    min-height: 2.75rem;
}
.search-input:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(22, 20, 32, 0.8);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06), 0 0 12px -4px rgba(245, 158, 11, 0.1);
}
.search-input::placeholder {
    color: var(--text-dim);
    font-size: 0.75rem;
}
.search-input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Command-line search */
.search-cmd {
    position: relative;
}
.search-cmd::before {
    content: '>';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--star-core);
    font-family: 'Space Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    pointer-events: none;
}
.search-cmd .search-input {
    padding-left: 1.75rem;
}

.filter-select {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.4375rem 0.625rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
}
.filter-select:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06);
}
.filter-select option {
    background: var(--deep);
    color: var(--text-secondary);
}

/* --- Buttons --- */
.btn-primary {
    font-family: 'Space Mono', monospace;
    background: var(--star-core);
    color: var(--void);
    font-weight: 700;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 0 12px -2px rgba(245, 158, 11, 0.25);
    border: none;
    cursor: pointer;
    min-height: 2.75rem;
}
.btn-primary:hover {
    background: var(--star-glow);
    box-shadow: 0 0 20px -2px rgba(245, 158, 11, 0.35);
}
.btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    font-family: 'IBM Plex Mono', monospace;
    background: transparent;
    color: var(--star-core);
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
    min-height: 2.25rem;
}
.btn-secondary:hover {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.25);
}

.btn-ghost {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-weight: 400;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
    letter-spacing: 0.02em;
    min-height: 2.25rem;
}
.btn-ghost:hover {
    color: var(--star-core);
    border-color: rgba(245, 158, 11, 0.15);
    background: rgba(245, 158, 11, 0.04);
}

/* AK MODE button — active state shows that the boost is live */
.btn-ghost.ak-mode-active {
    color: var(--star-core);
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
    font-weight: 600;
}
.btn-ghost.ak-mode-active::before {
    content: "● ";
    color: rgba(245, 158, 11, 0.9);
}

.btn-add {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.12);
    color: var(--star-core);
    transition: all 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-add:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 8px -2px rgba(245, 158, 11, 0.2);
}

/* --- Gurmukhi text --- */
.gurmukhi {
    font-family: 'Noto Sans Gurmukhi', serif;
    font-size: 1.125rem;
    line-height: 2;
    color: var(--star-glow);
}

/* --- Shabad expand/collapse --- */
.shabad-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}
.shabad-details.open {
    max-height: 700px;
}

/* --- Seed card --- */
.seed-card {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    transition: all 0.15s;
}
.seed-card:hover {
    background: rgba(245, 158, 11, 0.07);
}

/* --- Suggestion card --- */
.suggestion-card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}
.suggestion-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 16px -4px rgba(245, 158, 11, 0.08);
}

/* --- Position tags --- */
.position-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.0625rem 0.3125rem;
    border-radius: 0.1875rem;
    font-weight: 600;
}
.position-opening { background: rgba(59, 130, 246, 0.08); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.12); }
.position-building { background: rgba(139, 92, 246, 0.08); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.12); }
.position-climax { background: rgba(245, 158, 11, 0.08); color: var(--star-glow); border: 1px solid rgba(245, 158, 11, 0.12); }
.position-resolution { background: rgba(16, 185, 129, 0.08); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.12); }

/* --- Occasion card --- */
.occasion-card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.occasion-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 24px -8px rgba(245, 158, 11, 0.08);
}

/* --- Parkaran list item --- */
.parkaran-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: grab;
    transition: all 0.15s ease;
}
.parkaran-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
.parkaran-item.dragging { opacity: 0.3; }
.parkaran-item.drag-over {
    border-color: var(--star-core);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1);
}
.parkaran-item:active { cursor: grabbing; }
.drag-handle {
    color: #1f2937;
    cursor: grab;
    font-size: 0.875rem;
    user-select: none;
    transition: color 0.15s;
}
.drag-handle:hover { color: var(--text-dim); }
.parkaran-num {
    color: var(--text-dim);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    width: 1.25rem;
    flex-shrink: 0;
}

/* --- Autocomplete dropdown --- */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(22, 20, 32, 0.97);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 0.125rem;
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.6);
}
.autocomplete-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.1s ease;
}
.autocomplete-item:hover {
    background: rgba(245, 158, 11, 0.05);
}
.autocomplete-item:last-child {
    border-bottom: none;
}

/* --- Tab buttons --- */
.tab-btn {
    font-family: 'IBM Plex Mono', monospace;
    padding: 0.3125rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
    cursor: pointer;
    letter-spacing: 0.02em;
}
.tab-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}
.tab-btn.active {
    color: var(--star-core);
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
}

/* --- Discover card --- */
.discover-card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.discover-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 16px -4px rgba(245, 158, 11, 0.06);
}

/* --- Mukhra verse selection --- */
.mukhra-verse {
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s;
}
.mukhra-verse:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}
.mukhra-verse.rahao {
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.04);
}
.mukhra-verse.selected {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
}
.mukhra-verse.selected::before {
    content: "\2713 ";
    color: var(--star-core);
    font-weight: bold;
}

/* ============================
   GRAPH EXPLORER
   ============================ */

#cy {
    background: transparent;
}

/* Graph container grid overlay */
.graph-container {
    position: relative;
    background:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Mission control sidebar */
.mission-panel {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    overflow: hidden;
}
.mission-panel-header {
    font-family: 'Space Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--border-subtle);
    border-top: 2px solid var(--star-core);
    box-shadow: 0 1px 8px -2px rgba(245, 158, 11, 0.1);
}

/* Tag chips */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3125rem 0.625rem;
    border-radius: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.08);
    color: rgba(245, 158, 11, 0.7);
    cursor: pointer;
    transition: all 0.15s;
}
.tag-chip:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--star-core);
}
.tag-chip .count {
    font-size: 0.5625rem;
    color: var(--text-dim);
}

/* Tag modal */
.tag-modal-overlay {
    background: rgba(15, 13, 19, 0.88);
    backdrop-filter: blur(8px);
}

/* Parkaran sidebar items */
.parkaran-sidebar-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 0.25rem;
    padding: 0.4375rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: grab;
    font-size: 0.75rem;
    transition: all 0.12s;
}
.parkaran-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.08);
}
.parkaran-sidebar-item:active {
    cursor: grabbing;
}
.parkaran-sidebar-item {
    user-select: none;
    -webkit-user-select: none;
}

/* Breadcrumbs — chip with label + close button */
.breadcrumb-chip {
    font-family: 'IBM Plex Mono', monospace;
    border-radius: 0.1875rem;
    background: rgba(15, 13, 19, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(245, 158, 11, 0.1);
    color: rgba(245, 158, 11, 0.5);
    font-size: 0.5625rem;
    white-space: nowrap;
    transition: all 0.12s;
    letter-spacing: 0.01em;
    min-height: 1.75rem;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
}
.breadcrumb-chip:hover {
    background: rgba(245, 158, 11, 0.09);
    border-color: rgba(245, 158, 11, 0.2);
}
.breadcrumb-chip.active {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--star-core);
    font-weight: 700;
}
.breadcrumb-label {
    padding: 0.25rem 0.25rem 0.25rem 0.5rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    color: inherit;
}
.breadcrumb-chip:not(.active) .breadcrumb-label:hover {
    color: var(--star-core);
}
.breadcrumb-close {
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.55;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.12s;
    font-family: inherit;
}
.breadcrumb-close:hover {
    opacity: 1;
    color: #ef4444;
}
.breadcrumb-sep {
    color: rgba(107, 95, 82, 0.4);
    font-size: 10px;
    margin: 0 2px;
    align-self: center;
}
.breadcrumb-reset {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    padding: 0.3rem 0.55rem;
    margin-left: 0.5rem;
    border-radius: 0.1875rem;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.14);
    color: rgba(239, 68, 68, 0.5);
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.12s;
    min-height: 1.75rem;
    line-height: 1;
}
.breadcrumb-reset:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

/* HUD tooltip */
.hud-tooltip {
    background: rgba(18, 16, 28, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-top: 2px solid var(--star-core);
    border-radius: 0.5rem;
    padding: 0;
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.6), 0 0 16px -4px rgba(245, 158, 11, 0.06);
    font-family: 'IBM Plex Mono', monospace;
    width: 340px;
    pointer-events: auto;
}

/* Tooltip internal elements */
.tt-body { padding: 0.75rem 1rem; }
.tt-gurmukhi {
    font-family: 'Noto Serif Gurmukhi', 'Noto Sans Gurmukhi', serif;
    color: var(--text-scripture);
    font-size: 18px;
    line-height: 1.8;
}
.tt-meta {
    color: var(--text-dim);
    font-size: 11px;
    margin-top: 6px;
    letter-spacing: 0.03em;
}
.tt-summary {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.5;
}
.tt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.tt-tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(245, 158, 11, 0.06);
    color: rgba(245, 158, 11, 0.55);
    border: 1px solid rgba(245, 158, 11, 0.1);
}
.tt-tag-clickable {
    cursor: pointer;
    transition: all 0.15s ease;
}
.tt-tag-clickable:hover {
    background: rgba(245, 158, 11, 0.14);
    color: var(--star-core);
    border-color: rgba(245, 158, 11, 0.35);
}
.tt-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    gap: 6px;
}
.tt-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    background: none;
    white-space: nowrap;
    min-height: 32px;
}
.tt-btn-add {
    color: var(--star-core);
    border-color: rgba(245, 158, 11, 0.15);
}
.tt-btn-add:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}
.tt-btn-explore {
    color: var(--text-dim);
    border-color: var(--border-subtle);
}
.tt-btn-explore:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}
.tt-btn-preview {
    color: var(--text-dim);
    border-color: var(--border-subtle);
}
.tt-btn-preview:hover {
    color: var(--accent-gold);
    border-color: rgba(245, 158, 11, 0.3);
}
.tt-btn-disabled,
.tt-btn:disabled {
    color: rgba(200, 200, 210, 0.2);
    border-color: rgba(255, 255, 255, 0.04);
    cursor: not-allowed;
    opacity: 0.45;
}
.tt-btn-disabled:hover,
.tt-btn:disabled:hover {
    color: rgba(200, 200, 210, 0.2);
    border-color: rgba(255, 255, 255, 0.04);
    background: none;
}

/* --- Shabad Preview Modal (centered with backdrop) --- */
.shabad-preview-backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: preview-fade-in 0.18s ease-out;
}
@keyframes preview-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.shabad-preview-overlay {
    position: relative;
    background: rgba(18, 16, 28, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8);
    max-width: 520px;
    min-width: 320px;
    width: calc(100% - 2rem);
    max-height: 82vh;
    overflow-y: auto;
    pointer-events: auto;
    margin-top: 8vh;
    animation: preview-slide-in 0.22s ease-out;
}
@keyframes preview-slide-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.shabad-preview-overlay .preview-header {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: -1rem -1.25rem 0.75rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: -1rem;
    z-index: 5;
    background: rgba(18, 16, 28, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.08);
}
.shabad-preview-overlay .preview-close {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 18px;
    line-height: 1;
    background: none;
    border: none;
    padding: 4px 10px;
    margin: -4px -8px -4px 0;
    border-radius: 3px;
}
.shabad-preview-overlay .preview-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}
.shabad-preview-overlay .preview-verse {
    margin-bottom: 10px;
    padding: 4px 0;
}
.shabad-preview-overlay .preview-gurmukhi {
    font-family: 'Noto Serif Gurmukhi', 'Noto Sans Gurmukhi', serif;
    color: var(--text-scripture);
    font-size: 15px;
    line-height: 1.8;
}
.shabad-preview-overlay .preview-english {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.5;
    margin-top: 2px;
}
.shabad-preview-overlay .preview-rahao {
    border-left: 2px solid rgba(245, 158, 11, 0.4);
    padding-left: 8px;
    background: rgba(245, 158, 11, 0.03);
    border-radius: 0 4px 4px 0;
}

/* Tag-shabads list inside the modal */
.tag-shabads-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tag-shabad-row {
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.12s ease;
}
.tag-shabad-row:hover {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.2);
}
.tag-shabad-gurmukhi {
    font-family: 'Noto Serif Gurmukhi', 'Noto Sans Gurmukhi', serif;
    color: var(--text-scripture);
    font-size: 14px;
    line-height: 1.6;
}
.tag-shabad-meta {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 10px;
    margin-top: 2px;
    opacity: 0.7;
}

/* --- Unified App Shell (Batch 5 - floating sidebar) --- */
.app-shell {
    min-height: 0;
    position: relative;
}

/* Floating sidebar over content */
.library-panel {
    position: fixed;
    top: 4px;
    left: 0;
    bottom: 0;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 10px 10px 8px;
    z-index: 30;
    background: rgba(15, 13, 19, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(245, 158, 11, 0.08);
    transition: transform 0.25s ease;
}
.library-panel.collapsed {
    transform: translateX(-100%);
}

/* Sidebar logo row */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 4px;
}
.sidebar-orb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--star-core);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sidebar-orb:hover {
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
    transform: scale(1.1);
}

/* Open sidebar button (when collapsed) */
.sidebar-open-btn {
    position: fixed;
    top: 12px;
    left: 0;
    z-index: 31;
    background: rgba(15, 13, 19, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: var(--star-core);
    cursor: pointer;
    padding: 12px 6px;
    font-size: 12px;
    transition: all 0.15s;
}
.sidebar-open-btn:hover {
    background: rgba(245, 158, 11, 0.08);
    padding-right: 10px;
}

/* Library section inside sidebar */
.sidebar-library {
    border: 1px solid rgba(245, 158, 11, 0.06);
    border-radius: 4px;
    overflow: hidden;
}
.sidebar-library-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.library-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: rgba(245, 158, 11, 0.7);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
.app-tabs {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.015);
    padding: 2px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}
.app-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 10px;
    min-height: 40px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    text-transform: uppercase;
}
.app-tab:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}
.app-tab.active {
    color: var(--star-core);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-weight: 700;
}
.app-tab:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
/* Content takes full viewport; graph renders behind sidebar */
.tab-content-area {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
/* Search bar floats at top of explore area */
.explore-search-bar {
    position: absolute;
    top: 12px;
    left: 260px;
    right: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Search mode selector */
.search-mode-selector {
    display: flex;
    gap: 1px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.search-mode {
    background: transparent;
    border: none;
    padding: 8px 10px;
    min-height: 36px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.12s;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.search-mode:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}
.search-mode.active {
    color: var(--star-core);
    background: rgba(245, 158, 11, 0.1);
    font-weight: 700;
}
/* Full-screen loading overlay (video game style progress bar) */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--void);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.4s ease;
}
.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}
.loading-overlay.hidden { display: none; }
.loading-bar-track {
    width: 280px;
    height: 6px;
    background: var(--grid-line);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}
.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--star-core);
    border-radius: 3px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 8px var(--star-corona);
}
.loading-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.loading-percent {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--star-core);
    letter-spacing: 0.05em;
}

/* Searching animation dots */
.searching-dots::after {
    content: '';
    animation: searching-dots 1.2s steps(4, end) infinite;
}
@keyframes searching-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* Gurmukhi preview (inline inside input area, right-aligned) */
.gurmukhi-preview {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-family: 'Noto Sans Gurmukhi', 'Noto Serif Gurmukhi', sans-serif;
    font-size: 15px;
    color: var(--star-glow);
    letter-spacing: 0.2em;
    pointer-events: none;
    opacity: 0.7;
}
/* Gurmukhi input mode: style the input differently */
.search-input.gurmukhi-mode {
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}
/* Graph controls (bottom of graph) */
.graph-controls {
    position: absolute;
    bottom: 12px;
    left: 260px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.graph-controls .force-panel {
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.graph-controls label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: rgba(245, 158, 11, 0.4);
    letter-spacing: 0.1em;
}
.graph-controls input[type="range"] {
    width: 90px;
    accent-color: var(--star-core);
}
.graph-controls span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: rgba(245, 158, 11, 0.5);
    min-width: 24px;
}
.tab-pane {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.tab-pane.hidden {
    display: none !important;
}
.reviewer-tab-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-width: 800px;
    margin: 0 auto;
}
.link-btn {
    background: none;
    border: none;
    color: rgba(245, 158, 11, 0.5);
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}
.link-btn:hover {
    color: var(--star-core);
}

/* Theme toggle (top-right corner) */
.theme-toggle {
    position: fixed;
    top: 10px;
    right: 16px;
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 8px 12px;
    min-height: 36px;
    cursor: pointer;
    transition: all 0.15s;
}
.theme-toggle:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: var(--border-hover);
}
.theme-toggle-icon {
    font-size: 14px;
    line-height: 1;
}
.theme-toggle-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}
[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.03);
}

/* Library management modal content */
.library-modal-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 50vh;
    overflow-y: auto;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.library-modal-row {
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.library-modal-row:hover {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.2);
}
.library-modal-row.current {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}
.library-modal-row-name {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--star-core);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.library-modal-row-meta {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 9px;
    margin-top: 2px;
    opacity: 0.7;
}
.library-modal-delete {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 3px;
    flex-shrink: 0;
}
.library-modal-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
.library-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.library-modal-actions button {
    flex: 1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.12s;
}

/* --- Reviewer Detail Panel (rv-* classes use CSS variables for theme compat) --- */
.rv-header { margin-bottom: 20px; }
.rv-position { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--star-core); opacity: 0.5; font-weight: 700; }
.rv-meta { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-dim); display: block; margin-top: 4px; }
.rv-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-dim); letter-spacing: 0.08em; margin-bottom: 4px; text-transform: uppercase; }
.rv-value { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-secondary); }
.rv-rahao { margin-bottom: 20px; padding: 12px 16px; background: var(--star-corona); border-left: 2px solid var(--star-core); border-radius: 0 4px 4px 0; }
.rv-rahao-gurmukhi { font-family: 'Noto Serif Gurmukhi', 'Noto Sans Gurmukhi', serif; font-size: 20px; color: var(--text-scripture); line-height: 1.8; }
.rv-rahao-english { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-secondary); margin-top: 6px; line-height: 1.5; }
.rv-theme-mood { margin-bottom: 16px; display: flex; gap: 16px; }
.rv-tag { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--star-core); background: var(--star-corona); padding: 2px 8px; border-radius: 3px; border: 1px solid var(--border-hover); }
.rv-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.rv-summary-box { margin-bottom: 20px; padding: 10px 14px; background: var(--grid-line); border-radius: 4px; border: 1px solid var(--border-subtle); }
.rv-summary-text { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.rv-section { margin-bottom: 20px; }
.rv-gurbani { font-family: 'Noto Serif Gurmukhi', 'Noto Sans Gurmukhi', serif; font-size: 20px; color: var(--text-scripture); line-height: 2; }
.rv-gurbani-line { margin-bottom: 6px; }
.rv-translation { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.rv-empty-text { color: var(--text-dim); font-style: italic; }
.rv-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.06); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.1); }

/* --- Line clamp --- */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Threshold Slider --- */
.threshold-slider {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
}
.threshold-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 1px;
    outline: none;
}
.threshold-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(245, 158, 11, 0.6);
    border-radius: 50%;
    cursor: pointer;
}

/* --- Force Panel (Obsidian-style) --- */
.force-panel {
    background: rgba(14, 12, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    backdrop-filter: blur(8px);
    width: 200px;
}
.force-panel-header {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: rgba(245, 158, 11, 0.4);
    letter-spacing: 0.1em;
    padding: 5px 8px;
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.force-panel-header::-webkit-details-marker { display: none; }
.force-panel-header::before {
    content: "\25B8 ";
    font-size: 7px;
}
details[open] > .force-panel-header::before {
    content: "\25BE ";
}
.force-panel-body {
    padding: 4px 8px 8px;
}
.force-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.force-row label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    width: 52px;
    flex-shrink: 0;
}
.force-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 2px;
    outline: none;
    padding: 10px 0;
    margin: -10px 0;
    background-clip: content-box;
}
.force-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(245, 158, 11, 0.5);
    border-radius: 50%;
    cursor: pointer;
}
.force-row span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(245, 158, 11, 0.4);
    width: 34px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Selection --- */
::selection {
    background: rgba(245, 158, 11, 0.2);
    color: #fef3c7;
}

/* ========== REVIEWER ========== */

.reviewer-save-dialog {
    margin-top: 8px;
    padding: 10px;
    background: rgba(18, 16, 28, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 6px;
}
.reviewer-library-modal {
    margin-top: 8px;
    padding: 10px;
    background: rgba(18, 16, 28, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.reviewer-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.reviewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}
.reviewer-flow-panel {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.reviewer-flow-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.reviewer-flow-item {
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}
.reviewer-flow-item:hover {
    background: rgba(255, 255, 255, 0.015);
}
.reviewer-flow-item.selected {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.12);
}
.reviewer-connection {
    padding: 3px 0;
}
.reviewer-detail-panel {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
    .parkaran-sidebar {
        width: 160px;
    }
    /* Unified app: narrower library column on tablet */
    .library-panel {
        width: 180px;
    }
    .library-name {
        max-width: 100px;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    /* Nav: horizontal scroll instead of wrap */
    .nav-bar .flex.gap-0\.5 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-bar .flex.gap-0\.5::-webkit-scrollbar { display: none; }

    .nav-link {
        font-size: 0.625rem;
        padding: 0.5rem 0.5rem;
        white-space: nowrap;
    }

    /* Legacy: old parkaran-sidebar bottom sheet (not used in unified app) */
    .parkaran-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 40vh;
        z-index: 40;
        border-top: 1px solid rgba(245, 158, 11, 0.15);
        border-left: none;
        transform: translateY(calc(100% - 40px));
        transition: transform 0.3s ease-out;
    }
    .parkaran-sidebar.mobile-open {
        transform: translateY(0);
    }
    .parkaran-sidebar-header {
        cursor: pointer;
    }

    /* Floating sidebar becomes a bottom drawer on mobile */
    .library-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        border-right: none;
        border-top: 1px solid rgba(245, 158, 11, 0.15);
        border-radius: 12px 12px 0 0;
        transform: translateY(calc(100% - 46px));
        transition: transform 0.25s ease;
    }
    .library-panel.mobile-open {
        transform: translateY(0);
    }
    .library-panel.collapsed {
        transform: translateY(100%);
    }
    .sidebar-logo {
        cursor: pointer;
    }
    .sidebar-orb {
        width: 20px;
        height: 20px;
    }
    .sidebar-open-btn {
        bottom: 0;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 4px 4px 0 0;
        border-bottom: none;
    }
    /* Search + controls reset to screen left */
    .explore-search-bar {
        left: 12px !important;
        right: 12px !important;
        top: 8px !important;
    }
    .graph-controls {
        left: 12px !important;
    }
    #breadcrumbs {
        left: 12px !important;
        top: 50px !important;
        max-width: 90% !important;
    }
    .graph-controls label {
        font-size: 8px !important;
    }
    .graph-controls input[type="range"] {
        width: 65px !important;
    }
    /* Extra bottom padding for graph to clear collapsed sidebar handle */
    .graph-container {
        padding-bottom: 50px;
    }

    /* Reviewer (legacy) */
    .reviewer-flow-panel {
        width: 100%;
        min-width: unset;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
    #reviewContent {
        flex-direction: column !important;
    }

    /* Page titles */
    .page-title { font-size: 1rem; }
    .page-subtitle { font-size: 0.6875rem; }
}

/* --- Parkaran Toast Notification --- */
.parkaran-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(18, 16, 28, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 10px 20px;
    color: #fbbf24;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.parkaran-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Small-viewport notice
   Shown once under 768px. The graph explorer is not yet usable on a phone;
   this says so rather than letting the user think it is broken.
   ============================================ */
.mobile-notice {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 13, 19, 0.94);
    backdrop-filter: blur(6px);
}
[data-theme="light"] .mobile-notice {
    background: rgba(248, 245, 240, 0.95);
}
.mobile-notice.hidden {
    display: none;
}
.mobile-notice-body {
    max-width: 22rem;
    text-align: center;
}
.mobile-notice-mark {
    display: block;
    font-family: 'Noto Sans Gurmukhi', sans-serif;
    font-size: 2.25rem;
    color: var(--star-core);
    opacity: 0.5;
    margin-bottom: 1rem;
}
.mobile-notice-body p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
}
.mobile-notice-body strong {
    color: var(--text-primary);
    font-weight: 600;
}
.mobile-notice-btn {
    margin-top: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 0.7rem 1.4rem;
    border-radius: 0.35rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--star-core);
    cursor: pointer;
    min-height: 44px;
}
.mobile-notice-btn:hover {
    background: rgba(245, 158, 11, 0.18);
}

/* ============================================
   About page
   ============================================ */
.about-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.25rem 5rem;
}
.about-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0 2.5rem;
}
.about-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.about-mark {
    font-family: 'Noto Sans Gurmukhi', sans-serif;
    font-size: 1.5rem;
    color: var(--star-core);
    opacity: 0.8;
}
.about-wordmark {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    color: var(--text-secondary);
}
.about-back {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.about-back:hover {
    color: var(--star-core);
}

.about-hero {
    text-align: center;
    padding: 1rem 0 3rem;
}
.about-hero h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-scripture);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}
.about-lede {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 60ch;
    margin: 0 auto;
}

.about-section {
    padding: 2.25rem 0;
    border-top: 1px solid var(--border-subtle);
}
.about-section h2 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--star-core);
    margin-bottom: 1.25rem;
}
.about-section p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Video slot */
.about-video-slot {
    border-radius: 0.6rem;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--deep);
    aspect-ratio: 16 / 9;
}
.about-video-slot iframe,
.about-video-slot video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.about-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-dim);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}
.about-video-icon {
    font-size: 1.5rem;
    color: var(--star-core);
    opacity: 0.5;
}

/* Steps */
.about-steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0;
}
.about-steps li {
    counter-increment: step;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
}
.about-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--star-core);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}
.about-steps strong,
.about-honest strong {
    color: var(--text-primary);
    font-weight: 600;
}
.kbd {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78em;
    padding: 0.05em 0.4em;
    border-radius: 0.25rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: var(--star-glow);
}

/* Legend */
.about-legend {
    list-style: none;
    padding: 0;
    margin: 0;
}
.about-legend li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--star-core);
    font-weight: 600;
    flex-shrink: 0;
}
.legend-edge {
    width: 24px;
    height: 0;
    border-top: 3px solid rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
}

/* Methodology cards */
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}
.about-card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.6rem;
    padding: 1.25rem;
}
.about-card-num {
    font-family: 'Space Mono', monospace;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--star-core);
    line-height: 1;
}
.about-card-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0.4rem 0 0.75rem;
}
.about-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}
.about-source {
    font-size: 0.85rem !important;
    color: var(--text-dim) !important;
}
.about-source a,
.about-honest a,
.about-credits a {
    color: var(--star-core);
    text-decoration: none;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}
.about-source a:hover,
.about-honest a:hover,
.about-credits a:hover {
    color: var(--star-glow);
}

/* Transparency */
.about-honest {
    list-style: none;
    padding: 0;
    margin: 0;
}
.about-honest li {
    padding: 0.75rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.about-honest li:last-child {
    border-bottom: none;
}

/* Credits / CTA */
.about-credits {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-subtle);
}
.about-credits p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.about-cta {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    padding: 0.7rem 1.6rem;
    border-radius: 0.4rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--star-core);
    text-decoration: none;
    transition: all 0.15s;
}
.about-cta:hover {
    background: rgba(245, 158, 11, 0.18);
    color: var(--star-glow);
}

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