/* ===== LAW SARATHI - Advocate Theme CSS ===== */

:root {
    --gold: #B8941F;
    --gold-light: #D4B94A;
    --gold-dark: #8B7530;
    --navy: #0A1628;
    --navy-light: #1A2D4A;
    --navy-mid: #2A3F5F;
    --maroon: #7B2D3B;
    --maroon-light: #9E3A4C;
    --white: #FFFFFF;
    --text-primary: #1A1A2E;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --green: #38A169;
    --red: #E53E3E;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(245, 245, 250, 1);
    --border: rgba(10, 22, 40, 0.1);
    --border-hover: rgba(184, 148, 31, 0.4);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-gold: 0 4px 24px rgba(184, 148, 31, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-hindi: 'Noto Sans Devanagari', sans-serif;
    --bg-body: #F7F8FA;
    --bg-section: #F0F2F5;
    --bg-navbar: rgba(255, 255, 255, 0.97);
    --bg-input: #FAFBFC;
    --card-bg: rgba(255, 255, 255, 0.95);

    /* Claude-style palette (home page redesign) */
    --claude-cream: #faf9f6;
    --claude-paper: #f3ecdf;
    --claude-ink: #1a1918;
    --claude-burnt: #c96442;
    --claude-navy: #2a3347;
    --claude-sage: #8b9d83;
    --claude-pencil: #6b6258;
    --font-serif-display: 'Fraunces', 'Playfair Display', Georgia, serif;
    --font-sans-modern: 'Inter', -apple-system, sans-serif;
    --ease-claude: cubic-bezier(.22, 1, .36, 1);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --gold: #D4B94A;
    --gold-light: #E8D06A;
    --gold-dark: #C9A84C;
    --navy: #0D1B2A;
    --navy-light: #1B2D45;
    --navy-mid: #2A3F5F;
    --white: #E2E8F0;
    --text-primary: #E2E8F0;
    --text-secondary: #A0AEC0;
    --text-muted: #718096;
    --bg-card: rgba(22, 28, 45, 0.95);
    --bg-card-hover: rgba(30, 38, 60, 1);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(212, 185, 74, 0.4);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 4px 24px rgba(184, 148, 31, 0.15);
    --bg-body: #0B1120;
    --bg-section: #0F1729;
    --bg-navbar: rgba(11, 17, 32, 0.97);
    --bg-input: #151E30;
    --card-bg: rgba(22, 28, 45, 0.95);
    --green: #48BB78;
    --red: #FC8181;
}
[data-theme="dark"] body { background-color: var(--bg-body); }
[data-theme="dark"] .navbar { background: var(--bg-navbar); border-bottom-color: var(--border); }
[data-theme="dark"] .workspace-section { background: var(--bg-section); }
[data-theme="dark"] .workspace-tabs { background: var(--card-bg); }
[data-theme="dark"] .mini-hero { background: var(--bg-section); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
    background: var(--bg-input); color: var(--text-primary); border-color: var(--border);
}
[data-theme="dark"] .footer { background: #060B14; }
[data-theme="dark"] .chat-messages { background: var(--bg-section); }
[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #C9A84C, #B8941F); color: #0B1120; }
[data-theme="dark"] .section-container { background: transparent; }

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold-light);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== LEGAL WATERMARK ===== */
.legal-watermark {
    position: fixed;
    top: 50%;
    right: -60px;
    transform: translateY(-50%) rotate(90deg);
    font-family: var(--font-hindi);
    font-size: 2rem;
    color: rgba(201, 168, 76, 0.04);
    z-index: 0;
    pointer-events: none;
    letter-spacing: 0.5em;
    white-space: nowrap;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    z-index: 1000;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}
[data-theme="dark"] .navbar { background: var(--bg-navbar, #0a1628); }

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.logo-tagline {
    font-family: var(--font-hindi);
    font-size: 0.65rem;
    color: var(--gold);
    opacity: 0.8;
    letter-spacing: 0.03em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link.nav-cta {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy) !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-left: 0.5rem;
}

.nav-link.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
}

/* Theme Toggle */
.theme-toggle {
    background: none; border: none; cursor: pointer; padding: 6px;
    color: var(--text-secondary); transition: color 0.3s;
    display: flex; align-items: center;
}
.theme-toggle:hover { color: var(--gold); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--gold);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.45);
    color: var(--navy);
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold);
}

.btn-secondary:hover {
    background: rgba(201, 168, 76, 0.1);
    transform: translateY(-2px);
    color: var(--gold-light);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--border-hover);
    width: 100%;
    justify-content: center;
}

.btn-outline:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.05);
    color: var(--gold);
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #20BD5A;
    transform: translateY(-2px);
    color: #fff;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title .highlight {
    color: var(--gold);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(184, 148, 31, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(10, 22, 40, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(240, 242, 245, 0.8) 0%, transparent 60%);
    z-index: 0;
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 15s infinite ease-in-out;
}

.particle-1 { top: 20%; left: 10%; animation-delay: 0s; }
.particle-2 { top: 60%; left: 80%; animation-delay: -3s; }
.particle-3 { top: 40%; left: 50%; animation-delay: -6s; }
.particle-4 { top: 80%; left: 20%; animation-delay: -9s; }
.particle-5 { top: 10%; left: 70%; animation-delay: -12s; }

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25% { transform: translate(30px, -40px) scale(1.5); opacity: 0.6; }
    50% { transform: translate(-20px, 30px) scale(0.8); opacity: 0.2; }
    75% { transform: translate(40px, 20px) scale(1.2); opacity: 0.5; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.title-line {
    display: block;
    color: var(--text-primary);
}

.title-highlight {
    display: block;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 620px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

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

/* Hero Floating Cards */
.hero-floating {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.floating-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    animation: floatIn 1s ease both;
    box-shadow: var(--shadow);
}

.fc-1 { animation-delay: 0.6s; transform: translateX(40px); }
.fc-2 { animation-delay: 0.9s; transform: translateX(60px); }
.fc-3 { animation-delay: 1.2s; transform: translateX(20px); }

@keyframes floatIn {
    from { opacity: 0; transform: translateX(80px); }
    to { opacity: 1; transform: translateX(var(--offset, 0)); }
}

.fc-1 { --offset: 40px; }
.fc-2 { --offset: 60px; }
.fc-3 { --offset: 20px; }

/* ===== TRUST BAR ===== */
.trust-bar {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(240, 242, 245, 0.7);
}

.trust-label {
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.trust-item:hover {
    opacity: 1;
}

.trust-icon {
    color: var(--gold);
    font-size: 1.1rem;
}

/* ===== FEATURES ===== */
.features {
    padding: 6rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

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

.feature-primary {
    border-color: var(--border-hover);
    background: linear-gradient(145deg, rgba(201, 168, 76, 0.06), var(--bg-card));
}

.feature-icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.6;
}

.feature-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--navy);
    background: var(--gold);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(20, 34, 64, 0.3), transparent);
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}

.step-card {
    flex: 1;
    max-width: 320px;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 1rem;
}

.step-icon {
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.step-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 5rem;
    flex-shrink: 0;
}

/* ===== AI DEMO ===== */
.demo-section {
    padding: 6rem 0;
}

.demo-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.demo-chat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(201, 168, 76, 0.05);
    border-bottom: 1px solid var(--border);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--green);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.chat-model {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(201, 168, 76, 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

.chat-messages {
    padding: 1.5rem;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    max-width: 85%;
    animation: messageIn 0.4s ease;
}

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

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message .message-content {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.7;
}

.chat-message.bot .message-content {
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    border-radius: var(--radius) var(--radius) 4px var(--radius);
}

.chat-message .message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.chat-message .message-content li {
    margin-bottom: 0.25rem;
}

.chat-message .message-content strong {
    color: var(--gold);
}

.chat-message.user .message-content strong {
    color: var(--navy);
}

.chat-suggestions {
    padding: 0 1.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-chip {
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid var(--border);
    color: var(--gold);
    font-size: 0.78rem;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.suggestion-chip:hover {
    background: rgba(201, 168, 76, 0.15);
    border-color: var(--gold);
}

.chat-input-wrap {
    display: flex;
    align-items: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    gap: 0.75rem;
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    z-index: 5;
}

.chat-input {
    flex: 1;
    background: rgba(240, 242, 245, 0.7);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.1rem 1.35rem;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.2s ease;
    resize: vertical;
    min-height: 120px;
    max-height: 360px;
    line-height: 1.55;
    overflow-y: auto;
}
.chat-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,148,31,0.14);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-input:focus {
    border-color: var(--gold);
}

.chat-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    border-radius: 50%;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
}

/* Citation Verify System */
.citation-ref { display: inline; }
.citation-link { color: var(--gold); text-decoration: underline; text-decoration-style: dotted; }
.citation-link:hover { text-decoration-style: solid; }
.citation-verify-btn {
    display: inline-block; font-size: 9px; padding: 1px 6px; margin-left: 3px;
    background: var(--gold); color: var(--navy); border: none; border-radius: 3px;
    cursor: pointer; font-weight: 700; vertical-align: middle; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.citation-verify-btn:hover { background: var(--gold-light); }

/* Message Actions (TTS, Copy) */
.message-actions { display: flex; gap: 6px; margin-top: 6px; }
.msg-action-btn {
    background: none; border: 1px solid var(--border); border-radius: 6px;
    cursor: pointer; padding: 4px 6px; color: var(--text-muted); transition: all 0.2s;
    display: flex; align-items: center;
}
.msg-action-btn:hover { border-color: var(--gold); color: var(--gold); }
.msg-action-btn.speaking { color: var(--gold); border-color: var(--gold); animation: pulse-spin 1.5s infinite; }

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Demo Features Sidebar */
.demo-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.demo-features h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.demo-feature-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.demo-feature-item:hover {
    border-color: var(--border-hover);
}

.demo-feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.demo-feature-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.demo-feature-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== COMPARISON ===== */
.comparison {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent, rgba(20, 34, 64, 0.3));
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.comparison-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.comparison-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.comparison-card.before h3 {
    color: var(--red);
}

.comparison-card.after h3 {
    color: var(--green);
}

.comparison-card.after {
    border-color: rgba(76, 175, 80, 0.3);
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.05), var(--bg-card));
}

.comparison-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comparison-card li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.comparison-card li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.comparison-vs {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== PRICING ===== */
.pricing {
    padding: 6rem 0;
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.toggle-label.active {
    color: var(--gold);
    font-weight: 600;
}

.toggle-switch {
    width: 50px;
    height: 28px;
    background: rgba(201, 168, 76, 0.2);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--gold);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.annual .toggle-thumb {
    transform: translateX(22px);
}

.save-badge {
    font-size: 0.7rem;
    background: var(--green);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-weight: 600;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.pricing-card.popular {
    border-color: var(--gold);
    background: linear-gradient(145deg, rgba(201, 168, 76, 0.08), var(--bg-card));
    transform: scale(1.02);
    box-shadow: var(--shadow-gold);
}

.pricing-card.popular:hover {
    transform: scale(1.02) translateY(-4px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 1.25rem;
    border-radius: 50px;
    white-space: nowrap;
}

.pricing-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pricing-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pricing-amount {
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--gold);
}

.period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.pricing-features li {
    font-size: 0.88rem;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.5;
}

.pricing-features li.included {
    color: var(--text-primary);
}

.pricing-features li.excluded {
    color: var(--text-muted);
    opacity: 0.5;
}

.pricing-features li.included::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

.pricing-features li.excluded::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(20, 34, 64, 0.3), transparent);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.testimonial-stars {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.testimonial-author span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== FAQ ===== */
.faq {
    padding: 6rem 0;
}

.faq-list {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item.active {
    border-color: var(--border-hover);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
}

.faq-icon {
    flex-shrink: 0;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(123, 45, 59, 0.15), rgba(201, 168, 76, 0.08));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta-content {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-content > p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cta-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== CONTACT ===== */
.contact {
    padding: 6rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(240, 242, 245, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-group select option {
    background: #F7F8FA;
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.form-result.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--green);
}

.form-result.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--red);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.trust-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.badge-item svg {
    flex-shrink: 0;
}

/* ===== AUTH / LOGIN ===== */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.6);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
    animation: authSlideIn 0.3s ease;
}

@keyframes authSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.auth-close:hover { color: var(--navy); }

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--navy);
    margin: 10px 0 4px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    background: rgba(240, 242, 245, 0.5);
    outline: none;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.auth-input:focus {
    border-color: var(--gold);
    background: #fff;
}

.auth-btn {
    width: 100%;
    padding: 13px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-btn:hover { background: #1a2a4a; }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-divider {
    text-align: center;
    margin: 18px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: #fff;
    padding: 0 14px;
    position: relative;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-google-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.auth-google-btn:hover {
    background: rgba(66, 133, 244, 0.06);
    border-color: #4285F4;
}

.auth-error {
    color: #E53E3E;
    font-size: 13px;
    margin: 0 0 10px;
    min-height: 18px;
}

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

.auth-switch a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

.auth-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Nav User Info */
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), #2a3a5c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-heading);
    border: 2px solid var(--gold);
}

.nav-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-admin-badge {
    font-size: 9px;
    padding: 2px 6px;
    background: var(--gold);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-logout-btn:hover {
    color: #E53E3E;
    background: rgba(229, 62, 62, 0.08);
}

#navLoginBtn button {
    background: var(--gold);
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

#navLoginBtn button:hover {
    background: #a07c18;
}

@media (max-width: 768px) {
    .auth-modal { padding: 30px 24px; }
    .nav-user-name { display: none; }
}

/* ===== CASE TRACKER ===== */
.tracker-section {
    padding: 20px 0;
}

.tracker-add-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.tracker-add-card h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 17px;
    margin-bottom: 16px;
}

.tracker-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tracker-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.tracker-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.tracker-stat-card.stat-urgent {
    border-color: #E53E3E;
    background: rgba(229, 62, 62, 0.03);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.stat-urgent .stat-number {
    color: #E53E3E;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tracker-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.tracker-sub-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 12px;
}

.tracker-upcoming {
    background: rgba(229, 62, 62, 0.04);
    border: 1px solid rgba(229, 62, 62, 0.15);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border-left: 4px solid #E53E3E;
}

.upcoming-date {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: #E53E3E;
    min-width: 100px;
}

.upcoming-days {
    font-size: 11px;
    color: #E53E3E;
    font-weight: 600;
}

.upcoming-title {
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}

.upcoming-court {
    font-size: 12px;
    color: var(--text-muted);
}

.tracker-case-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tracker-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.tracker-empty p {
    margin-top: 12px;
}

.tracker-case-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tracker-case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.case-left {
    flex: 1;
}

.case-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.case-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.case-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-badge.active { background: rgba(56, 161, 105, 0.1); color: #38A169; }
.case-badge.listed { background: rgba(49, 130, 206, 0.1); color: #3182CE; }
.case-badge.reserved { background: rgba(214, 158, 46, 0.1); color: #D69E2E; }
.case-badge.adjourned { background: rgba(160, 174, 192, 0.1); color: #718096; }
.case-badge.disposed { background: rgba(113, 128, 150, 0.1); color: #4A5568; }

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.case-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.case-meta-item svg {
    flex-shrink: 0;
}

.case-notes {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.case-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 150px;
}

.case-next-date {
    text-align: right;
}

.case-next-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-next-value {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
}

.case-next-value.urgent {
    color: #E53E3E;
}

.case-days-left {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
}

.case-days-left.urgent {
    background: rgba(229, 62, 62, 0.1);
    color: #E53E3E;
}

.case-days-left.soon {
    background: rgba(214, 158, 46, 0.1);
    color: #D69E2E;
}

.case-days-left.normal {
    background: rgba(56, 161, 105, 0.1);
    color: #38A169;
}

.case-actions {
    display: flex;
    gap: 6px;
}

.case-action-btn {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.case-action-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.case-action-btn.delete:hover {
    border-color: #E53E3E;
    color: #E53E3E;
}

@media (max-width: 768px) {
    .tracker-form-grid { grid-template-columns: 1fr; }
    .tracker-stats { grid-template-columns: repeat(2, 1fr); }
    .tracker-filters { flex-direction: column; }
    .tracker-filters .complaint-input { max-width: 100% !important; }
    .tracker-case-card { flex-direction: column; }
    .case-right { align-items: flex-start; min-width: auto; flex-direction: row; flex-wrap: wrap; }
}

/* ===== TEAM SECTION ===== */
.team-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #fff 100%);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 750px;
    margin: 0 auto;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.team-avatar {
    margin-bottom: 20px;
}

.team-avatar-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), #2a3a5c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto;
    letter-spacing: 1px;
    border: 3px solid var(--gold);
    box-shadow: 0 4px 16px rgba(184, 148, 31, 0.2);
}

.team-name {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.team-role {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.team-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.team-education {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.team-edu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.team-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(184, 148, 31, 0.08);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border: 1px solid rgba(184, 148, 31, 0.15);
}

.team-social-link:hover {
    background: var(--gold);
    color: #fff;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

/* ===== FOOTER ===== */
.footer {
    padding: 4rem 0 2rem;
    background: var(--navy);
    border-top: 1px solid var(--border);
    color: #E8E6E0;
}

.footer, .footer h4, .footer span, .footer strong, .footer p, .footer a {
    color: #D0CEC8;
}

.footer h4, .footer-logo span {
    color: #F0EDE6 !important;
}

.footer a:hover {
    color: var(--gold) !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo span {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.footer-hindi {
    font-family: var(--font-hindi);
    font-size: 0.85rem;
    color: var(--gold);
    opacity: 0.6;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    font-size: 0.72rem !important;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F7F8FA;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-floating {
        display: none;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .comparison-vs {
        margin: 0 auto;
    }

    .demo-wrapper {
        grid-template-columns: 1fr;
    }

    .demo-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .demo-features h3 {
        grid-column: 1 / -1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: right 0.4s ease;
        border-left: 1px solid var(--border);
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-link.nav-cta {
        margin-left: 0;
        margin-top: 1rem;
        text-align: center;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .stat-divider {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        transform: rotate(90deg);
        padding: 0;
    }

    .step-card {
        max-width: 100%;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: none;
        order: -1;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .trust-logos {
        gap: 1.25rem;
    }

    .trust-item {
        font-size: 0.75rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
    }

    .demo-features {
        grid-template-columns: 1fr;
    }

    .chat-suggestions {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .suggestion-chip {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .pricing-card {
        padding: 2rem 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .trust-badges {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Selection */
::selection {
    background: rgba(184, 148, 31, 0.3);
    color: var(--navy);
}


/* ===== LAW SARATHI 2.0 — NEW FEATURES CSS ===== */

/* --- Council Mode Toggle --- */
.council-toggle {
    display: flex;
    gap: 2px;
    background: rgba(240, 242, 245, 0.95);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--border);
}

.council-mode-btn {
    padding: 4px 12px;
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.council-mode-btn.active {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.4);
}

.council-mode-btn:hover:not(.active) {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
}

/* --- Council Visualization --- */
.council-viz {
    margin: 0 auto 12px;
    max-width: 600px;
    background: rgba(247, 248, 250, 0.98);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    backdrop-filter: blur(10px);
}

.council-flow {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.council-stage {
    transition: opacity 0.5s ease;
}

.stage-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-align: center;
}

.council-models {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.model-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    min-width: 90px;
    position: relative;
    transition: all 0.4s ease;
}

.model-node.thinking {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.2);
    animation: nodeThink 1.5s ease-in-out infinite;
}

.model-node.done {
    border-color: var(--green);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2);
}

.model-node.error {
    border-color: var(--red);
    opacity: 0.5;
}

@keyframes nodeThink {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.model-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.model-gemini { background: linear-gradient(135deg, #4285F4, #34A853); }
.model-claude { background: linear-gradient(135deg, #D97706, #B45309); }
.model-gpt { background: linear-gradient(135deg, #10A37F, #1A7F64); }

.model-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.model-status {
    font-size: 9px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.model-node.thinking .model-status { color: var(--gold); }
.model-node.done .model-status { color: var(--green); }

/* Data flow particles */
.data-particles {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0;
}

.model-node.thinking .data-particles {
    animation: particleFlow 1s ease-in-out infinite;
}

@keyframes particleFlow {
    0% { opacity: 0; top: 100%; }
    50% { opacity: 1; }
    100% { opacity: 0; top: -15px; }
}

/* Flow lines */
.flow-lines {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    gap: 60px;
}

.flow-line {
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    opacity: 0;
    animation: flowPulse 2s ease-in-out infinite;
}

.flow-line-1 { animation-delay: 0s; }
.flow-line-2 { animation-delay: 0.3s; }
.flow-line-3 { animation-delay: 0.6s; }

@keyframes flowPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; }
}

/* Judge node */
.judge-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(201, 168, 76, 0.08);
    border: 2px solid rgba(201, 168, 76, 0.3);
    border-radius: var(--radius);
    max-width: 250px;
    margin: 0 auto;
    transition: all 0.5s ease;
}

.judge-node.active {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.3);
    animation: judgeGlow 2s ease-in-out infinite;
}

.judge-node.approved {
    border-color: var(--green);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
}

@keyframes judgeGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(201, 168, 76, 0.2); }
    50% { box-shadow: 0 0 40px rgba(201, 168, 76, 0.4); }
}

.judge-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
}

.judge-status {
    font-size: 10px;
    color: var(--text-muted);
}

.judge-verdict {
    margin-top: 4px;
}

.verdict-stamp {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(76, 175, 80, 0.15);
    border: 2px solid var(--green);
    border-radius: 4px;
    color: var(--green);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 3px;
    transform: rotate(-3deg);
    animation: stampIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stampIn {
    0% { transform: rotate(-3deg) scale(3); opacity: 0; }
    100% { transform: rotate(-3deg) scale(1); opacity: 1; }
}

/* --- Portfolio Section --- */
.portfolio-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #F0F2F5 0%, #F7F8FA 100%);
}

.portfolio-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-top: 30px;
}

.portfolio-input-card, .portfolio-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(10px);
}

.portfolio-input-card h3, .portfolio-preview h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 20px;
}

.portfolio-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.portfolio-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(240, 242, 245, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.portfolio-input:focus {
    border-color: var(--gold);
}

.portfolio-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Progress Stepper */
.portfolio-progress {
    margin-top: 24px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.done {
    opacity: 0.7;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active .step-dot {
    background: var(--gold);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.5);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.progress-step.done .step-dot {
    background: var(--green);
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(201, 168, 76, 0.3); }
    50% { box-shadow: 0 0 20px rgba(201, 168, 76, 0.6); }
}

.step-info {
    display: flex;
    flex-direction: column;
}

.step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.step-detail {
    font-size: 11px;
    color: var(--text-muted);
}

.progress-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(201, 168, 76, 0.1);
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Download */
.portfolio-download {
    text-align: center;
    padding: 20px 0;
}

.download-success {
    margin-bottom: 16px;
}

.download-success h4 {
    color: var(--green);
    font-size: 18px;
    margin: 8px 0 4px;
}

.download-success p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Preview Items */
.preview-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(240, 242, 245, 0.8);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    transition: border-color 0.3s;
}

.preview-item:hover {
    border-color: var(--gold);
}

.preview-icon {
    font-size: 20px;
}

/* ===== DOCUMENT WORKSPACE (Split-View Chat UI) ===== */
.doc-workspace {
    display: grid; grid-template-columns: 400px 1fr; gap: 20px;
    height: calc(100vh - 240px); min-height: 600px;
    padding-top: 20px;
    scroll-margin-top: 120px;
}

/* Chat Panel (Left) */
.doc-chat-panel {
    display: flex; flex-direction: column;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
}
.doc-chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(184,148,31,0.03), transparent);
    flex-shrink: 0;
    min-height: 64px;
}
.doc-chat-title { font-family: var(--font-heading); font-size: 17px; font-weight: 700; color: var(--text-primary); }
.doc-chat-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.doc-new-btn {
    background: transparent; border: 1px solid var(--border); border-radius: 8px;
    padding: 8px; cursor: pointer; color: var(--text-muted); transition: all 0.2s;
}
.doc-new-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Options accordion */
.doc-options-acc {
    border-bottom: 1px solid var(--border); background: rgba(10,22,40,0.02);
}
.doc-options-acc summary {
    padding: 10px 18px; cursor: pointer; font-size: 12px; font-weight: 600;
    color: var(--text-secondary); list-style: none; display: flex; align-items: center; gap: 6px;
    user-select: none;
}
.doc-options-acc summary::-webkit-details-marker { display: none; }
.doc-options-acc summary::before { content: '▸'; transition: transform 0.2s; font-size: 10px; color: var(--gold); }
.doc-options-acc[open] summary::before { transform: rotate(90deg); }
.doc-options-acc[open] { background: rgba(10,22,40,0.03); padding-bottom: 12px; }
.doc-type-chips {
    display: flex; flex-wrap: wrap; gap: 5px; padding: 0 18px 10px;
}
.doc-type-chip {
    font-size: 11px; padding: 5px 10px; border-radius: 12px;
    background: transparent; border: 1px solid var(--border); cursor: pointer;
    color: var(--text-muted); font-family: var(--font-body); transition: all 0.15s;
}
.doc-type-chip:hover { border-color: var(--gold); color: var(--gold); }
.doc-type-chip.active { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }
.doc-options-row {
    display: flex; gap: 6px; padding: 0 18px; flex-wrap: wrap; align-items: center;
}
.doc-select {
    padding: 5px 8px; font-size: 11px; border-radius: 6px;
    border: 1px solid var(--border); background: var(--bg-input);
    color: var(--text-primary); font-family: var(--font-body);
}
.doc-option-check { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); cursor: pointer; }

/* Chat messages */
.doc-chat-messages {
    flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.doc-welcome { text-align: center; padding: 24px 12px; color: var(--text-muted); }
.doc-welcome-icon {
    width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(184,148,31,0.12), rgba(184,148,31,0.04));
    border: 1px solid rgba(184,148,31,0.2);
    display: flex; align-items: center; justify-content: center;
}
.doc-welcome h4 { font-family: var(--font-heading); font-size: 16px; color: var(--text-primary); margin-bottom: 6px; }
.doc-welcome p { font-size: 12px; line-height: 1.5; margin-bottom: 14px; }
.doc-welcome-chips { display: flex; flex-direction: column; gap: 6px; align-items: center; }
/* Mini chat for "Upload mode" chat-with-docs */
.doc-chat-mini { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.doc-chat-mini-messages { min-height: 120px; max-height: 340px; overflow-y: auto; background: var(--chat-bg, #FAFAF7); border: 1px solid var(--border-color); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.doc-chat-mini-messages .doc-welcome { padding: 12px; text-align: center; }
.doc-chat-mini-messages .doc-welcome-chips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; }
.doc-chat-mini-input-wrap { display: flex; gap: 8px; align-items: flex-end; }
.doc-chat-mini-input-wrap textarea { flex: 1; min-height: 44px; resize: vertical; }
.upload-chat-msg { padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; max-width: 90%; word-wrap: break-word; }
.upload-chat-msg.user { align-self: flex-end; background: var(--gold-muted, #E9DCB0); color: var(--text-primary); }
.upload-chat-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--border-color); color: var(--text-primary); }
.upload-chat-msg.bot strong { color: var(--gold); }
body.dark-mode .doc-chat-mini-messages { background: rgba(255,255,255,.02); }
body.dark-mode .upload-chat-msg.bot { background: rgba(255,255,255,.04); }
.doc-chip-btn {
    font-size: 11px; padding: 6px 12px; border-radius: 16px;
    background: var(--bg-card); border: 1px solid var(--border); cursor: pointer;
    color: var(--text-secondary); font-family: var(--font-body); transition: all 0.15s;
}
.doc-chip-btn:hover { border-color: var(--gold); color: var(--gold); }

.doc-msg { display: flex; gap: 8px; animation: tabFadeIn 0.2s ease; max-width: 100%; }
.doc-msg.user { justify-content: flex-end; }
.doc-msg-bubble {
    padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5;
    max-width: 85%; word-wrap: break-word;
}
.doc-msg.user .doc-msg-bubble {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); border-bottom-right-radius: 4px;
}
.doc-msg.bot .doc-msg-bubble {
    background: rgba(10,22,40,0.04); color: var(--text-primary);
    border-bottom-left-radius: 4px;
}
[data-theme="dark"] .doc-msg.bot .doc-msg-bubble { background: rgba(255,255,255,0.06); }
.doc-msg.bot.typing .doc-msg-bubble { font-style: italic; color: var(--text-muted); }
.doc-typing-timer {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(184,148,31,0.14);
    border: 1px solid rgba(184,148,31,0.3);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-style: normal;
    color: var(--gold-dark, #9A7E1A);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

/* Missing items card inside the preview */
.doc-missing-card {
    margin: 28px 0 8px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(220, 90, 40, 0.08), rgba(220, 90, 40, 0.02));
    border: 1.5px solid rgba(220, 90, 40, 0.35);
    border-left: 4px solid #dc5a28;
    border-radius: 12px;
    color: var(--text-primary);
    text-align: left;
    text-indent: 0;
}
.doc-missing-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 15px;
    color: #b34517;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
    text-transform: none;
    text-align: left;
}
.doc-missing-list {
    margin: 0 0 8px 0;
    padding-left: 22px;
    font-size: 13.5px;
    line-height: 1.65;
    text-align: left;
}
.doc-missing-list li { text-indent: 0; margin-bottom: 4px; text-align: left; }
.doc-missing-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-muted, #777);
    font-style: italic;
    text-indent: 0;
    text-align: left;
}

/* Preview-panel HUD (while drafting) */
.preview-hud {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 28px 28px 24px;
    background: var(--bg-card, #fff);
    border: 1.5px solid var(--border, #e5e5e5);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    text-align: left;
}
.preview-hud-head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
}
.preview-hud-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(184,148,31,0.18), rgba(184,148,31,0.06));
    color: var(--gold-dark, #9A7E1A);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.preview-hud-title {
    font-family: var(--font-heading, serif);
    font-size: 17px; font-weight: 700;
    color: var(--text-primary);
}
.preview-hud-sub { font-size: 12px; color: var(--text-muted, #888); margin-top: 2px; }
.preview-hud-timer {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 12px;
    background: rgba(184,148,31,0.16);
    border: 1px solid rgba(184,148,31,0.3);
}
.preview-hud-bar { height: 6px; margin-bottom: 18px; }
.preview-hud-steps { font-size: 13px; gap: 8px; }
.preview-hud-steps li { padding: 2px 0; }

/* Stepped HUD shown while drafting */
.doc-msg.bot.typing.has-hud .doc-msg-bubble {
    font-style: normal;
    max-width: 100%;
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(10,22,40,0.04), rgba(184,148,31,0.04)) !important;
    border: 1px solid rgba(184,148,31,0.25);
    border-radius: 14px;
    color: var(--text-primary);
}
.doc-hud {}
.doc-hud-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}
.doc-hud-title {
    font-family: var(--font-heading, serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-dark, #9A7E1A);
}
.doc-hud-bar {
    height: 4px;
    background: rgba(10,22,40,0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}
.doc-hud-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold, #B8941F), var(--gold-dark, #9A7E1A));
    border-radius: 999px;
    transition: width 0.4s ease;
}
.doc-hud-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    color: var(--text-muted, #777);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.doc-hud-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.55;
    transition: opacity 0.2s, color 0.2s;
}
.doc-hud-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    border: 1.5px solid var(--text-muted, #aaa);
    background: transparent;
    flex-shrink: 0;
}
.doc-hud-steps li.current {
    opacity: 1;
    color: var(--text-primary);
    font-weight: 600;
}
.doc-hud-steps li.current .doc-hud-dot {
    border-color: var(--gold, #B8941F);
    background: var(--gold, #B8941F);
    box-shadow: 0 0 0 3px rgba(184,148,31,0.2);
    animation: hudPulse 1.2s ease-in-out infinite;
}
.doc-hud-steps li.done {
    opacity: 0.85;
    color: var(--text-secondary);
}
.doc-hud-steps li.done .doc-hud-dot {
    background: var(--gold, #B8941F);
    border-color: var(--gold, #B8941F);
}
.doc-hud-steps li.done::after {
    content: '✓';
    margin-left: auto;
    color: var(--gold-dark, #9A7E1A);
    font-weight: 700;
}
@keyframes hudPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(184,148,31,0.2); }
    50% { box-shadow: 0 0 0 6px rgba(184,148,31,0.08); }
}

/* Branding profiles */
.doc-branding-select { max-width: 170px; }
.doc-branding-manage-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px; font-size: 11px;
    background: transparent; border: 1px solid var(--border);
    border-radius: 6px; cursor: pointer;
    color: var(--text-muted); font-family: var(--font-body);
    transition: all 0.15s;
}
.doc-branding-manage-btn:hover { border-color: var(--gold); color: var(--gold); }

.branding-list {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 18px;
    max-height: 300px;
    overflow-y: auto;
}
.branding-empty {
    text-align: center; padding: 24px 16px;
    color: var(--text-muted, #888); font-size: 13px;
    border: 1.5px dashed var(--border, #ddd);
    border-radius: 10px;
}
.branding-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--bg-input, #fafafa);
    border: 1.5px solid var(--border, #eee);
    border-radius: 10px;
}
.branding-item.default {
    border-color: var(--gold, #B8941F);
    background: linear-gradient(180deg, rgba(184,148,31,0.06), rgba(184,148,31,0.02));
}
.branding-item-main { flex: 1; min-width: 0; }
.branding-item-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.branding-pill {
    font-size: 10px;
    padding: 2px 8px;
    background: var(--gold, #B8941F);
    color: #0A1628;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.branding-item-meta {
    font-size: 12px;
    color: var(--text-muted, #777);
    margin-top: 2px;
}
.branding-item-meta.small { font-size: 11px; opacity: 0.8; }
.branding-item-actions {
    display: flex; gap: 6px; flex-shrink: 0;
}
.btn-outline-sm.danger { color: #b03030; border-color: rgba(176,48,48,0.35); }
.btn-outline-sm.danger:hover { background: rgba(176,48,48,0.08); }

.branding-form-acc {
    border: 1.5px solid var(--border, #eee);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}
.branding-form-acc summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    background: rgba(10,22,40,0.02);
    list-style: none;
    user-select: none;
}
.branding-form-acc summary::-webkit-details-marker { display: none; }
.branding-form { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.branding-row { display: flex; gap: 10px; }
.branding-row > * { flex: 1; min-width: 0; }
.branding-form input,
.branding-form textarea,
.branding-form select {
    width: 100%;
    padding: 10px 12px;
    font-size: 13.5px;
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    background: var(--bg-card, #fff);
    font-family: var(--font-body);
    color: var(--text-primary);
    resize: vertical;
}
.branding-form input:focus,
.branding-form textarea:focus { outline: none; border-color: var(--gold, #B8941F); box-shadow: 0 0 0 3px rgba(184,148,31,0.14); }
.branding-check {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.branding-form-actions {
    display: flex; justify-content: flex-end; gap: 8px;
    margin-top: 6px;
}
@media (max-width: 600px) { .branding-row { flex-direction: column; } }

/* Chat input */
.doc-chat-input-wrap {
    display: flex; gap: 8px; padding: 14px 16px 18px; border-top: 1px solid var(--border);
    background: var(--bg-card);
    align-items: flex-end;
    position: sticky;
    bottom: 0;
    z-index: 3;
}
.doc-chat-input {
    flex: 1; padding: 16px 18px; border: 1.5px solid var(--border);
    border-radius: 14px; font-family: var(--font-body); font-size: 15.5px;
    background: var(--bg-input); color: var(--text-primary); resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    line-height: 1.55;
    min-height: 140px;
    max-height: 420px;
    overflow-y: auto;
}
.doc-chat-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,148,31,0.14); }
.doc-chat-send {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.doc-chat-send:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(184,148,31,0.35); }
.doc-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Highlighted Crux card (shown after a PDF is attached and analyzed) */
.doc-crux-card {
    margin: 8px 0;
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, rgba(184,148,31,0.14), rgba(184,148,31,0.04));
    border: 1.5px solid rgba(184,148,31,0.45);
    border-left: 4px solid var(--gold, #B8941F);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(184,148,31,0.08);
    animation: tabFadeIn 0.25s ease;
}
.doc-crux-title {
    font-family: var(--font-heading, serif);
    font-weight: 700;
    font-size: 14px;
    color: var(--gold-dark, #9A7E1A);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}
.doc-crux-title em { font-style: italic; color: var(--text-secondary); font-weight: 500; }
.doc-crux-pin {
    display: inline-block;
    margin-right: 6px;
    color: var(--gold, #B8941F);
}
.doc-crux-body {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}
.doc-crux-body strong { color: var(--gold-dark, #9A7E1A); }
.doc-crux-body p { margin: 4px 0; }

/* Attach button in chat input */
.doc-attach-btn {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    background: transparent; border: 1px solid var(--border); cursor: pointer;
    color: var(--text-muted); display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.doc-attach-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Attachment chip above input */
.doc-attachment-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px 6px 12px; margin: 0 16px 8px;
    background: rgba(184,148,31,0.08);
    border: 1px solid rgba(184,148,31,0.25);
    border-radius: 8px;
    font-size: 12px; color: var(--text-secondary);
}
.doc-attachment-chip svg { flex-shrink: 0; color: var(--gold); }
.doc-attachment-chip span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-attach-remove {
    background: transparent; border: none; cursor: pointer;
    font-size: 18px; line-height: 1; color: var(--text-muted);
    padding: 0 4px;
}
.doc-attach-remove:hover { color: #c33; }

/* Preview Panel (Right) */
.doc-preview-panel {
    display: flex; flex-direction: column;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
}
.doc-preview-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px; text-align: center; color: var(--text-muted);
}
.doc-preview-empty svg { margin-bottom: 16px; }
.doc-preview-empty h3 { font-family: var(--font-heading); font-size: 18px; color: var(--text-secondary); margin-bottom: 6px; }
.doc-preview-empty p { font-size: 13px; }

.doc-preview-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.doc-preview-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(184,148,31,0.03), transparent);
    flex-wrap: wrap; gap: 10px;
}
.doc-preview-header h3 { font-family: var(--font-heading); font-size: 16px; color: var(--text-primary); }
.doc-preview-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.doc-sig-dropdown { position: relative; }
.doc-sig-menu {
    position: absolute; top: calc(100% + 4px); right: 0; min-width: 200px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 6px; display: none; z-index: 100;
}
.doc-sig-menu.open { display: block; }
.doc-sig-item {
    padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 12px;
    display: flex; align-items: center; gap: 8px; transition: background 0.15s;
}
.doc-sig-item:hover { background: rgba(184,148,31,0.08); }
.doc-sig-item img { width: 40px; height: 20px; object-fit: contain; background: white; border-radius: 2px; }

.doc-preview-body {
    flex: 1; overflow-y: auto; padding: 48px 56px;
    font-size: 14.5px; line-height: 1.85; color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', 'Libre Baskerville', serif;
    text-align: justify;
    text-justify: inter-word;
    background: #fffdf6;
    background-image: linear-gradient(to bottom, #fffdf6 0%, #fdfaf0 100%);
    box-shadow: inset 0 0 0 1px rgba(10,22,40,0.03);
    hyphens: auto;
}
[data-theme="dark"] .doc-preview-body {
    background: #1a1d26;
    background-image: none;
}
.doc-preview-body h1, .doc-preview-body h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 16px;
    margin: 18px 0 14px;
    color: var(--text-primary);
}
.doc-preview-body h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    font-weight: 700;
    margin: 16px 0 8px;
    color: var(--text-primary);
    text-align: left;
}
.doc-preview-body h4 {
    font-size: 14px; font-weight: 700; margin: 12px 0 6px;
    color: var(--text-secondary);
    text-align: left;
}
.doc-preview-body strong { color: var(--navy); font-weight: 700; }
[data-theme="dark"] .doc-preview-body strong { color: var(--gold); }
.doc-preview-body ul, .doc-preview-body ol { padding-left: 28px; margin: 10px 0; }
.doc-preview-body li { margin-bottom: 6px; text-align: justify; }
.doc-preview-body p { margin: 0 0 12px; text-indent: 2em; }
.doc-preview-body p:first-child,
.doc-preview-body h1 + p,
.doc-preview-body h2 + p,
.doc-preview-body h3 + p { text-indent: 0; }
/* Numbered paragraphs rendered as "1. text", "2. text" — keep them hanging */
.doc-preview-body p.numbered-para,
.doc-preview-body p[data-num] {
    padding-left: 2em;
    text-indent: -2em;
}

.doc-preview-citations {
    border-top: 1px solid var(--border); padding: 16px 20px;
    background: rgba(184,148,31,0.02);
}
.doc-preview-citations h4 { font-size: 13px; font-weight: 700; color: var(--gold-dark); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.doc-preview-citations a { display: block; font-size: 12px; color: var(--gold-dark); text-decoration: none; padding: 3px 0; }
.doc-preview-citations a:hover { text-decoration: underline; }

@media (max-width: 968px) {
    .doc-workspace { grid-template-columns: 1fr; height: auto; }
    .doc-chat-panel { max-height: 500px; }
    .doc-preview-panel { min-height: 500px; }
}

/* ===== AIR SIGNATURE MODAL ===== */
.air-sign-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 8px;
    background: rgba(184,148,31,0.08); border: 1px solid rgba(184,148,31,0.3);
    color: var(--gold-dark); font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.air-sign-btn:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.air-sign-label { font-size: 13px; }

.air-sig-modal {
    position: fixed; inset: 0; z-index: 5000;
    background: rgba(10, 22, 40, 0.85); backdrop-filter: blur(8px);
    align-items: center; justify-content: center; padding: 20px;
}
.air-sig-container {
    background: var(--bg-card); border-radius: 20px;
    width: 100%; max-width: 720px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.air-sig-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(184,148,31,0.05), transparent);
}
.air-sig-header h3 { font-family: var(--font-heading); font-size: 20px; color: var(--text-primary); margin-bottom: 4px; }
.air-sig-hints { font-size: 12px; color: var(--text-muted); }
.air-sig-close {
    background: none; border: none; font-size: 28px; cursor: pointer;
    color: var(--text-muted); padding: 0; width: 32px; height: 32px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    line-height: 1; transition: all 0.2s;
}
.air-sig-close:hover { background: rgba(10,22,40,0.08); color: var(--text-primary); }

.air-sig-stage {
    position: relative; aspect-ratio: 4/3; background: #000;
}
.air-sig-stage video {
    width: 100%; height: 100%; object-fit: cover;
    transform: scaleX(-1); /* Mirror for selfie view */
}
.air-sig-stage canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}
.air-sig-status {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    padding: 8px 16px; background: rgba(0,0,0,0.7); color: white;
    border-radius: 20px; font-size: 13px; font-weight: 600;
    backdrop-filter: blur(4px);
}

.air-sig-controls {
    display: flex; gap: 10px; padding: 16px 24px;
    border-top: 1px solid var(--border); flex-wrap: wrap;
    align-items: center;
}
.air-sig-name-input {
    flex: 1; min-width: 180px;
    padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-family: var(--font-body); font-size: 13px;
    background: var(--bg-input); color: var(--text-primary);
}
.air-sig-name-input:focus { outline: none; border-color: var(--gold); }

@media (max-width: 640px) {
    .air-sign-label { display: none; }
    .air-sig-container { max-height: 90vh; overflow-y: auto; }
    .air-sig-stage { aspect-ratio: 3/4; }
}

/* --- Drafting Section (Legacy) --- */
.drafting-section {
    padding: 80px 0;
    background: #F7F8FA;
}

.drafting-wrapper {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.drafting-controls {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(10px);
}

.draft-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.draft-type-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-family: var(--font-body);
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.draft-type-btn.active {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 600;
}

.draft-type-btn:hover:not(.active) {
    border-color: var(--gold);
    color: var(--gold);
}

.draft-options {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.draft-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.draft-option label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.draft-select {
    padding: 6px 10px;
    background: rgba(240, 242, 245, 0.95);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 12px;
    outline: none;
}

.draft-textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(240, 242, 245, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.draft-textarea:focus {
    border-color: var(--gold);
}

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

/* Draft Output */
.draft-output {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.draft-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(201, 168, 76, 0.08);
    border-bottom: 1px solid var(--border);
}

.draft-output-header h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 16px;
}

.draft-copy-btn {
    padding: 6px 14px;
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid var(--gold);
    border-radius: 6px;
    color: var(--gold);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.draft-copy-btn:hover {
    background: var(--gold);
    color: var(--navy);
}

.draft-content {
    padding: 24px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    max-height: 600px;
    overflow-y: auto;
}

.draft-citations {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: rgba(240, 242, 245, 0.7);
}

.draft-citations h4 {
    color: var(--gold);
    font-size: 13px;
    margin-bottom: 8px;
}

.draft-citations a {
    color: var(--gold-light);
    font-size: 12px;
    text-decoration: none;
    display: block;
    padding: 4px 0;
}

.draft-citations a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* --- ML Predictions --- */
.ml-predictions {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(184, 148, 31, 0.04);
    border: 1px solid rgba(184, 148, 31, 0.15);
    border-radius: var(--radius);
}

.ml-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ml-card {
    padding: 14px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.ml-card.ml-wide {
    grid-column: 1 / -1;
}

.ml-card h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ml-result {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.ml-confidence {
    font-size: 11px;
    color: var(--text-muted);
}

.ml-meter {
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    margin: 8px 0;
    overflow: hidden;
}

.ml-meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease, background 0.5s ease;
}

.ml-cases-list {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.6;
}

.ml-case-item {
    padding: 8px 10px;
    margin-bottom: 6px;
    background: rgba(240, 242, 245, 0.6);
    border-radius: 6px;
    border-left: 3px solid var(--gold);
}

.ml-case-item strong {
    display: block;
    color: var(--navy);
    font-size: 12px;
}

.ml-case-item em {
    font-size: 11px;
    color: var(--text-muted);
}

.ml-case-sim {
    float: right;
    font-weight: 700;
    color: var(--gold-dark);
    font-size: 13px;
}

@media (max-width: 768px) {
    .ml-grid { grid-template-columns: 1fr; }
    .ml-card.ml-wide { grid-column: 1; }
}

/* --- Complaint Generator --- */
/* Complaint Mode Toggle */
.complaint-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(240, 242, 245, 0.8);
    border-radius: 12px;
    padding: 4px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.complaint-mode-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.complaint-mode-btn.active {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 2px 8px rgba(184, 148, 31, 0.3);
}

.complaint-mode-btn:hover:not(.active) {
    background: rgba(184, 148, 31, 0.1);
    color: var(--navy);
}

.complaint-mode-panel {
    display: none;
}

.complaint-mode-panel.active {
    display: block;
}

.complaint-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.complaint-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.complaint-card.complaint-wide {
    grid-column: 1 / -1;
}

.complaint-card h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 12px;
}

.complaint-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(240, 242, 245, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.complaint-input:focus {
    border-color: var(--gold);
}

select.complaint-input {
    cursor: pointer;
    appearance: auto;
}

.date-event-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-event-row .file-remove {
    margin-bottom: 10px;
}

.complaint-textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(240, 242, 245, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.complaint-textarea:focus {
    border-color: var(--gold);
}

.complaint-row {
    display: flex;
    gap: 10px;
}

.complaint-row .complaint-input {
    flex: 1;
}

.complaint-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.complaint-output-header h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 18px;
}

.complaint-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.complaint-doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.complaint-doc-card h4 {
    padding: 12px 20px;
    background: rgba(184, 148, 31, 0.06);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 14px;
    cursor: pointer;
}

.complaint-doc-card h4:hover {
    background: rgba(184, 148, 31, 0.12);
}

.complaint-doc-card .doc-content {
    padding: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.complaint-doc-card.open .doc-content {
    display: block;
}

.complaint-upload-zone {
    border: 2px dashed rgba(184, 148, 31, 0.3);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(184, 148, 31, 0.03);
}

.complaint-upload-zone:hover, .complaint-upload-zone.dragover {
    border-color: var(--gold);
    background: rgba(184, 148, 31, 0.08);
}

.complaint-upload-zone p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.uploaded-files-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(56, 161, 105, 0.08);
    border: 1px solid rgba(56, 161, 105, 0.2);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-primary);
}

.uploaded-file-item .file-remove {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

.complaint-modify {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.modify-chip {
    padding: 5px 12px;
    font-size: 11px;
    font-family: var(--font-body);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modify-chip:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(184, 148, 31, 0.06);
}

/* Processing Timeline */
.complaint-timeline {
    max-width: 600px;
    margin: 0 auto 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.timeline-header h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 17px;
    margin: 0;
}

.timeline-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(184, 148, 31, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: timelineSpin 0.8s linear infinite;
    flex-shrink: 0;
}

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

/* Live countdown timer for long AI operations */
.timeline-timer {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 12px;
    background: rgba(184, 148, 31, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(184, 148, 31, 0.2);
    position: relative;
    min-width: 180px;
}
.timeline-timer .timer-elapsed {
    font-weight: 600;
    color: var(--gold);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.timeline-timer .timer-separator { opacity: 0.5; }
.timeline-timer .timer-budget { font-size: 11px; opacity: 0.8; }
.timeline-timer.over-budget {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.3);
}
.timeline-timer.over-budget .timer-elapsed { color: #dc3545; animation: pulsePing 1.2s ease-in-out infinite; }
@keyframes pulsePing { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.timer-bar {
    position: absolute;
    bottom: -1px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: rgba(184, 148, 31, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.timer-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), #FFD700);
    transition: width 0.3s linear;
}
.timer-bar-fill.danger { background: #dc3545; }

/* Inline timer for chat messages */
.inline-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    color: var(--gold);
    background: rgba(184, 148, 31, 0.1);
    padding: 3px 9px;
    border-radius: 10px;
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
}

body.dark-mode .timeline-timer { background: rgba(212, 175, 55, 0.08); }

.timeline-steps {
    position: relative;
    padding-left: 20px;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.3s;
}

.timeline-step.active,
.timeline-step.done,
.timeline-step.skip {
    opacity: 1;
}

.timeline-step.active {
    transform: translateX(4px);
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid #fff;
    position: absolute;
    left: -19px;
    z-index: 1;
    transition: all 0.3s;
}

.timeline-step.active .timeline-dot {
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(184, 148, 31, 0.2);
    animation: timelinePulse 1.5s ease infinite;
}

.timeline-step.done .timeline-dot {
    background: #38A169;
    border-color: #fff;
}

.timeline-step.skip .timeline-dot {
    background: #CBD5E0;
}

@keyframes timelinePulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(184, 148, 31, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(184, 148, 31, 0.1); }
}

.timeline-label {
    font-size: 13px;
    color: var(--text-primary);
    font-family: var(--font-body);
    flex: 1;
}

.timeline-step.active .timeline-label {
    font-weight: 600;
    color: var(--navy);
}

.timeline-step.skip .timeline-label {
    color: var(--text-muted);
    font-style: italic;
}

.timeline-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.timeline-step.active .timeline-status {
    color: var(--gold);
}

.timeline-step.done .timeline-status {
    color: #38A169;
}

.timeline-step.skip .timeline-status {
    color: #A0AEC0;
    font-weight: 400;
}

@media (max-width: 768px) {
    .complaint-form-grid { grid-template-columns: 1fr; }
    .complaint-row { flex-direction: column; }
    .complaint-timeline { padding: 20px 18px; }
}

/* --- Lawyer Brain Selector --- */
.lawyer-selector {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
}

.lawyer-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.lawyer-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.lawyer-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lawyer-chip:hover {
    border-color: var(--gold);
    color: var(--text-primary);
}

.lawyer-chip.active {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.lc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .lawyer-chips {
        gap: 3px;
    }
    .lawyer-chip {
        padding: 3px 7px;
        font-size: 10px;
    }
}

/* --- Mini Hero --- */
.mini-hero {
    padding: 100px 0 30px;
    background: linear-gradient(135deg, #F7F8FA 0%, #EEF0F5 100%);
    text-align: center;
}

.mini-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.mini-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.1;
}

.mini-hero-title .highlight {
    color: var(--gold);
}

.mini-hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.mini-hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.mini-hero-stats span {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-dark);
    padding: 4px 14px;
    background: rgba(184, 148, 31, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(184, 148, 31, 0.15);
}

/* --- Workspace Tabs --- */
.workspace-section {
    padding: 0;
    background: var(--bg-section);
    min-height: calc(100vh - 64px);
    margin-top: 0;
}

/* ===== SIDEBAR LAYOUT ===== */
.workspace-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.workspace-sidebar {
    width: 220px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 12px 8px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    flex-shrink: 0;
    transition: width 0.3s ease;
    z-index: 10;
}
.workspace-sidebar.collapsed { width: 60px; }
.workspace-sidebar.collapsed .sidebar-brand-text { display: none; }
.workspace-sidebar.collapsed .workspace-tab { justify-content: center; padding: 10px; overflow: visible; position: relative; }
.workspace-sidebar.collapsed .workspace-tab svg ~ * { display: none; }
/* Tooltip on hover when collapsed */
.workspace-sidebar.collapsed .workspace-tab:hover::after {
    content: attr(data-tooltip);
    position: absolute; left: calc(100% + 10px); top: 50%;
    transform: translateY(-50%); white-space: nowrap;
    background: var(--navy); color: white;
    padding: 6px 12px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000; pointer-events: none;
}
[data-theme="dark"] .workspace-sidebar.collapsed .workspace-tab:hover::after {
    background: var(--gold); color: var(--navy);
}

.sidebar-toggle {
    background: none; border: none; cursor: pointer; padding: 8px;
    color: var(--text-muted); border-radius: var(--radius-sm);
    width: 100%; display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px; transition: background 0.2s;
}
.sidebar-toggle:hover { background: rgba(184, 148, 31, 0.08); color: var(--gold); }

.sidebar-brand {
    display: flex; align-items: center; gap: 8px; padding: 4px 12px 12px;
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    font-family: var(--font-heading); border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.workspace-sidebar.collapsed .sidebar-brand { justify-content: center; padding: 4px; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 9;
}
.sidebar-overlay.active { display: block; }

.workspace-main {
    flex: 1;
    min-width: 0;
    padding: 24px;
    max-width: 1200px;
}

/* Horizontal tabs (logged-out) */
.workspace-tabs-horizontal {
    display: flex; gap: 4px; background: var(--bg-card); padding: 6px;
    border-radius: var(--radius); border: 1px solid var(--border);
    margin-bottom: 20px; overflow-x: auto; box-shadow: var(--shadow);
}
.workspace-sidebar:not([style*="display: none"]) ~ .workspace-main .workspace-tabs-horizontal,
.workspace-sidebar:not([style*="display:none"]) ~ .workspace-main .workspace-tabs-horizontal { display: none; }
.htab {
    padding: 8px 16px; font-size: 13px; font-weight: 600; border: none;
    border-radius: var(--radius-sm); cursor: pointer; background: transparent;
    color: var(--text-muted); white-space: nowrap; transition: all 0.2s;
    font-family: var(--font-body);
}
.htab.active { background: var(--navy); color: white; }
.htab:hover:not(.active) { background: rgba(10,22,40,0.06); color: var(--text-primary); }

/* Sidebar Tabs */
.workspace-tabs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: transparent;
    padding: 0;
    border: none;
    margin: 0;
    box-shadow: none;
    overflow: visible;
}

.workspace-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    white-space: nowrap;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
}

.workspace-tab.active {
    background: var(--navy);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(10, 22, 40, 0.15);
}
[data-theme="dark"] .workspace-tab.active { background: var(--gold-dark); color: #0B1120; }

.workspace-tab:hover:not(.active) {
    background: rgba(10, 22, 40, 0.05);
    color: var(--text-primary);
}
[data-theme="dark"] .workspace-tab:hover:not(.active) { background: rgba(255,255,255,0.05); }

.workspace-tab svg { flex-shrink: 0; width: 18px; height: 18px; }

.workspace-content { position: relative; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: tabFadeIn 0.3s ease; }

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

/* Mobile sidebar */
@media (max-width: 768px) {
    .workspace-sidebar {
        position: fixed; left: -260px; top: 64px; z-index: 999;
        width: 240px; height: calc(100vh - 64px);
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    .workspace-sidebar.open { left: 0; }
    .workspace-main { padding: 16px 12px; }
    .sidebar-toggle { display: flex; }
}
@media (min-width: 769px) {
    .sidebar-overlay { display: none !important; }
}

/* --- Upload & Analyze Section --- */
.upload-section {
    padding: 80px 0;
    background: #F0F2F5;
}

.upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
}

.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.upload-zone {
    border: 2px dashed rgba(184, 148, 31, 0.3);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(184, 148, 31, 0.03);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--gold);
    background: rgba(184, 148, 31, 0.08);
}

.upload-icon {
    margin-bottom: 12px;
}

.upload-zone h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 18px;
    margin-bottom: 6px;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.btn-secondary {
    padding: 10px 24px;
    background: transparent;
    border: 1.5px solid var(--gold);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--gold);
    color: white;
}

.upload-preview {
    margin-top: 16px;
}

.preview-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(184, 148, 31, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    display: block;
}

.file-size {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-remove {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
}

.upload-remove:hover {
    color: var(--red);
}

.upload-text-preview {
    margin-top: 12px;
    padding: 12px;
    background: rgba(240, 242, 245, 0.8);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: var(--font-mono);
    line-height: 1.5;
}

.upload-actions {
    margin-top: 16px;
    text-align: center;
}

.upload-analyze-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Analysis Results */
.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.analysis-header h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 20px;
}

.urgency-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.urgency-badge.high { background: #FEE2E2; color: #DC2626; }
.urgency-badge.medium { background: #FEF3C7; color: #D97706; }
.urgency-badge.low { background: #D1FAE5; color: #059669; }

.analysis-summary {
    padding: 12px 16px;
    background: rgba(184, 148, 31, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.analysis-item {
    padding: 14px;
    background: rgba(240, 242, 245, 0.6);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.analysis-item h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.analysis-item div {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.analysis-response {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.analysis-response h4 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 12px;
}

.response-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.response-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-family: var(--font-body);
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.response-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.response-btn.loading {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
    pointer-events: none;
}

.response-output {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 12px;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(184, 148, 31, 0.06);
    border-bottom: 1px solid var(--border);
}

.response-header h4 {
    color: var(--navy);
    font-size: 14px;
    margin: 0;
}

.response-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .response-options {
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .council-models {
        gap: 12px;
    }

    .model-node {
        min-width: 70px;
        padding: 8px 10px;
    }

    .portfolio-wrapper {
        grid-template-columns: 1fr;
    }

    .portfolio-form {
        flex-direction: column;
    }

    .draft-type-grid {
        gap: 6px;
    }

    .draft-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .council-toggle {
        flex-wrap: nowrap;
    }

    .council-mode-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* ─── DASHBOARD ─────────────────────────────────────────────── */
.dashboard-section { padding: 0 0 20px; }

.dash-profile-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(201,168,76,0.03));
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 20px;
}
.dash-profile-left { display: flex; align-items: center; gap: 20px; }
.dash-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #C9A84C, #B8941F);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: #1a1a2e;
    font-family: 'Playfair Display', serif;
    flex-shrink: 0;
}
.dash-profile-info h3 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 4px; font-family: 'Playfair Display', serif; }
.dash-profile-info p { font-size: 14px; color: var(--text-muted); margin: 0 0 8px; }
.dash-role {
    display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px;
    background: rgba(201,168,76,0.12); color: #C9A84C; font-weight: 600; text-transform: capitalize;
}
.dash-admin-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px;
    background: linear-gradient(135deg, #C9A84C, #E8D48B); color: #1a1a2e; font-weight: 700; margin-left: 8px;
}
.dash-profile-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dash-member-since { text-align: right; font-size: 13px; color: var(--text-muted); }
.dash-member-since strong { display: block; color: var(--text); font-size: 15px; margin-top: 2px; }

/* Dashboard Stats */
.dash-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px;
}
.dash-stat-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
    padding: 20px; text-align: center;
    transition: border-color 0.3s, transform 0.2s;
}
.dash-stat-card:hover { border-color: rgba(201,168,76,0.4); transform: translateY(-2px); }
.dash-stat-card svg { margin-bottom: 8px; }
.dash-stat-num { font-size: 32px; font-weight: 800; color: #C9A84C; font-family: 'Playfair Display', serif; }
.dash-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Dashboard History */
.dash-history { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.dash-history-tabs {
    display: flex; border-bottom: 1px solid var(--border); overflow-x: auto;
}
.dash-htab {
    flex: 1; padding: 14px 16px; background: none; border: none; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--text-muted); transition: all 0.3s;
    border-bottom: 3px solid transparent; white-space: nowrap;
}
.dash-htab:hover { color: var(--text); background: rgba(201,168,76,0.05); }
.dash-htab.active { color: #C9A84C; border-bottom-color: #C9A84C; }

.dash-history-list { padding: 16px; max-height: 500px; overflow-y: auto; }
.dash-history-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.dash-history-empty svg { margin-bottom: 12px; opacity: 0.4; }

.dash-history-item {
    display: flex; gap: 14px; padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--border); margin-bottom: 10px;
    transition: border-color 0.3s;
}
.dash-history-item:hover { border-color: rgba(201,168,76,0.3); }
.dash-history-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.dash-history-icon.chat { background: rgba(59,130,246,0.12); color: #3B82F6; }
.dash-history-icon.draft { background: rgba(201,168,76,0.12); color: #C9A84C; }
.dash-history-icon.complaint { background: rgba(16,185,129,0.12); color: #10B981; }
.dash-history-content { flex: 1; min-width: 0; }
.dash-history-content h4 {
    font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-history-content p {
    font-size: 13px; color: var(--text-muted); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dash-history-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

/* ─── LOGIN HISTORY ─────────────────────────────────────────── */
.dash-login-history {
    margin-top: 24px; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}
.dash-section-title {
    display: flex; align-items: center; gap: 8px; padding: 18px 20px 14px;
    font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700;
    color: var(--text-primary); border-bottom: 1px solid var(--border);
}
.dash-login-list { max-height: 400px; overflow-y: auto; }
.dash-login-empty {
    text-align: center; padding: 32px 20px; color: var(--text-muted); font-size: 13px;
}
.dash-login-row {
    display: grid; grid-template-columns: 120px 1fr 110px;
    align-items: center; gap: 12px; padding: 12px 20px;
    border-bottom: 1px solid var(--border); font-size: 13px;
    transition: background 0.2s;
}
.dash-login-row:last-child { border-bottom: none; }
.dash-login-row:hover { background: rgba(184, 148, 31, 0.03); }
.dash-login-row.active-session {
    background: rgba(56, 161, 105, 0.05);
    border-left: 3px solid #38A169;
}
.dash-login-date { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.dash-login-clock { font-size: 11px; color: var(--text-muted); }
.dash-login-details {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.dash-login-device {
    font-size: 12px; color: var(--text-secondary);
}
.dash-login-ip {
    font-size: 11px; color: var(--text-muted);
    background: rgba(10, 22, 40, 0.04); padding: 2px 8px; border-radius: 4px;
    font-family: var(--font-mono);
}
.dash-login-type {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--gold); background: rgba(184, 148, 31, 0.08);
    padding: 2px 6px; border-radius: 4px;
}
.dash-login-duration { text-align: right; }
.dash-login-dur-value { font-size: 12px; color: var(--text-muted); }
.dash-login-active-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    color: #38A169; background: rgba(56, 161, 105, 0.1);
    padding: 2px 8px; border-radius: 10px; margin-right: 6px;
    animation: pulse-spin 2s infinite;
}

@media (max-width: 768px) {
    .dash-login-row {
        grid-template-columns: 1fr; gap: 6px; padding: 10px 16px;
    }
    .dash-login-duration { text-align: left; }
}

/* ─── VOICE BUTTON ──────────────────────────────────────────── */
.voice-btn {
    width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--card-bg); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; flex-shrink: 0; color: var(--text-muted);
}
.voice-btn:hover { border-color: #C9A84C; color: #C9A84C; }
.voice-btn.listening {
    border-color: #E53E3E; color: #E53E3E;
    animation: voicePulse 1.2s infinite;
    box-shadow: 0 0 0 4px rgba(229,62,62,0.15);
}
@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(229,62,62,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(229,62,62,0.08); }
}

/* ─── LOGIN GATE OVERLAY ────────────────────────────────────── */
.login-gate {
    position: relative;
}
.login-gate-overlay {
    position: absolute; inset: 0; z-index: 10;
    background: rgba(26,26,46,0.85);
    backdrop-filter: blur(6px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 12px; gap: 12px; text-align: center; padding: 24px;
}
.login-gate-overlay svg { opacity: 0.7; }
.login-gate-overlay p { color: rgba(255,255,255,0.8); font-size: 15px; margin: 0; }
.login-gate-overlay button {
    padding: 10px 28px; border-radius: 8px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #C9A84C, #E8D48B); color: #1a1a2e;
    font-weight: 700; font-size: 14px; transition: transform 0.2s;
}
.login-gate-overlay button:hover { transform: scale(1.05); }

@media (max-width: 768px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-profile-card { flex-direction: column; align-items: flex-start; padding: 20px; }
    .dash-profile-right { width: 100%; justify-content: space-between; }
    .dash-stat-num { font-size: 24px; }
}

/* ─── JUDGES TRACKER ────────────────────────────────────────── */
.judges-section { padding: 0 0 20px; }

.judge-stats {
    display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.judge-stat {
    flex: 1; min-width: 120px; text-align: center; padding: 16px 12px;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
}
.judge-stat strong {
    display: block; font-size: 28px; font-weight: 800; color: #C9A84C;
    font-family: 'Playfair Display', serif;
}
.judge-stat span { font-size: 12px; color: var(--text-muted); }
.judge-stat.bhavya { border-color: rgba(201,168,76,0.3); background: rgba(201,168,76,0.05); }

.judge-filters {
    display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; align-items: center;
}

.judge-section-title {
    display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700;
    color: var(--text); margin: 28px 0 16px; font-family: 'Playfair Display', serif;
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

.judge-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px;
    margin-bottom: 16px;
}

.judge-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
    padding: 20px; transition: border-color 0.3s, transform 0.2s;
    position: relative; overflow: hidden;
}
.judge-card:hover { border-color: rgba(201,168,76,0.4); transform: translateY(-2px); }
.judge-card.bhavya-judge {
    border-color: rgba(201,168,76,0.25);
    background: linear-gradient(135deg, rgba(201,168,76,0.04), transparent);
}
.judge-card.bhavya-judge::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: linear-gradient(to bottom, #C9A84C, #B8941F);
}

.judge-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.judge-avatar {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; color: #1a1a2e;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #E2E8F0, #CBD5E0);
}
.judge-card.bhavya-judge .judge-avatar {
    background: linear-gradient(135deg, #C9A84C, #E8D48B);
}
.judge-card-name { font-size: 16px; font-weight: 700; color: var(--text); font-family: 'Playfair Display', serif; }
.judge-card-desg { font-size: 12px; color: var(--text-muted); }

.judge-card-bench {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px;
    font-weight: 600; margin-bottom: 10px;
}
.judge-card-bench.Criminal { background: rgba(229,62,62,0.12); color: #E53E3E; }
.judge-card-bench.Civil { background: rgba(59,130,246,0.12); color: #3B82F6; }
.judge-card-bench.Commercial { background: rgba(16,185,129,0.12); color: #10B981; }
.judge-card-bench.IPR { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.judge-card-bench.Tax { background: rgba(245,158,11,0.12); color: #F59E0B; }
.judge-card-bench.Administrative { background: rgba(201,168,76,0.12); color: #C9A84C; }

.judge-areas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.judge-area-tag {
    padding: 2px 8px; border-radius: 4px; font-size: 11px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-muted);
}

.judge-bhavya-cases {
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.judge-bhavya-label {
    font-size: 12px; font-weight: 700; color: #C9A84C; margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.judge-case-item {
    font-size: 12px; color: var(--text-muted); padding: 4px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.judge-case-item:last-child { border-bottom: none; }
.judge-case-num { font-weight: 600; color: var(--text); }
.judge-since { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Judge Stats Grid */
.judge-stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    margin: 12px 0; padding: 10px; border-radius: 10px;
    background: rgba(10, 22, 40, 0.03); border: 1px solid var(--border);
}
.judge-mini-stat {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 6px 4px;
}
.judge-mini-stat-value {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    font-family: 'Inter', sans-serif; line-height: 1.2;
}
.judge-mini-stat-label {
    font-size: 10px; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; margin-top: 2px;
}

/* Notable Expertise */
.judge-notable-section { margin: 10px 0 6px; }
.judge-section-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 6px;
}
.judge-notable-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.judge-notable-tag {
    padding: 2px 8px; border-radius: 4px; font-size: 11px;
    background: rgba(184, 148, 31, 0.08); border: 1px solid rgba(184, 148, 31, 0.2);
    color: var(--gold-dark);
}

/* Background Details (collapsible) */
.judge-details { margin: 8px 0; }
.judge-details-toggle {
    font-size: 11px; font-weight: 600; color: var(--gold);
    cursor: pointer; list-style: none; user-select: none;
    padding: 4px 0; display: flex; align-items: center; gap: 4px;
}
.judge-details-toggle::before { content: '▸'; transition: transform 0.2s; }
.judge-details[open] .judge-details-toggle::before { transform: rotate(90deg); }
.judge-details-toggle::-webkit-details-marker { display: none; }
.judge-background {
    margin-top: 8px; padding: 10px; border-radius: 8px;
    background: rgba(10, 22, 40, 0.02); border: 1px solid var(--border);
}
.judge-bg-item {
    font-size: 11px; color: var(--text-secondary); padding: 3px 0;
    line-height: 1.5; display: flex; align-items: flex-start; gap: 6px;
}
.judge-bg-icon { color: var(--gold); font-size: 6px; margin-top: 5px; flex-shrink: 0; }

/* ===== BHAVYA IMPACT ANALYSIS ===== */
.impact-summary-cards {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.impact-sum-card {
    flex: 1; min-width: 120px; padding: 16px; border-radius: 12px;
    text-align: center; border: 1px solid var(--border);
    background: var(--bg-card);
}
.impact-sum-card.favorable { border-left: 4px solid #38A169; }
.impact-sum-card.unfavorable { border-left: 4px solid #E53E3E; }
.impact-sum-card.adjourned { border-left: 4px solid #F59E0B; }
.impact-sum-card.neutral { border-left: 4px solid #718096; }
.impact-sum-card.total { border-left: 4px solid #C9A84C; }
.impact-sum-num {
    display: block; font-size: 28px; font-weight: 800;
    font-family: 'Playfair Display', serif; color: var(--text-primary); line-height: 1.2;
}
.impact-sum-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-muted); margin-top: 4px; display: block;
}

/* Impact List */
.impact-list {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden;
}
.impact-row {
    display: grid;
    grid-template-columns: 40px 1.5fr 120px 1fr 1fr;
    align-items: center; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid var(--border); transition: background 0.2s;
}
.impact-row:last-child { border-bottom: none; }
.impact-row:hover:not(.impact-header) { background: rgba(184, 148, 31, 0.04); }
.impact-row.impact-header {
    background: rgba(10, 22, 40, 0.03); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted);
    padding: 10px 16px;
}
.impact-rank {
    font-size: 14px; font-weight: 700; color: var(--text-muted); text-align: center;
}
.impact-judge-name {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    font-family: 'Playfair Display', serif;
}
.impact-judge-meta {
    display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap;
}
.impact-side { display: flex; gap: 6px; font-size: 11px; }
.side-pet {
    background: rgba(59, 130, 246, 0.1); color: #3B82F6;
    padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
.side-res {
    background: rgba(139, 92, 246, 0.1); color: #8B5CF6;
    padding: 1px 6px; border-radius: 4px; font-weight: 600;
}

/* Counts */
.impact-counts {
    display: flex; gap: 6px; justify-content: center;
}
.impact-count {
    width: 26px; height: 26px; border-radius: 6px; display: flex;
    align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.impact-count.favorable, .impact-header .favorable { background: rgba(56, 161, 105, 0.12); color: #38A169; }
.impact-count.unfavorable, .impact-header .unfavorable { background: rgba(229, 62, 62, 0.12); color: #E53E3E; }
.impact-count.adjourned, .impact-header .adjourned { background: rgba(245, 158, 11, 0.12); color: #F59E0B; }
.impact-count.neutral, .impact-header .neutral { background: rgba(113, 128, 150, 0.12); color: #718096; }

/* Outcome Bar */
.impact-bar-col { min-width: 0; }
.impact-bar {
    height: 8px; border-radius: 4px; display: flex; overflow: hidden;
    background: rgba(113, 128, 150, 0.12);
}
.impact-bar-seg { height: 100%; transition: width 0.3s; }
.impact-bar-seg.favorable { background: #38A169; }
.impact-bar-seg.adjourned { background: #F59E0B; }
.impact-bar-seg.unfavorable { background: #E53E3E; }
.impact-bar-labels {
    display: flex; justify-content: space-between; margin-top: 4px;
    font-size: 11px; color: var(--text-muted);
}
.impact-indicator { font-size: 10px; font-weight: 700; }
.impact-indicator.favorable { color: #38A169; }
.impact-indicator.unfavorable { color: #E53E3E; }
.impact-indicator.neutral { color: #718096; }

/* Recent Cases */
.impact-cases-col { display: flex; flex-wrap: wrap; gap: 4px; }
.impact-case-chip {
    font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 600;
    white-space: nowrap;
}
.impact-case-chip.favorable { background: rgba(56, 161, 105, 0.1); color: #38A169; }
.impact-case-chip.unfavorable { background: rgba(229, 62, 62, 0.1); color: #E53E3E; }
.impact-case-chip.adjourned { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.impact-case-chip.neutral { background: rgba(113, 128, 150, 0.1); color: #718096; }

@media (max-width: 768px) {
    .impact-row {
        grid-template-columns: 30px 1fr;
        gap: 8px; padding: 12px;
    }
    .impact-row.impact-header .impact-counts,
    .impact-row.impact-header .impact-bar-col,
    .impact-row.impact-header .impact-cases-col { display: none; }
    .impact-counts { grid-column: 1 / -1; justify-content: flex-start; }
    .impact-bar-col { grid-column: 1 / -1; }
    .impact-cases-col { grid-column: 1 / -1; }
    .impact-summary-cards { gap: 8px; }
    .impact-sum-card { min-width: 80px; padding: 12px 8px; }
    .impact-sum-num { font-size: 22px; }
}

@media (max-width: 768px) {
    .judge-grid { grid-template-columns: 1fr; }
    .judge-stats { gap: 8px; }
    .judge-stat { min-width: 80px; padding: 12px 8px; }
    .judge-stat strong { font-size: 22px; }
}

/* ===== ARTICLE RESEARCH & GENERATION ===== */
.article-input-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 28px; margin-bottom: 24px;
}
.article-topic-row { margin-bottom: 16px; }
.article-input-group { width: 100%; }
.article-label {
    display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 6px;
}
.article-topic-input {
    width: 100%; padding: 14px 18px; border-radius: 12px;
    border: 2px solid var(--border); background: #FAFBFC;
    font-size: 16px; font-family: var(--font-body); color: var(--text-primary);
    transition: border-color 0.3s;
}
.article-topic-input:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 148, 31, 0.1);
}
.article-options-row {
    display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.article-opt { flex: 1; min-width: 140px; }
.article-select {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: #FAFBFC;
    font-size: 14px; font-family: var(--font-body); color: var(--text-primary);
    cursor: pointer;
}
.article-select:focus { outline: none; border-color: var(--gold); }
.article-extra-row { margin-bottom: 20px; }
.article-authors-row {
    display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}

/* Article Header Block (title + author in output) */
.article-header-block { text-align: center; margin-bottom: 20px; }
.article-custom-title {
    font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 800;
    color: var(--navy); line-height: 1.3; margin-bottom: 10px;
}
.article-author-line {
    font-size: 15px; color: var(--text-secondary); margin-bottom: 4px;
}
.article-author-desg { color: var(--gold-dark); }
.article-date-line { font-size: 13px; color: var(--text-muted); }
.article-divider {
    border: none; border-top: 2px solid rgba(184, 148, 31, 0.25);
    margin: 16px auto; width: 60%;
}
.article-textarea {
    width: 100%; padding: 12px 16px; border-radius: 10px;
    border: 1px solid var(--border); background: #FAFBFC;
    font-size: 14px; font-family: var(--font-body); color: var(--text-primary);
    resize: vertical;
}
.article-textarea:focus { outline: none; border-color: var(--gold); }
.article-generate-btn {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    width: 100%; padding: 16px; font-size: 16px; border-radius: 12px;
}

/* Progress Steps */
.article-progress {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 24px; margin-bottom: 20px;
}
.article-progress-steps { display: flex; flex-direction: column; gap: 12px; }
.article-step {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 10px;
    background: rgba(10, 22, 40, 0.02); color: var(--text-muted);
    transition: all 0.3s;
}
.article-step.active {
    background: rgba(184, 148, 31, 0.08); color: var(--gold);
    border-left: 3px solid var(--gold);
}
.article-step.active .article-step-icon svg { animation: pulse-spin 1.5s infinite; }
.article-step.done {
    background: rgba(56, 161, 105, 0.08); color: #38A169;
    border-left: 3px solid #38A169;
}
.article-step.error {
    background: rgba(229, 62, 62, 0.08); color: #E53E3E;
    border-left: 3px solid #E53E3E;
}
.article-step-icon { flex-shrink: 0; }
.article-step-text { font-size: 14px; font-weight: 600; }

@keyframes pulse-spin {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Council Model Nodes in Article */
.article-council-nodes {
    display: flex; gap: 12px; justify-content: center;
    margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border);
}
.article-model-node {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 20px; border-radius: 12px;
    background: rgba(10, 22, 40, 0.03); border: 1px solid var(--border);
    transition: all 0.3s; min-width: 90px;
}
.article-model-node.thinking {
    border-color: rgba(184, 148, 31, 0.4);
    background: rgba(184, 148, 31, 0.06);
    animation: pulse-spin 1.5s infinite;
}
.article-model-node.done {
    border-color: rgba(56, 161, 105, 0.4);
    background: rgba(56, 161, 105, 0.06);
}
.article-model-node.error {
    border-color: rgba(229, 62, 62, 0.3);
    background: rgba(229, 62, 62, 0.06);
}
.article-model-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: var(--text-muted);
    background: rgba(10, 22, 40, 0.06);
}
.article-model-node.thinking .article-model-icon { color: var(--gold); background: rgba(184, 148, 31, 0.15); }
.article-model-node.done .article-model-icon { color: #38A169; background: rgba(56, 161, 105, 0.15); }
.article-model-node.error .article-model-icon { color: #E53E3E; background: rgba(229, 62, 62, 0.15); }
.article-model-label { font-size: 11px; font-weight: 700; color: var(--text-primary); }
.article-model-status { font-size: 10px; color: var(--text-muted); }

/* Citations Found */
.article-citations-found {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 24px; margin-bottom: 20px;
}
.article-sub-title {
    display: flex; align-items: center; gap: 8px;
    font-family: 'Playfair Display', serif; font-size: 18px;
    font-weight: 700; color: var(--text-primary); margin-bottom: 16px;
}
.article-citations-list { display: flex; flex-direction: column; gap: 10px; }
.article-citation-card {
    display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px;
    background: rgba(10, 22, 40, 0.02); border: 1px solid var(--border);
    transition: border-color 0.2s;
}
.article-citation-card:hover { border-color: rgba(184, 148, 31, 0.3); }
.article-citation-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--gold);
    background: rgba(184, 148, 31, 0.1);
}
.article-citation-body { flex: 1; min-width: 0; }
.article-citation-title {
    font-size: 14px; font-weight: 600; color: var(--gold-dark);
    text-decoration: none; display: block; line-height: 1.4;
}
.article-citation-title:hover { text-decoration: underline; }
.article-citation-meta {
    display: flex; gap: 12px; font-size: 11px; color: var(--text-muted);
    margin-top: 4px;
}
.article-citation-snippet {
    font-size: 12px; color: var(--text-secondary); margin-top: 6px;
    line-height: 1.5;
}

/* Article Output */
.article-output {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 28px; margin-bottom: 24px;
}
.article-output-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.article-output-actions { display: flex; gap: 8px; }
.btn-outline-sm {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
    border: 1px solid var(--border); background: transparent;
    color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.btn-outline-sm:hover {
    border-color: var(--gold); color: var(--gold);
    background: rgba(184, 148, 31, 0.05);
}
.article-meta-bar {
    display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px;
    border-radius: 8px; background: rgba(184, 148, 31, 0.05);
    font-size: 12px; color: var(--text-muted); margin-bottom: 16px;
    border: 1px solid rgba(184, 148, 31, 0.15);
}
.article-content {
    font-size: 15px; line-height: 1.8; color: var(--text-primary);
}
.article-content h2 {
    font-family: 'Playfair Display', serif; font-size: 22px;
    margin: 28px 0 12px; color: var(--text-primary);
    border-bottom: 2px solid rgba(184, 148, 31, 0.2); padding-bottom: 8px;
}
.article-content h3 {
    font-family: 'Playfair Display', serif; font-size: 18px;
    margin: 24px 0 10px; color: var(--navy-light);
}
.article-content h4 {
    font-size: 16px; font-weight: 700; margin: 20px 0 8px;
    color: var(--text-secondary);
}
.article-content ul { padding-left: 24px; margin: 12px 0; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--navy); }
.article-content em { color: var(--gold-dark); }
.article-footnote {
    font-size: 10px; color: var(--gold); font-weight: 700;
    cursor: default; vertical-align: super;
}
.spinner-sm {
    display: inline-block; width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .article-options-row { flex-direction: column; gap: 10px; }
    .article-input-section { padding: 18px; }
    .article-output { padding: 18px; }
    .article-content h2 { font-size: 18px; }
    .article-output-header { flex-direction: column; }
}

/* ===== JUDGMENT DATABASE SEARCH (Redesigned) ===== */
.js-search-form {
    max-width: 900px; margin: 0 auto 2rem;
    background: linear-gradient(180deg, var(--bg-card), rgba(184,148,31,0.02));
    border: 1px solid var(--border); border-radius: 20px; padding: 28px;
    box-shadow: var(--shadow);
}
.js-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.js-field { display: flex; flex-direction: column; }
.js-field label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; margin-bottom: 6px; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
}
.js-field input, .js-field select {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px;
    background: var(--bg-input); color: var(--text-primary); transition: all 0.2s;
}
.js-field input:hover, .js-field select:hover { border-color: rgba(184,148,31,0.3); }
.js-field input:focus, .js-field select:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,148,31,0.12);
}

/* Loading State — LLM Council Animation */
.js-loading { padding: 48px 24px; text-align: center; }
.js-loading-models {
    display: flex; justify-content: center; gap: 24px; margin-bottom: 20px;
    flex-wrap: wrap;
}
.js-loading-model {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px; border-radius: 24px;
    background: var(--bg-card); border: 1px solid rgba(184,148,31,0.3);
    font-size: 13px; color: var(--text-secondary);
    animation: pulse-fade 1.5s infinite ease-in-out;
}
.js-loading-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
}
@keyframes pulse-fade {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}
.js-loading-status {
    font-size: 14px; color: var(--text-secondary); margin-bottom: 16px;
    font-weight: 500;
}
.js-loading-bar {
    max-width: 300px; height: 3px; background: rgba(10,22,40,0.08);
    border-radius: 2px; margin: 0 auto; overflow: hidden;
}
.js-loading-fill {
    height: 100%; width: 40%;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: progress-slide 1.5s infinite;
}
@keyframes progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

.js-error {
    padding: 40px 20px; text-align: center; border: 1px solid rgba(229,62,62,0.2);
    border-radius: var(--radius); background: rgba(229,62,62,0.03);
}
.js-error-msg { margin-top: 10px; color: var(--text-secondary); font-size: 14px; }

.js-empty { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.js-empty svg { margin-bottom: 12px; }

.js-results { margin-top: 28px; }
.js-results-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.js-result-count {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px;
}
.js-count-num {
    font-size: 22px; font-weight: 800; color: var(--gold);
    font-family: var(--font-heading);
}
.js-ai-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    background: linear-gradient(135deg, rgba(184,148,31,0.15), rgba(184,148,31,0.05));
    color: var(--gold-dark); padding: 3px 10px; border-radius: 12px;
    border: 1px solid rgba(184,148,31,0.25); text-transform: uppercase;
    letter-spacing: 0.5px; margin-left: 8px;
}

.js-results-list { display: flex; flex-direction: column; gap: 14px; }
.js-result-card {
    display: flex; gap: 16px; padding: 20px 22px;
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--bg-card); transition: all 0.2s;
    position: relative;
}
.js-result-card:hover {
    border-color: rgba(184,148,31,0.4);
    box-shadow: 0 4px 20px rgba(184,148,31,0.08);
    transform: translateY(-1px);
}
.js-result-num {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(184,148,31,0.15), rgba(184,148,31,0.05));
    border: 1px solid rgba(184,148,31,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: var(--gold);
    font-family: var(--font-heading);
}
.js-result-body { flex: 1; min-width: 0; }

.js-result-title {
    font-family: var(--font-heading); font-size: 16px; font-weight: 700;
    margin-bottom: 4px; line-height: 1.4;
}
.js-result-title a {
    color: var(--navy); text-decoration: none; transition: color 0.2s;
}
.js-result-title a:hover { color: var(--gold); }
[data-theme="dark"] .js-result-title a { color: var(--text-primary); }

.js-result-citation {
    font-size: 12px; color: var(--gold-dark); font-style: italic;
    margin-bottom: 10px; font-family: var(--font-mono);
}

.js-result-meta {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.js-meta-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; padding: 3px 10px; border-radius: 12px;
    background: rgba(10,22,40,0.04); color: var(--text-secondary);
    font-weight: 500;
}
.js-meta-tag.court {
    background: rgba(184,148,31,0.1); color: var(--gold-dark); font-weight: 600;
}
.js-meta-tag svg { flex-shrink: 0; }

.js-result-snippet {
    font-size: 13px; color: var(--text-secondary); line-height: 1.65;
    margin-bottom: 12px;
}

.js-result-sections {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.js-section-chip {
    font-size: 11px; padding: 2px 10px; border-radius: 4px;
    background: rgba(10,22,40,0.05); color: var(--text-secondary);
    font-weight: 600; font-family: var(--font-mono);
}

/* Legal Source Links */
.js-result-links {
    margin: 12px 0; padding: 12px; border-radius: 10px;
    background: rgba(10,22,40,0.02); border: 1px solid var(--border);
}
.js-result-links-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 8px;
}
.js-result-links-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.js-source-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 6px; text-decoration: none;
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all 0.2s;
}
.js-source-link:hover {
    color: var(--gold); border-color: var(--gold);
    background: rgba(184,148,31,0.04); transform: translateY(-1px);
}
.js-source-icon {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 20px; padding: 0 4px;
    border-radius: 4px; font-size: 9px; font-weight: 800;
    background: var(--gold); color: var(--navy); flex-shrink: 0;
}
.js-source-link.scc .js-source-icon { background: #1E40AF; color: white; }
.js-source-link.manupatra .js-source-icon { background: #7C2D12; color: white; }
.js-source-link.livelaw .js-source-icon { background: #DC2626; color: white; }
.js-source-link.bnb .js-source-icon { background: #059669; color: white; }
.js-source-link.google .js-source-icon { background: #4285F4; color: white; }

@media (max-width: 640px) {
    .js-result-links-grid { grid-template-columns: repeat(2, 1fr); }
}

.js-result-actions {
    display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.js-btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; font-size: 12px; font-weight: 600;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); border: none; border-radius: 6px;
    text-decoration: none; cursor: pointer; transition: all 0.2s;
}
.js-btn-primary:hover {
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(184,148,31,0.35);
}
.js-btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; font-size: 12px; font-weight: 600;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); border-radius: 6px; cursor: pointer;
    transition: all 0.2s; font-family: var(--font-body);
}
.js-btn-secondary:hover {
    border-color: var(--gold); color: var(--gold);
    background: rgba(184,148,31,0.04);
}

@media (max-width: 768px) {
    .js-row { grid-template-columns: 1fr; gap: 12px; }
    .js-search-form { padding: 20px; }
    .js-result-card { padding: 16px; flex-direction: column; gap: 12px; }
    .js-result-num { width: 28px; height: 28px; }
    .js-result-actions { flex-direction: column; }
    .js-btn-primary, .js-btn-secondary { justify-content: center; }
}

/* ===== CITATION TRAIL PANEL ===== */
.citation-trail {
    position: fixed; right: -320px; top: 64px; width: 300px; height: calc(100vh - 64px);
    background: var(--bg-card); border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1); z-index: 100;
    transition: right 0.3s ease; display: flex; flex-direction: column;
}
.citation-trail.open { right: 0; }
.ct-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
.ct-header h4 { font-family: var(--font-heading); font-size: 15px; color: var(--text-primary); }
.ct-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 18px; }
.ct-list { flex: 1; overflow-y: auto; padding: 12px; }
.ct-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; color: var(--text-secondary); transition: background 0.2s; border-bottom: 1px solid var(--border); }
.ct-item:hover { background: rgba(184,148,31,0.06); }
.ct-num { font-weight: 700; color: var(--gold); min-width: 24px; }
.ct-name { line-height: 1.4; }
.ct-footer { padding: 12px; border-top: 1px solid var(--border); }
.ct-badge {
    position: fixed; right: 16px; bottom: 80px; width: 48px; height: 48px;
    border-radius: 50%; background: var(--gold); color: var(--navy);
    display: none; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; cursor: pointer; z-index: 99;
    box-shadow: 0 4px 15px rgba(184,148,31,0.4);
}
.ct-badge.visible { display: flex; }

/* ===== GUIDED LEGAL INTAKE WIZARD ===== */
.wizard-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.wizard-modal { background: var(--bg-card); border-radius: var(--radius-lg); width: 90%; max-width: 640px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.wizard-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); z-index: 10; }
.wizard-progress { display: flex; padding: 20px 24px 0; gap: 4px; }
.wizard-step-ind { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background 0.3s; }
.wizard-step-ind.active { background: var(--gold); }
.wizard-step-ind.done { background: var(--green); }
.wizard-body { padding: 24px; }
.wizard-title { font-family: var(--font-heading); font-size: 22px; margin-bottom: 8px; color: var(--text-primary); }
.wizard-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.wizard-pane { display: none; }
.wizard-pane.active { display: block; animation: tabFadeIn 0.3s ease; }
.wizard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.wizard-card { padding: 16px 12px; border: 2px solid var(--border); border-radius: var(--radius); text-align: center; cursor: pointer; transition: all 0.2s; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.wizard-card:hover { border-color: var(--gold); color: var(--gold); }
.wizard-card.selected { border-color: var(--gold); background: rgba(184,148,31,0.08); color: var(--gold-dark); }
.wizard-card svg { display: block; margin: 0 auto 8px; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 24px; }
.wizard-result { padding: 16px; background: var(--bg-input); border-radius: var(--radius); border: 1px solid var(--border); font-size: 14px; line-height: 1.7; max-height: 300px; overflow-y: auto; }

/* ===== BULK DOCUMENT UPLOAD ===== */
.bulk-file-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.bulk-file-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; }
.bulk-file-item .file-name { font-weight: 600; color: var(--text-primary); }
.bulk-file-item .file-size { color: var(--text-muted); }
.bulk-file-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 16px; font-weight: 700; }
.bulk-actions { display: flex; gap: 10px; margin-top: 12px; }

/* ===== MATTER MANAGEMENT ===== */
.matter-selector { padding: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.matter-select { width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 12px; background: var(--bg-input); color: var(--text-primary); }
.matter-create-btn { width: 100%; margin-top: 6px; padding: 6px; font-size: 11px; background: none; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.matter-create-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ===== PRICING SECTION ===== */
.pricing-section { padding: 80px 0; background: linear-gradient(180deg, var(--bg-section), var(--bg-body)); }
.pricing-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 1100px; margin: 0 auto;
}
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 32px 24px; position: relative; transition: transform 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.pricing-card.featured {
    border: 2px solid var(--gold); box-shadow: var(--shadow-gold);
    background: linear-gradient(180deg, rgba(184,148,31,0.03), transparent);
}
.pricing-popular {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy);
    font-size: 11px; font-weight: 800; padding: 4px 16px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 1px; white-space: nowrap;
}
.pricing-header { text-align: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.pricing-name { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.pricing-price { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.pricing-currency { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.pricing-amount { font-size: 42px; font-weight: 800; color: var(--text-primary); font-family: var(--font-heading); line-height: 1; }
.pricing-period { font-size: 14px; color: var(--text-muted); margin-left: 4px; }
.pricing-desc { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.pricing-features { list-style: none; flex: 1; margin-bottom: 24px; }
.pricing-features li {
    padding: 8px 0; font-size: 13px; display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.pricing-features li.included { color: var(--text-primary); }
.pricing-features li.included::before { content: '✓'; color: var(--green); font-weight: 700; font-size: 14px; }
.pricing-features li.excluded { color: var(--text-muted); opacity: 0.5; }
.pricing-features li.excluded::before { content: '—'; color: var(--text-muted); font-size: 14px; }
.pricing-btn {
    width: 100%; padding: 12px; border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s;
    background: transparent; color: var(--text-primary); font-family: var(--font-body);
}
.pricing-btn:hover { border-color: var(--gold); color: var(--gold); }
.pricing-btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy);
    border-color: transparent;
}
.pricing-btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(184,148,31,0.4); color: var(--navy); }
.pricing-btn.current { background: var(--navy); color: white; border-color: var(--navy); cursor: default; }

@media (max-width: 1024px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; max-width: 360px; } }

/* ===== DASHBOARD SECTION TABS ===== */
.dash-section-tabs {
    display: flex; gap: 4px; margin-bottom: 24px; padding: 6px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow);
}
.dash-sec-tab {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; font-size: 13px; font-weight: 600;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    background: transparent; color: var(--text-muted); white-space: nowrap;
    font-family: var(--font-body); transition: all 0.2s;
    flex: 1; justify-content: center;
}
.dash-sec-tab.active {
    background: var(--navy); color: white;
    box-shadow: 0 2px 8px rgba(10, 22, 40, 0.15);
}
[data-theme="dark"] .dash-sec-tab.active { background: var(--gold-dark); color: #0B1120; }
.dash-sec-tab:hover:not(.active) {
    background: rgba(10, 22, 40, 0.05); color: var(--text-primary);
}
.dash-sec-panel { display: none; animation: tabFadeIn 0.3s ease; }
.dash-sec-panel.active { display: block; }

@media (max-width: 768px) {
    .dash-sec-tab { padding: 8px 10px; font-size: 11px; }
    .dash-sec-tab svg { width: 14px; height: 14px; }
}

/* ===== DASHBOARD PLAN SECTION ===== */
.dash-plan-section {
    margin-top: 24px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
}
.dash-plan-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 20px; gap: 20px; flex-wrap: wrap;
}
.dash-plan-current { margin-bottom: 12px; }
.dash-plan-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-muted); display: block; margin-bottom: 4px;
}
.dash-plan-name {
    font-family: var(--font-heading); font-size: 28px; font-weight: 800;
    color: var(--gold); display: inline-block;
}
.dash-plan-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    background: rgba(56, 161, 105, 0.1); color: #38A169;
    padding: 2px 10px; border-radius: 12px; margin-left: 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.dash-plan-details { display: flex; gap: 24px; flex-wrap: wrap; }
.dash-plan-detail { font-size: 13px; color: var(--text-secondary); }
.dash-plan-detail strong { color: var(--text-primary); margin-left: 4px; }
.dash-plan-actions { flex-shrink: 0; }

/* Purchase History */
.dash-purchase-list { padding: 0 20px 20px; }
.dash-purchase-row {
    display: grid; grid-template-columns: 1fr 100px 100px 80px;
    gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 13px; align-items: center;
}
.dash-purchase-row:last-child { border-bottom: none; }
.dash-purchase-plan { font-weight: 700; color: var(--text-primary); }
.dash-purchase-amount { font-weight: 600; color: var(--gold); }
.dash-purchase-date { color: var(--text-muted); }
.dash-purchase-status { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.dash-purchase-status.success { color: #38A169; }
.dash-purchase-status.pending { color: #F59E0B; }
.dash-purchase-status.failed { color: #E53E3E; }

@media (max-width: 768px) {
    .dash-plan-card { flex-direction: column; align-items: flex-start; }
    .dash-purchase-row { grid-template-columns: 1fr 1fr; gap: 6px; }
}

/* ===== UPGRADE MODAL ===== */
.upgrade-modal-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(10, 22, 40, 0.6); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; transition: opacity 0.25s ease;
}
.upgrade-modal-overlay.visible { opacity: 1; }
.upgrade-modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; padding: 40px 32px 28px; max-width: 420px; width: 100%;
    text-align: center; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.94) translateY(10px); transition: transform 0.25s ease;
    background-image: linear-gradient(180deg, rgba(184,148,31,0.04), transparent 120px);
}
.upgrade-modal-overlay.visible .upgrade-modal { transform: scale(1) translateY(0); }

.upgrade-modal-close {
    position: absolute; top: 14px; right: 14px;
    background: none; border: none; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%;
    font-size: 22px; color: var(--text-muted); line-height: 1;
    transition: all 0.2s;
}
.upgrade-modal-close:hover { background: rgba(10,22,40,0.06); color: var(--text-primary); }

.upgrade-modal-icon {
    font-size: 36px; width: 72px; height: 72px; margin: 0 auto 16px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(184,148,31,0.15), rgba(184,148,31,0.05));
    border: 1px solid rgba(184,148,31,0.25);
}

.upgrade-modal-title {
    font-family: var(--font-heading); font-size: 24px; font-weight: 700;
    color: var(--text-primary); margin-bottom: 8px; line-height: 1.3;
}
.upgrade-modal-title span { color: var(--gold); }

.upgrade-modal-subtitle {
    font-size: 14px; color: var(--text-muted); margin-bottom: 24px;
    line-height: 1.5;
}

.upgrade-modal-plan {
    background: linear-gradient(135deg, rgba(10,22,40,0.02), rgba(184,148,31,0.04));
    border: 1px solid rgba(184,148,31,0.2);
    border-radius: 14px; padding: 20px; margin-bottom: 24px;
    position: relative;
}
.upgrade-plan-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); font-size: 10px; font-weight: 800;
    padding: 3px 12px; border-radius: 12px;
    text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap;
}
.upgrade-plan-name {
    font-family: var(--font-heading); font-size: 22px; font-weight: 800;
    color: var(--text-primary); margin-top: 4px;
}
.upgrade-plan-price {
    font-size: 20px; font-weight: 700; color: var(--gold);
    margin: 4px 0;
}
.upgrade-plan-desc {
    font-size: 12px; color: var(--text-muted); font-style: italic;
}

.upgrade-modal-actions {
    display: flex; gap: 10px; margin-bottom: 14px;
}
.upgrade-btn-cancel {
    flex: 1; padding: 11px; font-size: 13px; font-weight: 600;
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-secondary); cursor: pointer;
    font-family: var(--font-body); transition: all 0.2s;
}
.upgrade-btn-cancel:hover { border-color: var(--text-muted); color: var(--text-primary); }
.upgrade-btn-primary {
    flex: 1.5; padding: 11px; font-size: 13px; font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy); border: none; border-radius: var(--radius);
    cursor: pointer; font-family: var(--font-body); transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.upgrade-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(184,148,31,0.4);
}

.upgrade-modal-link {
    background: none; border: none; cursor: pointer;
    font-size: 12px; color: var(--text-muted); font-weight: 600;
    font-family: var(--font-body); transition: color 0.2s;
}
.upgrade-modal-link:hover { color: var(--gold); }

@media (max-width: 480px) {
    .upgrade-modal { padding: 32px 20px 20px; }
    .upgrade-modal-actions { flex-direction: column; }
}

/* ===== Google Docs modal — live preview + edit link ===== */
.gdoc-modal {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.gdoc-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
}
.gdoc-modal-card {
    position: relative;
    width: min(1100px, 96vw);
    height: min(88vh, 900px);
    background: var(--bg, #fff);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
    display: flex; flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}
.gdoc-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    gap: 12px;
}
.gdoc-modal-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gdoc-modal-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.gdoc-modal-actions .btn-primary,
.gdoc-modal-actions .btn-outline-sm {
    font-size: 12px;
    padding: 6px 12px;
}
.gdoc-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}
.gdoc-modal-hint {
    padding: 10px 20px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--card);
    text-align: center;
}

/* ===== Per-section complaint cards ===== */
.complaint-section-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: 14px 0;
    background: var(--card);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.complaint-section-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.complaint-section-card .cs-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--card-hover, rgba(0,0,0,0.02));
    position: sticky;
    top: 0;
    z-index: 2;
}
.complaint-section-card .cs-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.3px;
}
.complaint-section-card .cs-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.complaint-section-card .cs-actions .btn-outline-sm {
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 6px;
}
.complaint-section-card .cs-body {
    padding: 16px 18px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 480px;
    overflow-y: auto;
}
.complaint-section-card .cs-body[contenteditable="true"] {
    outline: 2px dashed var(--accent);
    outline-offset: -2px;
    background: rgba(212, 175, 55, 0.04);
}
.complaint-section-card.section-just-updated {
    border-color: var(--gold, #d4af37);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

/* ===== Claude-style complaint refinement ===== */
.section-just-updated {
    animation: sectionPulse 3s ease-out;
    border-left: 3px solid var(--gold);
    padding-left: 10px;
    border-radius: 3px;
}
@keyframes sectionPulse {
    0%   { background: rgba(212, 175, 55, 0.25); }
    30%  { background: rgba(212, 175, 55, 0.18); }
    100% { background: transparent; }
}

.complaint-chips .chip:hover {
    background: rgba(212, 175, 55, 0.12) !important;
    border-color: var(--gold) !important;
}

.doc-msg.typing .doc-msg-bubble::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: typingDot 1s infinite;
    vertical-align: middle;
}
@keyframes typingDot {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
}

/* ===== My Documents dashboard ===== */
#myDocumentsList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.doc-group-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 14px 0 4px;
}
.doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    transition: border-color 0.15s, transform 0.15s;
}
.doc-row:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}
.doc-row-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 2px;
}
.doc-row-meta {
    font-size: 12px;
    color: var(--muted);
}
.doc-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
.empty-state svg { margin-bottom: 12px; opacity: 0.5; }

/* ===== Live editing state ===== */
.doc-preview-body.editing {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.03);
    min-height: 300px;
    cursor: text;
}
.doc-preview-body.editing:focus {
    outline-color: var(--gold-light, #D4B94A);
    outline-offset: 6px;
}
.doc-preview-body.editing * {
    cursor: text !important;
}
.autosave-indicator {
    font-size: 11px;
    color: var(--muted);
    padding: 0 8px;
    transition: opacity 0.3s;
    align-self: center;
}

/* ===== Step-by-step Complaint Wizard ===== */
.complaint-wizard {
    max-width: 640px;
    margin: 24px auto;
    padding: 28px 28px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    animation: wizardFadeIn 0.25s ease-out;
}
@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.wizard-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 6px;
}
.wizard-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 16px;
    line-height: 1.5;
}
.wizard-progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light, #D4B94A));
    transition: width 0.3s ease-out;
}
.wizard-step-count {
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    margin-bottom: 18px;
}
.wizard-body {
    min-height: 160px;
    margin-bottom: 20px;
}
.wizard-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.wizard-field input,
.wizard-field textarea,
.wizard-field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.15s;
}
.wizard-field input:focus,
.wizard-field textarea:focus,
.wizard-field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.wizard-hint {
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 0;
    font-style: italic;
}
.wizard-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.wizard-footer button {
    min-width: 120px;
}
.wizard-footer button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.wiz-date-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
}
.wiz-date-row .wiz-date { flex: 0 0 140px; }
.wiz-date-row .wiz-event { flex: 1; }
.wiz-date-row button { flex: 0 0 auto; }

/* ========================================================================
   CLAUDE-STYLE HOME PAGE (v21)
   Cream paper + burnt-orange accents + hand-drawn SVG aesthetic.
   ======================================================================== */

.home-claude {
    background: var(--claude-cream);
    color: var(--claude-ink);
    font-family: var(--font-sans-modern);
}

.home-claude .container-x {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.home-claude .serif-badge {
    font-family: var(--font-serif-display);
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--claude-burnt);
    display: inline-block;
    margin-bottom: 20px;
}

/* Hero badge row: Beta tag + "Built for…" serif badge side by side */
.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.hero-badge-row .serif-badge {
    margin-bottom: 0;
}

/* Beta badge — live dot + uppercase label */
.beta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(184, 148, 31, 0.12);
    color: #8a6e17;
    border: 1px solid rgba(184, 148, 31, 0.35);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    line-height: 1;
}
.beta-badge .beta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C9A84C;
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.6);
    animation: beta-pulse 1.8s ease-out infinite;
}
@keyframes beta-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
}

/* Nav Beta pill — compact for the header */
.nav-beta-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #C9A84C;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    vertical-align: middle;
    text-transform: uppercase;
}

.home-claude h1.home-h1 {
    font-family: var(--font-serif-display);
    font-weight: 500;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--claude-ink);
    margin: 0 0 20px;
}

.home-claude h2.home-h2 {
    font-family: var(--font-serif-display);
    font-weight: 500;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--claude-ink);
    margin: 0 0 16px;
}

.home-claude .home-sub {
    font-family: var(--font-sans-modern);
    font-size: 20px;
    line-height: 1.5;
    color: var(--claude-ink);
    opacity: 0.7;
    max-width: 640px;
}

/* ===== Hero ===== */
.home-hero {
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    background: var(--claude-cream);
}
.home-hero .hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}
@media (max-width: 860px) {
    .home-hero .hero-grid { grid-template-columns: 1fr; gap: 30px; }
}
.home-hero-svg {
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0 auto;
    display: block;
}
.home-hero-svg path,
.home-hero-svg line,
.home-hero-svg circle {
    stroke: var(--claude-ink);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 1.8s var(--ease-claude) forwards;
}
@keyframes draw {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

.typewriter {
    display: inline-block;
    font-family: var(--font-sans-modern);
    font-size: 18px;
    color: var(--claude-burnt);
    border-right: 2px solid var(--claude-burnt);
    padding-right: 4px;
    white-space: nowrap;
    overflow: hidden;
    margin-top: 28px;
    min-height: 28px;
    animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink {
    50% { border-color: transparent; }
}

.home-cta-row {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.home-btn-primary {
    background: var(--claude-burnt);
    color: #fff;
    border: none;
    padding: 14px 26px;
    border-radius: 8px;
    font-family: var(--font-sans-modern);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s var(--ease-claude);
    text-decoration: none;
    display: inline-block;
}
.home-btn-primary:hover { background: #b04f31; transform: translateY(-1px); }
.home-btn-outline {
    background: transparent;
    color: var(--claude-ink);
    border: 1.5px solid var(--claude-ink);
    padding: 13px 26px;
    border-radius: 8px;
    font-family: var(--font-sans-modern);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s var(--ease-claude);
    text-decoration: none;
    display: inline-block;
}
.home-btn-outline:hover { background: var(--claude-ink); color: var(--claude-cream); }

/* ===== Trust bar ===== */
.home-trust {
    background: var(--claude-paper);
    padding: 28px 0;
    text-align: center;
    font-family: var(--font-serif-display);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.02em;
    color: var(--claude-pencil);
}

/* ===== Section wrappers ===== */
.home-section { padding: 100px 0; }
.home-section.paper { background: var(--claude-paper); }
.home-section .section-top { text-align: center; margin-bottom: 60px; }

/* ===== One input, seven documents ===== */
.one-to-seven {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
@media (max-width: 860px) {
    .one-to-seven { grid-template-columns: 1fr; }
}
.chat-bubble-demo {
    background: #fff;
    border-radius: 16px;
    padding: 22px 26px;
    box-shadow: 0 10px 30px rgba(26, 25, 24, 0.05);
    border: 1px solid #ece4d2;
    font-size: 15px;
    line-height: 1.6;
    color: var(--claude-ink);
    position: relative;
}
.chat-bubble-demo::before {
    content: '';
    position: absolute;
    left: -10px; top: 20px;
    width: 20px; height: 20px;
    background: #fff;
    border-left: 1px solid #ece4d2;
    border-bottom: 1px solid #ece4d2;
    transform: rotate(45deg);
}
.doc-stack {
    position: relative;
    height: 360px;
}
.doc-stack .doc-card {
    position: absolute;
    width: 220px;
    height: 300px;
    background: #fff;
    border: 1px solid #ece4d2;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(26, 25, 24, 0.08);
    padding: 20px;
    font-size: 11px;
    color: var(--claude-pencil);
    transition: transform 0.4s var(--ease-claude);
    transform-origin: center;
}
.doc-stack .doc-card:nth-child(1) { top: 0; left: 10%; transform: rotate(-8deg); }
.doc-stack .doc-card:nth-child(2) { top: 10px; left: 20%; transform: rotate(-4deg); }
.doc-stack .doc-card:nth-child(3) { top: 20px; left: 30%; transform: rotate(0deg); }
.doc-stack .doc-card:nth-child(4) { top: 30px; left: 40%; transform: rotate(3deg); }
.doc-stack .doc-card:nth-child(5) { top: 40px; left: 50%; transform: rotate(6deg); }
.doc-stack .doc-card:nth-child(6) { top: 50px; left: 60%; transform: rotate(9deg); }
.doc-stack .doc-card:nth-child(7) { top: 60px; left: 70%; transform: rotate(12deg); }
.doc-stack:hover .doc-card { transform: rotate(0deg) translateY(-4px); }
.doc-stack .doc-card h5 { font-family: var(--font-serif-display); font-size: 13px; margin: 0 0 10px; color: var(--claude-ink); }
.doc-stack .doc-card .lines div { height: 6px; background: #ece4d2; margin-bottom: 6px; border-radius: 2px; }
.doc-stack .doc-card .lines div:nth-child(2) { width: 80%; }
.doc-stack .doc-card .lines div:nth-child(3) { width: 60%; }

/* ===== How it thinks (Council visualization) ===== */
.council-viz {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 320px;
    margin: 0 auto;
}
.council-node {
    position: absolute;
    width: 120px; height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif-display);
    font-weight: 500;
    background: #fff;
    border: 2px solid var(--claude-ink);
    box-shadow: 0 8px 24px rgba(26, 25, 24, 0.08);
}
.council-node.n1 { top: 0; left: 50%; transform: translateX(-50%); background: #faf9f6; }
.council-node.n2 { bottom: 0; left: 10%; background: #faf9f6; }
.council-node.n3 { bottom: 0; right: 10%; background: var(--claude-burnt); color: #fff; border-color: var(--claude-burnt); }
.council-line {
    position: absolute;
    height: 2px;
    background: var(--claude-ink);
    opacity: 0.4;
    animation: pulse-line 2.4s ease-in-out infinite;
}
@keyframes pulse-line {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}
.council-line.l1 { top: 110px; left: calc(50% - 120px); width: 120px; transform: rotate(40deg); transform-origin: left; }
.council-line.l2 { top: 110px; right: calc(50% - 120px); width: 120px; transform: rotate(-40deg); transform-origin: right; }
.council-line.l3 { bottom: 60px; left: 25%; width: 50%; }

/* ===== Feature grid ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 860px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    .feature-grid { grid-template-columns: 1fr; }
}
.feature-card-claude {
    background: #fff;
    border: 1px solid #ece4d2;
    border-radius: 14px;
    padding: 28px;
    transition: all 0.3s var(--ease-claude);
}
.feature-card-claude:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(26, 25, 24, 0.08); }
.feature-card-claude .feat-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.feature-card-claude .feat-icon svg { width: 48px; height: 48px; }
.feature-card-claude .feat-icon path,
.feature-card-claude .feat-icon line,
.feature-card-claude .feat-icon circle,
.feature-card-claude .feat-icon rect {
    stroke: var(--claude-ink);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.feature-card-claude h3 { font-family: var(--font-serif-display); font-weight: 500; font-size: 20px; margin: 0 0 8px; color: var(--claude-ink); }
.feature-card-claude p { font-size: 14px; line-height: 1.6; color: var(--claude-pencil); margin: 0; }

/* ===== Day timeline ===== */
.day-timeline { position: relative; padding-left: 32px; border-left: 1.5px dashed var(--claude-pencil); max-width: 720px; margin: 0 auto; }
.day-timeline .tl-item { margin-bottom: 40px; position: relative; opacity: 0; transform: translateY(20px); transition: all 0.6s var(--ease-claude); }
.day-timeline .tl-item.visible { opacity: 1; transform: translateY(0); }
.day-timeline .tl-item::before {
    content: ''; position: absolute; left: -40px; top: 8px; width: 16px; height: 16px;
    background: var(--claude-cream); border: 2px solid var(--claude-burnt); border-radius: 50%;
}
.day-timeline .tl-time { font-family: var(--font-serif-display); font-style: italic; color: var(--claude-burnt); font-size: 14px; }
.day-timeline .tl-moment { font-family: var(--font-serif-display); font-size: 22px; font-weight: 500; margin: 4px 0 8px; color: var(--claude-ink); }
.day-timeline .tl-detail { color: var(--claude-pencil); font-size: 15px; line-height: 1.6; max-width: 520px; }

/* ===== Testimonials ===== */
.testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 860px) {
    .testi-grid { grid-template-columns: 1fr; }
}
.testi-card {
    background: var(--claude-cream);
    border: 1px solid #e5ddc9;
    border-radius: 10px;
    padding: 28px 26px;
    box-shadow: 0 10px 28px rgba(26, 25, 24, 0.06);
}
.testi-card:nth-child(1) { transform: rotate(-2deg); }
.testi-card:nth-child(2) { transform: rotate(1deg); }
.testi-card:nth-child(3) { transform: rotate(-1deg); }
.testi-card blockquote { font-family: var(--font-serif-display); font-size: 18px; line-height: 1.55; color: var(--claude-ink); margin: 0 0 16px; }
.testi-card .testi-who { font-size: 13px; color: var(--claude-pencil); font-weight: 500; }

/* ===== CTA ===== */
.home-cta { padding: 120px 0; text-align: center; background: var(--claude-cream); }

/* ===== Join Waitlist ===== */
.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-top: 20px;
}
.waitlist-row {
    display: flex;
    gap: 12px;
}
.waitlist-row > * { flex: 1; }
.waitlist-form input,
.waitlist-form select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--font-sans-modern);
    color: var(--claude-ink);
    background: #fff;
    border: 1px solid #d9cfbc;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.waitlist-form input:focus,
.waitlist-form select:focus {
    border-color: var(--claude-burnt);
    box-shadow: 0 0 0 3px rgba(199, 91, 60, 0.12);
}
.waitlist-form input::placeholder { color: #a89780; }
.waitlist-status {
    min-height: 20px;
    font-size: 13px;
    margin: 6px 0 0;
    text-align: center;
    color: var(--claude-pencil);
}
.waitlist-status.ok { color: #2f7a3a; }
.waitlist-status.err { color: #b03030; }
@media (max-width: 600px) {
    .waitlist-row { flex-direction: column; }
}

/* ===== Sarathi Credits Badge ===== */
.credits-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 12px !important;
    background: linear-gradient(135deg, rgba(184,148,31,0.12), rgba(184,148,31,0.04));
    border: 1px solid rgba(184,148,31,0.35);
    border-radius: 999px;
    cursor: pointer;
    color: var(--gold, #B8941F);
    font-weight: 600;
    transition: all 0.15s;
}
.credits-badge:hover {
    background: linear-gradient(135deg, rgba(184,148,31,0.22), rgba(184,148,31,0.08));
    border-color: var(--gold, #B8941F);
    transform: translateY(-1px);
}
.credits-badge .credits-count { font-size: 14px; font-weight: 700; }
.credits-badge .credits-label { font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.8; }
@media (max-width: 900px) {
    .credits-badge .credits-label { display: none; }
}

/* ===== Buy Credits Modal ===== */
.credits-modal {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.credits-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(10, 22, 40, 0.55);
    backdrop-filter: blur(4px);
}
.credits-modal-card {
    position: relative;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #1a1a1a);
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 680px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-height: 90vh; overflow-y: auto;
}
.credits-modal-close {
    position: absolute; top: 12px; right: 16px;
    background: transparent; border: none;
    font-size: 28px; line-height: 1; cursor: pointer;
    color: var(--text-muted, #777);
}
.credits-modal-close:hover { color: var(--text-primary, #000); }
.credits-modal-header h3 {
    margin: 0 0 6px;
    font-family: var(--font-heading, serif);
    font-size: 24px;
}
.credits-modal-sub {
    margin: 0 0 10px;
    color: var(--text-muted, #666);
    font-size: 13.5px;
}
.credits-balance-line {
    font-size: 13px;
    color: var(--text-secondary, #333);
    margin-bottom: 18px;
    padding: 8px 12px;
    background: rgba(184,148,31,0.06);
    border-radius: 8px;
    display: inline-block;
}
.credits-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.credit-tier {
    position: relative;
    text-align: left;
    padding: 18px 16px;
    background: var(--bg-input, #fafafa);
    border: 1.5px solid var(--border, #e5e5e5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    color: inherit;
}
.credit-tier:hover {
    border-color: var(--gold, #B8941F);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(184,148,31,0.15);
}
.credit-tier.popular {
    border-color: var(--gold, #B8941F);
    background: linear-gradient(180deg, rgba(184,148,31,0.08), rgba(184,148,31,0.02));
}
.tier-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--gold, #B8941F); color: #0A1628;
    padding: 2px 10px; border-radius: 999px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.tier-name { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted, #666); font-weight: 600; }
.tier-credits { font-size: 16px; font-weight: 700; margin-top: 6px; }
.tier-price { font-size: 24px; font-weight: 700; margin-top: 8px; color: var(--gold-dark, #9A7E1A); }
.tier-per { font-size: 11px; color: var(--text-muted, #888); margin-top: 2px; }
.credits-modal-footnote {
    font-size: 12px;
    color: var(--text-muted, #666);
    margin: 0;
    line-height: 1.5;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--border, #eee);
}
.credits-modal-footnote a { color: var(--gold, #B8941F); }
@media (max-width: 600px) {
    .credits-tiers { grid-template-columns: 1fr; }
    .credits-modal-card { padding: 28px 18px 20px; }
}

/* ===== Micro text below hero CTA ===== */
.home-micro {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--claude-pencil);
    letter-spacing: 0.3px;
}

/* ===== Plans grid ===== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0 36px;
}
@media (max-width: 900px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card {
    position: relative;
    background: #fff;
    border: 1.5px solid #e7dcc3;
    border-radius: 16px;
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(10,22,40,0.03);
    transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}
.plan-card:hover { border-color: var(--claude-burnt); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(199,91,60,0.08); }
.plan-card.featured {
    border-color: var(--claude-burnt);
    background: linear-gradient(180deg, #fffaf3, #fff);
}
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--claude-burnt, #c75b3c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.plan-name {
    font-family: var(--font-serif-display);
    font-weight: 500;
    font-size: 22px;
    margin: 0;
    color: var(--claude-ink);
}
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.price-value { font-family: var(--font-serif-display); font-size: 38px; font-weight: 500; color: var(--claude-ink); }
.price-period { color: var(--claude-pencil); font-size: 13px; }
.plan-desc { font-size: 13.5px; color: var(--claude-pencil); margin: 0; }
.plan-features { list-style: none; padding: 0; margin: 4px 0 16px; }
.plan-features li {
    font-size: 13.5px;
    padding: 6px 0 6px 22px;
    position: relative;
    color: var(--claude-ink);
    border-bottom: 1px dashed rgba(199,91,60,0.15);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--claude-burnt);
    font-weight: 700;
}
.plan-cta {
    display: inline-block;
    text-align: center;
    padding: 12px 18px;
    border: 1.5px solid var(--claude-burnt);
    color: var(--claude-burnt);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.18s;
}
.plan-cta:hover { background: var(--claude-burnt); color: #fff; }
.plan-cta.primary { background: var(--claude-burnt); color: #fff; }
.plan-cta.primary:hover { background: #b04f31; }

/* ===== Credits explainer ===== */
.credits-explainer {
    margin: 10px 0 0;
    padding: 26px;
    background: #fffaf3;
    border: 1.5px solid #f0dfc7;
    border-radius: 16px;
}
.credits-explainer-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
    color: var(--claude-burnt);
}
.credits-explainer-head h3 {
    font-family: var(--font-serif-display);
    font-size: 20px;
    margin: 0 0 4px;
    color: var(--claude-ink);
}
.credits-explainer-head p {
    font-size: 13.5px;
    color: var(--claude-pencil);
    margin: 0;
    max-width: 640px;
}
.credits-tier-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
@media (max-width: 640px) { .credits-tier-row { grid-template-columns: 1fr; } }
.credit-tier-lite {
    background: #fff;
    border: 1.5px solid #e7dcc3;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}
.credit-tier-lite.featured {
    border-color: var(--claude-burnt);
    background: linear-gradient(180deg, #fff, #fffaf3);
}
.credit-tier-lite > div {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--claude-pencil);
    font-weight: 600;
}
.credit-tier-lite strong {
    display: block;
    font-family: var(--font-serif-display);
    font-size: 18px;
    font-weight: 500;
    margin: 6px 0 2px;
    color: var(--claude-ink);
}
.credit-tier-lite span {
    font-size: 14px;
    color: var(--claude-burnt);
    font-weight: 700;
}
.credits-footnote {
    text-align: center;
    font-size: 12.5px;
    color: var(--claude-pencil);
    margin: 14px 0 0;
}

/* ===== Founders ===== */
.founders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-top: 28px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 760px) { .founders-grid { grid-template-columns: 1fr; } }
.founder-card {
    background: #fff;
    border: 1.5px solid #e7dcc3;
    border-radius: 16px;
    padding: 28px 26px;
    text-align: left;
}
.founder-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--claude-burnt), #9a4224);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 20px;
    font-family: var(--font-serif-display);
    margin-bottom: 14px;
}
.founder-card h3 {
    font-family: var(--font-serif-display);
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 4px;
    color: var(--claude-ink);
}
.founder-role {
    font-size: 13px;
    color: var(--claude-burnt);
    font-weight: 600;
    margin: 0 0 10px;
    letter-spacing: 0.3px;
}
.founder-bio {
    font-size: 13.5px;
    color: var(--claude-pencil);
    line-height: 1.65;
    margin: 0 0 12px;
}
.founder-link {
    font-size: 13px;
    color: var(--claude-burnt);
    text-decoration: none;
    border-bottom: 1px dashed var(--claude-burnt);
}
.founder-link:hover { border-bottom-style: solid; }

/* ===== Footer ===== */
.home-footer-lite {
    background: var(--claude-cream);
    border-top: 1px solid #ece4d2;
    padding: 48px 0 24px;
    color: var(--claude-pencil);
    font-size: 13px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 32px;
    max-width: 1120px;
    margin: 0 auto 28px;
    padding: 0 24px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-grid strong {
    font-family: var(--font-serif-display);
    font-weight: 500;
    font-size: 18px;
    color: var(--claude-ink);
    display: block;
    margin-bottom: 8px;
}
.footer-blurb { margin: 0; max-width: 260px; }
.footer-grid h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--claude-ink);
    margin: 0 0 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.footer-grid nav a {
    display: block;
    color: var(--claude-pencil);
    text-decoration: none;
    padding: 4px 0;
    font-size: 13px;
}
.footer-grid nav a:hover { color: var(--claude-burnt); }
.footer-bottom {
    text-align: center;
    padding: 18px 24px 0;
    border-top: 1px solid #ece4d2;
    max-width: 1120px;
    margin: 0 auto;
    font-size: 12.5px;
}
.footer-bottom a { color: var(--claude-burnt); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* ===== Legal-copy (privacy/terms/disclaimer modal content) ===== */
.legal-copy h4 {
    margin: 16px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}
.legal-copy p {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 8px;
}
.legal-copy a { color: var(--gold, #B8941F); }

/* ===== Scroll reveal ===== */
.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-claude), transform 0.6s var(--ease-claude); }
.reveal-up.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .home-hero-svg path, .home-hero-svg line, .home-hero-svg circle { animation: none; stroke-dashoffset: 0; }
    .typewriter { animation: none; border-right: none; }
    .council-line { animation: none; }
    .reveal-up, .day-timeline .tl-item { opacity: 1; transform: none; transition: none; }
}

/* ===== Quill editor inside complaint section cards ===== */
.complaint-section-card .cs-body[data-quill-active="1"] { padding: 0; }
.complaint-section-card .ql-toolbar {
    background: #faf9f6;
    border-radius: 8px 8px 0 0;
    border-color: #e5e0d6;
}
.complaint-section-card .ql-container {
    border-radius: 0 0 8px 8px;
    border-color: #e5e0d6;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 12pt;
}
.complaint-section-card .ql-editor {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 12pt;
    line-height: 1.7;
    text-align: justify;
    min-height: 400px;
    max-height: 70vh;
    padding: 24px;
}
.complaint-section-card .ql-editor h1,
.complaint-section-card .ql-editor h2 {
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Times New Roman', Georgia, serif;
    margin: 18pt 0 12pt;
}
.complaint-section-card .ql-editor h1 { font-size: 16pt; }
.complaint-section-card .ql-editor h2 { font-size: 14pt; }
.complaint-section-card .ql-editor h3 { font-size: 13pt; font-weight: 600; text-decoration: underline; margin: 14pt 0 8pt; }

/* ===== Upgrade compare modal — cream theme ===== */
#upgradeCompareModal .upgrade-modal { background: #fff; border: 1px solid #ece4d2; }
#upgradeCompareModal .upgrade-modal-title span { color: var(--claude-burnt); }
