/* ═══════════════════════════════════════════════════════
   NYAYSETU — GLOBAL DESIGN TOKENS (matching original)
═══════════════════════════════════════════════════════ */
:root {
  --nav-height: 80px;
  --emergency-panel-height: 0px;
  --blue:       #1a56db;
  --blue-dark:  #1340b0;
  --blue-light: #dbeafe;
  --navy:       #0f172a;
  --navy2:      #1e293b;
  --text:       #111827;
  --text-2:     #4b5563;
  --text-3:     #9ca3af;
  --border:     #e5e7eb;
  --border-2:   #d1d5db;
  --bg:         #ffffff;
  --bg-2:       #f9fafb;
  --bg-3:       #f3f4f6;
  --success:    #065f46;
  --success-bg: #d1fae5;
  --warn:       #92400e;
  --warn-bg:    #fef3c7;
  --danger:     #991b1b;
  --danger-bg:  #fee2e2;
  --radius:     10px;
  --radius-lg:  14px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #d8b56f;
  outline-offset: 3px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

/* ════════════════════════════════
   TOP NAV
════════════════════════════════ */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 8px;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--navy);
  flex-shrink: 0; margin-right: 12px;
}
.nav-logo-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.nav-links {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nav-link {
  padding: 6px 12px; border-radius: 7px; font-size: 13px;
  font-weight: 500; color: var(--text-2); background: none; border: none;
  transition: background .15s, color .15s; white-space: nowrap;
}
.nav-link:hover { background: var(--bg-3); color: var(--text); }
.nav-link.active { background: var(--blue-light); color: var(--blue); }

.nav-right { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-shrink: 0; }

.btn-nav-ghost {
  padding: 7px 14px; border-radius: var(--radius); font-size: 13px;
  font-weight: 500; border: 1.5px solid var(--border-2);
  background: none; color: var(--text); transition: border-color .15s;
}
.btn-nav-ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn-nav-solid {
  padding: 7px 16px; border-radius: var(--radius); font-size: 13px;
  font-weight: 600; border: none;
  background: var(--blue); color: #fff; transition: background .15s;
}
.btn-nav-solid:hover { background: var(--blue-dark); }

.lang-selector { display: inline-flex; align-items: center; }
.lang-input {
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-width: 190px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.lang-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }

/* ════════════════════════════════
   PAGE SYSTEM
════════════════════════════════ */
.page { display: none; padding-top: 58px; min-height: 100vh; }
.page.active { display: block; }

/* ════════════════════════════════
   HOME PAGE
════════════════════════════════ */
.home-hero {
  background: var(--navy);
  padding: 80px 24px 72px;
  text-align: center;
}
.home-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #93c5fd; font-size: 12px; font-weight: 500; letter-spacing: .05em;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 28px;
}
.home-eyebrow span { opacity: .7; }
.home-h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700; color: #fff; line-height: 1.18;
  max-width: 700px; margin: 0 auto 20px;
}
.home-h1-line { display: block; }
.home-h1 em { color: #60a5fa; font-style: normal; }
.home-sub {
  max-width: 560px; margin: 0 auto 36px;
  color: #94a3b8; font-size: 16px; line-height: 1.65;
}
.home-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  padding: 13px 28px; border-radius: var(--radius); font-size: 15px;
  font-weight: 600; background: #fff; color: var(--navy); border: none;
  transition: transform .15s, box-shadow .15s;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.btn-hero-ghost {
  padding: 13px 28px; border-radius: var(--radius); font-size: 15px;
  font-weight: 500; background: rgba(255,255,255,.1); color: #fff;
  border: 1.5px solid rgba(255,255,255,.25); transition: background .15s;
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.18); }

.home-trust {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px; color: #64748b; font-size: 13px;
}
.home-trust span::before { content: "·"; margin-right: 8px; }
.home-trust span:first-child::before { content: none; }

/* Stats bar */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--navy2); border-top: 1px solid rgba(255,255,255,.06);
}
.stat-item { padding: 20px; text-align: center; border-right: 1px solid rgba(255,255,255,.06); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 26px; font-weight: 700; color: #fff; font-family: 'Playfair Display', serif; }
.stat-label { font-size: 12px; color: #64748b; margin-top: 3px; }

/* Process section */
.section { padding: 64px 24px; max-width: 1000px; margin: 0 auto; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--blue);
  text-transform: uppercase; margin-bottom: 10px;
}
.section-h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: var(--navy);
  margin-bottom: 12px;
}
.section-sub { color: var(--text-2); max-width: 520px; margin-bottom: 48px; }

.process-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.process-step {
  aspect-ratio: 1 / 1;
  padding: 22px; border: 1px solid var(--border);
  border-radius: 26px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.process-step[role="button"] {
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.process-step[role="button"]:hover,
.process-step[role="button"]:focus-visible {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  outline: none;
}
.process-step::after {
  content: attr(data-num);
  position: absolute; right: 16px; top: 12px;
  font-size: 48px; font-weight: 700; color: var(--bg-3);
  font-family: 'Playfair Display', serif; line-height: 1; pointer-events: none;
}
.step-icon { font-size: 28px; margin-bottom: 12px; }
.step-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.step-role {
  margin-top: auto; font-size: 11px; font-weight: 600;
  color: var(--blue); text-transform: uppercase; letter-spacing: .06em;
}

/* Capabilities grid */
.cap-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.cap-card {
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color .2s, transform .2s, box-shadow .2s; cursor: pointer;
}
.cap-card:hover {
  border-color: var(--blue); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cap-card-icon { font-size: 30px; margin-bottom: 14px; }
.cap-card-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; color: var(--navy); }
.cap-card-desc { font-size: 13px; color: var(--text-2); line-height: 1.55; margin-bottom: 14px; }
.cap-card-link { font-size: 13px; font-weight: 600; color: var(--blue); }

/* Advantage section */
.adv-section { background: var(--bg-2); }
.adv-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.adv-item {
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px; border: 1px solid var(--border);
  border-radius: 26px; align-items: flex-start;
  background: var(--bg);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.adv-item:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.adv-item > div:last-child {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.adv-num {
  width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--blue);
  background: var(--blue-light); border-radius: 14px;
  flex-shrink: 0;
}
.adv-title { font-weight: 600; font-size: 16px; margin-bottom: 6px; color: var(--navy); }
.adv-desc { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.adv-badge {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--success);
  background: var(--success-bg); padding: 4px 10px; border-radius: 20px;
  width: fit-content;
}

/* CTA section */
.cta-section {
  background: var(--navy);
  padding: 72px clamp(24px, 4vw, 64px);
  text-align: center;
  display: flex;
  justify-content: center;
}
.cta-inner {
  width: min(960px, 100%);
  margin: 0 auto;
}
.cta-h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3.5vw, 40px); color: #fff; margin-bottom: 12px;
}
.cta-sub { color: #94a3b8; margin-bottom: 32px; font-size: 15px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-actions .btn-hero-primary,
.cta-actions .btn-hero-ghost {
  min-width: 180px;
}
.cta-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  color: rgba(246,240,229,.24);
  font-size: 13px;
}
.cta-trust span::before {
  content: "Â·";
  color: rgba(246,240,229,.24);
  margin-right: 10px;
}
.cta-trust span:first-child::before { content: none; margin-right: 0; }
.cta-trust span::before { content: "\00b7"; }
.cta-trust span:first-child::before { content: none; }

/* ════════════════════════════════
   CHAT PAGE
════════════════════════════════ */
/* Premium dark landing treatment */
#topnav {
  height: 80px;
  padding: 0 clamp(16px, 2.1vw, 40px);
  gap: clamp(12px, 1.4vw, 28px);
  background: rgba(8, 8, 8, .92);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}
.nav-logo {
  gap: 12px;
  margin-right: 8px;
  color: #f7f1e6;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
}
.nav-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e7c276, #b9934f);
  color: #111;
  font-family: Georgia, serif;
  font-weight: 800;
  font-size: 0;
}
.nav-logo-icon::before { content: "N"; font-size: 18px; }
.nav-links {
  gap: clamp(2px, .35vw, 7px);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding-right: 0;
}
.nav-link {
  height: 54px;
  padding: 0 clamp(6px, .55vw, 12px);
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(246,240,229,.48);
  font-size: clamp(12px, .82vw, 14px);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,.05); color: #f7f1e6; }
.nav-link.active {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: #f7f1e6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.nav-right {
  gap: clamp(8px, .7vw, 12px);
  flex-shrink: 0;
  margin-left: clamp(8px, 1vw, 18px);
}
.lang-input {
  height: 48px;
  width: clamp(148px, 10vw, 164px);
  min-width: 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 0 34px 0 14px;
  color: #f7f1e6;
  background: #0d0d0d;
  font-size: 15px;
  font-weight: 600;
}
.lang-input:focus {
  border-color: rgba(218,185,116,.65);
  box-shadow: 0 0 0 3px rgba(218,185,116,.12);
}
.btn-nav-ghost {
  height: 48px;
  min-width: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.8) !important;
  background: #0d0d0d;
  color: #e7e1d7 !important;
}
.nav-icon-btn { width: 48px; padding: 0; font-size: 16px; }
.btn-nav-solid {
  height: 56px;
  padding: 0 clamp(16px, 1.3vw, 24px);
  border-radius: 10px;
  background: linear-gradient(135deg, #e3c17b, #cda662);
  color: #0b0b0b;
  font-size: 15px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-nav-solid:hover { background: linear-gradient(135deg, #edcf8c, #d8b16d); }
.page { padding-top: var(--nav-height); }
body.emergency-open .page.active {
  padding-top: calc(var(--nav-height) + var(--emergency-panel-height));
}
.home-hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  padding: 50px clamp(32px, 3vw, 72px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(circle at 50% 40%, rgba(151,117,58,.12), transparent 34%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    #070707;
  background-size: auto, 68px 68px, 68px 68px, auto;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #070707 0%, rgba(7,7,7,.62) 18%, rgba(7,7,7,.2) 50%, #070707 100%),
    linear-gradient(180deg, transparent 0%, rgba(7,7,7,.35) 70%, #070707 100%);
  pointer-events: none;
}
.home-hero > * {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.home-hero-inner {
  text-align: left;
}
.home-eyebrow {
  margin-top: 0;
  margin-bottom: 42px;
  width: auto;
  align-self: flex-start;
  background: rgba(205,166,98,.12);
  border: 1px solid rgba(205,166,98,.38);
  color: #d8b56f;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #d8b56f;
  box-shadow: 0 0 16px rgba(216,181,111,.55);
}
.home-h1 {
  max-width: 860px;
  margin: 0 0 28px;
  color: #f5f0e8;
  font-size: clamp(54px, 6.4vw, 104px);
  line-height: .98;
  letter-spacing: 0;
  text-align: left;
}
.home-h1-line {
  display: block;
  white-space: nowrap;
}
.home-h1 em { color: inherit; font-style: normal; }
.home-sub {
  max-width: 650px;
  margin: 0 0 52px;
  color: rgba(246,240,229,.48);
  font-size: 21px;
  line-height: 1.8;
  text-align: left;
}
.home-actions { justify-content: flex-start; gap: 16px; }
.home-trust { justify-content: flex-start; }
.btn-hero-primary {
  min-width: 218px;
  height: 64px;
  padding: 0 30px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e3c17b, #cda662);
  color: #090909;
  font-size: 17px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(205,166,98,.16);
}
.btn-hero-ghost {
  min-width: 192px;
  height: 64px;
  padding: 0 30px;
  border-radius: 14px;
  background: rgba(255,255,255,.015);
  border: 1px solid rgba(255,255,255,.09);
  color: rgba(246,240,229,.48);
  font-size: 17px;
  font-weight: 800;
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.045); color: #f5f0e8; }
.home-trust {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 34px;
  color: rgba(246,240,229,.24);
  font-size: 15px;
}
.home-trust span::before { content: "·"; color: rgba(246,240,229,.24); margin-right: 10px; }
.stats-bar {
  background: #070707;
  border-top: 1px solid rgba(255,255,255,.06);
}
.stat-item { border-color: rgba(255,255,255,.06); }
.stat-label { color: rgba(246,240,229,.35); }

#page-chat {
  display: none;
  flex-direction: row;
  height: 100vh;
  padding-top: 80px;
}
#page-chat.active { display: flex; }

/* Sidebar */
.chat-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  position: relative;
}
.sidebar-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar-header-title { font-weight: 600; font-size: 13px; color: var(--text-2); letter-spacing: .04em; text-transform: uppercase; }
.sidebar-toggle {
  font-size: 18px; background: none; border: none; color: var(--text-3);
  padding: 4px; border-radius: 5px; line-height: 1;
}
.sidebar-section { padding: 12px 10px 4px; }
.sidebar-section-title {
  font-size: 10px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .08em;
  padding: 0 6px; margin-bottom: 4px;
}
.topic-pill {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 7px; font-size: 13px;
  background: none; border: none; color: var(--text-2);
  transition: background .12s, color .12s; line-height: 1.3;
}
.topic-pill:hover { background: var(--bg-3); color: var(--text); }
.lang-note {
  margin: 12px 10px; padding: 10px 12px; border-radius: 8px;
  background: var(--blue-light); color: #1e40af; font-size: 12px; line-height: 1.45;
}

/* Chat main */
.chat-main {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  min-width: 0;
}
.chat-topbar {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.chat-topbar-left { display: flex; align-items: center; gap: 10px; }
.chat-bot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.chat-bot-name { font-weight: 600; font-size: 15px; }
.chat-bot-status { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.chat-topbar-actions { display: flex; gap: 6px; }
.chat-action-btn {
  padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); background: none; color: var(--text-2);
  transition: background .12s;
}
.chat-action-btn:hover { background: var(--bg-3); color: var(--text); }

/* Messages */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 24px 20px 16px;
  display: flex; flex-direction: column; gap: 4px;
}

/* Welcome state */
.chat-welcome {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; text-align: center; padding: 24px;
}
.chat-welcome-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--navy); color: #fff; font-size: 30px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.chat-welcome-title { font-weight: 700; font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.chat-welcome-sub { font-size: 13px; color: var(--text-2); margin-bottom: 20px; max-width: 320px; }
.quick-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 400px;
}
.quick-action-btn {
  padding: 9px 16px; border-radius: 20px; font-size: 13px;
  border: 1.5px solid var(--border-2); background: var(--bg);
  color: var(--text-2); font-weight: 500; transition: border-color .15s, color .15s;
}
.quick-action-btn:hover { border-color: var(--blue); color: var(--blue); }

/* Message bubbles */
.msg-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.msg-row.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.msg-avatar.bot { background: var(--navy); color: #fff; }
.msg-avatar.user { background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; }
.msg-bubble {
  max-width: 72%; padding: 11px 15px; border-radius: 16px;
  font-size: 14px; line-height: 1.65; white-space: pre-wrap;
}
.msg-bubble.bot {
  background: var(--bg-2); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; color: var(--text);
}
.msg-bubble.user {
  background: var(--blue); color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble strong { font-weight: 600; }
.msg-bubble.bot strong { color: var(--navy); }

/* Typing indicator */
.typing-indicator {
  display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px;
}
.typing-dots {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 16px; border-bottom-left-radius: 4px;
  padding: 12px 16px; display: flex; gap: 4px; align-items: center;
}
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-3);
  animation: typeBounce 1.3s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typeBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

/* Connect with Lawyer button */
.lawyer-connect-row {
  display: flex; justify-content: flex-start;
  padding: 4px 0 12px 38px;
  animation: fadeUp .3s ease both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.lawyer-connect-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 20px;
  border: 1.5px solid var(--blue); background: transparent; color: var(--blue);
  font-size: 13px; font-weight: 600; transition: background .15s, color .15s, transform .12s;
}
.lawyer-connect-btn:hover {
  background: var(--blue); color: #fff; transform: translateY(-1px);
}
.lawyer-connect-btn .lcb-arrow { transition: transform .15s; }
.lawyer-connect-btn:hover .lcb-arrow { transform: translateX(3px); }

/* Deadline / case summary banners */
.chat-banner {
  margin: 8px 0; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.chat-banner.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #fcd34d; }
.chat-banner.info { background: var(--blue-light); color: #1e40af; border: 1px solid #93c5fd; }
.banner-action {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  border: none; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.banner-action.warn { background: #fcd34d; color: var(--warn); }
.banner-action.info { background: var(--blue); color: #fff; }

/* Input area */
.chat-input-wrap {
  border-top: 1px solid var(--border); padding: 14px 20px 16px;
  background: var(--bg); flex-shrink: 0;
}
.chat-input-row {
  display: flex; gap: 8px; align-items: flex-end;
  border: 1.5px solid var(--border-2); border-radius: 12px;
  padding: 8px 10px; background: var(--bg);
  transition: border-color .15s;
}
.chat-input-row:focus-within { border-color: var(--blue); }
.chat-textarea {
  flex: 1; border: none; outline: none; resize: none;
  font-size: 14px; line-height: 1.5; background: transparent;
  color: var(--text); max-height: 120px; min-height: 24px;
}
.chat-textarea::placeholder { color: var(--text-3); }
.input-btn {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background .12s; flex-shrink: 0;
}
.input-btn.voice { background: var(--bg-3); color: var(--text-2); }
.input-btn.voice:hover { background: var(--border); }
.input-btn.send { background: var(--blue); color: #fff; }
.input-btn.send:hover { background: var(--blue-dark); }
.input-btn.send:disabled { background: var(--bg-3); color: var(--text-3); cursor: default; }
.chat-disclaimer {
  font-size: 11px; color: var(--text-3); text-align: center; margin-top: 8px;
}

/* Evidence upload strip */
.evidence-strip {
  border: 1.5px dashed var(--border-2); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-2); cursor: pointer;
  transition: border-color .15s;
}
.evidence-strip:hover { border-color: var(--blue); color: var(--blue); }
.evidence-file {
  background: var(--blue-light); color: #1e40af;
  padding: 2px 8px; border-radius: 12px; font-size: 11px;
}

/* ════════════════════════════════
   LAWYER MODAL
════════════════════════════════ */
.lm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lm-overlay.open { opacity: 1; pointer-events: all; }
@media(min-width:600px) {
  .lm-overlay { align-items: center; }
  .lm-panel { border-radius: var(--radius-lg) !important; }
}
.lm-panel {
  background: var(--bg); width: 100%; max-width: 580px; max-height: 84vh;
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(40px); transition: transform .28s cubic-bezier(.34,1.2,.64,1);
}
.lm-overlay.open .lm-panel { transform: translateY(0); }

.lm-head {
  padding: 16px 20px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.lm-head-left { display: flex; align-items: center; gap: 10px; }
.lm-head-icon { font-size: 22px; }
.lm-head-title { font-weight: 700; font-size: 17px; color: var(--navy); }
.lm-head-badge {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: var(--blue-light); color: var(--blue); font-weight: 600;
}
.lm-close {
  width: 30px; height: 30px; border-radius: 7px; border: none;
  background: var(--bg-3); color: var(--text-2); font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .12s;
}
.lm-close:hover { background: var(--border); }

.lm-filters {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0;
}
.lm-select {
  flex: 1; min-width: 130px; padding: 7px 10px;
  border: 1px solid var(--border-2); border-radius: 8px;
  font-size: 13px; background: var(--bg); color: var(--text);
  outline: none; cursor: pointer;
}
.lm-select:focus { border-color: var(--blue); }

.lm-cards { overflow-y: auto; flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }

.lm-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; transition: border-color .18s, box-shadow .18s;
}
.lm-card:hover { border-color: var(--blue); box-shadow: 0 2px 12px rgba(26,86,219,.08); }

.lm-card-top { display: flex; gap: 12px; margin-bottom: 10px; }
.lm-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.lm-card-info { flex: 1; min-width: 0; }
.lm-card-name {
  font-weight: 700; font-size: 15px; color: var(--navy);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.lm-verified {
  font-size: 10px; font-weight: 600; background: var(--success-bg);
  color: var(--success); padding: 2px 7px; border-radius: 20px;
}
.lm-card-qual { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.lm-fee { font-size: 17px; font-weight: 700; color: var(--blue); flex-shrink: 0; }
.lm-fee-label { font-size: 10px; color: var(--text-3); }

.lm-card-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.lm-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.lm-rating { font-size: 12px; color: var(--text-2); }
.lm-location { font-size: 12px; color: var(--text-2); }

.lm-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.lm-tag {
  font-size: 11px; background: var(--blue-light); color: #1e40af;
  padding: 2px 9px; border-radius: 20px; font-weight: 500;
}
.lm-bio { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 12px; }

.lm-card-actions { display: flex; gap: 8px; }
.lm-btn-book {
  flex: 1; padding: 9px 14px; background: var(--blue); color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.lm-btn-book:hover { background: var(--blue-dark); }
.lm-btn-send {
  padding: 9px 14px; background: none; color: var(--text);
  border: 1px solid var(--border-2); border-radius: 8px; font-size: 13px;
  transition: background .12s;
}
.lm-btn-send:hover { background: var(--bg-2); }
.lm-booked {
  padding: 9px 12px; background: var(--success-bg); color: var(--success);
  border-radius: 8px; font-size: 13px; font-weight: 500; text-align: center;
}
.lm-empty { text-align: center; padding: 32px; color: var(--text-3); font-size: 14px; }
.lm-foot { padding: 10px 20px 14px; font-size: 11px; color: var(--text-3); text-align: center; border-top: 1px solid var(--border); flex-shrink: 0; }

/* ════════════════════════════════
   DOCUMENTS PAGE
════════════════════════════════ */
.docs-page { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }
.docs-header { margin-bottom: 32px; }
.docs-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: var(--navy); margin-bottom: 10px;
}
.docs-sub { color: var(--text-2); font-size: 15px; }

.doc-type-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.doc-tab {
  padding: 9px 16px; border-radius: var(--radius); font-size: 13px;
  font-weight: 500; border: 1.5px solid var(--border-2);
  background: var(--bg); color: var(--text-2); transition: all .15s;
}
.doc-tab:hover { border-color: var(--blue); color: var(--blue); }
.doc-tab.active { border-color: var(--blue); background: var(--blue); color: #fff; }

.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media(max-width:700px) { .docs-grid { grid-template-columns: 1fr; } }

.docs-form-panel {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.docs-form-title { font-weight: 600; font-size: 15px; margin-bottom: 18px; color: var(--navy); }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; letter-spacing: .02em; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border-2); border-radius: 8px;
  font-size: 13px; color: var(--text); background: var(--bg);
  outline: none; transition: border-color .15s;
}
.form-select option, .lm-select option, .lang-input option {
  background: #0d0d0d;
  color: #f5f0e8;
}
.form-select option:checked, .lm-select option:checked, .lang-input option:checked {
  background: #cda662;
  color: #090909;
}
.form-input:focus, .form-textarea:focus { border-color: var(--blue); }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.btn-generate {
  width: 100%; padding: 12px; background: var(--navy); color: #fff;
  border: none; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  transition: background .15s; margin-top: 8px;
}
.btn-generate:hover { background: var(--blue); }
.btn-generate:disabled { background: var(--bg-3); color: var(--text-3); cursor: default; }

.docs-preview-panel {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column;
}
.docs-preview-title {
  font-weight: 600; font-size: 15px; margin-bottom: 14px;
  color: var(--navy); display: flex; justify-content: space-between; align-items: center;
}
.docs-preview-actions { display: flex; gap: 6px; }
.btn-copy, .btn-pdf {
  padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 500;
}
.btn-copy { border: 1px solid var(--border-2); background: none; color: var(--text-2); }
.btn-copy:hover { background: var(--bg-2); }
.btn-pdf { background: var(--blue); color: #fff; border: none; }
.btn-pdf:hover { background: var(--blue-dark); }
.docs-preview-area {
  flex: 1; font-family: 'Courier New', monospace; font-size: 12px;
  line-height: 1.75; white-space: pre-wrap; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; overflow-y: auto; min-height: 360px;
  max-height: 500px;
}
.docs-preview-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; color: rgba(246,240,229,.70);
  font-family: 'Inter', sans-serif; font-size: 15px; gap: 12px;
  text-align: center; line-height: 1.65; letter-spacing: 0;
}
.docs-preview-empty strong {
  color: #f1d38b;
  font-weight: 800;
}
.docs-disclaimer {
  margin-top: 12px; font-size: 11px; color: var(--text-3); line-height: 1.5;
  padding: 8px 12px; background: var(--warn-bg); border-radius: 7px;
}

/* ════════════════════════════════
   SIMPLIFIER PAGE
════════════════════════════════ */
.simp-page { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }
.simp-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: var(--navy); margin-bottom: 10px;
}
.simp-sub { color: var(--text-2); margin-bottom: 28px; }
.simp-samples { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.simp-sample {
  padding: 6px 12px; border-radius: 20px; font-size: 12px;
  border: 1.5px solid var(--border-2); background: none; color: var(--text-2);
  font-weight: 500; transition: all .15s;
}
.simp-sample:hover { border-color: var(--blue); color: var(--blue); }
.simp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width:700px) { .simp-grid { grid-template-columns: 1fr; } }
.simp-panel {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column;
}
.simp-panel-title {
  font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.simp-textarea {
  flex: 1; width: 100%; border: 1.5px solid var(--border-2); border-radius: 8px;
  padding: 12px; font-size: 13px; line-height: 1.65; resize: none;
  min-height: 280px; color: var(--text); background: var(--bg-2);
  outline: none; transition: border-color .15s;
}
.simp-textarea::placeholder {
  color: rgba(246,240,229,.56);
  opacity: 1;
}
.simp-textarea:focus { border-color: var(--blue); background: var(--bg); }
.simp-actions { display: flex; gap: 8px; margin-top: 12px; }
.simp-btn-clear {
  padding: 9px 16px; border: 1.5px solid var(--border-2); border-radius: 8px;
  background: none; color: var(--text-2); font-size: 13px;
}
.simp-btn-go {
  flex: 1; padding: 9px 16px; background: var(--navy); color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.simp-btn-go:hover { background: var(--blue); }
.simp-btn-go:disabled { background: var(--bg-3); color: var(--text-3); cursor: default; }
.simp-output {
  flex: 1; background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 14px; font-size: 13px; line-height: 1.7;
  min-height: 280px; white-space: pre-wrap; color: var(--text); overflow-y: auto;
}
.simp-output-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 280px; color: var(--text-3); font-size: 14px; gap: 8px;
}
.simp-output-actions { display: flex; gap: 8px; margin-top: 10px; }
.simp-word-count { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* ════════════════════════════════
   STUDENTS PAGE
════════════════════════════════ */
.students-page, .lawyers-page, .citizens-page { max-width: 960px; margin: 0 auto; padding: 48px 24px; }
.students-h1, .citizens-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3vw, 40px); font-weight: 700; color: var(--navy); margin-bottom: 10px;
}
.students-sub, .lawyers-sub, .citizens-sub { color: var(--text-2); font-size: 15px; margin-bottom: 32px; }

/* Citizens page */
.citizens-page { max-width: 1120px; }
.citizen-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.citizen-main { min-width: 0; }
.citizen-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.citizen-path-item,
.citizen-lock-panel,
.citizen-login-card,
.citizen-submit-card,
.citizen-summary-card,
.citizen-submitted-case {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.citizen-path-item {
  min-height: 150px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.citizen-path-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.citizen-path-title,
.citizen-lock-title,
.citizen-summary-title,
.citizen-session-name {
  font-weight: 700;
  color: var(--navy);
}
.citizen-path-copy,
.citizen-lock-copy,
.citizen-summary-meta,
.citizen-session-id {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}
.citizen-lock-panel {
  min-height: 240px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.citizen-lock-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  font-size: 24px;
  flex-shrink: 0;
}
.citizen-case-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 320px;
  gap: 20px;
  align-items: start;
}
.citizen-login-card,
.citizen-submit-card,
.citizen-summary-card {
  padding: 24px;
}
.citizen-login-card {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}
.citizen-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
}
.citizen-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 12px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.citizen-consent input {
  margin-top: 3px;
  accent-color: var(--blue);
}
.citizen-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 16px;
}
.citizen-status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}
.citizen-status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.citizen-status-item span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  color: var(--text-2);
  font-weight: 700;
  flex-shrink: 0;
}
.citizen-status-item.active span {
  background: var(--success-bg);
  color: var(--success);
}
.citizen-demo-fill {
  width: 100%;
  margin-top: 10px;
}
.citizen-session-panel {
  text-align: center;
}
.citizen-session-avatar {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}
.citizen-session-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.citizen-session-grid div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px;
  background: var(--bg);
}
.citizen-session-grid strong,
.citizen-session-grid span {
  display: block;
}
.citizen-session-grid strong {
  color: var(--navy);
  font-size: 18px;
}
.citizen-session-grid span {
  color: var(--text-3);
  font-size: 11px;
}
.citizen-submitted-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.citizen-submitted-case {
  padding: 12px;
}
.citizen-submitted-case strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  margin-bottom: 3px;
}
.citizen-submitted-case span {
  color: var(--text-2);
  font-size: 12px;
}

.students-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.students-tab, .lawyer-tab {
  padding: 10px 18px; font-size: 13px; font-weight: 600; border: none;
  background: none; color: var(--text-3); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.students-tab.active, .lawyer-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.dashboard-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px;
}
@media(max-width:600px) { .dashboard-stats { grid-template-columns: repeat(2,1fr); } }
.dash-stat {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px;
}
.dash-stat-num { font-size: 22px; font-weight: 700; color: var(--navy); font-family: 'Playfair Display', serif; }
.dash-stat-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.dash-stat-delta { font-size: 11px; color: var(--success); margin-top: 4px; }

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
}
.activity-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.activity-dot.approved { background: #22c55e; }
.activity-dot.edited { background: var(--blue); }
.activity-dot.escalated { background: #f59e0b; }
.activity-text { min-width: 0; font-size: 13px; color: var(--text); }
.activity-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.perf-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.perf-row { display: flex; align-items: center; gap: 12px; }
.perf-label { font-size: 13px; color: var(--text-2); min-width: 150px; }
.perf-bar-bg { flex: 1; height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.perf-bar-fill { height: 100%; border-radius: 4px; background: var(--blue); }
.perf-pct { font-size: 12px; font-weight: 600; color: var(--text); min-width: 36px; text-align: right; }

/* Leaderboard */
.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.leaderboard-table th {
  text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em;
}
.leaderboard-table td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.leaderboard-table tr:last-child td { border-bottom: none; }
.lb-rank { font-weight: 700; font-size: 15px; color: var(--blue); }
.lb-rank.gold { color: #b45309; }
.lb-avt {
  width: 32px; height: 32px; border-radius: 50%; background: var(--navy);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.lb-progress-bg { width: 100px; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; display: inline-block; }
.lb-progress-fill { height: 100%; border-radius: 3px; background: var(--blue); }

/* Join form */
.join-form {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; max-width: 560px;
}
.join-form-title { font-weight: 700; font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.join-form-sub { color: var(--text-2); font-size: 13px; margin-bottom: 22px; }
.btn-join {
  width: 100%; padding: 13px; background: var(--navy); color: #fff;
  border: none; border-radius: var(--radius); font-size: 14px; font-weight: 700;
  transition: background .15s; margin-top: 8px;
}
.btn-join:hover { background: var(--blue); }
.form-agree { font-size: 11px; color: var(--text-3); margin-top: 10px; line-height: 1.5; }
.form-agree a { color: var(--blue); text-decoration: underline; }

/* Login / onboarding page */
.login-page { max-width: 1080px; margin: 0 auto; padding: 52px 24px; }
.login-header { max-width: 680px; margin-bottom: 30px; }
.login-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 44px); font-weight: 700; color: var(--navy); margin-bottom: 10px;
}
.login-sub { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.login-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
@media(max-width:800px) { .login-grid { grid-template-columns: 1fr; } }
.role-panel, .login-form-panel {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.role-panel-title, .login-form-title { font-weight: 700; font-size: 15px; color: var(--navy); margin-bottom: 14px; }
.role-options { display: flex; flex-direction: column; gap: 10px; }
.role-option {
  width: 100%; text-align: left; display: grid; grid-template-columns: 38px minmax(0,1fr);
  gap: 12px; align-items: center; padding: 13px; border: 1.5px solid var(--border-2);
  background: rgba(255,255,255,.035); color: #f5f0e8; border-radius: 10px; transition: border-color .15s, background .15s;
}
.role-option:hover, .role-option.active {
  border-color: rgba(216,181,111,.62);
  background: rgba(216,181,111,.14);
}
.role-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.92); color: #f5f0e8; font-size: 17px; font-weight: 700;
}
.role-name { font-weight: 700; font-size: 14px; color: #f5f0e8; }
.role-desc { font-size: 12px; color: rgba(246,240,229,.62); line-height: 1.45; margin-top: 2px; }
.login-form { display: none; }
.login-form.active { display: block; }
.login-form-sub { color: var(--text-2); font-size: 13px; margin-bottom: 20px; line-height: 1.6; }
.login-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.login-actions .btn-join { width: auto; min-width: 180px; flex: 1; }
.btn-login-secondary {
  flex: 1; min-width: 180px; padding: 13px; background: rgba(255,255,255,.035); color: rgba(246,240,229,.82);
  border: 1.5px solid rgba(255,255,255,.18); border-radius: var(--radius); font-size: 14px; font-weight: 700;
  transition: background .15s, border-color .15s;
}
.btn-login-secondary:hover { background: rgba(216,181,111,.12); border-color: rgba(216,181,111,.52); color: #f1d38b; }
.login-note { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: rgba(216,181,111,.13); color: #f1d38b; font-size: 12px; line-height: 1.55; }

/* Lawyer lead cards */
.lawyer-lead-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.lawyer-lead-heading { font-size: 14px; font-weight: 700; color: #f5f0e8; }
.lawyer-lead-meta { font-size: 12px; color: rgba(246,240,229,.58); }
.lawyer-lead-intro { font-size: 13px; color: rgba(246,240,229,.62); margin-bottom: 18px; line-height: 1.7; }
.lawyer-lead-card {
  border: 1px solid rgba(216,181,111,.34);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.lawyer-lead-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:10px; }
.lawyer-lead-title { font-size: 15px; font-weight: 700; color: #f5f0e8; margin-top: 8px; }
.lawyer-lead-summary { font-size: 13px; color: rgba(246,240,229,.66); line-height: 1.65; margin-bottom: 14px; }
.lawyer-lead-urgency { font-size: 11px; color: #f8d892; font-weight: 800; flex-shrink: 0; }
.lawyer-lead-urgency.high { color: #f87171; }
.lawyer-lead-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.lawyer-lead-btn {
  padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 800;
  border: 1px solid rgba(216,181,111,.22); background: rgba(255,255,255,.04);
  color: rgba(246,240,229,.82);
}
.lawyer-lead-btn.accept { background: rgba(34,197,94,.14); border-color: rgba(74,222,128,.34); color: #86efac; }
.lawyer-lead-btn.request { background: rgba(216,181,111,.14); border-color: rgba(216,181,111,.36); color: #f1d38b; }
.lawyer-lead-btn:hover { transform: translateY(-1px); }

/* ════════════════════════════════
   ABOUT / PRIVACY / TERMS PAGES
════════════════════════════════ */
.prose-page { max-width: 720px; margin: 0 auto; padding: 56px 24px; }
.prose-page h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3vw, 38px); font-weight: 700; color: var(--navy); margin-bottom: 8px;
}
.prose-page .prose-sub { color: var(--text-2); font-size: 15px; margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.prose-page h2 { font-size: 18px; font-weight: 700; color: var(--navy); margin: 32px 0 10px; }
.prose-page h3 { font-size: 16px; font-weight: 600; color: var(--navy); margin: 24px 0 8px; }
.prose-page p { font-size: 14px; color: var(--text-2); line-height: 1.75; margin-bottom: 12px; }
.prose-page ul { padding-left: 20px; margin-bottom: 16px; }
.prose-page li { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 5px; }
.prose-page strong { color: var(--text); }
.disclaimer-box {
  margin-top: 24px; padding: 16px 20px; background: var(--warn-bg);
  border: 1px solid #fcd34d; border-radius: var(--radius); font-size: 13px;
  color: var(--warn); line-height: 1.6;
}
.prose-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px;
}
.prose-toc a {
  font-size: 12px; padding: 5px 12px; border-radius: 20px;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-2); font-weight: 500; transition: all .15s;
}
.prose-toc a:hover { border-color: var(--blue); color: var(--blue); }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.site-footer {
  background: var(--navy); color: #94a3b8;
  padding: 32px 24px; font-size: 13px;
}
.footer-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
}
.footer-brand-block { min-width: 220px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; }
.footer-brand-icon {
  width: 30px; height: 30px; border-radius: 7px;
  background: rgba(255,255,255,.15); display: flex; align-items: center;
  justify-content: center; font-size: 15px;
}
.footer-tagline { margin-top: 6px; font-size: 12px; color: rgba(246,240,229,.48); }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  transition: color .12s, background .12s, border-color .12s;
}
.footer-link:hover {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
  color: #fff;
}
.footer-copy { width: 100%; text-align: center; font-size: 12px; color: #64748b; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); }

/* ════════════════════════════════
   UTILITIES / COMPONENTS
════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
}
.badge-blue { background: var(--blue-light); color: #1e40af; }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* Emergency panel */
.emergency-panel {
  background: #fff1f2; border: 1.5px solid #fca5a5; border-radius: var(--radius-lg);
  padding: 14px 16px; margin: 12px 20px;
}
.emergency-title { font-weight: 700; font-size: 13px; color: var(--danger); margin-bottom: 10px; }
.helplines-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px;
}
.helpline-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1px solid #fca5a5; border-radius: 8px; padding: 7px 10px;
}
.helpline-name { font-size: 12px; font-weight: 600; color: var(--text); }
.helpline-num { font-size: 14px; font-weight: 700; color: var(--blue); }
.immediate-steps {
  margin-top: 10px; padding: 10px 12px; background: var(--warn-bg);
  border-radius: 8px; font-size: 12px; color: var(--warn); line-height: 1.6;
}

/* Spinner */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Premium dark app-wide surface */
body { background: #070707; color: #f5f0e8; }
#page-home {
  background: #070707;
  color: #f5f0e8;
}
.home-band {
  background: #070707;
  padding: 1px 0;
}
.page:not(#page-home) {
  background:
    radial-gradient(circle at 50% 0%, rgba(205,166,98,.10), transparent 28%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    #070707;
  background-size: auto, 68px 68px, 68px 68px, auto;
  color: #f5f0e8;
}
.section, .docs-page, .simp-page, .prose-page { max-width: 1120px; }
.students-page, .lawyers-page { max-width: 960px; }
.citizens-page { max-width: 1120px; }
.section-label, .docs-page .section-label, .simp-page .section-label, .students-page .section-label, .lawyers-page .section-label, .citizens-page .section-label { color: #d8b56f; }
.section-h2, .docs-h1, .simp-h1, .students-h1, .citizens-h1, .login-h1, .prose-page h1, .prose-page h2, .prose-page h3,
.adv-title, .cap-card-title, .step-title, .docs-form-title, .docs-preview-title, .simp-panel-title,
.students-tab, .lawyer-tab, .join-form-title, .login-form-title, .role-panel-title, .role-name, .chat-bot-name, .chat-welcome-title, .lm-head-title, .lm-card-name,
.citizen-path-title, .citizen-lock-title, .citizen-summary-title, .citizen-session-name, .citizen-submitted-case strong {
  color: #f5f0e8 !important;
}
.section-sub, .docs-sub, .simp-sub, .students-sub, .lawyers-sub, .citizens-sub, .login-sub, .step-desc, .cap-card-desc, .adv-desc,
.prose-page p, .prose-page li, .join-form-sub, .login-form-sub, .role-desc, .activity-text, .perf-label, .lm-card-qual,
.lm-rating, .lm-location, .lm-bio, .form-label, .sidebar-section-title, .sidebar-header-title,
.chat-welcome-sub, .chat-bot-status, .docs-disclaimer, .simp-word-count, .form-agree,
.citizen-path-copy, .citizen-lock-copy, .citizen-summary-meta, .citizen-session-id, .citizen-consent,
.citizen-status-item, .citizen-submitted-case span, .citizen-session-grid span {
  color: rgba(246,240,229,.55) !important;
}
.adv-section, .cta-section, .site-footer { background: #070707; }
.process-step, .cap-card, .adv-item, .docs-form-panel, .docs-preview-panel, .simp-panel, .dash-stat, .join-form, .role-panel, .login-form-panel, .role-option,
.lm-panel, .lm-card, .prose-page, .prose-toc, .disclaimer-box, .chat-sidebar, .chat-main,
.chat-topbar, .chat-input-wrap, .chat-input-row, .chat-welcome, .msg-bubble.bot, .typing-dots,
.quick-action-btn, .doc-tab, .simp-sample, .leaderboard-table, .activity-list,
.citizen-path-item, .citizen-lock-panel, .citizen-login-card, .citizen-submit-card, .citizen-summary-card,
.citizen-submitted-case, .citizen-session-grid div {
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.09);
  color: #f5f0e8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.cap-card:hover, .process-step:hover, .adv-item:hover, .doc-tab:hover, .simp-sample:hover, .lm-card:hover,
.citizen-path-item:hover {
  border-color: rgba(216,181,111,.55);
  box-shadow: 0 18px 40px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.05);
}
.cap-card-link, .students-tab.active, .lawyer-tab.active, .footer-link:hover, .form-agree a, .prose-toc a:hover { color: #d8b56f; }
.adv-num, .step-role, .badge-blue, .lm-tag, .evidence-file, .citizen-path-icon {
  background: rgba(216,181,111,.13);
  color: #d8b56f;
}
.adv-badge, .badge-green, .lm-verified, .lm-booked { background: rgba(34,197,94,.12); color: #79d7a0; }
.stats-bar, .site-footer, .footer-copy, .adv-item, .students-tabs, .activity-item, .leaderboard-table td,
.leaderboard-table th, .docs-preview-area, .simp-output, .simp-textarea, .form-input, .form-textarea,
.form-select, .lm-select, .chat-textarea, .citizen-session-grid div { border-color: rgba(255,255,255,.09); }
.form-input, .form-textarea, .form-select, .lm-select, .docs-preview-area, .simp-textarea, .simp-output, .chat-textarea {
  background: rgba(0,0,0,.28);
  color: #f5f0e8;
}
.form-input::placeholder, .form-textarea::placeholder, .chat-textarea::placeholder {
  color: rgba(246,240,229,.32);
}
.form-input:focus, .form-textarea:focus, .lm-select:focus, .simp-textarea:focus, .chat-input-row:focus-within {
  border-color: rgba(216,181,111,.7);
  box-shadow: 0 0 0 3px rgba(216,181,111,.11);
}
.btn-generate, .simp-btn-go, .btn-join, .input-btn.send, .lm-btn-book, .btn-pdf, .banner-action.info,
.perf-bar-fill, .activity-dot.edited {
  background: linear-gradient(135deg, #e3c17b, #cda662);
  color: #090909;
}
.btn-generate:hover, .simp-btn-go:hover, .btn-join:hover, .input-btn.send:hover, .lm-btn-book:hover, .btn-pdf:hover {
  background: linear-gradient(135deg, #edcf8c, #d8b16d);
}
.btn-copy, .simp-btn-clear, .lm-btn-send, .input-btn.voice, .doc-tab, .simp-sample, .quick-action-btn,
.chat-action-btn, .sidebar-toggle, .lm-close {
  background: rgba(255,255,255,.035);
  color: rgba(246,240,229,.7);
  border-color: rgba(255,255,255,.10);
}
.btn-copy:hover, .simp-btn-clear:hover, .lm-btn-send:hover, .input-btn.voice:hover, .doc-tab:hover,
.simp-sample:hover, .quick-action-btn:hover, .chat-action-btn:hover, .topic-pill:hover, .lm-close:hover {
  background: rgba(255,255,255,.07);
  color: #f5f0e8;
}
.doc-tab.active, .students-tab.active, .lawyer-tab.active {
  border-color: #d8b56f;
  background: rgba(216,181,111,.14);
  color: #d8b56f !important;
}
.chat-sidebar { background: rgba(255,255,255,.025); border-right-color: rgba(255,255,255,.08); }
.topic-pill { color: rgba(246,240,229,.52); }
.lang-note { background: rgba(216,181,111,.12); color: #d8b56f; }
.chat-main, .chat-input-wrap { background: rgba(7,7,7,.96); }
.chat-topbar { border-bottom-color: rgba(255,255,255,.08); }
.chat-bot-avatar, .chat-welcome-icon, .msg-avatar.bot, .lm-avatar, .footer-brand-icon, .citizen-lock-icon, .citizen-session-avatar {
  background: linear-gradient(135deg, #e7c276, #b9934f);
  color: #111;
}
.msg-bubble.bot strong, .prose-page strong { color: #f5f0e8; }
.msg-bubble.user, .msg-avatar.user { background: #d8b56f; color: #090909; }
.lawyer-connect-btn { border-color: #d8b56f; color: #d8b56f; }
.lawyer-connect-btn:hover { background: #d8b56f; color: #090909; }
.chat-banner.info { background: rgba(216,181,111,.12); border-color: rgba(216,181,111,.35); color: #d8b56f; }
.chat-banner.warn, .docs-disclaimer, .disclaimer-box {
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.25);
  color: #f5c16c;
}
.lm-overlay { background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.lm-head, .lm-filters, .lm-foot { border-color: rgba(255,255,255,.09); }
.lm-fee, .lm-stars { color: #d8b56f; }
.students-tab, .lawyer-tab { color: rgba(246,240,229,.52); }
.dashboard-stats, .activity-list, .perf-bars, .leaderboard-table, .join-form { color: #f5f0e8; }
.dash-stat { border-color: rgba(255,255,255,.09); }
.dash-stat-num, .perf-pct, .leaderboard-table td, .leaderboard-table th, .citizen-session-grid strong { color: #f5f0e8; }
.perf-bar-bg, .lb-progress-bg { background: rgba(255,255,255,.08); }
.lb-progress-fill { background: #d8b56f; }
.prose-page {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  margin-top: 48px;
  margin-bottom: 48px;
}
.prose-page .prose-sub { color: rgba(246,240,229,.55); border-bottom-color: rgba(255,255,255,.09); }
.prose-toc a {
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.10);
  color: rgba(246,240,229,.7);
}
.site-footer { border-top-color: rgba(255,255,255,.08); }
.footer-link {
  background: transparent !important;
  color: rgba(246,240,229,.58);
  border-color: transparent;
}
.footer-link:hover {
  background: rgba(255,255,255,.055) !important;
  color: #d8b56f;
  border-color: rgba(216,181,111,.18);
}
.footer-copy, .site-footer { color: rgba(246,240,229,.48); }
.emergency-panel {
  z-index: 900 !important;
  background: #170707 !important;
  border-color: rgba(248,113,113,.35) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,.42);
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}
.emergency-title { color: #f87171; }
.helplines-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.helpline-item {
  min-height: 74px;
  background: rgba(0,0,0,.28);
  border-color: rgba(248,113,113,.25);
}
.helpline-name { color: #f5f0e8; }
.helpline-num { color: #f5c16c; }
.immediate-steps {
  background: #fff2bd;
  color: #8a3b0c;
}

/* Brightness mode keeps the same layout, only swaps surfaces and contrast. */
body.theme-bright {
  background: #f7f4ed;
  color: #17130b;
}
body.theme-bright #topnav {
  background: rgba(255, 252, 245, .94);
  border-bottom-color: rgba(24,18,10,.10);
}
body.theme-bright .nav-logo,
body.theme-bright .nav-link.active,
body.theme-bright .nav-link:hover {
  color: #17130b;
}
body.theme-bright .nav-link { color: rgba(23,19,11,.58); }
body.theme-bright .nav-link.active,
body.theme-bright .nav-link:hover,
body.theme-bright .btn-nav-ghost,
body.theme-bright .lang-input {
  background: rgba(255,255,255,.74);
  border-color: rgba(23,19,11,.12) !important;
  color: #17130b !important;
}
body.theme-bright #page-home,
body.theme-bright .home-band,
body.theme-bright .adv-section,
body.theme-bright .cta-section,
body.theme-bright .site-footer,
body.theme-bright .page:not(#page-home) {
  background:
    linear-gradient(rgba(23,19,11,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,19,11,.045) 1px, transparent 1px),
    #f7f4ed;
  background-size: 68px 68px, 68px 68px, auto;
  color: #17130b;
}
body.theme-bright .home-hero {
  background:
    radial-gradient(circle at 50% 38%, rgba(205,166,98,.22), transparent 34%),
    linear-gradient(rgba(23,19,11,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,19,11,.045) 1px, transparent 1px),
    #f7f4ed;
}
body.theme-bright .home-hero::before {
  background:
    linear-gradient(90deg, #f7f4ed 0%, rgba(247,244,237,.55) 45%, #f7f4ed 100%),
    linear-gradient(180deg, transparent 0%, rgba(247,244,237,.58) 72%, #f7f4ed 100%);
}
body.theme-bright .home-h1,
body.theme-bright .cta-h2,
body.theme-bright .section-h2,
body.theme-bright .docs-h1,
body.theme-bright .simp-h1,
body.theme-bright .students-h1,
body.theme-bright .citizens-h1,
body.theme-bright .login-h1,
body.theme-bright .prose-page h1,
body.theme-bright .prose-page h2,
body.theme-bright .prose-page h3,
body.theme-bright .adv-title,
body.theme-bright .cap-card-title,
body.theme-bright .step-title,
body.theme-bright .docs-form-title,
body.theme-bright .docs-preview-title,
body.theme-bright .simp-panel-title,
body.theme-bright .students-tab,
body.theme-bright .lawyer-tab,
body.theme-bright .join-form-title,
body.theme-bright .chat-bot-name,
body.theme-bright .chat-welcome-title,
body.theme-bright .lm-head-title,
body.theme-bright .lm-card-name,
body.theme-bright .citizen-path-title,
body.theme-bright .citizen-lock-title,
body.theme-bright .citizen-summary-title,
body.theme-bright .citizen-session-name,
body.theme-bright .citizen-submitted-case strong {
  color: #17130b !important;
}
body.theme-bright .home-sub,
body.theme-bright .cta-sub,
body.theme-bright .section-sub,
body.theme-bright .docs-sub,
body.theme-bright .simp-sub,
body.theme-bright .students-sub,
body.theme-bright .lawyers-sub,
body.theme-bright .citizens-sub,
body.theme-bright .login-sub,
body.theme-bright .step-desc,
body.theme-bright .cap-card-desc,
body.theme-bright .adv-desc,
body.theme-bright .prose-page p,
body.theme-bright .prose-page li,
body.theme-bright .join-form-sub,
body.theme-bright .activity-text,
body.theme-bright .perf-label,
body.theme-bright .lm-card-qual,
body.theme-bright .lm-rating,
body.theme-bright .lm-location,
body.theme-bright .lm-bio,
body.theme-bright .form-label,
body.theme-bright .sidebar-section-title,
body.theme-bright .sidebar-header-title,
body.theme-bright .chat-welcome-sub,
body.theme-bright .chat-bot-status,
body.theme-bright .docs-disclaimer,
body.theme-bright .simp-word-count,
body.theme-bright .form-agree,
body.theme-bright .citizen-path-copy,
body.theme-bright .citizen-lock-copy,
body.theme-bright .citizen-summary-meta,
body.theme-bright .citizen-session-id,
body.theme-bright .citizen-consent,
body.theme-bright .citizen-status-item,
body.theme-bright .citizen-submitted-case span {
  color: rgba(23,19,11,.62) !important;
}
body.theme-bright .lawyer-lead-heading,
body.theme-bright .lawyer-lead-title {
  color: #17130b;
}
body.theme-bright .lawyer-lead-meta,
body.theme-bright .lawyer-lead-intro,
body.theme-bright .lawyer-lead-summary {
  color: rgba(23,19,11,.64);
}
body.theme-bright .lawyer-lead-card {
  background: rgba(255,255,255,.74);
  border-color: rgba(205,166,98,.34);
  box-shadow: 0 12px 32px rgba(92,65,22,.06);
}
body.theme-bright .lawyer-lead-btn {
  background: #fffdfa;
  color: rgba(23,19,11,.72);
  border-color: rgba(23,19,11,.12);
}
body.theme-bright .lawyer-lead-btn.accept {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
body.theme-bright .lawyer-lead-btn.request {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
body.theme-bright .role-option {
  background: #fffdfa;
  border-color: rgba(23,19,11,.12);
}
body.theme-bright .role-option:hover,
body.theme-bright .role-option.active {
  background: #fff3cd;
  border-color: rgba(205,166,98,.64);
}
body.theme-bright .role-icon {
  background: #0f172a;
  color: #fff;
}
body.theme-bright .role-name {
  color: #17130b !important;
}
body.theme-bright .role-desc {
  color: rgba(23,19,11,.62) !important;
}
body.theme-bright .btn-login-secondary {
  background: #fffdfa;
  color: rgba(23,19,11,.72);
  border-color: rgba(23,19,11,.16);
}
body.theme-bright .btn-login-secondary:hover {
  background: #fff3cd;
  color: #8a5a12;
  border-color: rgba(205,166,98,.64);
}
body.theme-bright .login-note {
  background: #fef3c7;
  color: #92400e;
}
body.theme-bright .docs-preview-empty {
  color: rgba(23,19,11,.62);
}
body.theme-bright .docs-preview-empty strong {
  color: #8a5a12;
}
body.theme-bright .process-step,
body.theme-bright .cap-card,
body.theme-bright .adv-item,
body.theme-bright .docs-form-panel,
body.theme-bright .docs-preview-panel,
body.theme-bright .simp-panel,
body.theme-bright .dash-stat,
body.theme-bright .join-form,
body.theme-bright .lm-panel,
body.theme-bright .lm-card,
body.theme-bright .prose-page,
body.theme-bright .prose-toc,
body.theme-bright .disclaimer-box,
body.theme-bright .chat-sidebar,
body.theme-bright .chat-main,
body.theme-bright .chat-topbar,
body.theme-bright .chat-input-wrap,
body.theme-bright .chat-input-row,
body.theme-bright .chat-welcome,
body.theme-bright .msg-bubble.bot,
body.theme-bright .typing-dots,
body.theme-bright .quick-action-btn,
body.theme-bright .doc-tab,
body.theme-bright .simp-sample,
body.theme-bright .leaderboard-table,
body.theme-bright .activity-list,
body.theme-bright .citizen-path-item,
body.theme-bright .citizen-lock-panel,
body.theme-bright .citizen-login-card,
body.theme-bright .citizen-submit-card,
body.theme-bright .citizen-summary-card,
body.theme-bright .citizen-submitted-case,
body.theme-bright .citizen-session-grid div {
  background: rgba(255,255,255,.72);
  border-color: rgba(23,19,11,.10);
  color: #17130b;
  box-shadow: 0 12px 32px rgba(92,65,22,.06);
}
body.theme-bright .form-input,
body.theme-bright .form-textarea,
body.theme-bright .form-select,
body.theme-bright .lm-select,
body.theme-bright .docs-preview-area,
body.theme-bright .simp-textarea,
body.theme-bright .simp-output,
body.theme-bright .chat-textarea {
  background: #fffdfa;
  border-color: rgba(23,19,11,.12);
  color: #17130b;
}
body.theme-bright .form-select option,
body.theme-bright .lm-select option,
body.theme-bright .lang-input option {
  background: #fffdfa;
  color: #17130b;
}
body.theme-bright .form-select option:checked,
body.theme-bright .lm-select option:checked,
body.theme-bright .lang-input option:checked {
  background: #e3c17b;
  color: #17130b;
}
body.theme-bright .form-input::placeholder,
body.theme-bright .form-textarea::placeholder,
body.theme-bright .chat-textarea::placeholder {
  color: rgba(23,19,11,.38);
}
body.theme-bright .simp-textarea::placeholder {
  color: rgba(23,19,11,.48);
}
body.theme-bright .chat-main,
body.theme-bright .chat-input-wrap {
  background: rgba(247,244,237,.96);
}
body.theme-bright .msg-bubble.user,
body.theme-bright .msg-avatar.user {
  background: #cda662;
  color: #17130b;
}
body.theme-bright .footer-link,
body.theme-bright .footer-copy,
body.theme-bright .site-footer {
  color: rgba(23,19,11,.58);
}
body.theme-bright .btn-hero-ghost {
  background: rgba(255,255,255,.58);
  border-color: rgba(23,19,11,.12);
  color: rgba(23,19,11,.72);
}
body.theme-bright .btn-hero-ghost:hover {
  background: rgba(255,255,255,.86);
  border-color: rgba(205,166,98,.45);
  color: #17130b;
}
body.theme-bright .home-trust,
body.theme-bright .home-trust span::before {
  color: rgba(23,19,11,.42);
}
body.theme-bright .footer-brand {
  color: #17130b;
}
body.theme-bright .site-footer {
  border-top-color: rgba(23,19,11,.10);
}
body.theme-bright .footer-copy {
  border-top-color: rgba(23,19,11,.10);
}
body.theme-bright .emergency-panel {
  background: #fff8f0 !important;
}

@media(max-width:1320px) {
  #topnav {
    padding: 0 12px;
    gap: 6px;
  }
  .nav-logo {
    gap: 0;
    margin-right: 0;
    font-size: 0;
  }
  .nav-link {
    padding: 0 7px;
    font-size: 12px;
  }
  .nav-right {
    gap: 6px;
    margin-left: 6px;
  }
  .lang-input {
    height: 46px;
    width: 136px;
    padding: 0 28px 0 12px;
    font-size: 14px;
  }
  .nav-icon-btn,
  .nav-ask,
  .nav-start {
    display: none;
  }
}

@media(max-width:1180px) {
  .nav-logo {
    display: none;
  }
  .nav-link {
    padding: 0 8px;
  }
}

@media(max-width:1120px) {
  :root { --nav-height: 72px; }
  #topnav {
    height: 72px;
    padding: 0 8px;
    gap: 6px;
  }
  .emergency-panel { top: 72px !important; }
  .nav-link {
    height: 46px;
    padding: 0 5px;
    font-size: 12px;
  }
  .nav-right {
    margin-left: 4px;
  }
  .lang-input {
    height: 44px;
    width: 126px;
    min-width: 0;
    padding: 0 30px 0 12px;
  }
  .btn-nav-ghost {
    height: 44px;
    min-width: 44px;
  }
  .nav-icon-btn { width: 44px; }
  .btn-nav-solid {
    height: 48px;
    padding: 0 12px;
    font-size: 13px;
  }
  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .citizen-hero-grid {
    grid-template-columns: 1fr;
  }
  .citizen-login-card {
    position: static;
  }
}

@media(max-width:980px) {
  .nav-icon-btn {
    display: none;
  }
}

/* Mobile nav */
@media(max-width:680px) {
  :root { --nav-height: 118px; }
  #topnav {
    height: auto;
    min-height: 64px;
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .nav-logo {
    display: flex;
    gap: 12px;
    margin-right: auto;
    font-size: 19px;
  }
  .nav-right {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .lang-selector { flex: 1 1 100%; }
  .lang-input { width: 100%; min-width: 0; }
  .nav-icon-btn { flex: 0 0 44px; }
  .btn-nav-solid { flex: 1 1 130px; }
  .home-hero {
    padding-left: 24px;
    padding-right: 24px;
  }
  .home-h1 {
    font-size: clamp(30px, 10vw, 52px);
  }
  #page-chat { height: 100dvh; }
  .emergency-panel { top: 118px !important; }
  .nav-links { display: none; }
  .chat-sidebar { display: none; }
  .chat-action-btn { font-size: 12px; padding: 7px 9px; }
  .chat-input-wrap { padding: 10px 12px; }
  .chat-textarea { max-height: 110px; }
  .stats-bar { grid-template-columns: repeat(2,1fr); }
  .process-steps { grid-template-columns: 1fr; }
  .citizen-path,
  .citizen-case-workspace,
  .citizen-form-grid {
    grid-template-columns: 1fr;
  }
  .citizen-lock-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .process-step {
    aspect-ratio: auto;
    min-height: 210px;
  }
  .adv-item {
    aspect-ratio: auto;
    min-height: 230px;
  }
  .cap-grid { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: repeat(2,1fr); }
  .activity-list { max-width: none; }
  .activity-item {
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: start;
  }
  .activity-time {
    grid-column: 2;
    margin-top: 2px;
  }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-links { justify-content: center; }
}
