/* ====================================================================
   EVERYONE'S LAW - INDIAN LEGAL INTELLIGENCE PLATFORM
   Modern Institutional Dashboard Design System (Pure Vanilla CSS)
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Institutional Deep Palette */
  --bg-page: #080c14;
  --bg-surface: #0e1526;
  --bg-surface-elevated: #141f36;
  --bg-glass: rgba(14, 21, 38, 0.88);
  --bg-glass-card: rgba(20, 31, 54, 0.75);
  --bg-glass-input: rgba(8, 12, 20, 0.85);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-gold-subtle: rgba(212, 175, 55, 0.18);
  --border-sky: rgba(14, 165, 233, 0.25);

  /* Primary Legal Gold / Amber Accents */
  --gold-500: #d4af37;
  --gold-400: #e5c358;
  --gold-300: #f3e5ab;
  --gold-600: #aa7c11;
  --gold-glow: rgba(212, 175, 55, 0.22);

  /* Category Thematic Colors */
  --accent-amber: #f59e0b;
  --accent-sky: #0ea5e9;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;

  /* Typography & Contrasts */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dark: #090d16;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 36px -8px rgba(0, 0, 0, 0.65);
  --shadow-gold: 0 8px 30px -6px rgba(212, 175, 55, 0.2);

  /* Fonts */
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-legal: 'Merriweather', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout Constants */
  --navbar-height: 72px;
  --max-content-width: 1400px;
}

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

html {
  font-family: var(--font-ui);
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #151d33 0%, #080c14 70%);
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #080c14;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Clean Typography */
a {
  color: var(--gold-400);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--gold-300);
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-ui);
  color: var(--text-primary);
}

/* Reusable Containers */
.container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Top Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-height);
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-gold-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
  border: 1px solid rgba(243, 229, 171, 0.3);
  color: #080c14;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.brand:hover .brand-icon {
  transform: scale(1.05);
}

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

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff2cc 0%, #d4af37 50%, #f3e5ab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 9px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nav-item.active {
  color: var(--gold-300);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(14, 21, 38, 0.6) 100%);
  border-color: var(--border-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}
.nav-item.active svg {
  color: var(--gold-400);
  opacity: 1;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  color: var(--text-secondary);
  padding: 0.5rem;
}

/* Main Content Area */
main {
  flex: 1;
  padding: 2rem 0 3.5rem;
}

/* Section Views */
.view-section {
  display: none;
}
.view-section.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* ====================================================================
   DASHBOARD / HOME STYLES
   ==================================================================== */

.hero-card {
  position: relative;
  background: linear-gradient(135deg, #10192e 0%, #0b1120 70%, #1e1b12 100%);
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-400);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: #ffffff;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #fff2cc 0%, #d4af37 50%, #f3e5ab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Global Search Bar */
.search-bar-wrap {
  max-width: 740px;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 0.5rem 0.6rem 0.5rem 1.2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}
.search-bar:focus-within {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25), 0 12px 30px rgba(0, 0, 0, 0.6);
}

.search-icon {
  color: var(--gold-400);
  margin-right: 0.85rem;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: #fff;
  outline: none;
}
.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  color: #080c14;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}
.search-btn:hover {
  background: linear-gradient(135deg, #e5c358 0%, #b8972e 100%);
  transform: translateY(-1px);
}

/* Stat Cards Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
}

.stat-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-400);
  border: 1px solid var(--border-gold-subtle);
}
.stat-icon-sky {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-sky);
  border: 1px solid var(--border-sky);
}
.stat-icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.stat-icon-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  font-family: var(--font-legal);
}
.stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Module Cards Grid */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.module-card {
  background: linear-gradient(135deg, rgba(20, 31, 54, 0.9) 0%, rgba(13, 20, 37, 0.95) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.module-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.module-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.module-badge.gold {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-gold-subtle);
  color: var(--gold-400);
}

.module-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #080c14;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.module-card:hover .module-icon-wrap {
  transform: scale(1.08);
  border-color: var(--border-gold);
}

.module-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.45rem;
}
.module-card:hover .module-title {
  color: var(--gold-300);
}

.module-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.module-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-400);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold-subtle);
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  width: fit-content;
  transition: all 0.2s ease;
}
.module-btn:hover {
  background: var(--gold-500);
  color: #080c14;
  border-color: var(--gold-500);
}

/* ====================================================================
   BARE ACT COMPASS (DUAL-PANE EXPLORER)
   ==================================================================== */

.compass-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Sticky Toolbar */
.compass-toolbar {
  position: sticky;
  top: calc(var(--navbar-height) + 8px);
  z-index: 500;
  background: rgba(14, 21, 38, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.toolbar-selectors {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.select-wrap {
  position: relative;
}

.custom-select {
  appearance: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 9px;
  padding: 0.55rem 2.2rem 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.custom-select:focus {
  border-color: var(--gold-400);
}

.select-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  width: 14px;
  height: 14px;
}

.filter-search {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 9px;
  padding: 0.45rem 0.85rem;
  width: 260px;
}
.filter-search:focus-within {
  border-color: var(--gold-400);
}
.filter-search input {
  background: transparent;
  border: none;
  font-size: 0.82rem;
  outline: none;
  color: #fff;
  width: 100%;
}

/* Quick Section Pills */
.section-pills-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  max-width: 100%;
}
.section-pill {
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}
.section-pill:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}
.section-pill.active {
  background: var(--gold-500);
  color: #080c14;
  border-color: var(--gold-500);
  font-weight: 700;
}

/* Dual-Pane Grid */
.dual-pane-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  min-height: 640px;
}

/* Left Pane: Official Statutory Text */
.pane-left {
  background: #090d16;
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  height: 720px;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-md);
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.pane-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
.pane-badge.official {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold-subtle);
  color: var(--gold-400);
}

.copy-citation-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  transition: all 0.2s ease;
}
.copy-citation-btn:hover {
  color: var(--gold-300);
  border-color: var(--border-gold-subtle);
}

.statutory-meta {
  margin-bottom: 1rem;
}
.statutory-act {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.statutory-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-legal);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.statutory-body {
  font-family: var(--font-legal);
  font-size: 0.98rem;
  line-height: 1.85;
  color: #e2e8f0;
  white-space: pre-line;
}

.statutory-clause {
  margin-bottom: 1.15rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(212, 175, 55, 0.2);
}

/* Right Pane: Plain-English Intelligence Stack */
.pane-right {
  background: linear-gradient(135deg, rgba(14, 21, 38, 0.9) 0%, rgba(10, 16, 30, 0.95) 100%);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 20px;
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  height: 720px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

/* Plain-Language Summary Box */
.plain-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.card-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold-400);
  margin-bottom: 0.65rem;
}

.plain-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Real-Life Example Callout */
.example-callout {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.09) 0%, rgba(14, 21, 38, 0.6) 100%);
  border: 1px solid var(--border-gold-subtle);
  border-left: 4px solid var(--gold-500);
  border-radius: 14px;
  padding: 1.35rem;
}

.example-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold-300);
  margin-bottom: 0.5rem;
}

.example-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Landmark Judgments Collapsible Accordion */
.judgments-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.accordion-card.open {
  border-color: var(--border-gold);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease;
}
.accordion-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.case-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.case-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}
.case-citation {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--gold-400);
}

.accordion-arrow {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  width: 18px;
  height: 18px;
}
.accordion-card.open .accordion-arrow {
  transform: rotate(180deg);
  color: var(--gold-400);
}

.accordion-content {
  display: none;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(8, 12, 20, 0.5);
}
.accordion-card.open .accordion-content {
  display: block;
}

.case-ratio {
  font-family: var(--font-legal);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.source-note-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ====================================================================
   INCIDENT DECODER
   ==================================================================== */

.decoder-card {
  background: linear-gradient(135deg, rgba(20, 31, 54, 0.95) 0%, rgba(11, 17, 32, 0.98) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 22px;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  margin-bottom: 2rem;
}

.quick-scenarios-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.scenario-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.scenario-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-gold);
  color: var(--gold-300);
}

.intake-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  padding: 1.15rem;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1.25rem;
}
.intake-textarea:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.analyze-btn {
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  color: #080c14;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.85rem 1.85rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
  transition: all 0.2s ease;
}
.analyze-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.45);
}

/* Results Panel */
.decoder-results {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.results-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.classification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 0.85rem;
}

.objective-summary {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #ffffff;
  font-weight: 500;
}

/* Side-by-Side Provisions Chips */
.provisions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.provision-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}
.provision-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-400);
  transform: translateY(-2px);
}

.chip-old {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: line-through;
}
.chip-arrow {
  color: var(--gold-400);
  font-size: 0.8rem;
}
.chip-new {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--gold-300);
}
.chip-title {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Vertical Action Timeline / Stepper */
.stepper-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  margin-left: 0.5rem;
}

.stepper-wrap::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 15px;
  bottom: 25px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-500), var(--accent-sky), var(--accent-emerald));
}

.stepper-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
}

.stepper-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-300);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  flex-shrink: 0;
  z-index: 2;
}

.stepper-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  flex: 1;
}
.stepper-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}
.stepper-card-desc {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Landmark Precedent Card */
.precedent-card {
  background: linear-gradient(135deg, rgba(20, 31, 54, 0.9) 0%, rgba(14, 21, 38, 0.95) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 1.4rem;
}

/* ====================================================================
   AI LEGAL ASSISTANT (CHAT UI)
   ==================================================================== */

.chat-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: 720px;
  overflow: hidden;
}

.chat-header {
  padding: 1.15rem 1.5rem;
  background: rgba(8, 12, 20, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-bot-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.chat-bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #080c14;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.chat-bubble {
  max-width: 75%;
  padding: 1rem 1.35rem;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
  word-break: break-word;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold-subtle);
  border-bottom-left-radius: 4px;
  color: #e2e8f0;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-medium);
  border-bottom-right-radius: 4px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.bubble-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Clickable Provision Chips inside Chat */
.chat-citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-300);
  border: 1px solid var(--border-gold-subtle);
  margin: 0.2rem 0.15rem;
  cursor: pointer;
}
.chat-citation-chip:hover {
  background: var(--gold-500);
  color: #080c14;
}

/* Chat Suggestions Bar */
.chat-suggestions {
  padding: 0.75rem 1.5rem;
  background: rgba(8, 12, 20, 0.4);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.suggestion-pill {
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.suggestion-pill:hover {
  border-color: var(--border-gold);
  color: var(--gold-300);
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.chat-input {
  flex: 1;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 0.75rem 1.15rem;
  font-size: 0.9rem;
  outline: none;
  color: #fff;
  transition: border-color 0.2s ease;
}
.chat-input:focus {
  border-color: var(--gold-400);
}

.chat-send-btn {
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  color: #080c14;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  transform: translateY(-1px);
}

/* ====================================================================
   BNS ↔ IPC CONVERTER
   ==================================================================== */

.converter-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.converter-search-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.converter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.comparison-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.2s ease;
}
.comparison-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
}

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

.law-col {
  padding: 1.25rem;
  border-radius: 14px;
}
.law-col-old {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
}
.law-col-new {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold-subtle);
}

.law-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.law-tag-old { color: var(--text-muted); }
.law-tag-new { color: var(--gold-400); }

.law-sec-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-legal);
  margin-bottom: 0.25rem;
}

.change-summary-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  border-left: 3px solid var(--gold-500);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.law-official-text {
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: rgba(8, 12, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-family: var(--font-legal);
  font-size: 0.84rem;
  line-height: 1.65;
  color: #cbd5e1;
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-line;
}
.law-official-text::-webkit-scrollbar {
  width: 4px;
}

/* Search Disambiguation Panel */
.disambiguation-panel {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(14, 21, 38, 0.95) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}
.disambiguation-header {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.disambiguation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.disambiguation-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
}
.disambiguation-chip:hover {
  background: var(--gold-500);
  border-color: var(--gold-500);
  transform: translateY(-2px);
}
.disambiguation-chip:hover .chip-act-title,
.disambiguation-chip:hover .chip-sec-title {
  color: #080c14;
}
.chip-act-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-400);
}
.chip-sec-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}

/* ====================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET: 375px, 414px, 768px, 1024px)
   ==================================================================== */

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dual-pane-grid {
    grid-template-columns: 1fr;
  }
  .pane-left, .pane-right {
    height: 480px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-card {
    padding: 2rem 1.5rem;
  }
  .modules-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .comparison-columns {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: #080c14;
    border-bottom: 2px solid var(--border-gold);
    padding: 1.25rem;
    gap: 0.65rem;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.85);
    z-index: 1001;
  }
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .navbar-inner {
    padding: 0 0.25rem;
  }
  .brand-title {
    font-size: 1.12rem;
  }
  .brand-subtitle {
    display: none;
  }
  .hero-title {
    font-size: 1.65rem;
  }
  .hero-card {
    padding: 1.5rem 1.15rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .stat-card {
    padding: 0.95rem 1rem;
  }
  .compass-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-selectors {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  .select-wrap, .custom-select, .filter-search {
    width: 100% !important;
  }
  .pane-left, .pane-right {
    height: 420px;
    padding: 1.15rem;
  }
  .chat-container {
    height: calc(100vh - 130px);
    max-height: 580px;
  }
  .chat-input-bar {
    padding: 0.65rem 0.85rem;
    position: sticky;
    bottom: 0;
  }
  .comparison-columns {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Categories & Acts Explorer Grid (Replaces or Augments Hero Search)
   ========================================================================== */
.category-explorer-section {
  margin: 2.5rem 0 3.5rem 0;
}

.category-explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  backdrop-filter: blur(14px);
}
.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.15);
}

.category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.category-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.category-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.category-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.acts-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.act-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.act-tag:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-400);
  color: #fff;
  transform: translateY(-1px);
}

.category-explore-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold-subtle);
  color: var(--gold-400);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.category-explore-btn:hover {
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  color: #080c14;
  border-color: var(--gold-400);
  transform: translateY(-1px);
}

/* ==========================================================================
   Decoder Action Buttons & Copy Features
   ========================================================================== */
.decoder-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.action-btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  color: #080c14;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}
.action-btn-gold:hover {
  background: linear-gradient(135deg, #e5c358 0%, #b8972e 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}

.action-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-gold);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.action-btn-outline:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-400);
  transform: translateY(-1px);
}

/* Assistant Message Bubble Copy Button */
.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.bubble-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}
.bubble-copy-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-400);
  color: #fff;
}
.bubble-copy-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* ==========================================================================
   Multi-Act Search Disambiguation Panel
   ========================================================================== */
.disambiguation-panel {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.25s ease-out;
}

.disambiguation-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
  margin-top: 0.6rem;
}

.disambiguation-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.disambiguation-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-400);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.disambiguation-chip .chip-act {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-400);
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.disambiguation-chip .chip-sec {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}


